Add Coolify management links to service cards and overview chips
Each discovered service now shows a settings gear icon linking to its Coolify management page alongside the existing web URL link. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useCallback } from 'react';
|
||||
import { Service, DiscoveredService } from '@/lib/services';
|
||||
import { Service, DiscoveredService, getCoolifyUrl } from '@/lib/services';
|
||||
import { HealthStatus } from '@/lib/PortalContext';
|
||||
import { Icon } from './Icons';
|
||||
|
||||
@@ -101,13 +101,24 @@ export function ServiceCard({ service, status }: ServiceCardProps) {
|
||||
|
||||
return (
|
||||
<div className={`group relative p-4 bg-white dark:bg-stone-900 rounded-xl border border-slate-100 dark:border-stone-700/50 border-l-[3px] ${borderColors[status]} shadow-sm hover:shadow-md transition-all duration-200 ${isStopped ? 'opacity-75 hover:opacity-100' : ''}`}>
|
||||
{/* Top row: badges */}
|
||||
{/* Top row: badges + links */}
|
||||
<div className="absolute top-3 right-3 flex items-center gap-1.5">
|
||||
{resourceBadge && (
|
||||
<span className="text-[10px] font-medium px-1.5 py-0.5 rounded bg-slate-100 dark:bg-stone-800 text-slate-500 dark:text-stone-400">
|
||||
{resourceBadge}
|
||||
</span>
|
||||
)}
|
||||
{discovered && (
|
||||
<a
|
||||
href={getCoolifyUrl(service as DiscoveredService)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
title="Manage in Coolify"
|
||||
className="p-1 rounded-md text-slate-300 dark:text-stone-600 hover:text-blue-500 dark:hover:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 transition-colors"
|
||||
>
|
||||
<Icon name="settings" size={14} />
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Clickable area for opening service URL */}
|
||||
|
||||
Reference in New Issue
Block a user