Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(resources): remove empty-domain placeholder from grid

Andras Bacsai2bce16e4d4fa
diff --git a/resources/views/livewire/project/resource/index.blade.php b/resources/views/livewire/project/resource/index.blade.php
index 772a01fdc3..09be827990 100644
--- a/resources/views/livewire/project/resource/index.blade.php
+++ b/resources/views/livewire/project/resource/index.blade.php
@@ -314,8 +314,6 @@
class="relative z-10 max-w-full self-start truncate text-[11px] text-neutral-500 hover:underline dark:text-fg-dim"
:title="displayDomain(item.fqdn)" x-text="displayDomain(item.fqdn)"></a>
</template>
- <span x-show="!item.fqdn"
- class="text-[11px] text-neutral-400 dark:text-fg-faint">-</span>
</div>
</article>
</template>
diff --git a/tests/Feature/ResourceIndexDescriptionSubtitleTest.php b/tests/Feature/ResourceIndexDescriptionSubtitleTest.php
index ab570b7f34..eec80be0a2 100644
--- a/tests/Feature/ResourceIndexDescriptionSubtitleTest.php
+++ b/tests/Feature/ResourceIndexDescriptionSubtitleTest.php
@@ -9,3 +9,12 @@ test('resource table subtitle shows description only and never falls back to uui
->not->toContain('item.description || item.fqdn || item.uuid')
->not->toContain('item.fqdn || item.uuid');
});
+
+test('resource grid does not show a placeholder when a domain is missing', function () {
+ $view = file_get_contents(resource_path('views/livewire/project/resource/index.blade.php'));
+ $gridView = explode('x-show="viewMode === \'grid\'"', $view, 2)[1];
+
+ expect($gridView)
+ ->not->toContain('x-show="!item.fqdn"')
+ ->not->toContain('>-</span>');
+});