feat(services): add architecture warning
This commit is contained in:
parent
25ccde83fa
commit
dfd0edff64
4 changed files with 70 additions and 1 deletions
|
|
@ -88,6 +88,14 @@ private function processFile(string $file): false|array
|
||||||
$payload['envs'] = base64_encode($envFileContent);
|
$payload['envs'] = base64_encode($envFileContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (str($data->get('amd_only'))->toBoolean()) {
|
||||||
|
$payload['amd_only'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str($data->get('arm_only'))->toBoolean()) {
|
||||||
|
$payload['arm_only'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $payload;
|
return $payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,6 +168,14 @@ private function processFileWithFqdn(string $file): false|array
|
||||||
$payload['envs'] = base64_encode($modifiedEnvContent);
|
$payload['envs'] = base64_encode($modifiedEnvContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (str($data->get('amd_only'))->toBoolean()) {
|
||||||
|
$payload['amd_only'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str($data->get('arm_only'))->toBoolean()) {
|
||||||
|
$payload['arm_only'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $payload;
|
return $payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -229,6 +245,14 @@ private function processFileWithFqdnRaw(string $file): false|array
|
||||||
$payload['envs'] = $modifiedEnvContent;
|
$payload['envs'] = $modifiedEnvContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (str($data->get('amd_only'))->toBoolean()) {
|
||||||
|
$payload['amd_only'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str($data->get('arm_only'))->toBoolean()) {
|
||||||
|
$payload['arm_only'] = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $payload;
|
return $payload;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1495,7 +1495,10 @@ public function getServicesProperty()
|
||||||
'type' => 'one-click-service-'.$serviceKey,
|
'type' => 'one-click-service-'.$serviceKey,
|
||||||
'category' => 'Services',
|
'category' => 'Services',
|
||||||
'resourceType' => 'service',
|
'resourceType' => 'service',
|
||||||
]);
|
] + array_filter([
|
||||||
|
'amd_only' => data_get($service, 'amd_only') ? true : null,
|
||||||
|
'arm_only' => data_get($service, 'arm_only') ? true : null,
|
||||||
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$cachedServices = $items->toArray();
|
$cachedServices = $items->toArray();
|
||||||
|
|
|
||||||
|
|
@ -822,6 +822,20 @@ class="h-5 w-5 text-warning-600 dark:text-warning-400"
|
||||||
<div class="font-medium text-neutral-900 dark:text-white truncate"
|
<div class="font-medium text-neutral-900 dark:text-white truncate"
|
||||||
x-text="item.name">
|
x-text="item.name">
|
||||||
</div>
|
</div>
|
||||||
|
<template x-if="item.amd_only">
|
||||||
|
<span
|
||||||
|
class="px-2 py-0.5 text-xs rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 shrink-0"
|
||||||
|
title="This service only supports AMD64/x86_64 architecture">
|
||||||
|
AMD only
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template x-if="item.arm_only">
|
||||||
|
<span
|
||||||
|
class="px-2 py-0.5 text-xs rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 shrink-0"
|
||||||
|
title="This service only supports ARM64/aarch64 architecture">
|
||||||
|
ARM only
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<span
|
<span
|
||||||
class="text-xs text-neutral-500 dark:text-neutral-400 shrink-0"
|
class="text-xs text-neutral-500 dark:text-neutral-400 shrink-0"
|
||||||
x-text="item.quickcommand"
|
x-text="item.quickcommand"
|
||||||
|
|
|
||||||
|
|
@ -173,6 +173,34 @@ class="w-full h-full p-2 transition-all duration-200 dark:bg-white/10 bg-black/1
|
||||||
</template>
|
</template>
|
||||||
</x-slot:logo>
|
</x-slot:logo>
|
||||||
</x-resource-view>
|
</x-resource-view>
|
||||||
|
<template x-if="service.amd_only">
|
||||||
|
<div class="absolute top-2 right-10 group">
|
||||||
|
<span
|
||||||
|
class="px-2 py-0.5 text-xs rounded bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 cursor-pointer">
|
||||||
|
AMD only
|
||||||
|
</span>
|
||||||
|
<div class="info-helper-popup right-0 w-sm">
|
||||||
|
<div class="p-4">
|
||||||
|
This service only supports AMD64/x86_64 architecture. It will not work
|
||||||
|
on ARM-based servers (e.g., Apple Silicon, Raspberry Pi, AWS Graviton).
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template x-if="service.arm_only">
|
||||||
|
<div class="absolute top-2 right-10 group">
|
||||||
|
<span
|
||||||
|
class="px-2 py-0.5 text-xs rounded-full bg-amber-100 text-amber-800 dark:bg-amber-900/50 dark:text-amber-200 cursor-pointer">
|
||||||
|
ARM only
|
||||||
|
</span>
|
||||||
|
<div class="info-helper-popup right-0 w-sm">
|
||||||
|
<div class="p-4">
|
||||||
|
This service only supports ARM64/aarch64 architecture. It will not work
|
||||||
|
on AMD64/x86_64-based servers.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template x-if="shouldShowDocIcon(service)">
|
<template x-if="shouldShowDocIcon(service)">
|
||||||
<a :href="getDocLink(service) || coolifyDocsUrl(service.name)" target="_blank"
|
<a :href="getDocLink(service) || coolifyDocsUrl(service.name)" target="_blank"
|
||||||
@click.stop @mouseenter="resolveDocLink(service)"
|
@click.stop @mouseenter="resolveDocLink(service)"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue