hmm
This commit is contained in:
parent
194675c838
commit
5255311a2e
1 changed files with 9 additions and 7 deletions
|
|
@ -8,6 +8,7 @@
|
|||
use Illuminate\Support\Facades\Cache;
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
use Illuminate\Support\Str;
|
||||
use Spatie\Url\Url;
|
||||
|
||||
class Service extends BaseModel
|
||||
{
|
||||
|
|
@ -259,7 +260,7 @@ public function parse(bool $isNew = false): Collection
|
|||
$networks = $serviceNetworks->toArray();
|
||||
foreach ($definedNetwork as $key => $network) {
|
||||
$networks = array_merge($networks, [
|
||||
$network
|
||||
$network => null
|
||||
]);
|
||||
}
|
||||
data_set($service, 'networks', $networks);
|
||||
|
|
@ -288,10 +289,7 @@ public function parse(bool $isNew = false): Collection
|
|||
$isDirectory = (bool) data_get($volume, 'isDirectory', false);
|
||||
$foundConfig = $savedService->fileStorages()->whereMountPath($target)->first();
|
||||
if ($foundConfig) {
|
||||
$contentNotNull = data_get($foundConfig, 'content');
|
||||
if ($contentNotNull) {
|
||||
$content = $contentNotNull;
|
||||
}
|
||||
$content = data_get($foundConfig, 'content');
|
||||
$isDirectory = (bool) data_get($foundConfig, 'is_directory');
|
||||
}
|
||||
}
|
||||
|
|
@ -319,7 +317,11 @@ public function parse(bool $isNew = false): Collection
|
|||
);
|
||||
} else if ($type->value() === 'volume') {
|
||||
$slug = Str::slug($source, '-');
|
||||
$name = "{$savedService->service->uuid}_{$slug}";
|
||||
if ($isNew) {
|
||||
$name = "{$savedService->service->uuid}-{$slug}";
|
||||
} else {
|
||||
$name = "{$savedService->service->uuid}_{$slug}";
|
||||
}
|
||||
if (is_string($volume)) {
|
||||
$source = Str::of($volume)->before(':');
|
||||
$target = Str::of($volume)->after(':')->beforeLast(':');
|
||||
|
|
@ -343,7 +345,7 @@ public function parse(bool $isNew = false): Collection
|
|||
]
|
||||
);
|
||||
}
|
||||
$savedService->getFilesFromServer(isInit: true);
|
||||
$savedService->getFilesFromServer();
|
||||
return $volume;
|
||||
});
|
||||
data_set($service, 'volumes', $serviceVolumes->toArray());
|
||||
|
|
|
|||
Loading…
Reference in a new issue