mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(ui): show Nixpacks deprecation notice in application heading
This commit is contained in:
@@ -193,9 +193,6 @@
|
||||
]" x-bind:disabled="!canUpdate" />
|
||||
@endif
|
||||
</div>
|
||||
@if ($buildPack === 'nixpacks')
|
||||
<x-nixpacks-deprecated-callout class="mt-4" />
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@if ($application->could_set_build_commands() || ($isStatic && $buildPack !== 'static'))
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
<nav wire:poll.10000ms="checkStatus" class="w-full max-w-none pb-4 md:pb-6 lg:pb-0">
|
||||
<div>
|
||||
@if ($application->build_pack === 'nixpacks')
|
||||
<x-callout type="warning" title="Nixpacks is deprecated" class="mb-4">
|
||||
{{ config('deprecations.nixpacks') }}
|
||||
<a class="underline" href="{{ route('project.application.configuration', $parameters) }}" {{ wireNavigate() }}>
|
||||
Switch to Railpack in General settings.
|
||||
</a>
|
||||
</x-callout>
|
||||
@endif
|
||||
|
||||
<div class="mb-3 w-full xl:hidden">
|
||||
<div class="flex min-w-0 flex-col items-start gap-2">
|
||||
<h1 class="min-w-0 max-w-full truncate text-[24px]! leading-7! font-semibold! tracking-tight! text-black dark:text-fg">
|
||||
@@ -113,15 +122,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($application->build_pack === 'nixpacks' && $activeRouteName !== 'project.application.configuration')
|
||||
<x-callout type="warning" title="Nixpacks is deprecated" class="mb-4">
|
||||
{{ config('deprecations.nixpacks') }}
|
||||
<a class="underline" href="{{ route('project.application.configuration', $parameters) }}" {{ wireNavigate() }}>
|
||||
Switch to Railpack in General settings.
|
||||
</a>
|
||||
</x-callout>
|
||||
@endif
|
||||
|
||||
{{-- Desktop actions live in the fixed top bar so they cannot overlap page content. --}}
|
||||
@teleport('#resource-action-hud-slot')
|
||||
<div class="hidden w-full items-center xl:flex xl:w-auto">
|
||||
|
||||
@@ -48,30 +48,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
|
||||
?? StandaloneDocker::factory()->create(['server_id' => $this->server->id, 'network' => 'coolify-test']);
|
||||
});
|
||||
|
||||
test('the application page shows the nixpacks deprecation notice only for nixpacks', function (string $buildPack, bool $showsNotice) {
|
||||
$application = Application::factory()->create([
|
||||
'environment_id' => $this->environment->id,
|
||||
'destination_id' => $this->destination->id,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'build_pack' => $buildPack,
|
||||
'static_image' => 'nginx:alpine',
|
||||
'base_directory' => '/',
|
||||
'ports_exposes' => '3000',
|
||||
'is_http_basic_auth_enabled' => false,
|
||||
'redirect' => 'no',
|
||||
]);
|
||||
|
||||
$component = Livewire::test(General::class, ['application' => $application])->assertSuccessful();
|
||||
|
||||
$showsNotice
|
||||
? $component->assertSee(config('deprecations.nixpacks'))
|
||||
: $component->assertDontSee(config('deprecations.nixpacks'));
|
||||
})->with([
|
||||
'nixpacks' => ['nixpacks', true],
|
||||
'railpack' => ['railpack', false],
|
||||
]);
|
||||
|
||||
test('switching the build pack to railpack hides the nixpacks deprecation notice', function () {
|
||||
test('the general page does not repeat the nixpacks deprecation notice from the heading', function () {
|
||||
$application = Application::factory()->create([
|
||||
'environment_id' => $this->environment->id,
|
||||
'destination_id' => $this->destination->id,
|
||||
@@ -85,11 +62,26 @@ test('switching the build pack to railpack hides the nixpacks deprecation notice
|
||||
]);
|
||||
|
||||
Livewire::test(General::class, ['application' => $application])
|
||||
->assertSee(config('deprecations.nixpacks'))
|
||||
->set('buildPack', 'railpack')
|
||||
->assertSuccessful()
|
||||
->assertDontSee(config('deprecations.nixpacks'));
|
||||
});
|
||||
|
||||
test('switching the build pack to railpack hides the nixpacks deprecation notice in the heading', function () {
|
||||
$application = Application::factory()->create([
|
||||
'environment_id' => $this->environment->id,
|
||||
'destination_id' => $this->destination->id,
|
||||
'destination_type' => StandaloneDocker::class,
|
||||
'build_pack' => 'nixpacks',
|
||||
]);
|
||||
|
||||
$component = Livewire::test(Heading::class, ['application' => $application])
|
||||
->assertSee(config('deprecations.nixpacks'));
|
||||
|
||||
$application->update(['build_pack' => 'railpack']);
|
||||
|
||||
$component->call('$refresh')->assertDontSee(config('deprecations.nixpacks'));
|
||||
});
|
||||
|
||||
test('the application heading shows the nixpacks deprecation notice only for nixpacks', function (string $buildPack, bool $showsNotice) {
|
||||
$application = Application::factory()->create([
|
||||
'environment_id' => $this->environment->id,
|
||||
|
||||
Reference in New Issue
Block a user