Merge pull request #257 from jhd3197/dev

Release: unified detail pages, editable overviews, leaner list chrome
This commit is contained in:
Juan Denis authored and GitHub committed 2026-11-14 15:26:12 -05:00
commit c9aa8bcbf0
81 files changed
+3494 -2701

No files matched your search

+1 -1
View File
@@ -1 +1 @@
1.11.40
1.11.41
+26 -4
View File
@@ -15,12 +15,13 @@ would be a broken dashboard the user cannot fix without an API call.
"""
import logging
from flask import Blueprint, jsonify
from flask import Blueprint, jsonify, request
from flask_jwt_extended import jwt_required, get_jwt_identity
from app.services import dashboard_service
from app.services.dashboard_service import GRID_COLS, MAX_WIDGETS_PER_BOARD
from app.services.dashboard_service import ENTITY_SCOPES, GRID_COLS, MAX_WIDGETS_PER_BOARD
from app.api._request import json_object
from app.exceptions import ValidationError
logger = logging.getLogger(__name__)
@@ -126,8 +127,17 @@ def _validate_icon(value):
@dashboards_bp.route('/', methods=['GET'])
@jwt_required()
def list_boards():
"""This user's boards, seeding the shipped defaults on the first call."""
"""This user's dashboard tabs, seeding the shipped defaults on the first
call. With ``?scope=entity:<kind>`` it returns instead the overview layout
the user saved for that kind of detail page: a list of one, or empty while
they are still on the shipped layout."""
user_id = get_jwt_identity()
scope = request.args.get('scope')
if scope is not None:
if scope not in ENTITY_SCOPES:
raise ValidationError('Unknown board scope')
board = dashboard_service.get_entity_board(user_id, scope)
return jsonify({'boards': [board.to_dict()] if board else []})
boards = dashboard_service.get_boards_for_user(user_id)
return jsonify({'boards': [b.to_dict() for b in boards]})
@@ -137,10 +147,18 @@ def list_boards():
@jwt_required()
def create_board():
"""Add a board for this user. ``widgets`` is optional — a new tab usually
starts empty and gets filled from the widget library."""
starts empty and gets filled from the widget library.
With ``scope: 'entity:<kind>'`` the board is the user's overview layout for
that kind of detail page rather than a dashboard tab. A user has one per
kind, so posting again replaces it (200 instead of 201)."""
user_id = get_jwt_identity()
body = json_object(optional=True)
scope = body.get('scope')
if scope is not None and scope not in ENTITY_SCOPES:
raise ValidationError('Unknown board scope')
name, err = _validate_name(body.get('name'))
if err:
return jsonify({'error': err}), 400
@@ -157,6 +175,10 @@ def create_board():
if err:
return jsonify({'error': err}), 400
if scope is not None:
board, created = dashboard_service.save_entity_board(user_id, scope, name, widgets)
return jsonify(board.to_dict()), 201 if created else 200
board = dashboard_service.create_board(user_id, name, icon=icon, widgets=widgets)
return jsonify(board.to_dict()), 201
+12
View File
@@ -15,6 +15,7 @@ from sqlalchemy.orm import joinedload
from app import db, limiter
from app.services import permission_levels
from app.services.server_metrics_service import latest_metrics_by_server
from app.services.server_workload_service import workload_counts_by_server
from app.api._query import apply_query, QueryParseError
from app.api._request import json_object
from app.models.server import Server, ServerGroup, ServerMetrics, ServerCommand, AgentSession
@@ -357,6 +358,13 @@ def list_servers():
(server.id for server in servers), order_by='id',
)
# What each server carries, when the caller wants it. Two queries for the
# whole list, scoped to the services this caller may see.
count_keys = [key for key in ('services_count', 'domains_count')
if fields is None or key in fields]
workload = (workload_counts_by_server((server.id for server in servers), user, ws_id)
if count_keys else {})
result = []
for server in servers:
server_dict = server.to_dict(fields=fields)
@@ -364,6 +372,10 @@ def list_servers():
metrics = metrics_by_server.get(server.id)
if metrics:
server_dict['metrics'] = metrics.to_dict()
counts = workload.get(server.id)
if counts:
for key in count_keys:
server_dict[key] = counts[key]
result.append(server_dict)
return jsonify(result)
+4 -1
View File
@@ -476,7 +476,10 @@ class Server(TimestampMixin, JsonColumnMixin, db.Model):
# Emitted by to_dict but not mapped columns: each costs a relationship load
# or a JSON walk, so `$select` has to know they exist in order to decline
# them. Kept next to to_dict so the two cannot drift.
DERIVED_FIELDS = ('group_name', 'onboarding_progress', 'latest_metrics')
# `services_count` / `domains_count` are added by the list route (they
# need the caller's access scope), not by to_dict.
DERIVED_FIELDS = ('group_name', 'onboarding_progress', 'latest_metrics',
'services_count', 'domains_count')
def to_dict(self, include_metrics=False, fields=None):
"""Serialize the server.
+48 -11
View File
@@ -49,6 +49,18 @@ GRID_COLS = 12
# JSON per board.
MAX_WIDGETS_PER_BOARD = 100
# A board can also hold the Overview layout a user saved for a page: one kind
# of detail page (every server page shares the user's server layout, the
# page's own server being the board's variable) or a single overview page
# (Monitoring, Backups). It is an ordinary board row whose slug names the
# page, so it reuses the same storage, validation and ownership rules; it is
# just never listed among the dashboard tabs.
ENTITY_SCOPE_PREFIX = 'entity:'
ENTITY_SCOPES = (
'entity:server', 'entity:service',
'entity:monitoring', 'entity:backups',
)
DEFAULT_BOARDS = [
{
@@ -257,14 +269,21 @@ def _repair_board(board):
return True
def _dashboard_tabs(user_id):
"""This user's dashboard tabs: every board except saved overview layouts."""
return (DashboardBoard.query
.filter_by(user_id=user_id)
.filter(db.or_(DashboardBoard.slug.is_(None),
~DashboardBoard.slug.like(f'{ENTITY_SCOPE_PREFIX}%')))
.order_by(DashboardBoard.position, DashboardBoard.id)
.all())
def get_boards_for_user(user_id):
"""Every board owned by this user, seeding the shipped defaults on the
first read for a user who has none, and repairing configs that predate the
current renderer contract."""
boards = (DashboardBoard.query
.filter_by(user_id=user_id)
.order_by(DashboardBoard.position, DashboardBoard.id)
.all())
"""Every dashboard tab owned by this user, seeding the shipped defaults on
the first read for a user who has none, and repairing configs that predate
the current renderer contract."""
boards = _dashboard_tabs(user_id)
if boards:
# Not `any(...)`: it short-circuits, so only the first repairable board
# would ever be fixed.
@@ -272,10 +291,28 @@ def get_boards_for_user(user_id):
db.session.commit()
return boards
seed_defaults(user_id)
return (DashboardBoard.query
.filter_by(user_id=user_id)
.order_by(DashboardBoard.position, DashboardBoard.id)
.all())
return _dashboard_tabs(user_id)
def get_entity_board(user_id, scope):
"""The overview layout this user saved for one kind of detail page, or
None when they are still on the shipped layout."""
return DashboardBoard.query.filter_by(user_id=user_id, slug=scope).first()
def save_entity_board(user_id, scope, name, widgets):
"""Store a user's overview layout for one kind of detail page. There is at
most one per user and kind, so a second save replaces the first. Returns
``(board, created)``."""
board = get_entity_board(user_id, scope)
created = board is None
if created:
board = DashboardBoard(user_id=user_id, slug=scope, icon='grid', position=0)
db.session.add(board)
board.name = name
board.widgets = list(widgets or [])
db.session.commit()
return board, created
def get_board_for_user(user_id, board_id):
@@ -0,0 +1,48 @@
"""What each server carries: its services and the domains pointing at them.
The server list shows these as columns, so they are computed for the whole
list at once (two queries, however many servers) rather than per row.
"""
from collections import Counter
from app.models import Application
from app.models.domain import Domain
from app.services.workspace_service import WorkspaceService
def workload_counts_by_server(server_ids, user, workspace_id=None):
"""Return ``{server_id: {'services_count': n, 'domains_count': n}}``.
Only services the caller may see are counted, by the same scoping the
service list applies: a count must not reveal that a server runs something
the caller has no access to. A service with no ``server_id`` runs on the
panel host itself and belongs to no row here.
"""
ids = list(server_ids)
if not ids or user is None:
return {}
services = WorkspaceService.scope_query(
Application.query_active(), Application, user,
workspace_id=workspace_id, owner_attr='user_id',
grant_resource_type='application',
).filter(Application.server_id.in_(ids))
server_of = dict(services.with_entities(Application.id, Application.server_id).all())
service_counts = Counter(server_of.values())
domain_counts = Counter()
if server_of:
domain_rows = (Domain.query_active()
.filter(Domain.application_id.in_(list(server_of)))
.with_entities(Domain.application_id)
.all())
for (application_id,) in domain_rows:
domain_counts[server_of[application_id]] += 1
return {
server_id: {
'services_count': service_counts.get(server_id, 0),
'domains_count': domain_counts.get(server_id, 0),
}
for server_id in ids
}
+78
View File
@@ -464,3 +464,81 @@ def test_repair_leaves_a_current_board_untouched(app, client, auth_headers):
boards = client.get('/api/v1/dashboards', headers=auth_headers).get_json()['boards']
current = next(b for b in boards if b['name'] == 'Current')
assert current['widgets'][0]['cfg'] == cfg
# --- saved overview layouts (entity-scoped boards) ---------------------------
def test_overview_layout_is_stored_but_is_not_a_dashboard_tab(client, auth_headers):
saved = client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Server overview', 'scope': 'entity:server', 'widgets': [_widget()],
})
assert saved.status_code == 201
assert saved.get_json()['slug'] == 'entity:server'
tabs = client.get('/api/v1/dashboards', headers=auth_headers).get_json()['boards']
assert 'entity:server' not in [board['slug'] for board in tabs]
# Saving an overview first must not stop the shipped tabs from seeding.
assert [board['slug'] for board in tabs] == ['overview', 'infra', 'apps']
scoped = client.get('/api/v1/dashboards?scope=entity:server', headers=auth_headers).get_json()['boards']
assert [board['id'] for board in scoped] == [saved.get_json()['id']]
assert scoped[0]['widgets'] == [_widget()]
@pytest.mark.parametrize('scope', [
'entity:server', 'entity:service', 'entity:monitoring', 'entity:backups',
])
def test_overview_layout_is_empty_until_saved(client, auth_headers, scope):
resp = client.get(f'/api/v1/dashboards?scope={scope}', headers=auth_headers)
assert resp.status_code == 200
assert resp.get_json()['boards'] == []
saved = client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Overview', 'scope': scope, 'widgets': [_widget()],
})
assert saved.status_code == 201
again = client.get(f'/api/v1/dashboards?scope={scope}', headers=auth_headers).get_json()['boards']
assert [board['slug'] for board in again] == [scope]
def test_saving_an_overview_layout_again_replaces_it(client, auth_headers):
first = client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Server overview', 'scope': 'entity:server', 'widgets': [_widget()],
})
second = client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Server overview', 'scope': 'entity:server',
'widgets': [_widget(i='w1'), _widget(i='w2', x=3)],
})
assert second.status_code == 200
assert second.get_json()['id'] == first.get_json()['id']
scoped = client.get('/api/v1/dashboards?scope=entity:server', headers=auth_headers).get_json()['boards']
assert len(scoped) == 1
assert [widget['i'] for widget in scoped[0]['widgets']] == ['w1', 'w2']
def test_deleting_an_overview_layout_returns_to_the_shipped_one(client, auth_headers):
saved = client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Service overview', 'scope': 'entity:service', 'widgets': [_widget()],
}).get_json()
assert client.delete(f"/api/v1/dashboards/{saved['id']}", headers=auth_headers).status_code == 200
scoped = client.get('/api/v1/dashboards?scope=entity:service', headers=auth_headers).get_json()['boards']
assert scoped == []
def test_overview_layouts_are_scoped_per_user(client, auth_headers, other_headers):
client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Server overview', 'scope': 'entity:server', 'widgets': [_widget()],
})
theirs = client.get('/api/v1/dashboards?scope=entity:server', headers=other_headers).get_json()['boards']
assert theirs == []
@pytest.mark.parametrize('scope', ['entity:database', 'overview', '', 7])
def test_unknown_board_scope_is_rejected(client, auth_headers, scope):
resp = client.post('/api/v1/dashboards', headers=auth_headers, json={
'name': 'Nope', 'scope': scope, 'widgets': [],
})
assert resp.status_code == 400
assert client.get('/api/v1/dashboards?scope=entity:database', headers=auth_headers).status_code == 400
@@ -0,0 +1,101 @@
"""The server list reports how many services and domains each server carries."""
from app import db
from app.models.domain import Domain
from tests.factories import headers_for, make_application, make_server, make_user
def _rows(client, headers, query=''):
resp = client.get(f'/api/v1/servers{query}', headers=headers)
assert resp.status_code == 200
return {row['name']: row for row in resp.get_json()}
def test_list_counts_services_and_domains_per_server(app, client):
with app.app_context():
admin = make_user(db, role='admin')
busy = make_server(db, name='busy')
make_server(db, name='idle')
web = make_application(db, name='web', user_id=admin.id, server_id=busy.id)
make_application(db, name='api', user_id=admin.id, server_id=busy.id)
# Runs on the panel host: belongs to no server row.
make_application(db, name='local', user_id=admin.id, server_id=None)
db.session.add_all([
Domain(name='a.example.test', application_id=web.id),
Domain(name='b.example.test', application_id=web.id),
])
db.session.commit()
headers = headers_for(admin)
rows = _rows(client, headers)
assert (rows['busy']['services_count'], rows['busy']['domains_count']) == (2, 2)
assert (rows['idle']['services_count'], rows['idle']['domains_count']) == (0, 0)
def test_deleted_services_and_domains_are_not_counted(app, client):
with app.app_context():
admin = make_user(db, role='admin')
box = make_server(db, name='box')
kept = make_application(db, name='kept', user_id=admin.id, server_id=box.id)
gone = make_application(db, name='gone', user_id=admin.id, server_id=box.id)
live = Domain(name='live.example.test', application_id=kept.id)
dead = Domain(name='dead.example.test', application_id=kept.id)
db.session.add_all([live, dead])
db.session.commit()
gone.soft_delete()
dead.soft_delete()
db.session.commit()
headers = headers_for(admin)
row = _rows(client, headers)['box']
assert (row['services_count'], row['domains_count']) == (1, 1)
def test_counts_only_include_services_the_caller_can_see(app):
"""Asked at the service: a non-admin's count covers their own services
only, while an admin's covers everything on the server."""
from app.services.server_workload_service import workload_counts_by_server
with app.app_context():
admin = make_user(db, role='admin')
owner = make_user(db, role='developer')
other = make_user(db, role='developer')
box = make_server(db, name='shared')
mine = make_application(db, name='mine', user_id=owner.id, server_id=box.id)
theirs = make_application(db, name='theirs', user_id=other.id, server_id=box.id)
db.session.add_all([
Domain(name='mine.example.test', application_id=mine.id),
Domain(name='theirs.example.test', application_id=theirs.id),
])
db.session.commit()
assert workload_counts_by_server([box.id], owner)[box.id] == {
'services_count': 1, 'domains_count': 1}
assert workload_counts_by_server([box.id], admin)[box.id] == {
'services_count': 2, 'domains_count': 2}
assert workload_counts_by_server([box.id], None) == {}
assert workload_counts_by_server([], admin) == {}
def test_select_can_ask_for_just_the_counts(app, client):
with app.app_context():
admin = make_user(db, role='admin')
box = make_server(db, name='box')
make_application(db, name='web', user_id=admin.id, server_id=box.id)
headers = headers_for(admin)
resp = client.get('/api/v1/servers?$select=name,services_count', headers=headers)
assert resp.status_code == 200
row = resp.get_json()[0]
assert row['services_count'] == 1
assert 'domains_count' not in row
def test_narrow_select_skips_the_counts(app, client):
with app.app_context():
admin = make_user(db, role='admin')
make_server(db, name='box')
headers = headers_for(admin)
row = client.get('/api/v1/servers?$select=name', headers=headers).get_json()[0]
assert 'services_count' not in row and 'domains_count' not in row
@@ -10,6 +10,7 @@ import { formatBytes } from '@/utils/formatBytes';
import { KpiBand, MetricCard, Pill, DataTable, DataTableFooter } from '@/components/ds';
import EmptyState from '../EmptyState';
import InfoTip from '../InfoTip';
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
import { useTranslation } from 'react-i18next';
import { formatDuration, formatNumber } from '@/utils/intl';
@@ -100,6 +101,9 @@ const LATEST_COLUMNS = [
// reliably it has been running, where the bytes live, and what happened lately.
// The archive table lives on its own Snapshots section — this page answers
// "is my data safe?", not "show me every file".
// Dashboard widget types the Backups overview can carry besides its blocks.
const BACKUPS_WIDGET_TYPES = ['note'];
export default function BackupsOverview({
stats, storageConfig, costSummary, schedules = [], backups = [], onGo, storageWarning = false,
}) {
@@ -254,6 +258,8 @@ export default function BackupsOverview({
return (
<div className="bk-overview">
<OverviewBoard kind="backups" widgetTypes={BACKUPS_WIDGET_TYPES}>
<OverviewSection id="glance" title={t('app.backupsOverview.atAGlance', 'At a glance')} w={12} h={4}>
<KpiBand max={4}>
<MetricCard
tone="green"
@@ -301,8 +307,9 @@ export default function BackupsOverview({
</div>
</MetricCard>
</KpiBand>
</OverviewSection>
<div className="bk-grid2">
<OverviewSection id="activity" title={t('app.backupsOverview.backupActivity', 'Backup activity')} w={6} h={8}>
<section className="bk-panel">
<div className="bk-panel__head">
<div>
@@ -342,7 +349,9 @@ export default function BackupsOverview({
))}
</div>
</section>
</OverviewSection>
<OverviewSection id="recent" title={t('app.backupsOverview.recentActivity', 'Recent activity')} w={6} h={8}>
<section className="bk-panel">
<div className="bk-panel__head">
<h3>{t('app.backupsOverview.recentActivity', 'Recent activity')}</h3>
@@ -378,9 +387,9 @@ export default function BackupsOverview({
</div>
)}
</section>
</div>
</OverviewSection>
<div className="bk-grid2">
<OverviewSection id="destinations" title={t('app.backupsOverview.storageDestinations', 'Storage destinations')} w={6} h={7}>
<section className="bk-panel">
<div className="bk-panel__head">
<h3>{t('app.backupsOverview.storageDestinations', 'Storage destinations')}</h3>
@@ -420,7 +429,9 @@ export default function BackupsOverview({
</p>
)}
</section>
</OverviewSection>
<OverviewSection id="latest" title={t('app.backupsOverview.latestSnapshots', 'Latest backups')} w={6} h={7}>
<section className="bk-panel bk-panel--flush">
<div className="bk-panel__head">
<h3>{t('app.backupsOverview.latestSnapshots', 'Latest backups')}</h3>
@@ -447,7 +458,8 @@ export default function BackupsOverview({
/>
)}
</section>
</div>
</OverviewSection>
</OverviewBoard>
</div>
);
}
@@ -1,116 +0,0 @@
import { useEffect, useState } from 'react';
import { useNavigate } from 'react-router-dom';
import api from '../../services/api';
import { ShieldAlert, ShieldCheck, ChevronRight, X } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
// Compact "how set-up is this panel" card for the dashboard (admin-only).
// Reads GET /setup-health and shows the score + the top open items, each
// deep-linking to its fix. Collapses to a slim "all set" line when clean —
// no dead card.
const DISMISS_KEY = 'serverkit.setupHealth.dismissed';
const SetupHealthWidget = () => {
const { t } = useTranslation();
const navigate = useNavigate();
const [data, setData] = useState(null);
const [loading, setLoading] = useState(true);
const [dismissed, setDismissed] = useState(() => {
try { return localStorage.getItem(DISMISS_KEY) === '1'; } catch { return false; }
});
useEffect(() => {
let cancelled = false;
api.getSetupHealth()
.then((res) => { if (!cancelled) setData(res); })
.catch(() => { /* non-admin or error — widget stays quiet */ })
.finally(() => { if (!cancelled) setLoading(false); });
return () => { cancelled = true; };
}, []);
if (dismissed) return null;
if (loading || !data || !data.summary) {
return (
<div className="setup-health-widget setup-health-widget--loading" role="status">
<ShieldCheck size={16} />
<span>{t('app.setupHealthWidget.setupHealth', 'Setup health')}</span>
<span className="setup-health-widget__muted">
{loading
? t('common.checking', 'Checking…')
: t('app.setupHealthWidget.unavailable', 'Unavailable')}
</span>
</div>
);
}
const { summary } = data;
const openCount = Number(summary.critical_open || 0) + Number(summary.recommended_open || 0);
const dismiss = () => {
setDismissed(true);
try { localStorage.setItem(DISMISS_KEY, '1'); } catch { /* ignore */ }
};
// Clean → slim "all set" line, not a big empty card.
if (openCount === 0) {
return (
<Button variant="unstyled"
type="button"
className="setup-health-widget setup-health-widget--clean"
onClick={() => navigate('/monitoring/doctor')}
>
<ShieldCheck size={16} />
<span className="setup-health-widget__cleanlabel">
{t('app.setupHealthWidget.allSet', 'Setup complete:')} {summary.score}{t('app.setupHealthWidget.setupHealth2', '% setup health')}
</span>
<ChevronRight size={14} />
</Button>
);
}
return (
<div className="setup-health-widget">
<ShieldAlert size={16} className="setup-health-widget__icon" />
<span className="setup-health-widget__title">{t('app.setupHealthWidget.setupHealth', 'Setup health')}</span>
<span className="setup-health-widget__score">{summary.score}%</span>
<progress max="100" value={summary.score} aria-label={t('app.setupHealthWidget.progress', 'Setup health progress')} />
<span className="setup-health-widget__summary">
{summary.critical_open > 0 && t(
'app.setupHealthWidget.criticalCount',
'{{count}} critical',
{ count: summary.critical_open },
)}
{summary.critical_open > 0 && summary.recommended_open > 0 && ' · '}
{summary.recommended_open > 0 && t(
'app.setupHealthWidget.recommendedCount',
'{{count}} recommended',
{ count: summary.recommended_open },
)}
</span>
<span className="setup-health-widget__spacer" />
<Button
type="button"
variant="outline"
size="sm"
onClick={() => navigate('/monitoring/doctor')}
title={t('app.setupHealthWidget.moreInDoctor', 'more in Doctor')}
>
{t('app.setupHealthWidget.review', 'Review')}
</Button>
<Button variant="unstyled"
type="button"
className="setup-health-widget__dismiss"
onClick={dismiss}
aria-label={t('common.actions.dismiss', 'Dismiss')}
title={t('app.setupHealthWidget.dismissHint', 'Dismiss (setup health stays in the status bar)')}
>
<X size={14} />
</Button>
</div>
);
};
export default SetupHealthWidget;
@@ -36,6 +36,9 @@ export function DashGrid({
onChange,
ctx,
onWidgetMenu,
// Height of one grid row. The home dashboard uses the default; a host can
// pass a finer row for layouts that need smaller height steps.
rowHeight = GRID_ROW,
}) {
const { t } = useTranslation();
const hostRef = useRef(null);
@@ -44,7 +47,10 @@ export function DashGrid({
// Detach function for the in-flight pointer gesture, so a mid-drag unmount
// (or a pointer released outside the viewport) never leaves listeners behind.
const detachRef = useRef(null);
const types = useWidgetTypes();
// A host with its own widget types (an entity overview's page blocks)
// passes them through ctx; the home dashboard uses the registry.
const registeredTypes = useWidgetTypes();
const types = ctx?.types || registeredTypes;
useEffect(() => {
const element = hostRef.current;
@@ -68,7 +74,7 @@ export function DashGrid({
? (hostWidth - GRID_GAP * (GRID_COLS - 1)) / GRID_COLS
: 0;
const stepX = cell + GRID_GAP;
const stepY = GRID_ROW + GRID_GAP;
const stepY = rowHeight + GRID_GAP;
// While dragging we paint the previewed layout instead of the committed one.
const list = drag ? drag.preview : widgets;
@@ -142,9 +148,9 @@ export function DashGrid({
left: widget.x * stepX,
top: widget.y * stepY,
width: widget.w * cell + (widget.w - 1) * GRID_GAP,
height: widget.h * GRID_ROW + (widget.h - 1) * GRID_GAP,
height: widget.h * rowHeight + (widget.h - 1) * GRID_GAP,
zIndex: drag?.id === widget.i ? 5 : 1,
}), [drag, cell, stepX, stepY]);
}), [drag, cell, stepX, stepY, rowHeight]);
const hostClassName = useMemo(() => [
'skw-grid',
@@ -156,7 +162,7 @@ export function DashGrid({
<div
ref={hostRef}
className={hostClassName}
style={{ height: rows * GRID_ROW + (rows - 1) * GRID_GAP + HOST_PAD }}
style={{ height: rows * rowHeight + (rows - 1) * GRID_GAP + HOST_PAD }}
onMouseDown={(event) => {
if (edit && event.target === event.currentTarget) onSelect?.(null);
}}
@@ -0,0 +1,77 @@
import { Link } from 'react-router-dom';
import PageLayout from '@/layouts/PageLayout';
import { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { cn } from '@/lib/utils';
// One anatomy for entity detail pages (services, servers):
//
// top bar Parent / Name [star] [actions]
// identity [tile] Name [status] [badges]
// meta line · meta line
// tabs [Overview] [Logs] … [Settings]
// content
//
// Feature pages own their data, actions and tab bodies; this module owns the
// frame so the two pages cannot drift apart again.
export function DetailPage({ className, topbarClassName, icon, parentTo, parentLabel, name, favorite, actions, children }) {
return (
<PageLayout
className={cn('sk-detail-page', className)}
topbarClassName={topbarClassName}
contentClassName="sk-detail-body"
icon={icon}
title={(
<span className="sk-detail-crumbs">
<Link to={parentTo}>{parentLabel}</Link>
<span aria-hidden="true">/</span>
<span aria-current="page">{name}</span>
</span>
)}
meta={favorite}
actions={actions}
>
{children}
</PageLayout>
);
}
// The entity's name, state and key facts, directly under the top bar.
export function DetailIdentity({ avatar, name, badges, meta, description }) {
return (
<header className="sk-detail-identity">
{avatar}
<div className="sk-detail-identity__body">
<div className="sk-detail-identity__title">
<h2>{name}</h2>
{badges}
</div>
{meta && <div className="sk-detail-identity__meta">{meta}</div>}
{description && <p className="sk-detail-identity__description">{description}</p>}
</div>
</header>
);
}
// Separator between facts on the identity meta line.
export function DetailMetaSep() {
return <span className="sk-detail-identity__sep" aria-hidden="true">·</span>;
}
// The tab strip under the identity. `items`: [{ id, label, icon, badge }].
// Settings always sits at the far end of the strip.
export function DetailTabs({ items, value, onValueChange, ariaLabel, children }) {
return (
<Tabs className="sk-detail-tabs" value={value} onValueChange={onValueChange}>
<TabsList aria-label={ariaLabel}>
{items.map(({ id, label, icon: Icon, badge }) => (
<TabsTrigger key={id} value={id} className={id === 'settings' ? 'sk-detail-tabs__end' : undefined}>
{Icon && <Icon size={14} aria-hidden="true" />}
{label}
{badge ? <span className="tab-badge">{badge}</span> : null}
</TabsTrigger>
))}
</TabsList>
<div className="sk-detail-tabs__content">{children}</div>
</Tabs>
);
}
@@ -0,0 +1,44 @@
import { Button } from '@/components/ui/button';
// The settings shell every entity detail page shares (services, servers):
// a grouped section nav on the left, the active section's panels on the right.
// Pages keep their own sections, URL state, permissions and mutation handlers.
//
// groups: [{ label, items: [{ id, label, icon }] }]
export function DetailSettings({ groups, value, onValueChange, ariaLabel, children }) {
return (
<div className="sk-detail-settings">
<nav className="sk-detail-settings__nav" aria-label={ariaLabel}>
{groups.map((group) => (
<div className="sk-detail-settings__group" key={group.label}>
<div className="sk-detail-settings__grouplabel">{group.label}</div>
{group.items.map(({ id, label, icon: Icon }) => (
<Button
variant="unstyled"
type="button"
key={id}
className={`sk-detail-settings__navitem ${value === id ? 'is-active' : ''}`}
aria-current={value === id ? 'page' : undefined}
onClick={() => onValueChange(id)}
>
<Icon size={15} aria-hidden="true" />
{label}
</Button>
))}
</div>
))}
</nav>
<div className="sk-detail-settings__content">{children}</div>
</div>
);
}
// One section of the content column: a quiet title above its panel(s).
export function DetailSettingsSection({ title, children }) {
return (
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{title}</h3>
{children}
</div>
);
}
@@ -0,0 +1,465 @@
import { Children, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { useNavigate, useSearchParams } from 'react-router-dom';
import { Grid2x2, History, LayoutGrid, Plus, SlidersHorizontal } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import api from '@/services/api';
import { useAuth } from '@/contexts/useAuth';
import { useToast } from '@/contexts/useToast';
import useEditingSession from '@/hooks/useEditingSession';
import { useUnsavedChangesGuard } from '@/hooks/useUnsavedChangesGuard';
import { usePolling } from '@/hooks/usePolling';
import { Button } from '@/components/ui/button';
import ChangeBar from '@/components/ds/ChangeBar';
import { DashGrid } from '@/components/dashboard/grid/DashGrid';
import { WidgetLibrary } from '@/components/dashboard/grid/WidgetLibrary';
import { WidgetEditor } from '@/components/dashboard/grid/WidgetEditor';
import { WidgetFullscreen } from '@/components/dashboard/grid/WidgetFullscreen';
import { GRID_GAP, GRID_ROW, compact, findFreeSpot, nextWidgetId, pushDown } from '@/components/dashboard/grid/layout';
import { useWidgetTypes, getWidgetType } from '@/components/dashboard/widgets/registry';
import { toastError } from '@/utils/errorMessage';
// The Overview tab of an entity detail page, laid out on the dashboard's widget
// grid: the same frames, library, editor and fullscreen view, with the page's
// own cards available as blocks next to the dashboard's widgets.
//
// <OverviewBoard kind="server" entityId={server.id} widgetTypes={['stat', 'note']}>
// <OverviewSection id="info" title="Server information" w={6} h={3}>
// …the card…
// </OverviewSection>
// </OverviewBoard>
//
// A user has one layout per kind (every server page shares their server
// layout; the page's own entity is the board's variable), stored on the server
// like a dashboard. Until they save one, the layout is the sections in the
// order the page declares them.
// ?layout=edit puts the board in edit mode, so the page's menu can link to it.
const EDIT_PARAM = 'layout';
const EDIT_VALUE = 'edit';
// How often dashboard widgets on the board re-read their data.
const REFRESH_MS = 15000;
// Time range the board's metric widgets read. Fixed for now: the page has no
// range picker of its own.
const BOARD_RANGE = '1h';
// The board's rows are half a dashboard row tall: page blocks vary a lot in
// height, and a full row (88px) is too coarse a step for them. Two half rows
// plus the gap between them are exactly one dashboard row, so a dashboard
// widget keeps its size here at twice its row count.
const ROWS_PER_DASHBOARD_ROW = 2;
const BOARD_ROW = (GRID_ROW - GRID_GAP) / ROWS_PER_DASHBOARD_ROW;
const SECTION_TYPE_PREFIX = 'overview.';
const sectionTypeId = (kind, id) => `${SECTION_TYPE_PREFIX}${kind}.${id}`;
const isSectionWidget = (widget) => String(widget?.type || '').startsWith(SECTION_TYPE_PREFIX);
// Declares one block of the page. Renders nothing itself: OverviewBoard reads
// its props and mounts the children where the layout places the block.
// id, title, icon, w (of 12 columns), h (board rows, see BOARD_ROW)
// placed in the default layout unless false
// lead placed ahead of the board's leading dashboard widgets (a notice)
export function OverviewSection() {
return null;
}
// A section's frame body. The section's content lives in a host element the
// board renders into once; the frame only adopts that element, so moving,
// resizing or opening a block fullscreen never remounts the card inside it.
function SectionWidget({ widget, ctx }) {
const slotRef = useRef(null);
const host = ctx.sectionHosts.get(widget.cfg?.section);
const { adoptVersion, releaseSection } = ctx;
// Take the section's element whenever it is free to take (first mount, or
// after another frame showing the same section let go of it).
useEffect(() => {
const slot = slotRef.current;
if (slot && host && host.parentNode !== slot) slot.appendChild(host);
}, [host, adoptVersion]);
// Hand it back only when this frame really goes away.
useEffect(() => {
if (!host) return undefined;
return () => releaseSection(host);
}, [host, releaseSection]);
return <div className="sk-overview-section" ref={slotRef} data-empty={ctx.emptyLabel} />;
}
const NO_WIDGET_TYPES = [];
const NO_LEADING_WIDGETS = [];
// kind what the layout is for: 'server' / 'service' (one layout shared
// by every page of that kind) or a page such as 'monitoring'
// shared true when `kind` covers many pages, so editing says so
// serverVar what dashboard widgets bound to `$server` should read
// widgetTypes ids of dashboard widget types offered on this board
// leading dashboard widgets placed ahead of the sections in the default
// layout: [{ type, w, h, cfg }], h in board rows
// Pass both as module-level constants: they define the board, they are not state.
export function OverviewBoard({
kind, entityId, entityLabel, shared = false, serverVar,
widgetTypes = NO_WIDGET_TYPES, leading = NO_LEADING_WIDGETS, children,
}) {
const sections = Children.toArray(children).filter(isValidElement).map((child) => child.props);
return (
<OverviewBoardInner
key={kind}
kind={kind}
entityId={entityId}
entityLabel={entityLabel}
shared={shared}
serverVar={serverVar}
widgetTypeIds={widgetTypes}
leading={leading}
sections={sections}
/>
);
}
function OverviewBoardInner({ kind, entityId, entityLabel, shared, serverVar, widgetTypeIds, leading, sections }) {
const { t } = useTranslation();
const toast = useToast();
const navigate = useNavigate();
const { isAdmin } = useAuth();
const [query, setQuery] = useSearchParams();
const edit = query.get(EDIT_PARAM) === EDIT_VALUE;
// ---- section hosts ------------------------------------------------------
// One detached element per section, created once and kept for the life of
// the board. Sections that are not on the grid wait in the hidden park.
const hostsRef = useRef(new Map());
const parkRef = useRef(null);
const sectionIds = sections.map((section) => section.id);
sectionIds.forEach((id) => {
if (!hostsRef.current.has(id)) {
const host = document.createElement('div');
host.className = 'sk-overview-section__host';
hostsRef.current.set(id, host);
}
});
const sectionKey = sectionIds.join('|');
// Everything about the sections that shapes the board (not their content,
// which re-renders through the portals below on every pass).
const sectionSignature = sections
.map((section) => [section.id, section.title, section.w, section.h, section.placed, section.lead].join(':'))
.join('|');
// The same descriptors object for as long as the signature holds, so the
// memos below depend on a real value instead of re-running every render.
const metaRef = useRef({ signature: null, meta: [] });
if (metaRef.current.signature !== sectionSignature) {
metaRef.current = {
signature: sectionSignature,
meta: sections.map(({ id, title, icon, w, h, placed, lead }) => ({ id, title, icon, w, h, placed, lead })),
};
}
const sectionMeta = metaRef.current.meta;
const [adoptVersion, setAdoptVersion] = useState(0);
const releaseSection = useCallback((host) => {
// Park the element, then let any frame that still wants it take it back
// (closing fullscreen returns the block to its frame on the grid).
if (parkRef.current && host.parentNode !== parkRef.current) parkRef.current.appendChild(host);
setAdoptVersion((version) => version + 1);
}, []);
// Which sections currently render something. A card that hides itself (no
// traffic yet, feature not applicable) simply leaves the layout.
const [present, setPresent] = useState(() => new Set());
useEffect(() => {
const park = parkRef.current;
const observers = [];
const measure = () => {
const next = new Set();
hostsRef.current.forEach((host, id) => { if (host.childElementCount > 0) next.add(id); });
setPresent((current) => (
current.size === next.size && [...next].every((id) => current.has(id)) ? current : next
));
};
hostsRef.current.forEach((host) => {
if (!host.parentNode && park) park.appendChild(host);
const observer = new MutationObserver(measure);
observer.observe(host, { childList: true });
observers.push(observer);
});
measure();
return () => observers.forEach((observer) => observer.disconnect());
}, [sectionKey]);
// ---- widget types -------------------------------------------------------
const registered = useWidgetTypes();
const types = useMemo(() => {
const sectionTypes = sectionMeta.map((section) => ({
id: sectionTypeId(kind, section.id),
name: section.title,
icon: section.icon || LayoutGrid,
cat: 'Overview',
desc: section.title,
w: section.w || 6,
h: section.h || 3,
min: [3, 2],
defaultCfg: { section: section.id },
component: SectionWidget,
section: section.id,
}));
// Dashboard widgets keep their size on the finer rows.
const shared = registered.filter((type) => widgetTypeIds.includes(type.id)).map((type) => ({
...type,
h: type.h * ROWS_PER_DASHBOARD_ROW,
min: [type.min?.[0] ?? 2, (type.min?.[1] ?? 1) * ROWS_PER_DASHBOARD_ROW],
}));
return [...sectionTypes, ...shared];
}, [kind, sectionMeta, registered, widgetTypeIds]);
const defaults = useMemo(() => {
const widgets = [];
const place = (type, w, h, cfg) => {
widgets.push({ i: nextWidgetId(widgets), type, ...findFreeSpot(widgets, w, h), w, h, cfg });
};
const placeSection = (section) => place(
sectionTypeId(kind, section.id), section.w || 6, section.h || 3, { section: section.id },
);
const placed = sectionMeta.filter((section) => section.placed !== false);
placed.filter((section) => section.lead).forEach(placeSection);
leading.forEach((item) => place(item.type, item.w, item.h, { ...item.cfg }));
placed.filter((section) => !section.lead).forEach(placeSection);
return widgets;
}, [kind, sectionMeta, leading]);
// Drop anything a saved layout references that this page no longer offers.
const sanitize = useCallback(
(widgets) => widgets.filter((widget) => getWidgetType(types, widget.type)),
[types],
);
// ---- persistence --------------------------------------------------------
// `board` is the saved row, null while the user is on the shipped layout,
// undefined until the first read returns.
const [board, setBoard] = useState(undefined);
useEffect(() => {
let cancelled = false;
api.getOverviewBoard(kind)
.then((saved) => { if (!cancelled) setBoard(saved); })
// A failed read must not hide the page: fall back to the default layout.
.catch(() => { if (!cancelled) setBoard(null); });
return () => { cancelled = true; };
}, [kind]);
const saved = useMemo(
() => (board?.widgets ? sanitize(board.widgets) : defaults),
[board, defaults, sanitize],
);
// ---- editing ------------------------------------------------------------
const editing = useEditingSession({ baseline: [] });
const { draft, isDirty, reset: resetEditing, save: saveEditing, transaction } = editing;
const [selectedId, setSelectedId] = useState(null);
const [libraryOpen, setLibraryOpen] = useState(false);
const [fullscreen, setFullscreen] = useState(null);
const [tick, setTick] = useState(0);
usePolling(() => setTick((value) => value + 1), REFRESH_MS, { immediate: false });
// Entering edit mode starts a fresh draft from what is on screen.
const wasEditing = useRef(false);
useEffect(() => {
if (edit && !wasEditing.current && board !== undefined) resetEditing(saved);
wasEditing.current = edit && board !== undefined;
}, [edit, board, saved, resetEditing]);
const setEditing = useCallback((on) => {
const next = new URLSearchParams(query);
if (on) next.set(EDIT_PARAM, EDIT_VALUE);
else next.delete(EDIT_PARAM);
setQuery(next, { replace: true });
if (!on) { setSelectedId(null); setLibraryOpen(false); }
}, [query, setQuery]);
const { requestLeave } = useUnsavedChangesGuard({
isDirty: edit && isDirty,
confirmOptions: {
title: t('app.overviewBoard.discardTitle', 'Discard layout changes?'),
message: t('app.overviewBoard.discardMessage', 'Your saved overview layout stays as it was.'),
confirmText: t('common.actions.discard', 'Discard'),
},
});
const discard = useCallback(async () => {
if (isDirty && !(await requestLeave())) return;
setEditing(false);
}, [isDirty, requestLeave, setEditing]);
const save = useCallback(async () => {
try {
await saveEditing(async (widgets) => {
// Saving the shipped layout means "no layout of my own": drop
// the saved row so later changes to the default still reach
// this user, instead of pinning them to today's copy of it.
if (JSON.stringify(widgets) === JSON.stringify(defaults)) {
if (board?.id) await api.deleteDashboard(board.id);
setBoard(null);
return widgets;
}
const stored = await api.saveOverviewBoard(kind, widgets);
setBoard(stored);
return stored?.widgets || widgets;
});
setEditing(false);
toast.success(t('app.overviewBoard.saved', 'Overview layout saved'));
} catch (err) {
toastError(toast, t('app.overviewBoard.couldNotSave', "Couldn't save the overview layout."), err);
}
}, [board, defaults, kind, saveEditing, setEditing, t, toast]);
const restoreDefaults = useCallback(() => transaction(defaults), [defaults, transaction]);
const widgets = edit ? draft : saved;
const selected = widgets.find((widget) => widget.i === selectedId) || null;
// Out of edit mode, blocks with nothing to show leave the layout and the
// rest close the gap. In edit mode every block stays where it was put.
const shown = useMemo(() => {
if (edit) return widgets;
const visible = widgets.filter((widget) => !isSectionWidget(widget) || present.has(widget.cfg?.section));
if (visible.length === widgets.length) return widgets;
// Re-place the remaining blocks in reading order, keeping their sizes:
// floating them straight up would leave a hole beside a block whose
// neighbour is the one that went away.
const placed = [];
[...visible].sort((a, b) => a.y - b.y || a.x - b.x).forEach((widget) => {
placed.push({ ...widget, ...findFreeSpot(placed, widget.w, widget.h) });
});
return placed;
}, [edit, widgets, present]);
const startEditing = useCallback(() => { if (!edit) setEditing(true); }, [edit, setEditing]);
const addWidget = (type) => {
const widget = {
i: nextWidgetId(widgets),
type: type.id,
...findFreeSpot(widgets, type.w, type.h),
w: type.w,
h: type.h,
cfg: structuredClone(type.defaultCfg || {}),
};
transaction(compact([...widgets, widget]));
setLibraryOpen(false);
setSelectedId(widget.i);
};
const removeWidget = (widget) => {
transaction(compact(widgets.filter((item) => item.i !== widget.i)));
setSelectedId(null);
};
const duplicateWidget = (widget) => {
// A page block exists once; only dashboard widgets can be duplicated.
if (isSectionWidget(widget)) return;
const copy = { ...structuredClone(widget), i: nextWidgetId(widgets), ...findFreeSpot(widgets, widget.w, widget.h) };
transaction([...widgets, copy]);
setSelectedId(copy.i);
};
const onWidgetMenu = (action, widget) => {
if (action === 'full') { setFullscreen(widget); return; }
// The other actions change the layout, so they open edit mode first.
// The draft is seeded from the saved layout on the next render, so only
// "configure" can be applied straight away; the rest are edit-mode only.
if (!edit) { startEditing(); if (action === 'config') setSelectedId(widget.i); return; }
if (action === 'config') setSelectedId(widget.i);
if (action === 'del') removeWidget(widget);
if (action === 'dup') duplicateWidget(widget);
};
const ctx = useMemo(() => ({
range: BOARD_RANGE,
tick,
// What dashboard widgets bound to `$server` read on this page.
serverVar,
isAdmin,
navigate,
types,
entity: { kind, id: entityId },
sectionHosts: hostsRef.current,
adoptVersion,
releaseSection,
emptyLabel: t('app.overviewBoard.nothingToShow', 'Nothing to show here right now.'),
}), [tick, kind, entityId, serverVar, isAdmin, navigate, types, adoptVersion, releaseSection, t]);
// Page blocks already on the board are not offered again.
const placedSections = new Set(widgets.filter(isSectionWidget).map((widget) => widget.cfg?.section));
const libraryTypes = types.filter((type) => !type.section || !placedSections.has(type.section));
const resources = serverVar ? [{ id: serverVar, label: entityLabel || String(serverVar), kind: 'server' }] : [];
return (
<div className={`sk-overview-board${edit ? ' is-editing' : ''}`}>
{/* Every section renders exactly once, into its own host element. */}
{sections.map((section) => createPortal(section.children, hostsRef.current.get(section.id), section.id))}
<div ref={parkRef} hidden />
{edit && (
<>
<div className="sk-overview-board__bar">
<Button variant="unstyled" type="button" className="skw-barbtn" onClick={() => setLibraryOpen(true)}>
<Plus size={14} /> {t('app.overviewBoard.addBlock', 'Add block')}
</Button>
<Button variant="unstyled" type="button" className="skw-barbtn" onClick={restoreDefaults}>
<History size={14} /> {t('app.overviewBoard.restoreDefault', 'Restore default layout')}
</Button>
</div>
<div className="skw-hint">
<Grid2x2 size={13} aria-hidden="true" /> {shared
? t('app.overviewBoard.editHint', 'Drag headers to move · drag the corner to resize · this layout applies to every {{kind}} page for your account', { kind })
: t('app.overviewBoard.editHintPage', 'Drag headers to move · drag the corner to resize · saved to your account')}
</div>
</>
)}
{board !== undefined && (
<DashGrid
rowHeight={BOARD_ROW}
widgets={shown}
edit={edit}
selectedId={selectedId}
onSelect={setSelectedId}
onChange={transaction}
ctx={ctx}
onWidgetMenu={onWidgetMenu}
/>
)}
{/* A quiet way in, under the blocks it rearranges. */}
{!edit && board !== undefined && (
<div className="sk-overview-board__foot">
<Button variant="unstyled" type="button" className="sk-overview-board__edit" onClick={startEditing}>
<SlidersHorizontal size={13} aria-hidden="true" /> {t('app.overviewBoard.editLayout', 'Edit overview layout')}
</Button>
</div>
)}
{edit && <ChangeBar session={editing} onDiscard={discard} onSave={save} />}
{edit && libraryOpen && (
<WidgetLibrary types={libraryTypes} onAdd={addWidget} onClose={() => setLibraryOpen(false)} />
)}
{edit && selected && (
<WidgetEditor
widget={selected}
type={getWidgetType(types, selected.type)}
ctx={ctx}
resources={resources}
onChange={(next) => transaction(pushDown(widgets, next))}
onClose={() => setSelectedId(null)}
onDuplicate={() => duplicateWidget(selected)}
onRemove={() => removeWidget(selected)}
/>
)}
{fullscreen && (
<WidgetFullscreen
widget={fullscreen}
type={getWidgetType(types, fullscreen.type)}
ctx={ctx}
onClose={() => setFullscreen(null)}
/>
)}
</div>
);
}
+21 -12
View File
@@ -23,6 +23,10 @@ import { cn } from '@/lib/utils';
// <footer>…</footer>
// </form>
// </Drawer>
//
// Pass `headless` when the body opens with its own header (a tab switch, a
// toolbar) that already says what the drawer is: the title is then kept for
// assistive tech only, instead of stacking a heading above the real one.
export function Drawer({
open,
onOpenChange,
@@ -36,24 +40,29 @@ export function Drawer({
className,
bodyClassName,
flush = false,
headless = false,
children,
}) {
return (
<Sheet open={open} onOpenChange={onOpenChange}>
<SheetContent side={side} className={cn('sk-drawer', className)} style={{ width }}>
<div className="sk-drawer__head">
{icon && (
<span className="sk-drawer__ico" style={iconColor ? { color: iconColor } : undefined}>
{icon}
</span>
)}
<div>
{/* SheetTitle is required by Radix for a11y; keep it as the visible title. */}
<SheetTitle className="sk-drawer__title">{title}</SheetTitle>
{subtitle && <div className="sk-drawer__sub">{subtitle}</div>}
{headless ? (
<SheetTitle className="sr-only">{title}</SheetTitle>
) : (
<div className="sk-drawer__head">
{icon && (
<span className="sk-drawer__ico" style={iconColor ? { color: iconColor } : undefined}>
{icon}
</span>
)}
<div>
{/* SheetTitle is required by Radix for a11y; keep it as the visible title. */}
<SheetTitle className="sk-drawer__title">{title}</SheetTitle>
{subtitle && <div className="sk-drawer__sub">{subtitle}</div>}
</div>
{headerExtra}
</div>
{headerExtra}
</div>
)}
<div className={cn('sk-drawer__body', flush && 'sk-drawer__body--flush', bodyClassName)}>
{children}
</div>
@@ -1,5 +1,5 @@
import { useState } from 'react';
import { Filter, Layers, X, Plus, History, GripVertical } from 'lucide-react';
import { Filter, Layers, X, Plus, History, GripVertical, Search } from 'lucide-react';
import { Drawer } from '../Drawer';
import { Button } from '@/components/ui/button';
import { Switch } from '@/components/ui/switch';
@@ -7,14 +7,21 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@
import { cn } from '@/lib/utils';
import { useTranslation } from 'react-i18next';
import {
OPS, byKey, columnLabel, coerceValue, emptyValueFor,
isFilterable, isSortable, optionsFor,
OPS, applyFilters, byKey, columnLabel, coerceValue, emptyValueFor,
isDecorative, isFilterable, isSortable, optionsFor,
} from './fields';
// A field search only earns its row once the list is long enough to scan.
const FIELD_SEARCH_MIN = 9;
// Two panes behind one drawer, because they are the two halves of "what am I
// looking at": FILTERS decides which rows, FIELDS decides which columns (and in
// what order, at what density, with which detail line). The header menu is the
// fast path for one column; this is the whole picture at once.
//
// The pane switch IS the drawer's header: a title saying "Filters and fields"
// above tabs reading "Filters" and "Fields" only repeated them. The footer
// answers the question a filter always raises: how many rows are left.
export function GridFilterDrawer({
open, onOpenChange, columns, rows, cfg, grid, noun = 'rows',
// Hosts whose table auto-sizes its columns and has no sub-detail line
@@ -26,10 +33,26 @@ export function GridFilterDrawer({
const { t } = useTranslation();
const [tab, setTab] = useState('filters');
const [dragging, setDragging] = useState(null);
const [fieldQuery, setFieldQuery] = useState('');
const map = byKey(columns);
const rules = cfg.filters.rules;
const filterable = columns.filter(isFilterable);
// A rule can outlive its column's filterability (a saved view from before
// a column changed shape); those are skipped everywhere below.
const liveRules = rules.filter((rule) => isFilterable(map.get(rule.field)));
const allRows = rows || [];
const total = allRows.length;
const matching = applyFilters(allRows, cfg.filters, columns).length;
const singular = noun.replace(/s$/, '');
const nounFor = (count) => (count === 1 ? singular : noun);
// Action / chevron columns have no name and nothing to toggle, so they are
// neither listed nor counted.
const namedColumns = columns.filter((column) => !isDecorative(column));
const shownCount = cfg.cols.filter((key) => !isDecorative(map.get(key))).length;
const hiddenCount = namedColumns.length - shownCount;
const fieldNeedle = fieldQuery.trim().toLowerCase();
const fieldMatches = (column) => !fieldNeedle || columnLabel(column).toLowerCase().includes(fieldNeedle);
const patchRule = (id, patch) => grid.setRules(
rules.map((r) => (r.id === id ? { ...r, ...patch } : r)),
@@ -99,145 +122,191 @@ export function GridFilterDrawer({
);
};
const panes = [
{ key: 'filters', icon: Filter, label: t('app.gridFilterDrawer.filters', 'Filters'), count: liveRules.length || null },
{
key: 'fields',
icon: Layers,
label: t('app.gridFilterDrawer.fieldsTab', 'Fields'),
// Only worth a badge when something is hidden.
count: hiddenCount > 0 ? `${shownCount}/${namedColumns.length}` : null,
},
];
return (
<Drawer
open={open}
onOpenChange={onOpenChange}
title={t('app.gridFilterDrawer.filtersFields', 'Filters and fields')}
subtitle={`${t('app.gridFilterDrawer.conditions', { count: rules.length, defaultValue_one: '1 condition', defaultValue_other: '{{count}} conditions' })} · ${t('app.gridFilterDrawer.fieldsShown', { count: cfg.cols.length, defaultValue_one: '1 field shown', defaultValue_other: '{{count}} fields shown' })}`}
icon={<Filter size={18} />}
iconColor="var(--accent-bright)"
headless
width={470}
flush
className="sk-griddrawer"
>
<div className="sk-griddrawer__tabs">
{[['filters', Filter, 'Filters', rules.length], ['fields', Layers, 'Fields', cfg.cols.length]]
.map(([key, Icon, text, n]) => (
<div className="sk-griddrawer__head">
<div className="sk-gridseg sk-griddrawer__switch" role="tablist" aria-label={t('app.gridFilterDrawer.filtersFields', 'Filters and fields')}>
{panes.map(({ key, icon: Icon, label, count }) => (
<Button variant="unstyled"
key={key}
type="button"
role="tab"
aria-selected={tab === key}
className={cn(tab === key && 'is-on')}
onClick={() => setTab(key)}
>
<Icon size={14} />{text}<span className="n">{n}</span>
<Icon size={14} aria-hidden="true" />{label}
{count != null && <span className="sk-griddrawer__n">{count}</span>}
</Button>
))}
</div>
</div>
<div className="sk-griddrawer__body">
{tab === 'filters' && (
<div className="sk-gridsec">
<div className="sk-gridsec__head">
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.conditions', 'Conditions')}</div>
<Button variant="unstyled" type="button" className="sk-gridsec__add" onClick={() => grid.addRule(columns)}>
<Plus size={13} />{t('app.gridFilterDrawer.addCondition', 'Add condition')}
</Button>
</div>
<div className="sk-gridmatch">
{t('app.gridFilterDrawer.match', 'Match')}
<div className="sk-gridseg">
{['all', 'any'].map((value) => (
<Button variant="unstyled"
key={value}
type="button"
className={cn(cfg.filters.match === value && 'is-on')}
onClick={() => grid.setMatch(value)}
>
{value}
</Button>
))}
</div>
{t('app.gridFilterDrawer.ofTheFollowing', 'of the following')}
</div>
{rules.length === 0 && (
<div className="sk-gridsec__none">
{t('app.gridFilterDrawer.noConditionsThisViewShowsEvery', 'No conditions. This view shows every')} {noun.replace(/s$/, '')}.
</div>
)}
{rules.map((rule, i) => {
const column = map.get(rule.field);
// A rule can outlive its column's filterability — a
// saved view from before a column changed shape, or
// a column whose data went empty. Skip it rather
// than look up OPS[undefined] and crash the drawer.
if (!column || !isFilterable(column)) return null;
return (
<div key={rule.id}>
{i > 0 && (
<div className="sk-gridrule__join">
{cfg.filters.match === 'all' ? 'and' : 'or'}
{liveRules.length === 0 ? (
<div className="sk-gridstart">
<p className="sk-gridstart__lead">
{t('app.gridFilterDrawer.nothingFiltered', {
count: total,
noun: nounFor(total),
defaultValue_one: 'The only {{noun}} is showing.',
defaultValue_other: 'All {{count}} {{noun}} are showing.',
})}
</p>
{filterable.length > 0 && (
<>
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.filterBy', 'Filter by')}</div>
<div className="sk-gridsec__tags">
{filterable.map((column) => (
<Button variant="unstyled"
key={column.key}
type="button"
className="sk-gridrule__tag sk-gridstart__field"
onClick={() => grid.addRule([column])}
>
<Plus size={12} aria-hidden="true" />{columnLabel(column)}
</Button>
))}
</div>
)}
<div className="sk-gridrule">
<Select
value={rule.field}
onValueChange={(key) => {
const next = map.get(key);
patchRule(rule.id, {
field: next.key,
op: OPS[next.type][0][0],
value: emptyValueFor(next.type),
});
}}
>
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.field', 'Field')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
{filterable.map((c) => (
<SelectItem key={c.key} value={c.key}>{columnLabel(c)}</SelectItem>
))}
</SelectContent>
</Select>
<Select
value={rule.op}
onValueChange={(op) => patchRule(rule.id, { op })}
>
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.operator', 'Operator')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
{OPS[column.type].map(([op, text]) => (
<SelectItem key={op} value={op}>{text}</SelectItem>
))}
</SelectContent>
</Select>
<Button variant="unstyled"
type="button"
className="sk-gridrule__del"
onClick={() => grid.removeRule(rule.id)}
aria-label={t('app.gridFilterDrawer.removeCondition', 'Remove condition')}
>
<X size={14} />
</Button>
<div className="sk-gridrule__value">{valueEditor(rule)}</div>
</div>
</div>
);
})}
</>
)}
</div>
) : (
<>
{liveRules.map((rule, i) => {
const column = map.get(rule.field);
return (
<div key={rule.id}>
{i > 0 && (
// The word between two conditions is the switch for how
// they combine; it applies to the whole list.
<div className="sk-gridrule__join">
<div className="sk-gridseg" role="group" aria-label={t('app.gridFilterDrawer.combine', 'How conditions combine')}>
{[
['all', t('app.gridFilterDrawer.and', 'and')],
['any', t('app.gridFilterDrawer.or', 'or')],
].map(([value, text]) => (
<Button variant="unstyled"
key={value}
type="button"
aria-pressed={cfg.filters.match === value}
className={cn(cfg.filters.match === value && 'is-on')}
onClick={() => grid.setMatch(value)}
>
{text}
</Button>
))}
</div>
</div>
)}
<div className="sk-gridrule">
<Select
value={rule.field}
onValueChange={(key) => {
const next = map.get(key);
patchRule(rule.id, {
field: next.key,
op: OPS[next.type][0][0],
value: emptyValueFor(next.type),
});
}}
>
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.field', 'Field')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
{filterable.map((c) => (
<SelectItem key={c.key} value={c.key}>{columnLabel(c)}</SelectItem>
))}
</SelectContent>
</Select>
<Select
value={rule.op}
onValueChange={(op) => patchRule(rule.id, { op })}
>
<SelectTrigger size="sm" className="sk-gridrule__sel" aria-label={t('app.gridFilterDrawer.operator', 'Operator')}>
<SelectValue />
</SelectTrigger>
<SelectContent>
{OPS[column.type].map(([op, text]) => (
<SelectItem key={op} value={op}>{text}</SelectItem>
))}
</SelectContent>
</Select>
<Button variant="unstyled"
type="button"
className="sk-gridrule__del"
onClick={() => grid.removeRule(rule.id)}
aria-label={t('app.gridFilterDrawer.removeCondition', 'Remove condition')}
>
<X size={14} />
</Button>
<div className="sk-gridrule__value">{valueEditor(rule)}</div>
</div>
</div>
);
})}
<Button variant="unstyled" type="button" className="sk-gridsec__add" onClick={() => grid.addRule(columns)}>
<Plus size={13} aria-hidden="true" />{t('app.gridFilterDrawer.addCondition', 'Add condition')}
</Button>
</>
)}
</div>
)}
{tab === 'fields' && (
<>
{namedColumns.length >= FIELD_SEARCH_MIN && (
<div className="sk-gridfind">
<Search size={14} aria-hidden="true" />
<input
type="search"
value={fieldQuery}
onChange={(e) => setFieldQuery(e.target.value)}
placeholder={t('app.gridFilterDrawer.findField', 'Find a field')}
aria-label={t('app.gridFilterDrawer.findField', 'Find a field')}
/>
</div>
)}
{/* In the table, in table order: drag to reorder, switch off to remove. */}
<div className="sk-gridsec">
<div className="sk-gridsec__head">
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.fields', 'Fields ·')} {cfg.cols.length} shown</div>
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.shown', 'In the table')}</div>
<span className="sk-gridsec__meta">{shownCount}</span>
</div>
{ordered.map((key, i) => {
const column = map.get(key);
if (!column) return null;
const on = cfg.cols.includes(key);
if (!column || isDecorative(column) || !cfg.cols.includes(key) || !fieldMatches(column)) return null;
const locked = !!column.locked || column.hideable === false;
return (
<div
key={key}
draggable={!locked && on}
className={cn('sk-gridcol', !on && 'is-off', dragging === i && 'is-drag')}
// Reordering while a search hides part of the list
// would drop the field at an index nobody can see.
draggable={!locked && !fieldNeedle}
className={cn('sk-gridcol', locked && 'is-locked', dragging === i && 'is-drag')}
onDragStart={() => setDragging(i)}
onDragEnd={() => setDragging(null)}
onDragOver={(e) => {
@@ -248,12 +317,12 @@ export function GridFilterDrawer({
<span className="sk-gridcol__grip"><GripVertical size={13} /></span>
<span className="sk-gridcol__nm">{columnLabel(column)}</span>
{locked
? <span className="sk-gridcol__lock">pinned</span>
? <span className="sk-gridcol__lock">{t('app.gridFilterDrawer.pinned', 'pinned')}</span>
: (
<Switch
checked={on}
checked
onCheckedChange={() => grid.toggleColumn(key, allKeys)}
aria-label={t('app.gridFilterDrawer.show', 'Show {{value}}', { value: columnLabel(column) })}
aria-label={t('app.gridFilterDrawer.hide', 'Hide {{value}}', { value: columnLabel(column) })}
/>
)}
</div>
@@ -261,6 +330,37 @@ export function GridFilterDrawer({
})}
</div>
{/* Everything else the table knows about each row. */}
{hiddenCount > 0 && (
<div className="sk-gridsec">
<div className="sk-gridsec__head">
<div className="sk-gridsec__t">{t('app.gridFilterDrawer.available', 'More fields')}</div>
<span className="sk-gridsec__meta">{hiddenCount}</span>
</div>
<div className="sk-gridsec__tags">
{namedColumns.filter((column) => !cfg.cols.includes(column.key) && fieldMatches(column)).map((column) => (
<Button variant="unstyled"
key={column.key}
type="button"
className="sk-gridrule__tag sk-gridstart__field"
onClick={() => grid.toggleColumn(column.key, allKeys)}
aria-label={t('app.gridFilterDrawer.show', 'Show {{value}}', { value: columnLabel(column) })}
>
<Plus size={12} aria-hidden="true" />{columnLabel(column)}
</Button>
))}
</div>
</div>
)}
{fieldNeedle && !namedColumns.some(fieldMatches) && (
<div className="sk-gridsec">
<p className="sk-gridstart__lead">
{t('app.gridFilterDrawer.noFieldMatches', 'No field matches "{{query}}".', { query: fieldQuery.trim() })}
</p>
</div>
)}
{(showRowDetail || showDensity) && (
<div className="sk-gridsec">
{showRowDetail && (
@@ -313,10 +413,16 @@ export function GridFilterDrawer({
</div>
<div className="sk-griddrawer__foot">
{/* What the filters leave: the number this drawer exists to change. */}
<span className="sk-griddrawer__count" role="status">
{matching === total
? t('app.gridFilterDrawer.countAll', '{{count}} {{noun}}', { count: total, noun: nounFor(total) })
: t('app.gridFilterDrawer.countOf', '{{matching}} of {{total}} {{noun}}', { matching, total, noun: nounFor(total) })}
</span>
<span className="sk-griddrawer__sp" />
<Button variant="ghost" size="sm" onClick={grid.resetToView}>
<History size={14} /> {t('app.gridFilterDrawer.reset', 'Reset')}
</Button>
<span className="sk-griddrawer__sp" />
<Button size="sm" onClick={() => onOpenChange(false)}>{t('common.actions.done', 'Done')}</Button>
</div>
</Drawer>
+128 -104
View File
@@ -1,25 +1,34 @@
import { useState } from 'react';
import { MoreVertical, Download, RefreshCw, History, Check, Link2, Rows2, Rows3 } from 'lucide-react';
import { MoreVertical, ChevronLeft, Download, RefreshCw, History, Check, Link2, Rows2, Rows3 } from 'lucide-react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { cn } from '@/lib/utils';
import { byKey, exportRows } from './fields';
import { useTranslation } from 'react-i18next';
import { Button as SharedButton } from '@/components/ui/button';
// The toolbar's "⋮" — everything that is neither a filter nor a per-column
// action: export, refresh, row density, and discarding unsaved view changes.
// One button instead of four keeps the top bar the same shape on every page,
// which is the whole point of putting search there.
export function GridToolsMenu({
// Everything about a table that is neither a filter nor a per-column action:
// copying a link to the view, export, refresh, row density, and discarding
// unsaved view changes.
//
// GridToolsPanel is the content; it is shown either inside its own "⋮"
// popover (GridToolsMenu, below) or inside the view selector's menu
// (GridViewPicker `tools`), where it is `embedded` and reports which pane it
// is on so the host can step aside while the export options are open.
export function GridToolsPanel({
cfg, columns, rows, selectedRows = [], viewName, noun = 'rows',
onRefresh, onReset, onDensity, onExported, onCopyLink,
// Off for hosts whose table auto-sizes its rows (<DataTable>) — showing a
// density toggle that changes nothing is worse than not showing one.
showDensity = true,
onClose,
embedded = false,
pane: paneProp,
onPaneChange,
}) {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [pane, setPane] = useState('root'); // root | export
const [ownPane, setOwnPane] = useState('root'); // root | export
const pane = paneProp ?? ownPane;
const setPane = onPaneChange ?? setOwnPane;
const [scope, setScope] = useState('view');
const [copied, setCopied] = useState(null);
const [allCols, setAllCols] = useState(false);
@@ -28,7 +37,7 @@ export function GridToolsMenu({
const set = scope === 'picked' ? selectedRows : rows;
const exportCols = allCols ? columns : cfg.cols.map((k) => map.get(k)).filter(Boolean);
const close = () => { setOpen(false); setPane('root'); };
const close = () => { setPane('root'); onClose?.(); };
const go = (format) => {
const n = exportRows(
@@ -41,6 +50,115 @@ export function GridToolsMenu({
close();
};
return pane === 'root' ? (
<>
{onCopyLink && (
<SharedButton variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={async () => {
const res = await onCopyLink();
setCopied(res?.copied ? 'ok' : 'fail');
setTimeout(() => setCopied(null), 1800);
}}
>
{copied === 'ok' ? <Check size={13} /> : <Link2 size={13} />}
{copied === 'ok' ? t('app.gridToolsMenu.linkCopied', 'Link copied')
: copied === 'fail' ? t('app.gridToolsMenu.copyFailed', "Couldn't copy the link. Check clipboard permissions.")
: t('app.gridToolsMenu.copyLinkToThisView', 'Copy link to this view')}
</SharedButton>
)}
<SharedButton variant="unstyled" type="button" className="sk-gridmenu__opt" onClick={() => setPane('export')}>
<Download size={13} />{t('app.gridToolsMenu.export', 'Export…')}
</SharedButton>
{onRefresh && (
<SharedButton variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={() => { onRefresh(); close(); }}
>
<RefreshCw size={13} />{t('app.gridToolsMenu.refreshData', 'Refresh data')}
</SharedButton>
)}
{showDensity && (
<>
<div className="sk-gridmenu__sep" />
<div className="sk-gridmenu__head">{t('app.gridToolsMenu.rowDensity', 'Row density')}</div>
{[['cozy', 'Cozy', Rows2], ['compact', 'Compact', Rows3]].map(([value, text, Icon]) => (
<SharedButton variant="unstyled"
key={value}
type="button"
className={cn('sk-gridmenu__opt', cfg.density === value && 'is-on')}
onClick={() => onDensity(value)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
<Icon size={13} />{text}
</SharedButton>
))}
</>
)}
<div className="sk-gridmenu__sep" />
<SharedButton variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={() => { onReset(); close(); }}
>
<History size={13} />{t('app.gridToolsMenu.resetViewChanges', 'Reset view changes')}
</SharedButton>
</>
) : (
<>
{embedded ? (
<SharedButton variant="unstyled" type="button" className="sk-gridmenu__opt sk-gridmenu__back" onClick={() => setPane('root')}>
<ChevronLeft size={13} />{t('app.gridToolsMenu.export2', 'Export')}
</SharedButton>
) : (
<div className="sk-gridmenu__head">{t('app.gridToolsMenu.export2', 'Export')}</div>
)}
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', scope === 'view' && 'is-on')}
onClick={() => setScope('view')}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridToolsMenu.rowsInThisView', 'Rows in this view')}
<span className="sk-gridmenu__rest">{rows.length}</span>
</SharedButton>
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', scope === 'picked' && 'is-on')}
disabled={!selectedRows.length}
disabledReason={t('app.gridToolsMenu.selectSomeRowsFirst', 'Select some rows first')}
onClick={() => setScope('picked')}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridToolsMenu.selectedRows', 'Selected rows')}
<span className="sk-gridmenu__rest">{selectedRows.length}</span>
</SharedButton>
<div className="sk-gridmenu__sep" />
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', allCols && 'is-on')}
onClick={() => setAllCols((v) => !v)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridToolsMenu.includeHiddenFields', 'Include hidden fields')}
<span className="sk-gridmenu__rest">{exportCols.length}</span>
</SharedButton>
<div className="sk-gridmenu__foot">
<SharedButton variant="unstyled" type="button" onClick={() => go('json')}>JSON</SharedButton>
<SharedButton variant="unstyled" type="button" className="is-primary" onClick={() => go('csv')}>{t('app.gridToolsMenu.downloadCsv', 'Download CSV')}</SharedButton>
</div>
</>
);
}
// The standalone "⋮" for tables that keep their tools on their own button.
export function GridToolsMenu(props) {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [pane, setPane] = useState('root');
return (
<Popover
open={open}
@@ -52,101 +170,7 @@ export function GridToolsMenu({
</SharedButton>
</PopoverTrigger>
<PopoverContent align="end" sideOffset={6} className="ui-popover-panel sk-gridmenu">
{pane === 'root' ? (
<>
{onCopyLink && (
<SharedButton variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={async () => {
const res = await onCopyLink();
setCopied(res?.copied ? 'ok' : 'fail');
setTimeout(() => setCopied(null), 1800);
}}
>
{copied === 'ok' ? <Check size={13} /> : <Link2 size={13} />}
{copied === 'ok' ? t('app.gridToolsMenu.linkCopied', 'Link copied')
: copied === 'fail' ? t('app.gridToolsMenu.copyFailed', "Couldn't copy the link. Check clipboard permissions.")
: t('app.gridToolsMenu.copyLinkToThisView', 'Copy link to this view')}
</SharedButton>
)}
<SharedButton variant="unstyled" type="button" className="sk-gridmenu__opt" onClick={() => setPane('export')}>
<Download size={13} />{t('app.gridToolsMenu.export', 'Export…')}
</SharedButton>
{onRefresh && (
<SharedButton variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={() => { onRefresh(); close(); }}
>
<RefreshCw size={13} />{t('app.gridToolsMenu.refreshData', 'Refresh data')}
</SharedButton>
)}
{showDensity && (
<>
<div className="sk-gridmenu__sep" />
<div className="sk-gridmenu__head">{t('app.gridToolsMenu.rowDensity', 'Row density')}</div>
{[['cozy', 'Cozy', Rows2], ['compact', 'Compact', Rows3]].map(([value, text, Icon]) => (
<SharedButton variant="unstyled"
key={value}
type="button"
className={cn('sk-gridmenu__opt', cfg.density === value && 'is-on')}
onClick={() => onDensity(value)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
<Icon size={13} />{text}
</SharedButton>
))}
</>
)}
<div className="sk-gridmenu__sep" />
<SharedButton variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={() => { onReset(); close(); }}
>
<History size={13} />{t('app.gridToolsMenu.resetViewChanges', 'Reset view changes')}
</SharedButton>
</>
) : (
<>
<div className="sk-gridmenu__head">{t('app.gridToolsMenu.export2', 'Export')}</div>
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', scope === 'view' && 'is-on')}
onClick={() => setScope('view')}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridToolsMenu.rowsInThisView', 'Rows in this view')}
<span className="sk-gridmenu__rest">{rows.length}</span>
</SharedButton>
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', scope === 'picked' && 'is-on')}
disabled={!selectedRows.length}
disabledReason={t('app.gridToolsMenu.selectSomeRowsFirst', 'Select some rows first')}
onClick={() => setScope('picked')}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridToolsMenu.selectedRows', 'Selected rows')}
<span className="sk-gridmenu__rest">{selectedRows.length}</span>
</SharedButton>
<div className="sk-gridmenu__sep" />
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', allCols && 'is-on')}
onClick={() => setAllCols((v) => !v)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridToolsMenu.includeHiddenFields', 'Include hidden fields')}
<span className="sk-gridmenu__rest">{exportCols.length}</span>
</SharedButton>
<div className="sk-gridmenu__foot">
<SharedButton variant="unstyled" type="button" onClick={() => go('json')}>JSON</SharedButton>
<SharedButton variant="unstyled" type="button" className="is-primary" onClick={() => go('csv')}>{t('app.gridToolsMenu.downloadCsv', 'Download CSV')}</SharedButton>
</div>
</>
)}
<GridToolsPanel {...props} pane={pane} onPaneChange={setPane} onClose={() => setOpen(false)} />
</PopoverContent>
</Popover>
);
@@ -1,11 +1,12 @@
import { useState } from 'react';
import {
ChevronDown, Star, Copy, Trash2, Plus, MoreVertical, Check, History, AlertTriangle,
ChevronDown, Star, Copy, Trash2, Plus, MoreVertical, Check, History, AlertTriangle, SlidersHorizontal,
} from 'lucide-react';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { cn } from '@/lib/utils';
import { useTranslation } from 'react-i18next';
import { Button as SharedButton } from '@/components/ui/button';
import { GridToolsPanel } from './GridToolsMenu';
// The saved-view selector, rendered as the page's own heading rather than yet
// another toolbar button — the view IS what you are looking at, so its name is
@@ -21,17 +22,30 @@ import { Button as SharedButton } from '@/components/ui/button';
// there instead (see useTopbarChrome) and passes nothing here; an inner or sub
// table, which has no top bar of its own, passes it and keeps it inline.
//
// A page can instead fold the table's controls INTO this menu, so the page has
// one place for "what am I looking at and what can I do with it" and its top
// bar keeps only the actions that create or reload things:
//
// filters { count, hidden, onOpen } opens the filters and fields drawer
// tools the GridToolsMenu props copy link, export, reset…
// extra [{ icon, label, onSelect }] page-specific entries (Manage groups)
//
// There is deliberately no row count. It was rendered twice on every page that
// also had a toolbar underneath — once next to the view name, once on the right
// of the second bar — and the footer already says how many rows there are,
// under the rows it is counting.
export function GridViewPicker({ views, counts, onCreate, label = 'items', actions }) {
export function GridViewPicker({ views, counts, onCreate, label = 'items', actions, filters, tools, extra }) {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const [menuFor, setMenuFor] = useState(null);
const [creating, setCreating] = useState(false);
const [name, setName] = useState('');
const [fromCurrent, setFromCurrent] = useState(true);
// While the tools section shows its export options, the rest of the menu
// steps aside so the options are not buried under the list of views.
const [toolsPane, setToolsPane] = useState('root');
const exporting = toolsPane !== 'root';
const closeMenu = () => { setOpen(false); setMenuFor(null); setToolsPane('root'); };
const active = views.activeView;
const activeName = active?.name || `All ${label}`;
@@ -101,7 +115,7 @@ export function GridViewPicker({ views, counts, onCreate, label = 'items', actio
return (
<div className="sk-viewbar">
<Popover open={open} onOpenChange={setOpen}>
<Popover open={open} onOpenChange={(o) => { setOpen(o); if (!o) setToolsPane('root'); }}>
<PopoverTrigger asChild>
<SharedButton variant="unstyled" type="button" className={cn('sk-viewpick', open && 'is-open')}>
<span className="sk-viewpick__title">{activeName}</span>
@@ -110,48 +124,102 @@ export function GridViewPicker({ views, counts, onCreate, label = 'items', actio
</SharedButton>
</PopoverTrigger>
<PopoverContent align="start" sideOffset={6} className="ui-popover-panel sk-gridmenu sk-viewpick__menu">
{!!builtins.length && <div className="sk-gridmenu__head">{t('app.gridViewPicker.builtIn', 'Built in')}</div>}
{builtins.map(renderRow)}
<div className="sk-gridmenu__head">{t('app.gridViewPicker.myViews', 'My views')}</div>
{mine.length ? mine.map(renderRow) : (
<div className="sk-gridmenu__note">
{t('app.gridViewPicker.noPersonalViewsYetTuneThe', 'No personal views yet. Tune the grid, then save it here.')}
</div>
)}
<div className="sk-gridmenu__sep" />
{creating ? (
{!exporting && (
<>
<div className="sk-gridmenu__mini sk-gridmenu__mini--input">
<input
autoFocus
value={name}
placeholder={t('app.gridViewPicker.eGCloudflareProd', 'e.g. Cloudflare prod')}
onChange={(e) => setName(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter') submitNew();
if (e.key === 'Escape') setCreating(false);
}}
/>
</div>
{!!builtins.length && <div className="sk-gridmenu__head">{t('app.gridViewPicker.builtIn', 'Built in')}</div>}
{builtins.map(renderRow)}
<div className="sk-gridmenu__head">{t('app.gridViewPicker.myViews', 'My views')}</div>
{mine.length ? mine.map(renderRow) : (
<div className="sk-gridmenu__note">
{t('app.gridViewPicker.noPersonalViewsYetTuneThe', 'No personal views yet. Tune the grid, then save it here.')}
</div>
)}
<div className="sk-gridmenu__sep" />
{creating ? (
<>
<div className="sk-gridmenu__mini sk-gridmenu__mini--input">
<input
autoFocus
value={name}
placeholder={t('app.gridViewPicker.eGCloudflareProd', 'e.g. Cloudflare prod')}
onChange={(e) => setName(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter') submitNew();
if (e.key === 'Escape') setCreating(false);
}}
/>
</div>
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', fromCurrent && 'is-on')}
onClick={() => setFromCurrent((v) => !v)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridViewPicker.startFromCurrentFiltersColumns', 'Start from current filters and columns')}
</SharedButton>
<div className="sk-gridmenu__foot">
<SharedButton variant="unstyled" type="button" onClick={() => setCreating(false)}>{t('common.actions.cancel', 'Cancel')}</SharedButton>
<SharedButton variant="unstyled" type="button" className="is-primary" disabled={!name.trim()} disabledReason={t('app.gridViewPicker.enterAViewNameFirst', 'Enter a view name first')} onClick={submitNew}>
{t('common.actions.create', 'Create')}
</SharedButton>
</div>
</>
) : (
<SharedButton variant="unstyled" type="button" className="sk-gridmenu__opt" onClick={() => setCreating(true)}>
<Plus size={13} />{t('app.gridViewPicker.saveCurrentView', 'Save current view…')}
</SharedButton>
)}
</>
)}
{filters && !exporting && (
<>
<div className="sk-gridmenu__sep" />
<SharedButton variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', fromCurrent && 'is-on')}
onClick={() => setFromCurrent((v) => !v)}
className="sk-gridmenu__opt"
onClick={() => { closeMenu(); filters.onOpen(); }}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.gridViewPicker.startFromCurrentFiltersColumns', 'Start from current filters and columns')}
<SlidersHorizontal size={13} />{t('app.gridViewPicker.filtersAndFields', 'Filters and fields')}
{(filters.count > 0 || filters.hidden > 0) && (
<span className="sk-gridmenu__rest">
{[
filters.count > 0 && t('app.gridViewPicker.filterCount', { count: filters.count, defaultValue_one: '1 filter', defaultValue_other: '{{count}} filters' }),
filters.hidden > 0 && t('app.gridViewPicker.moreFields', '{{count}} more fields', { count: filters.hidden }),
].filter(Boolean).join(' \u00b7 ')}
</span>
)}
</SharedButton>
<div className="sk-gridmenu__foot">
<SharedButton variant="unstyled" type="button" onClick={() => setCreating(false)}>{t('common.actions.cancel', 'Cancel')}</SharedButton>
<SharedButton variant="unstyled" type="button" className="is-primary" disabled={!name.trim()} disabledReason={t('app.gridViewPicker.enterAViewNameFirst', 'Enter a view name first')} onClick={submitNew}>
{t('common.actions.create', 'Create')}
</SharedButton>
</div>
</>
) : (
<SharedButton variant="unstyled" type="button" className="sk-gridmenu__opt" onClick={() => setCreating(true)}>
<Plus size={13} />{t('app.gridViewPicker.saveCurrentView', 'Save current view…')}
</SharedButton>
)}
{tools && (
<>
{!exporting && <div className="sk-gridmenu__sep" />}
<GridToolsPanel
{...tools}
embedded
pane={toolsPane}
onPaneChange={setToolsPane}
onClose={closeMenu}
/>
</>
)}
{!!extra?.length && !exporting && (
<>
<div className="sk-gridmenu__sep" />
{extra.map(({ icon: Icon, label: text, onSelect }) => (
<SharedButton variant="unstyled"
key={text}
type="button"
className="sk-gridmenu__opt"
onClick={() => { closeMenu(); onSelect(); }}
>
{Icon && <Icon size={13} />}{text}
</SharedButton>
))}
</>
)}
</PopoverContent>
</Popover>
@@ -31,6 +31,8 @@ const NO_FILTERS = { match: 'all', rules: [] };
* every page, which is what makes a saved view, a shareable link and a guard
* one concept instead of eleven.
*/
const NO_KEYS = [];
export function useTableChrome({
columns,
rows = [],
@@ -41,6 +43,10 @@ export function useTableChrome({
setSorts,
hiddenKeys = [],
setHiddenKeys,
// Columns a fresh table keeps out of sight. "Reset" goes back to THIS set,
// not to "show everything": a table that offers twenty fields does not want
// all twenty on screen the moment someone clears a filter.
defaultHiddenKeys = NO_KEYS,
groupBy = null,
setGroupBy,
pageState,
@@ -112,8 +118,8 @@ export function useTableChrome({
),
setSub: () => {},
setDensity: () => {},
resetToView: () => { clearRules(); setHiddenKeys?.([]); setColumnOrder(null); },
}), [setMatch, removeRule, clearRules, hiddenKeys, setHiddenKeys]);
resetToView: () => { clearRules(); setHiddenKeys?.([...defaultHiddenKeys]); setColumnOrder(null); },
}), [setMatch, removeRule, clearRules, hiddenKeys, setHiddenKeys, defaultHiddenKeys]);
// The envelope. The column rules are `columnFilters`, never `filters`:
// three pages persist a `filters` key of their own meaning a SERVER-side
@@ -1,25 +1,22 @@
import {
File,
ArrowDown,
ArrowLeft,
ArrowRight,
ArrowUp,
Search,
X,
Check,
RefreshCw,
Eye,
EyeOff,
HardDrive,
PanelLeftClose,
PanelLeftOpen,
LayoutGrid,
List,
Home,
ArrowUpDown,
SlidersHorizontal,
} from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@/components/ui/select';
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
import { cn } from '@/lib/utils';
import { useTranslation } from 'react-i18next';
@@ -44,11 +41,8 @@ export default function FileManagerToolbar({
filterCounts,
sortValue,
handleSortChange,
searchQuery,
setSearchQuery,
handleSearch,
searchResults,
clearSearch,
// The search box, only when the page has no top bar to host it.
search,
viewMode,
setViewMode,
showHidden,
@@ -58,6 +52,18 @@ export default function FileManagerToolbar({
loading,
}) {
const { t } = useTranslation();
const [sortKey, sortDir] = String(sortValue || 'name-asc').split('-');
// What the listing can be sorted by, with the direction a fresh pick
// starts in (newest and largest first; names and types A to Z).
const sortKeys = [
{ key: 'name', label: t('common.labels.name', 'Name'), first: 'asc' },
{ key: 'modified', label: t('app.fileManager.modified', 'Modified'), first: 'desc' },
{ key: 'size', label: t('common.labels.size', 'Size'), first: 'desc' },
{ key: 'type', label: t('common.labels.type', 'Type'), first: 'asc' },
];
// Anything other than "everything, hidden files off" is worth a mark on
// the button, since the menu is closed most of the time.
const viewIsNarrowed = activeFilter !== FILTER_OPTIONS[0]?.id || showHidden;
return (
<>
<div className="file-manager-toolbar">
@@ -122,7 +128,8 @@ export default function FileManagerToolbar({
<div className="path-breadcrumb">
{breadcrumbs.map((crumb, idx) => (
<span key={crumb.path + idx} className="crumb-segment">
{idx > 0 && <span className="crumb-separator">/</span>}
{/* The root crumb is itself "/", so the one after it needs no separator. */}
{idx > 0 && breadcrumbs[idx - 1].name !== '/' && <span className="crumb-separator">/</span>}
<Button
variant="unstyled"
type="button"
@@ -149,78 +156,7 @@ export default function FileManagerToolbar({
)}
</div>
<div className="toolbar-right">
<Select value={activeFilter} onValueChange={setActiveFilter}>
<SelectTrigger
className="file-toolbar-select"
title={t('app.fileManager.types', 'Types')}
aria-label={t('app.fileManager.types', 'Types')}
>
<File size={13} aria-hidden="true" />
<SelectValue />
</SelectTrigger>
<SelectContent>
{FILTER_OPTIONS.map((option) => (
<SelectItem key={option.id} value={option.id}>
{filterLabels[option.id]} ({filterCounts[option.id] ?? 0})
</SelectItem>
))}
</SelectContent>
</Select>
<Select value={sortValue} onValueChange={handleSortChange}>
<SelectTrigger
className="file-toolbar-select"
title={t('app.fileManager.sort', 'Sort')}
aria-label={t('app.fileManager.sort', 'Sort')}
>
<ArrowUpDown size={13} aria-hidden="true" />
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="name-asc">
{t('app.fileManager.nameAZ', 'Name A-Z')}
</SelectItem>
<SelectItem value="name-desc">
{t('app.fileManager.nameZA', 'Name Z-A')}
</SelectItem>
<SelectItem value="modified-desc">
{t('app.fileManager.newest', 'Newest')}
</SelectItem>
<SelectItem value="modified-asc">
{t('app.fileManager.oldest', 'Oldest')}
</SelectItem>
<SelectItem value="size-desc">
{t('app.fileManager.largest', 'Largest')}
</SelectItem>
<SelectItem value="size-asc">
{t('app.fileManager.smallest', 'Smallest')}
</SelectItem>
<SelectItem value="type-asc">{t('common.labels.type', 'Type')}</SelectItem>
<SelectItem value="type-desc">
{t('app.fileManager.typeZA', 'Type Z-A')}
</SelectItem>
</SelectContent>
</Select>
<div className="search-field">
<Search size={14} className="search-field-icon" />
<input
type="text"
placeholder={t('app.fileManager.searchFiles', 'Search files…')}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
/>
{(searchResults || searchQuery) && (
<Button
variant="unstyled"
type="button"
className="search-field-clear"
onClick={clearSearch}
title={t('common.actions.clear', 'Clear')}
>
<X size={12} />
</Button>
)}
</div>
{search}
<div className="view-toggle">
<Button
variant="unstyled"
@@ -243,16 +179,76 @@ export default function FileManagerToolbar({
<List size={14} />
</Button>
</div>
<Button
variant="unstyled"
type="button"
className={`toolbar-icon-btn ${showHidden ? 'active' : ''}`}
onClick={() => setShowHidden(!showHidden)}
aria-pressed={showHidden}
title={t('app.fileManager.toggleHiddenFiles', 'Toggle hidden files')}
>
{showHidden ? <Eye size={14} /> : <EyeOff size={14} />}
</Button>
{/* One menu for how the listing is shown: which kinds, in what
order, hidden files or not. They were two selects and an
icon, each as wide as the control it sat beside. */}
<Popover>
<PopoverTrigger asChild>
<Button
variant="unstyled"
type="button"
className={cn('toolbar-icon-btn toolbar-view-btn', viewIsNarrowed && 'active')}
title={t('app.fileManager.viewOptions', 'View options')}
aria-label={t('app.fileManager.viewOptions', 'View options')}
>
<SlidersHorizontal size={14} />
</Button>
</PopoverTrigger>
<PopoverContent align="end" sideOffset={6} className="ui-popover-panel sk-gridmenu">
<div className="sk-gridmenu__head">{t('app.fileManager.show', 'Show')}</div>
{FILTER_OPTIONS.map((option) => (
<Button
variant="unstyled"
key={option.id}
type="button"
className={cn('sk-gridmenu__opt', activeFilter === option.id && 'is-on')}
onClick={() => setActiveFilter(option.id)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{filterLabels[option.id]}
<span className="sk-gridmenu__rest">{filterCounts[option.id] ?? 0}</span>
</Button>
))}
<div className="sk-gridmenu__sep" />
<div className="sk-gridmenu__head">{t('app.fileManager.sortBy', 'Sort by')}</div>
{sortKeys.map((option) => (
<Button
variant="unstyled"
key={option.key}
type="button"
className={cn('sk-gridmenu__opt', sortKey === option.key && 'is-on')}
onClick={() => handleSortChange(`${option.key}-${option.first}`)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{option.label}
</Button>
))}
<Button
variant="unstyled"
type="button"
className="sk-gridmenu__opt"
onClick={() => handleSortChange(`${sortKey}-${sortDir === 'asc' ? 'desc' : 'asc'}`)}
>
{sortDir === 'asc' ? <ArrowUp size={13} /> : <ArrowDown size={13} />}
{sortDir === 'asc'
? t('app.fileManager.ascending', 'Ascending')
: t('app.fileManager.descending', 'Descending')}
</Button>
<div className="sk-gridmenu__sep" />
<Button
variant="unstyled"
type="button"
className={cn('sk-gridmenu__opt', showHidden && 'is-on')}
aria-pressed={showHidden}
onClick={() => setShowHidden(!showHidden)}
>
<span className="sk-gridmenu__box"><Check size={11} /></span>
{t('app.fileManager.showHiddenFiles', 'Show hidden files')}
</Button>
</PopoverContent>
</Popover>
<Button
variant="unstyled"
type="button"
@@ -0,0 +1,39 @@
import { Search, X } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Button } from '@/components/ui/button';
// The Files search box. It searches the server on Enter (not on every
// keystroke: this walks a directory tree), and the clear button also cancels a
// search that is still running. It looks like every other top-bar search
// because it is hosted there; the page falls back to its own toolbar only when
// it is rendered without a top bar.
export default function FileSearchField({ searchQuery, setSearchQuery, handleSearch, searchResults, clearSearch }) {
const { t } = useTranslation();
const label = t('app.fileManager.searchFiles', 'Search files…');
return (
<div className="sk-searchfield fm-search">
<Search className="sk-searchfield__icon" aria-hidden="true" />
<input
type="text"
className="sk-searchfield__input"
placeholder={label}
aria-label={label}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
onKeyDown={(e) => e.key === 'Enter' && handleSearch()}
/>
{(searchResults || searchQuery) && (
<Button
variant="unstyled"
type="button"
className="search-field-clear"
onClick={clearSearch}
title={t('common.actions.clear', 'Clear')}
aria-label={t('common.actions.clear', 'Clear')}
>
<X size={12} />
</Button>
)}
</div>
);
}
@@ -9,6 +9,7 @@ import { AreaChart, KpiBand, MetricCard, Pill, Sparkline } from '@/components/ds
import { Button } from '@/components/ui/button';
import { Skeleton } from '../Skeleton';
import MonitorsSummary from './MonitorsSummary';
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
import DiskReclaimModal from './DiskReclaimModal';
import { HOST_SCOPE, useScopeMetrics, trendOf } from './useMonitorScope';
import { useTranslation } from 'react-i18next';
@@ -45,6 +46,9 @@ function last(series) {
// the Host health grid below is how you switch between them. That grid is what
// the standalone Fleet Monitor page used to be — a heatmap you had to leave
// this page to read, for numbers that belong next to these ones.
// Dashboard widget types the Monitoring overview can carry besides its blocks.
const MONITORING_WIDGET_TYPES = ['stat', 'gauge', 'timeseries', 'specs', 'note'];
export default function MonitoringOverview({
scope, isHost, scopeLabel, status, activeAlerts = [],
speedTest, speedTestRunning, onRunSpeedTest,
@@ -195,16 +199,21 @@ export default function MonitoringOverview({
return (
<div className="mon-overview">
<OverviewBoard
kind="monitoring"
// Dashboard widgets added here follow the host this page is scoped to.
serverVar={isHost ? 'local' : scope}
entityLabel={scopeLabel}
widgetTypes={MONITORING_WIDGET_TYPES}
>
{/* Monitors first: "is the site up" is the question this page is
for, and everything below describes the machines ServerKit runs
on rather than the things it is watching. */}
<MonitorsSummary summary={monitorsSummary} />
<div className="mon-section-head">
<h3>{t('app.monitoringOverview.hostHealth', 'Host health')}</h3>
<span className="mon-section-head__meta">{scopeLabel}</span>
</div>
<OverviewSection id="monitors" title={t('app.monitoringOverview.monitors', 'Monitors')} w={12} h={9}>
<MonitorsSummary summary={monitorsSummary} />
</OverviewSection>
<OverviewSection id="health" title={t('app.monitoringOverview.hostHealth', 'Host health')} w={12} h={5}>
{/* The shared DS tile, not a monitoring-only copy of it — same
geometry as every other KPI strip in the panel, plus the
sparkline slot this page needed. */}
@@ -258,8 +267,9 @@ export default function MonitoringOverview({
);
})}
</KpiBand>
</OverviewSection>
<div className="mon-grid2">
<OverviewSection id="processor" title={t('app.monitoringOverview.processor', 'Processor')} w={6} h={7}>
<section className="monitoring-panel">
<div className="monitoring-panel__header">
<div>
@@ -283,7 +293,9 @@ export default function MonitoringOverview({
<AreaChart series={[series?.cpu || []]} colors={[TONE.cpu]} height={CHART_HEIGHT} />
</ChartBody>
</section>
</OverviewSection>
<OverviewSection id="memory" title={t('app.monitoringOverview.memoryDisk', 'Memory and disk')} w={6} h={7}>
<section className="monitoring-panel">
<div className="monitoring-panel__header">
<div>
@@ -303,16 +315,13 @@ export default function MonitoringOverview({
/>
</ChartBody>
</section>
</div>
</OverviewSection>
{/* The fleet, inline. Clicking a card re-scopes everything above it,
which is the whole reason this replaced a separate page. */}
<OverviewSection id="hosts" title={t('app.monitoringOverview.allHosts', 'All hosts')} w={12} h={7}>
{!fleetLoaded && (
<div role="status" aria-busy="true" aria-label={t('app.monitoringOverview.loadingHosts', 'Loading hosts')}>
<div className="mon-section-head">
<h3>{t('app.monitoringOverview.allHosts', 'All hosts')}</h3>
<Skeleton variant="line" width={160} height={18} />
</div>
<div className="mon-fleet-grid">
<Skeleton variant="block" height={FLEET_CARD_HEIGHT} />
</div>
@@ -320,12 +329,9 @@ export default function MonitoringOverview({
)}
{fleet.length > 0 && (
<>
<div className="mon-section-head">
<h3>{t('app.monitoringOverview.allHosts', 'All hosts')}</h3>
<span className="mon-section-head__meta">
{online}/{fleet.length} {t('app.monitoringOverview.onlineClickACardToRe', 'online · click a card to re-scope')}
</span>
</div>
<p className="mon-panel-sub">
{online}/{fleet.length} {t('app.monitoringOverview.onlineClickACardToRe', 'online · click a card to re-scope')}
</p>
<div className="mon-fleet-grid">
{/* Always the panel host's own numbers, never the
scoped ones — a card in this strip has to keep
@@ -359,8 +365,9 @@ export default function MonitoringOverview({
</div>
</>
)}
</OverviewSection>
<div className="mon-grid2">
<OverviewSection id="alerts" title={t('app.monitoringOverview.activeAlerts', 'Active alerts')} w={6} h={5}>
<section className={`monitoring-panel${activeAlerts.length ? ' monitoring-panel--warning' : ''}`}>
<div className="monitoring-panel__header">
<h3>{t('app.monitoringOverview.activeAlerts', 'Active alerts')}</h3>
@@ -385,7 +392,9 @@ export default function MonitoringOverview({
</div>
)}
</section>
</OverviewSection>
<OverviewSection id="speed" title={t('app.monitoringOverview.speedTest', 'Speed test')} w={6} h={5}>
<section className="monitoring-panel">
<div className="monitoring-panel__header">
<h3>{t('app.monitoringOverview.speedTest', 'Speed test')}</h3>
@@ -429,7 +438,8 @@ export default function MonitoringOverview({
</p>
)}
</section>
</div>
</OverviewSection>
</OverviewBoard>
<DiskReclaimModal open={reclaimOpen} onClose={() => setReclaimOpen(false)} />
</div>
@@ -1,33 +0,0 @@
import { useTranslation } from 'react-i18next';
import FavoriteStar from '@/components/FavoriteStar';
import InfoTip from '@/components/InfoTip';
import CopyButton from '@/components/CopyButton';
import { StatusDot } from '../ds';
import { serverStatusKind } from './serverDetailData';
// Header meta: [status dot] [(i) with endpoint + ID] [star]. Everything the
// header used to spell out lives behind the (i).
export default function ServerHeaderMeta({ server }) {
const { t } = useTranslation();
const status = server.status || 'pending';
const endpoint = server.hostname || server.ip_address || t('app.serverDetail.noEndpointConfigured', 'No endpoint configured');
return (
<>
<StatusDot kind={serverStatusKind(status)} label={status.charAt(0).toUpperCase() + status.slice(1)} />
<InfoTip size="md" title={t('app.serverDetail.details', 'Server details')}>
<dl className="server-detail-info">
<dt>{t('common.labels.status', 'Status')}</dt>
<dd>{status}</dd>
<dt>{t('app.serverDetail.endpoint', 'Endpoint')}</dt>
<dd>{endpoint}</dd>
<dt>{t('app.serverDetail.serverId', 'ID')}</dt>
<dd className="server-detail-info__id">
<code>{server.id}</code>
<CopyButton value={String(server.id)} label={t('app.serverDetail.copyId', 'Copy ID')} />
</dd>
</dl>
</InfoTip>
<FavoriteStar type="server" id={server.id} path={`/servers/${server.id}`} label={server.name} />
</>
);
}
@@ -15,19 +15,22 @@ const checkKind = (status) => {
return 'gray';
};
// Two overview cards that read the same agent report; `part` picks one:
// 'permission' (the agent's permission level) or 'health' (status + checks).
// Read-only by design: the permission level is enforced by the agent and can
// only be changed on the server itself, so there is deliberately no control.
const ServerHealthCard = ({ server }) => {
const ServerHealthCard = ({ server, part }) => {
const { t } = useTranslation();
const [alerts, setAlerts] = useState([]);
useEffect(() => {
if (part !== 'health') return undefined;
let alive = true;
api.getFleetAlerts({ server_id: server.id, status: 'active', limit: 20 })
.then((res) => { if (alive) setAlerts((Array.isArray(res) ? res : []).filter((a) => a.detail)); })
.catch(() => { if (alive) setAlerts([]); });
return () => { alive = false; };
}, [server.id, server.status, server.last_report_at]);
}, [part, server.id, server.status, server.last_report_at]);
const level = server.permission_level_effective || 'full';
const health = serverHealth(server);
@@ -48,10 +51,10 @@ const ServerHealthCard = ({ server }) => {
{ key: 'checked', headerKey: 'app.serverHealthCard.lastChecked', header: 'Last checked', sortable: false, cellClassName: 'sk-cell-dim', render: (c) => (c.checked_at ? formatDateTime(c.checked_at) : '—') },
];
return (
<>
<div className="info-card">
<h3>{t('app.serverHealthCard.permissionLevel', 'Permission level')}</h3>
if (part === 'permission') {
return (
<div className="overview-tab__card">
<h3 className="overview-tab__card-title">{t('app.serverHealthCard.permissionLevel', 'Permission level')}</h3>
<InfoList className="server-info-list">
<InfoItem label={t('app.serverHealthCard.level', 'Level')}>
<Pill kind={levelKind(level)} dot={false}>{levelName}</Pill>
@@ -74,28 +77,36 @@ const ServerHealthCard = ({ server }) => {
</p>
<code>{SET_HINT}</code>
</div>
);
}
<div className="info-card">
<h3>{t('app.serverHealthCard.health', 'Health')} <Pill kind={health.kind}>{health.code}</Pill></h3>
return (
<div className="overview-tab__card">
<h3 className="overview-tab__card-title">{t('app.serverHealthCard.health', 'Health')}</h3>
<InfoList className="server-info-list">
<InfoItem label={t('common.labels.status', 'Status')}>
<Pill kind={health.kind}>{health.code}</Pill>
</InfoItem>
{server.last_report_at && (
<p className="text-muted">
{t('app.serverHealthCard.lastReport', 'Last report')}: {formatDateTime(server.last_report_at)}
</p>
<InfoItem
label={t('app.serverHealthCard.lastReport', 'Last report')}
value={formatDateTime(server.last_report_at)}
/>
)}
{alerts.length > 0 && (
<ul className="notifications-list">
{alerts.map((a) => <li key={a.id}>{a.detail}</li>)}
</ul>
)}
<DataTable
columns={columns}
data={server.service_checks || []}
keyField="name"
emptyTitle={t('app.serverHealthCard.noChecks', 'No service checks reported yet.')}
emptyMessage=""
/>
</div>
</>
</InfoList>
{alerts.length > 0 && (
<ul className="notifications-list">
{alerts.map((a) => <li key={a.id}>{a.detail}</li>)}
</ul>
)}
<DataTable
columns={columns}
data={server.service_checks || []}
keyField="name"
emptyTitle={t('app.serverHealthCard.noChecks', 'No service checks reported yet.')}
emptyMessage=""
/>
</div>
);
};
@@ -1,34 +1,73 @@
import { serverStatusKind } from './serverDetailData';
import { Pill, KpiBand } from '../ds';
import { Pill, KpiBand, MetricCard, Gauge } from '../ds';
import OnboardingWizard from '../server/OnboardingWizard';
import SystemStatusCard from './SystemStatusCard';
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
import ServerHealthCard from './ServerHealthCard';
import { formatBytes } from '@/utils/formatBytes';
import { InfoList, InfoItem } from '../InfoList';
import { useTranslation } from 'react-i18next';
import { Bot, Cpu, HeartPulse, ListChecks, Server as ServerGlyph, ShieldCheck } from 'lucide-react';
import { formatDateTime } from '@/utils/intl';
import {
KpiTile,
KpiGauge,
PulseIcon,
ClockIcon,
CpuIcon,
MemoryIcon,
DiskIcon,
OfflineIcon,
ServerIcon,
HostIcon,
NetworkIcon,
FolderTinyIcon,
ChipIcon,
OsIcon,
ArchIcon,
AgentIcon,
TagIcon,
HashIcon,
DockerMiniIcon,
} from './serverDetailShared';
// Dashboard widget types a server overview can carry besides its own blocks.
const SERVER_WIDGET_TYPES = ['stat', 'gauge', 'timeseries', 'specs', 'note'];
// Dashboard widgets that open the default layout. `$server` is the board's
// variable: on this page it is always the server being viewed. Titles come
// from the metric, so nothing here needs translating.
const SERVER_LEADING_WIDGETS = [
{ type: 'stat', w: 3, h: 4, cfg: { metric: 'cpu', agg: 'last', resource: '$server', spark: true, thresholds: [70, 90] } },
{ type: 'stat', w: 3, h: 4, cfg: { metric: 'ram', agg: 'last', resource: '$server', spark: true, thresholds: [80, 92] } },
{ type: 'stat', w: 3, h: 4, cfg: { metric: 'disk', agg: 'last', resource: '$server', spark: true, thresholds: [75, 90] } },
{ type: 'stat', w: 3, h: 4, cfg: { metric: 'net_in', agg: 'last', resource: '$server', spark: true, thresholds: null } },
{
type: 'timeseries', w: 8, h: 6,
cfg: { series: [{ resource: '$server', metric: 'cpu' }, { resource: '$server', metric: 'ram' }], legend: true, fill: true },
},
];
// Usage thresholds for the CPU / memory / disk tiles.
const USAGE_DANGER_PERCENT = 85;
const USAGE_WARN_PERCENT = 70;
// A percent tile on the shared MetricCard: the value, a thin meter and the
// capacity line underneath. Same tile the service overview's KPI band uses.
const UsageTile = ({ icon, label, percent, color, sub }) => {
const has = Number.isFinite(percent);
const safe = has ? Math.min(Math.max(percent, 0), 100) : 0;
const danger = safe > USAGE_DANGER_PERCENT;
const warn = safe > USAGE_WARN_PERCENT && !danger;
return (
<MetricCard
icon={icon}
tone={danger ? 'red' : warn ? 'amber' : 'accent'}
value={has ? safe.toFixed(1) : '—'}
unit={has ? '%' : undefined}
label={label}
>
<Gauge className="sk-kpi__meter" value={safe} color={danger ? 'var(--red)' : warn ? 'var(--amber)' : color} />
{sub && <div className="sk-kpi__sub">{sub}</div>}
</MetricCard>
);
};
const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) => {
const { t } = useTranslation();
const formatUptime = (seconds) => {
@@ -41,6 +80,7 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) =>
};
const isOnline = server.status === 'online';
const statusLabel = server.status || 'pending';
const cpuCores = systemInfo?.cpu_cores || server.cpu_cores;
const cpuModel = systemInfo?.cpu_model || server.cpu_model;
const totalMemory = systemInfo?.total_memory || server.total_memory;
@@ -71,59 +111,75 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) =>
/>
</div>
)}
<KpiBand max={5}>
<KpiTile
icon={<PulseIcon />}
label={t('common.labels.status', 'Status')}
value={server.status || 'pending'}
tone={isOnline ? 'success' : server.status === 'connecting' ? 'warning' : 'danger'}
/>
<KpiTile
icon={<ClockIcon />}
label={t('common.labels.uptime', 'Uptime')}
value={isOnline ? formatUptime(metrics?.uptime) : '—'}
sub={isOnline && metrics?.uptime ? 'since last boot' : null}
/>
<KpiGauge
icon={<CpuIcon />}
label="CPU"
percent={isOnline ? metrics?.cpu_percent : null}
color="var(--accent-bright)"
sub={cpuCores ? `${cpuCores} cores` : null}
/>
<KpiGauge
icon={<MemoryIcon />}
label={t('common.labels.memory', 'Memory')}
percent={isOnline ? metrics?.memory_percent : null}
color="var(--cyan)"
sub={totalMemory ? formatBytes(totalMemory) : null}
/>
<KpiGauge
icon={<DiskIcon />}
label={t('common.labels.disk', 'Disk')}
percent={isOnline ? metrics?.disk_percent : null}
color="var(--green)"
sub={totalDisk ? formatBytes(totalDisk) : null}
/>
</KpiBand>
<OverviewBoard
kind="server"
shared
entityId={server.id}
entityLabel={server.name}
serverVar={server.id}
widgetTypes={SERVER_WIDGET_TYPES}
leading={SERVER_LEADING_WIDGETS}
>
{/* Only renders while the agent is unreachable, so it leaves
the layout on its own once the server is back. */}
<OverviewSection id="offline" title={t('app.serverOverviewTab.connection', 'Connection')} w={12} h={4} lead>
{!isOnline && (
<div className="offline-message">
<OfflineIcon />
<h4>{t('app.serverOverviewTab.serverOffline', 'Server offline')}</h4>
<p>
{server.status === 'pending'
? t('app.serverOverviewTab.waitingForAgentInstall', 'Waiting for the agent to be installed…')
: t('app.serverOverviewTab.cantReachAgent', "Couldn't connect to the server agent.")}
</p>
</div>
)}
</OverviewSection>
{!isOnline && (
<div className="info-card offline-card">
<div className="offline-message">
<OfflineIcon />
<h4>{t('app.serverOverviewTab.serverOffline', 'Server offline')}</h4>
<p>
{server.status === 'pending'
? t('app.serverOverviewTab.waitingForAgentInstall', 'Waiting for the agent to be installed…')
: t('app.serverOverviewTab.cantReachAgent', "Couldn't connect to the server agent.")}
</p>
</div>
</div>
)}
{/* The agent's live readings (no history needed). Offered in
the block library; the default layout opens with the
dashboard's metric widgets instead. */}
<OverviewSection id="live" title={t('app.serverOverviewTab.liveStatus', 'Live status')} w={12} h={4} placed={false}>
<KpiBand max={5}>
<MetricCard
icon={<PulseIcon />}
tone={isOnline ? 'green' : server.status === 'connecting' ? 'amber' : 'red'}
value={statusLabel.charAt(0).toUpperCase() + statusLabel.slice(1)}
label={t('common.labels.status', 'Status')}
/>
<MetricCard
icon={<ClockIcon />}
tone="accent"
value={isOnline ? formatUptime(metrics?.uptime) : '—'}
label={t('common.labels.uptime', 'Uptime')}
>
{isOnline && metrics?.uptime ? <div className="sk-kpi__sub">{t('app.serverOverviewTab.sinceLastBoot', 'since last boot')}</div> : null}
</MetricCard>
<UsageTile
icon={<CpuIcon />}
label="CPU"
percent={isOnline ? metrics?.cpu_percent : null}
color="var(--accent-bright)"
sub={cpuCores ? `${cpuCores} cores` : null}
/>
<UsageTile
icon={<MemoryIcon />}
label={t('common.labels.memory', 'Memory')}
percent={isOnline ? metrics?.memory_percent : null}
color="var(--cyan)"
sub={totalMemory ? formatBytes(totalMemory) : null}
/>
<UsageTile
icon={<DiskIcon />}
label={t('common.labels.disk', 'Disk')}
percent={isOnline ? metrics?.disk_percent : null}
color="var(--green)"
sub={totalDisk ? formatBytes(totalDisk) : null}
/>
</KpiBand>
</OverviewSection>
<div className="overview-grid">
<div className="info-card">
<h3><ServerIcon /> {t('app.serverOverviewTab.serverInformation', 'Server information')}</h3>
<OverviewSection id="info" title={t('app.serverOverviewTab.serverInformation', 'Server information')} icon={ServerGlyph} w={4} h={6}>
<InfoList className="server-info-list">
<InfoItem label={<><PulseIcon /> {t('common.labels.status', 'Status')}</>}>
<Pill kind={serverStatusKind(server.status)}>{server.status}</Pill>
@@ -136,10 +192,9 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) =>
value={server.last_seen ? formatDateTime(server.last_seen) : 'Never'}
/>
</InfoList>
</div>
</OverviewSection>
<div className="info-card">
<h3><ChipIcon /> {t('app.serverOverviewTab.systemInformation', 'System information')}</h3>
<OverviewSection id="system" title={t('app.serverOverviewTab.systemInformation', 'System information')} icon={Cpu} w={6} h={6}>
<InfoList className="server-info-list">
<InfoItem label={<><OsIcon /> {t('app.serverOverviewTab.operatingSystem', 'Operating system')}</>} value={osLabel} />
<InfoItem label={<><ArchIcon /> {t('app.serverOverviewTab.architecture', 'Architecture')}</>} value={systemInfo?.architecture || server.architecture || 'N/A'} />
@@ -152,24 +207,29 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) =>
<InfoItem label={<><MemoryIcon /> {t('app.serverOverviewTab.totalMemory', 'Total memory')}</>} value={formatBytes(totalMemory, { defaultValue: 'N/A' })} />
<InfoItem label={<><DiskIcon /> {t('app.serverOverviewTab.totalDisk', 'Total disk')}</>} value={formatBytes(totalDisk, { defaultValue: 'N/A' })} />
</InfoList>
</div>
</OverviewSection>
<div className="info-card overview-grid__full">
<h3><AgentIcon /> {t('app.serverOverviewTab.agentInformation', 'Agent information')}</h3>
<OverviewSection id="agent" title={t('app.serverOverviewTab.agentInformation', 'Agent information')} icon={Bot} w={6} h={6}>
<InfoList className="server-info-list server-info-list--columns">
<InfoItem label={<><TagIcon /> {t('app.serverOverviewTab.agentVersion', 'Agent version')}</>} value={server.agent_version || 'Not installed'} mono />
<InfoItem label={<><HashIcon /> {t('app.serverOverviewTab.agentId', 'Agent ID')}</>} value={server.agent_id || 'N/A'} mono />
<InfoItem label={<><DockerMiniIcon /> {t('app.serverOverviewTab.dockerVersion', 'Docker version')}</>} value={server.docker_version || systemInfo?.docker_version || 'N/A'} mono />
<InfoItem label={<><ClockIcon /> {t('common.labels.uptime', 'Uptime')}</>} value={formatUptime(metrics?.uptime)} />
</InfoList>
</div>
</OverviewSection>
<ServerHealthCard server={server} />
<OverviewSection id="permission" title={t('app.serverHealthCard.permissionLevel', 'Permission level')} icon={ShieldCheck} w={6} h={6}>
<ServerHealthCard server={server} part="permission" />
</OverviewSection>
<div className="overview-grid__full">
<OverviewSection id="health" title={t('app.serverHealthCard.health', 'Health')} icon={HeartPulse} w={6} h={6}>
<ServerHealthCard server={server} part="health" />
</OverviewSection>
<OverviewSection id="status" title={t('app.systemStatusCard.systemStatus', 'System status')} icon={ListChecks} w={12} h={10}>
<SystemStatusCard server={server} onRefresh={onRefreshServer} />
</div>
</div>
</OverviewSection>
</OverviewBoard>
</div>
);
};
@@ -1,5 +1,7 @@
import { TOKEN_EXPIRY_OPTIONS } from './serverDetailData';
import { useCallback, useState, useEffect, useId } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { Server, Tags, KeyRound, Shield, RefreshCw, Trash2 } from 'lucide-react';
import api from '../../services/api';
import { useToast } from '../../contexts/useToast.js';
import { useConfirm } from '../../hooks/useConfirm';
@@ -8,6 +10,8 @@ import { InfoList, InfoItem } from '../InfoList';
import InfoTip from '../InfoTip';
import { DangerZone } from '../DangerZone';
import { Button } from '@/components/ui/button';
import { Card } from '@/components/ui/card';
import { DetailSettings, DetailSettingsSection } from '@/components/detail/DetailSettings';
import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
import { Pill } from '../ds';
@@ -22,48 +26,57 @@ import {
} from '@/components/ui/select';
import TagsPanel from '../shared/TagsPanel';
import { useTranslation } from 'react-i18next';
import {
KeyIcon,
ServerIcon,
NetworkIcon,
TrashIcon,
TagIcon,
} from './serverDetailShared';
import { KeyIcon, TrashIcon } from './serverDetailShared';
import { toastError } from '@/utils/errorMessage';
import { formatDateTime } from '@/utils/intl';
// Radix Select items cannot carry an empty value; this stands for "no group".
const NO_GROUP = '__none';
const AgentRegistrationSection = ({ server, onRegenerateToken }) => {
const { t } = useTranslation();
// The connection-string InfoTip depends on the server's state, so its copy is
// assembled here rather than inline in the section title.
const connectionStringHelp = (server, t) => {
const expires = server.registration_expires;
const isExpired = expires && new Date(expires) < new Date();
const isOnline = server.status === 'online';
return (
<div className="form-section form-section--accent">
<div className="form-section__header">
<span className="form-section__icon"><KeyIcon /></span>
<div>
<h3>{t('app.serverSettingsTab.connectionString', 'Connection string')}
<InfoTip>
{t('app.serverSettingsTab.generateAFreshConnectionStringTo', 'Generate a fresh connection string to pair (or re-pair) this server. Useful after reinstalling the agent: old credentials are gone, but a new string brings the agent right back to this row.')}
{isOnline && ` ${t('app.serverSettingsTab.onlineRegenerateNote', 'This server is online now; a new string only affects re-pairing.')}`}
{isExpired && ` ${t('app.serverSettingsTab.previousTokenExpired', 'The previous token has expired.')}`}
</InfoTip></h3>
<p className="section-description">{t('app.serverSettingsTab.pairOrRepair', 'Pair or re-pair this server.')}</p>
</div>
</div>
<Button onClick={onRegenerateToken}>
<KeyIcon /> {t('app.serverSettingsTab.generateConnectionString', 'Generate connection string')}
</Button>
</div>
);
return [
t('app.serverSettingsTab.generateAFreshConnectionStringTo', 'Generate a fresh connection string to pair (or re-pair) this server. Useful after reinstalling the agent: old credentials are gone, but a new string brings the agent right back to this row.'),
server.status === 'online' && t('app.serverSettingsTab.onlineRegenerateNote', 'This server is online now; a new string only affects re-pairing.'),
isExpired && t('app.serverSettingsTab.previousTokenExpired', 'The previous token has expired.'),
].filter(Boolean).join(' ');
};
const ServerSettingsTab = ({ server, onUpdate, onRegenerateToken, onDelete }) => {
const { t } = useTranslation();
const navigate = useNavigate();
// Section lives in the URL (/servers/:id/settings/:section), same as the
// service detail page, so it is shareable and survives a refresh.
const { section: sectionParam } = useParams();
const settingsGroups = [
{
label: t('app.settingsTab.general', 'General'),
items: [
{ id: 'general', label: t('app.serverSettingsTab.basicInformation', 'Basic information'), icon: Server },
{ id: 'tags', label: t('app.serverSettingsTab.tags', 'Tags'), icon: Tags },
],
},
{
label: t('app.serverSettingsTab.connection', 'Connection'),
items: [
{ id: 'connection', label: t('app.serverSettingsTab.connectionString', 'Connection string'), icon: KeyRound },
{ id: 'allowlist', label: t('app.serverSettingsTab.ipAllowlist', 'IP allowlist'), icon: Shield },
{ id: 'credentials', label: t('app.serverSettingsTab.apiKeyRotation', 'API key rotation'), icon: RefreshCw },
],
},
{
label: t('app.settingsTab.advanced', 'Advanced'),
items: [
{ id: 'danger', label: t('app.serverSettingsTab.removeServer', 'Remove server'), icon: Trash2 },
],
},
];
const settingsItems = settingsGroups.flatMap((group) => group.items);
const section = settingsItems.some((item) => item.id === sectionParam) ? sectionParam : 'general';
const setSection = (next) => navigate(`/servers/${server.id}/settings/${next}`, { replace: true });
const fieldId = useId();
const { confirm: confirmSettings } = useConfirm();
const [formData, setFormData] = useState({
@@ -172,218 +185,233 @@ const ServerSettingsTab = ({ server, onUpdate, onRegenerateToken, onDelete }) =>
}
return (
<div className="settings-tab">
<div className="settings-grid">
<form onSubmit={handleSubmit} className="settings-form">
<div className="form-section form-section--accent">
<div className="form-section__header">
<span className="form-section__icon"><ServerIcon /></span>
<div>
<h3>{t('app.serverSettingsTab.basicInformation', 'Basic information')}</h3>
<p className="section-description">{t('app.serverSettingsTab.identityAndGroupingForThisServer', 'Identity and grouping for this server.')}</p>
</div>
</div>
<div className="form-group">
<label htmlFor={`${fieldId}-name`}>{t('app.serverSettingsTab.serverName', 'Server name')}</label>
<Input
id={`${fieldId}-name`}
type="text"
name="name"
value={formData.name}
onChange={handleChange}
required
/>
</div>
<div className="form-group">
<label htmlFor={`${fieldId}-description`}>{t('common.labels.description', 'Description')}</label>
<Textarea
id={`${fieldId}-description`}
name="description"
value={formData.description}
onChange={handleChange}
rows={3}
/>
</div>
<div className="form-row">
<DetailSettings
groups={settingsGroups}
value={section}
onValueChange={setSection}
ariaLabel={t('app.serverSettingsTab.settingsSections', 'Server settings sections')}
>
{section === 'general' && (
<DetailSettingsSection title={t('app.serverSettingsTab.basicInformation', 'Basic information')}>
<Card variant="legacy" className="card settings-section">
<form onSubmit={handleSubmit} className="settings-form">
<p className="hint">{t('app.serverSettingsTab.identityAndGroupingForThisServer', 'Identity and grouping for this server.')}</p>
<div className="form-group">
<label htmlFor={`${fieldId}-hostname`}>{t('app.serverSettingsTab.hostname', 'Hostname')}</label>
<label htmlFor={`${fieldId}-name`}>{t('app.serverSettingsTab.serverName', 'Server name')}</label>
<Input
id={`${fieldId}-hostname`}
id={`${fieldId}-name`}
type="text"
name="hostname"
value={formData.hostname}
name="name"
value={formData.name}
onChange={handleChange}
required
/>
</div>
<div className="form-group">
<label htmlFor={`${fieldId}-ip`}>{t('common.labels.ipAddress', 'IP address')}</label>
<Input
id={`${fieldId}-ip`}
type="text"
name="ip_address"
value={formData.ip_address}
<label htmlFor={`${fieldId}-description`}>{t('common.labels.description', 'Description')}</label>
<Textarea
id={`${fieldId}-description`}
name="description"
value={formData.description}
onChange={handleChange}
rows={3}
/>
</div>
</div>
<div className="form-group">
<label htmlFor="server-settings-group">{t('app.serverSettingsTab.group', 'Group')}</label>
<Select
name="group_id"
value={formData.group_id === '' || formData.group_id == null ? NO_GROUP : String(formData.group_id)}
onValueChange={(value) => setFormData(prev => ({ ...prev, group_id: value === NO_GROUP ? '' : value }))}
>
<SelectTrigger id="server-settings-group"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value={NO_GROUP}>{t('app.serverSettingsTab.noGroup', 'No group')}</SelectItem>
{groups.map(group => (
<SelectItem key={group.id} value={String(group.id)}>{group.name}</SelectItem>
))}
</SelectContent>
</Select>
</div>
<div className="form-row">
<div className="form-group">
<label htmlFor={`${fieldId}-hostname`}>{t('app.serverSettingsTab.hostname', 'Hostname')}</label>
<Input
id={`${fieldId}-hostname`}
type="text"
name="hostname"
value={formData.hostname}
onChange={handleChange}
/>
</div>
<div className="form-group">
<label htmlFor={`${fieldId}-ip`}>{t('common.labels.ipAddress', 'IP address')}</label>
<Input
id={`${fieldId}-ip`}
type="text"
name="ip_address"
value={formData.ip_address}
onChange={handleChange}
/>
</div>
</div>
<Button type="submit" disabled={loading}>
{loading ? t('common.saving', 'Saving…') : t('app.serverSettingsTab.saveChanges', 'Save changes')}
</Button>
</div>
</form>
<div className="form-group">
<label htmlFor="server-settings-group">{t('app.serverSettingsTab.group', 'Group')}</label>
<Select
name="group_id"
value={formData.group_id === '' || formData.group_id == null ? NO_GROUP : String(formData.group_id)}
onValueChange={(value) => setFormData(prev => ({ ...prev, group_id: value === NO_GROUP ? '' : value }))}
>
<SelectTrigger id="server-settings-group"><SelectValue /></SelectTrigger>
<SelectContent>
<SelectItem value={NO_GROUP}>{t('app.serverSettingsTab.noGroup', 'No group')}</SelectItem>
{groups.map(group => (
<SelectItem key={group.id} value={String(group.id)}>{group.name}</SelectItem>
))}
</SelectContent>
</Select>
</div>
<AgentRegistrationSection
server={server}
onRegenerateToken={onRegenerateToken}
/>
</div>
<div className="security-grid">
<div className="form-section form-section--accent">
<div className="form-section__header">
<span className="form-section__icon"><NetworkIcon /></span>
<div>
<h3>{t('app.serverSettingsTab.connectionIpAllowlist', 'Connection and IP allowlist')}
<InfoTip>{t('app.serverSettingsTab.restrictWhichIpsCanConnectSupports', 'Restrict which IPs can connect. Supports single IPs, CIDR notation, and wildcards.')}</InfoTip></h3>
<p className="section-description">{t('app.serverSettingsTab.allowedIps', 'Allowed IPs only.')}</p>
</div>
</div>
{connectionInfo && (
<InfoList className="security-info-bar">
<InfoItem
label={t('app.serverSettingsTab.connectionIp', 'Connection IP')}
value={connectionInfo.ip_address || 'Not connected'}
mono
/>
{connectionInfo.connected_since && (
<InfoItem
label={t('app.serverSettingsTab.connectedSince', 'Connected since')}
value={formatDateTime(connectionInfo.connected_since)}
/>
)}
</InfoList>
)}
<div className="subsection">
<div className="ip-list">
{allowedIPs.length === 0 ? (
<div className="ip-empty">{t('app.serverSettingsTab.noIpRestrictionsAllIpsAllowed', 'No IP restrictions (all IPs allowed)')}</div>
) : (
allowedIPs.map((ip, idx) => (
<div key={idx} className="ip-item">
<code>{ip}</code>
{connectionInfo?.ip_address === ip && (
<Pill kind="green" dot={false}>{t('common.labels.current', 'Current')}</Pill>
)}
<Button variant="unstyled" type="button"
className="btn-icon danger"
onClick={() => handleRemoveIP(ip)}
title={t('common.actions.remove', 'Remove')}
>
<TrashIcon />
</Button>
</div>
))
)}
</div>
<div className="ip-add-form">
<Input
type="text"
placeholder={t('app.serverSettingsTab.ipAddressOrCidrEG', 'IP address or CIDR (e.g. 192.168.1.0/24)')}
value={newIP}
onChange={(e) => setNewIP(e.target.value)}
onKeyPress={(e) => e.key === 'Enter' && (e.preventDefault(), handleAddIP())}
/>
<Button variant="outline" onClick={handleAddIP}>
{t('common.actions.add', 'Add')}
<Button type="submit" disabled={loading}>
{loading ? t('common.saving', 'Saving…') : t('app.serverSettingsTab.saveChanges', 'Save changes')}
</Button>
</div>
</form>
</Card>
</DetailSettingsSection>
)}
{connectionInfo?.ip_address && allowedIPs.length > 0 && !allowedIPs.some(ip => {
return ip === connectionInfo.ip_address || ip.includes('*') || ip.includes('/');
}) && (
<div className="security-warning">
{t('app.serverSettingsTab.currentConnectionIp', 'Current connection IP (')}{connectionInfo.ip_address}{t('app.serverSettingsTab.mayBeBlockedByTheseRules', ') may be blocked by these rules.')}
</div>
)}
</div>
</div>
<div className="form-section form-section--accent">
<div className="form-section__header">
<span className="form-section__icon"><KeyIcon /></span>
<div>
<h3>{t('app.serverSettingsTab.apiKeyRotation', 'API key rotation')}
<InfoTip>{t('app.serverSettingsTab.rotateTheApiCredentialsUsedBy', 'Rotate the API credentials used by the agent. The agent must be online to receive new credentials.')}</InfoTip></h3>
<p className="section-description">{t('app.serverSettingsTab.rotateAgentCredentials', 'Rotate agent credentials.')}</p>
</div>
</div>
<div className="key-rotation-actions">
<Button
variant="outline"
onClick={handleRotateKey}
disabled={rotatingKey || server.status !== 'online'}
>
<KeyIcon /> {rotatingKey ? t('app.serverSettingsTab.rotating', 'Rotating…') : t('app.serverSettingsTab.rotateApiKey', 'Rotate API key')}
</Button>
{server.api_key_last_rotated && (
<span className="key-rotation-hint">{t('app.serverSettingsTab.lastRotated', 'Last rotated:')} {formatDateTime(server.api_key_last_rotated)}</span>
)}
</div>
{server.status !== 'online' && (
<div className="security-notice">
{t('app.serverSettingsTab.serverMustBeOnlineToRotate', 'Server must be online to rotate credentials.')}
</div>
)}
</div>
</div>
<div className="form-section form-section--accent shared-resources-section">
<div className="form-section__header">
<span className="form-section__icon"><TagIcon /></span>
<div>
<h3>{t('app.serverSettingsTab.tags', 'Tags')}</h3>
<p className="section-description">
{section === 'tags' && (
<DetailSettingsSection title={t('app.serverSettingsTab.tags', 'Tags')}>
<Card variant="legacy" className="card settings-section">
<p className="hint">
{t('app.serverSettingsTab.freeFormLabelsForGroupingAnd', 'Free-form labels for grouping and filtering this server across the panel.')}
</p>
</div>
</div>
<TagsPanel resourceType="server" resourceId={server.id} />
</div>
<TagsPanel resourceType="server" resourceId={server.id} />
</Card>
</DetailSettingsSection>
)}
<DangerZone
title={t('app.serverSettingsTab.dangerZone', 'Remove server')}
description={t('app.serverSettingsTab.removingThisServerWillDisconnectThe', 'Removing this server will disconnect the agent and delete all associated data.')}
action={
<Button variant="destructive" onClick={onDelete}>
<TrashIcon /> {t('app.serverSettingsTab.removeServer', 'Remove server')}
</Button>
}
/>
</div>
{section === 'connection' && (
<DetailSettingsSection
title={<>
{t('app.serverSettingsTab.connectionString', 'Connection string')}
<InfoTip>{connectionStringHelp(server, t)}</InfoTip>
</>}
>
<Card variant="legacy" className="card settings-section">
<p className="hint">{t('app.serverSettingsTab.pairOrRepair', 'Pair or re-pair this server.')}</p>
<Button onClick={onRegenerateToken}>
<KeyIcon /> {t('app.serverSettingsTab.generateConnectionString', 'Generate connection string')}
</Button>
</Card>
</DetailSettingsSection>
)}
{section === 'allowlist' && (
<DetailSettingsSection
title={<>
{t('app.serverSettingsTab.connectionIpAllowlist', 'Connection and IP allowlist')}
<InfoTip>{t('app.serverSettingsTab.restrictWhichIpsCanConnectSupports', 'Restrict which IPs can connect. Supports single IPs, CIDR notation, and wildcards.')}</InfoTip>
</>}
>
<Card variant="legacy" className="card settings-section">
<p className="hint">{t('app.serverSettingsTab.allowedIps', 'Allowed IPs only.')}</p>
{connectionInfo && (
<InfoList className="security-info-bar">
<InfoItem
label={t('app.serverSettingsTab.connectionIp', 'Connection IP')}
value={connectionInfo.ip_address || 'Not connected'}
mono
/>
{connectionInfo.connected_since && (
<InfoItem
label={t('app.serverSettingsTab.connectedSince', 'Connected since')}
value={formatDateTime(connectionInfo.connected_since)}
/>
)}
</InfoList>
)}
<div className="subsection">
<div className="ip-list">
{allowedIPs.length === 0 ? (
<div className="ip-empty">{t('app.serverSettingsTab.noIpRestrictionsAllIpsAllowed', 'No IP restrictions (all IPs allowed)')}</div>
) : (
allowedIPs.map((ip, idx) => (
<div key={idx} className="ip-item">
<code>{ip}</code>
{connectionInfo?.ip_address === ip && (
<Pill kind="green" dot={false}>{t('common.labels.current', 'Current')}</Pill>
)}
<Button variant="unstyled" type="button"
className="btn-icon danger"
onClick={() => handleRemoveIP(ip)}
title={t('common.actions.remove', 'Remove')}
>
<TrashIcon />
</Button>
</div>
))
)}
</div>
<div className="ip-add-form">
<Input
type="text"
placeholder={t('app.serverSettingsTab.ipAddressOrCidrEG', 'IP address or CIDR (e.g. 192.168.1.0/24)')}
value={newIP}
onChange={(e) => setNewIP(e.target.value)}
onKeyPress={(e) => e.key === 'Enter' && (e.preventDefault(), handleAddIP())}
/>
<Button variant="outline" onClick={handleAddIP}>
{t('common.actions.add', 'Add')}
</Button>
</div>
{connectionInfo?.ip_address && allowedIPs.length > 0 && !allowedIPs.some(ip => {
return ip === connectionInfo.ip_address || ip.includes('*') || ip.includes('/');
}) && (
<div className="security-warning">
{t('app.serverSettingsTab.currentConnectionIp', 'Current connection IP (')}{connectionInfo.ip_address}{t('app.serverSettingsTab.mayBeBlockedByTheseRules', ') may be blocked by these rules.')}
</div>
)}
</div>
</Card>
</DetailSettingsSection>
)}
{section === 'credentials' && (
<DetailSettingsSection
title={<>
{t('app.serverSettingsTab.apiKeyRotation', 'API key rotation')}
<InfoTip>{t('app.serverSettingsTab.rotateTheApiCredentialsUsedBy', 'Rotate the API credentials used by the agent. The agent must be online to receive new credentials.')}</InfoTip>
</>}
>
<Card variant="legacy" className="card settings-section">
<p className="hint">{t('app.serverSettingsTab.rotateAgentCredentials', 'Rotate agent credentials.')}</p>
<div className="key-rotation-actions">
<Button
variant="outline"
onClick={handleRotateKey}
disabled={rotatingKey || server.status !== 'online'}
>
<KeyIcon /> {rotatingKey ? t('app.serverSettingsTab.rotating', 'Rotating…') : t('app.serverSettingsTab.rotateApiKey', 'Rotate API key')}
</Button>
{server.api_key_last_rotated && (
<span className="key-rotation-hint">{t('app.serverSettingsTab.lastRotated', 'Last rotated:')} {formatDateTime(server.api_key_last_rotated)}</span>
)}
</div>
{server.status !== 'online' && (
<div className="security-notice">
{t('app.serverSettingsTab.serverMustBeOnlineToRotate', 'Server must be online to rotate credentials.')}
</div>
)}
</Card>
</DetailSettingsSection>
)}
{section === 'danger' && (
<DetailSettingsSection title={t('app.serverSettingsTab.dangerZone', 'Remove server')}>
<DangerZone
description={t('app.serverSettingsTab.removingThisServerWillDisconnectThe', 'Removing this server will disconnect the agent and delete all associated data.')}
action={
<Button variant="destructive" onClick={onDelete}>
<TrashIcon /> {t('app.serverSettingsTab.removeServer', 'Remove server')}
</Button>
}
/>
</DetailSettingsSection>
)}
</DetailSettings>
);
};
@@ -48,7 +48,7 @@ export default function SystemStatusCard({ server, onRefresh }) {
const runtimeKeys = Object.keys(runtimes).filter((k) => runtimes[k]).sort();
return (
<div className="info-card system-status-card">
<div className="overview-tab__card overview-tab__card--full system-status-card">
<div className="system-status-card__header">
<div className="system-status-card__title">
<h3>{t('app.systemStatusCard.systemStatus', 'System status')}</h3>
@@ -1,5 +1,4 @@
import { Button } from '@/components/ui/button';
import { Gauge } from '../ds';
import { useClipboard } from '@/hooks/useClipboard';
import { useTranslation } from 'react-i18next';
import { formatDateTime } from '@/utils/intl';
@@ -47,37 +46,6 @@ export const SecurityAlertItem = ({ alert, onAcknowledge, onResolve }) => {
};
export const KpiTile = ({ icon, label, value, sub, tone }) => (
<div className={`kpi-tile${tone ? ` kpi-tile--${tone}` : ''}`}>
<div className="kpi-tile__head">
<span className="kpi-tile__icon">{icon}</span>
<span className="kpi-tile__label">{label}</span>
</div>
<div className="kpi-tile__value">{value}</div>
{sub && <div className="kpi-tile__sub">{sub}</div>}
</div>
);
export const KpiGauge = ({ icon, label, percent, color, sub }) => {
const has = percent !== null && percent !== undefined && Number.isFinite(percent);
const safe = has ? Math.min(Math.max(percent, 0), 100) : 0;
const danger = safe > 85;
const warn = safe > 70 && !danger;
const fillColor = danger ? 'var(--red)' : warn ? 'var(--amber)' : color;
return (
<div className={`kpi-tile kpi-tile--gauge${danger ? ' kpi-tile--danger' : warn ? ' kpi-tile--warn' : ''}`}>
<div className="kpi-tile__head">
<span className="kpi-tile__icon">{icon}</span>
<span className="kpi-tile__label">{label}</span>
</div>
<div className="kpi-tile__value">{has ? `${safe.toFixed(1)}%` : '—'}</div>
<Gauge className="kpi-tile__meter" value={safe} color={fillColor} />
{sub && <div className="kpi-tile__sub">{sub}</div>}
</div>
);
};
export const CopyChip = ({ label, value, title, mono }) => {
const { t } = useTranslation();
const { copy } = useClipboard();
@@ -157,7 +157,7 @@ export default function AttachmentsCard({ app }) {
const open = kinds.filter((k) => !attachedKinds.has(k));
return (
<div className="overview-tab__card overview-tab__card--full attachments">
<div className="overview-tab__card attachments">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.attachments.title', 'Attached services')}</h3>
{open.length > 0 && (
@@ -1,6 +1,6 @@
import { useCallback, useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { Activity, Rocket, CheckCircle2, XCircle, Globe, Database, ShieldCheck, ExternalLink } from 'lucide-react';
import { Globe, Database, ShieldCheck, ExternalLink } from 'lucide-react';
import { servicePortUrl } from '@/utils/serviceUrl';
import api from '../../services/api';
import { useDeployments } from '../../hooks/useDeployments';
@@ -14,7 +14,8 @@ import AttachmentsCard from './AttachmentsCard';
import PoolerCard from './PoolerCard';
import SlotsCard from './SlotsCard';
import HintsCard from './HintsCard';
import { KpiBand, MetricCard, Pill, Gauge, EnvTag, statusKind } from '@/components/ds';
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
import { Pill, Gauge, EnvTag, statusKind } from '@/components/ds';
import { usePolling } from '@/hooks/usePolling';
import { useTranslation } from 'react-i18next';
import { normalizeContainerStats, resolveAppContainerId } from '@/utils/containerMetrics';
@@ -32,6 +33,9 @@ const ENV_LABEL = {
staging: 'STAGING',
};
// Dashboard widget types a service overview can carry besides its own blocks.
const SERVICE_WIDGET_TYPES = ['note'];
const OverviewTab = ({ app, deployConfig }) => {
const { t } = useTranslation();
const [metrics, setMetrics] = useState(null);
@@ -114,283 +118,278 @@ const OverviewTab = ({ app, deployConfig }) => {
return (
<div className="overview-tab">
{/* KPI Strip */}
<KpiBand>
<MetricCard
tone={app.isRunning ? 'green' : 'amber'}
icon={<Activity size={16} />}
value={app.isRunning ? 'Live' : 'Stopped'}
label={t('common.labels.status', 'Status')}
/>
<MetricCard
tone="accent"
icon={<Rocket size={16} />}
value={deployments.length}
label={t('app.overviewTab.totalDeploys', 'Total deploys')}
/>
<MetricCard
tone="green"
icon={<CheckCircle2 size={16} />}
value={successfulDeploys.length}
label={t('app.overviewTab.successful', 'Successful')}
/>
<MetricCard
tone="red"
icon={<XCircle size={16} />}
value={failedDeploys.length}
label={t('common.state.failed', 'Failed')}
/>
</KpiBand>
<div className="overview-tab__grid">
{/* Service Info Card */}
<div className="overview-tab__card">
<h3 className="overview-tab__card-title">{t('app.overviewTab.serviceInfo', 'Service info')}</h3>
<InfoList className="overview-tab__info-list">
<InfoItem label={t('common.labels.type', 'Type')}>
<span className="info-value">
<span
className="overview-tab__info-badge"
style={{ backgroundColor: app.typeInfo.bgColor, color: app.typeInfo.color, borderColor: app.typeInfo.borderColor }}
>
{app.typeInfo.label}
</span>
</span>
</InfoItem>
{app.domain && (
<InfoItem label={t('common.labels.domain', 'Domain')}>
<OverviewBoard kind="service" shared entityId={app.id} entityLabel={app.name} widgetTypes={SERVICE_WIDGET_TYPES}>
<OverviewSection id="info" title={t('app.overviewTab.serviceInfo', 'Service info')} w={6} h={7}>
<div className="overview-tab__card">
<h3 className="overview-tab__card-title">{t('app.overviewTab.serviceInfo', 'Service info')}</h3>
<InfoList className="overview-tab__info-list">
<InfoItem label={t('common.labels.type', 'Type')}>
<span className="info-value">
<a
href={`https://${app.domain}`}
target="_blank"
rel="noopener noreferrer"
className="overview-tab__info-link"
<span
className="overview-tab__info-badge"
style={{ backgroundColor: app.typeInfo.bgColor, color: app.typeInfo.color, borderColor: app.typeInfo.borderColor }}
>
{app.domain}
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
<polyline points="15 3 21 3 21 9"/>
<line x1="10" y1="14" x2="21" y2="3"/>
</svg>
</a>
{app.typeInfo.label}
</span>
</span>
</InfoItem>
)}
{app.port && (
<InfoItem label={t('common.labels.port', 'Port')}>
<span className="info-value">
{/* A port with no domain in front of it is
still reachable — the number alone made
you assemble the URL yourself. */}
{portUrl ? (
{app.domain && (
<InfoItem label={t('common.labels.domain', 'Domain')}>
<span className="info-value">
<a
href={portUrl}
href={`https://${app.domain}`}
target="_blank"
rel="noopener noreferrer"
className="overview-tab__info-link"
title={t('app.overviewTab.open', 'Open {{portUrl}}', { portUrl: portUrl })}
>
{app.port}
<ExternalLink size={10} />
{app.domain}
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>
<polyline points="15 3 21 3 21 9"/>
<line x1="10" y1="14" x2="21" y2="3"/>
</svg>
</a>
) : app.port}
</span>
</InfoItem>
)}
<InfoItem label={t('common.labels.created', 'Created')}>
<span className="info-value">
{formatDate(app.created_at, { parts: {
year: 'numeric', month: 'short', day: 'numeric'
} })}
</span>
</InfoItem>
{deployConfig && (
<InfoItem label={t('app.overviewTab.repository', 'Repository')}>
<span className="info-value">
{extractRepoDisplay(deployConfig.repo_url)}
<span className="overview-tab__branch">{deployConfig.branch || 'main'}</span>
</span>
</InfoItem>
)}
{app.environment_type && app.environment_type !== 'standalone' && (
<InfoItem label={t('app.overviewTab.environment', 'Environment')}>
<span className="info-value">
<EnvTag env={ENV_LABEL[app.environment_type] || app.environment_type.toUpperCase()} />
</span>
</InfoItem>
)}
</InfoList>
</div>
{/* Resource Usage Card */}
<div className="overview-tab__card">
<h3 className="overview-tab__card-title">{t('app.overviewTab.resourceUsage', 'Resource usage')}</h3>
{metricsLoading ? (
<div className="overview-tab__loading">{t('app.overviewTab.loadingMetrics', 'Loading metrics…')}</div>
) : isDocker && metrics ? (
<div className="overview-tab__metrics">
<div className="overview-tab__metric">
<div className="overview-tab__metric-header">
<span>CPU</span>
<span className="overview-tab__metric-value">{metrics.cpu.toFixed(1)}%</span>
</div>
<Gauge value={metrics.cpu} />
</div>
<div className="overview-tab__metric">
<div className="overview-tab__metric-header">
<span>{t('common.labels.memory', 'Memory')}</span>
<span className="overview-tab__metric-value">{metrics.memory.toFixed(1)}%</span>
</div>
<Gauge value={metrics.memory} />
<span className="overview-tab__metric-detail">{metrics.memUsage}</span>
</div>
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('app.overviewTab.networkIO', 'Network I/O')}</span>
<span className="overview-tab__metric-item-value">{metrics.netIO}</span>
</div>
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('app.overviewTab.processes', 'Processes')}</span>
<span className="overview-tab__metric-item-value">{metrics.pids}</span>
</div>
</div>
</div>
) : isPython && metrics ? (
<div className="overview-tab__metrics">
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('common.labels.status', 'Status')}</span>
<span className="overview-tab__metric-item-value">
{metrics.active ? t('app.overviewTab.active', 'Active') : t('app.overviewTab.inactive', 'Inactive')}
</span>
</div>
{metrics.pid && (
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">PID</span>
<span className="overview-tab__metric-item-value">{metrics.pid}</span>
</InfoItem>
)}
{app.port && (
<InfoItem label={t('common.labels.port', 'Port')}>
<span className="info-value">
{/* A port with no domain in front of it is
still reachable — the number alone made
you assemble the URL yourself. */}
{portUrl ? (
<a
href={portUrl}
target="_blank"
rel="noopener noreferrer"
className="overview-tab__info-link"
title={t('app.overviewTab.open', 'Open {{portUrl}}', { portUrl: portUrl })}
>
{app.port}
<ExternalLink size={10} />
</a>
) : app.port}
</span>
</InfoItem>
)}
<InfoItem label={t('common.labels.created', 'Created')}>
<span className="info-value">
{formatDate(app.created_at, { parts: {
year: 'numeric', month: 'short', day: 'numeric'
} })}
</span>
</InfoItem>
{deployConfig && (
<InfoItem label={t('app.overviewTab.repository', 'Repository')}>
<span className="info-value">
{extractRepoDisplay(deployConfig.repo_url)}
<span className="overview-tab__branch">{deployConfig.branch || 'main'}</span>
</span>
</InfoItem>
)}
{app.environment_type && app.environment_type !== 'standalone' && (
<InfoItem label={t('app.overviewTab.environment', 'Environment')}>
<span className="info-value">
<EnvTag env={ENV_LABEL[app.environment_type] || app.environment_type.toUpperCase()} />
</span>
</InfoItem>
)}
</InfoList>
</div>
</OverviewSection>
<OverviewSection id="resources" title={t('app.overviewTab.resourceUsage', 'Resource usage')} w={6} h={7}>
<div className="overview-tab__card">
<h3 className="overview-tab__card-title">{t('app.overviewTab.resourceUsage', 'Resource usage')}</h3>
{metricsLoading ? (
<div className="overview-tab__loading">{t('app.overviewTab.loadingMetrics', 'Loading metrics…')}</div>
) : isDocker && metrics ? (
<div className="overview-tab__metrics">
<div className="overview-tab__metric">
<div className="overview-tab__metric-header">
<span>CPU</span>
<span className="overview-tab__metric-value">{metrics.cpu.toFixed(1)}%</span>
</div>
)}
</div>
{metrics.memory && (
<Gauge value={metrics.cpu} />
</div>
<div className="overview-tab__metric">
<div className="overview-tab__metric-header">
<span>{t('common.labels.memory', 'Memory')}</span>
<span className="overview-tab__metric-value">{metrics.memory.toFixed(1)}%</span>
</div>
<Gauge value={metrics.memory} />
<span className="overview-tab__metric-detail">{metrics.memUsage}</span>
</div>
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('common.labels.memory', 'Memory')}</span>
<span className="overview-tab__metric-item-value">{metrics.memory}</span>
<span className="overview-tab__metric-item-label">{t('app.overviewTab.networkIO', 'Network I/O')}</span>
<span className="overview-tab__metric-item-value">{metrics.netIO}</span>
</div>
{metrics.workers && (
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('app.overviewTab.processes', 'Processes')}</span>
<span className="overview-tab__metric-item-value">{metrics.pids}</span>
</div>
</div>
</div>
) : isPython && metrics ? (
<div className="overview-tab__metrics">
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('common.labels.status', 'Status')}</span>
<span className="overview-tab__metric-item-value">
{metrics.active ? t('app.overviewTab.active', 'Active') : t('app.overviewTab.inactive', 'Inactive')}
</span>
</div>
{metrics.pid && (
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('app.overviewTab.workers', 'Workers')}</span>
<span className="overview-tab__metric-item-value">{metrics.workers}</span>
<span className="overview-tab__metric-item-label">PID</span>
<span className="overview-tab__metric-item-value">{metrics.pid}</span>
</div>
)}
</div>
)}
{metrics.uptime && (
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('common.labels.uptime', 'Uptime')}</span>
<span className="overview-tab__metric-item-value">{metrics.uptime}</span>
{metrics.memory && (
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('common.labels.memory', 'Memory')}</span>
<span className="overview-tab__metric-item-value">{metrics.memory}</span>
</div>
{metrics.workers && (
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('app.overviewTab.workers', 'Workers')}</span>
<span className="overview-tab__metric-item-value">{metrics.workers}</span>
</div>
)}
</div>
</div>
)}
</div>
) : (
<div className="overview-tab__no-metrics">
<p>{app.isRunning
? t('app.overviewTab.noMetricsForType', 'No metrics available for this service type.')
: t('app.overviewTab.startToViewMetrics', 'Start the service to view metrics.')}</p>
)}
{metrics.uptime && (
<div className="overview-tab__metric-row">
<div className="overview-tab__metric-item">
<span className="overview-tab__metric-item-label">{t('common.labels.uptime', 'Uptime')}</span>
<span className="overview-tab__metric-item-value">{metrics.uptime}</span>
</div>
</div>
)}
</div>
) : (
<div className="overview-tab__no-metrics">
<p>{app.isRunning
? t('app.overviewTab.noMetricsForType', 'No metrics available for this service type.')
: t('app.overviewTab.startToViewMetrics', 'Start the service to view metrics.')}</p>
</div>
)}
</div>
</OverviewSection>
{/* Member-visible: domains, DBs, backups, deploys */}
<OverviewSection id="related" title={t('app.overviewTab.relatedResources', 'Related resources')} w={4} h={4}>
<RelatedResourcesCard app={app} related={related} />
</OverviewSection>
{/* Read-only cron summary; renders nothing for non-members */}
<OverviewSection id="scheduled" title={t('app.scheduledTasksCard.scheduledTasks', 'Scheduled tasks')} w={4} h={4}>
<ScheduledTasksCard appId={app.id} />
</OverviewSection>
{/* Daily nginx rollups; hidden until data exists */}
<OverviewSection id="bandwidth" title={t('app.overviewTab.bandwidth', 'Bandwidth')} w={12} h={4}>
{bandwidth?.series?.some(p => p.bytes_sent > 0) && (
<div className="overview-tab__card overview-tab__card--full overview-tab__bandwidth">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.overviewTab.bandwidth', 'Bandwidth')}</h3>
<span className="overview-tab__bandwidth-month">
{formatBytes(bandwidth.month_bytes)} {t('app.overviewTab.thisMonth', 'this month')}
</span>
</div>
<BandwidthSparkline
data={bandwidth.series.map(p => p.bytes_sent)}
width={600}
height={48}
className="bw-spark--wide"
/>
<span className="overview-tab__bandwidth-caption">{t('app.overviewTab.last90Days', 'Last 90 days')}</span>
</div>
)}
</div>
</OverviewSection>
{/* Related Resources Card (member-visible: domains, DBs, backups, deploys) */}
<RelatedResourcesCard app={app} related={related} />
{/* Timed access log; hidden until requests exist */}
<OverviewSection id="traffic" title={t('app.overviewTab.traffic', 'Traffic')} w={12} h={6}>
<RequestMetricsCard appId={app.id} />
</OverviewSection>
{/* Scheduled tasks (read-only cron summary; renders nothing for non-members) */}
<ScheduledTasksCard appId={app.id} />
</div>
{/* Bottleneck hints from the traffic above */}
<OverviewSection id="hints" title={t('app.overviewTab.hints', 'Hints')} w={12} h={4}>
<HintsCard app={app} />
</OverviewSection>
{/* Bandwidth (daily nginx rollups; hidden until data exists) */}
{bandwidth?.series?.some(p => p.bytes_sent > 0) && (
<div className="overview-tab__card overview-tab__card--full overview-tab__bandwidth">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.overviewTab.bandwidth', 'Bandwidth')}</h3>
<span className="overview-tab__bandwidth-month">
{formatBytes(bandwidth.month_bytes)} {t('app.overviewTab.thisMonth', 'this month')}
</span>
{/* Cache / storage / queue this app uses */}
<OverviewSection id="attachments" title={t('app.attachments.title', 'Attached services')} w={4} h={4}>
<AttachmentsCard app={app} />
</OverviewSection>
{/* PgBouncer beside an installed PostgreSQL */}
<OverviewSection id="pooler" title={t('app.pooler.title', 'Connection pooling')} w={6} h={4}>
<PoolerCard app={app} />
</OverviewSection>
{/* A/B slot deploys: live release, warm standby, switch back */}
<OverviewSection id="slots" title={t('app.slots.title', 'Slot deploys')} w={6} h={4}>
<SlotsCard app={app} />
</OverviewSection>
<OverviewSection id="deployments" title={t('app.overviewTab.recentDeployments', 'Recent deployments')} w={6} h={4}>
<div className="overview-tab__card overview-tab__card--full">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.overviewTab.recentDeployments', 'Recent deployments')}</h3>
{deployments.length > 0 && (
<span className="overview-tab__see-all">
{t('app.overviewTab.deploySummary', '{{total}} total · {{successful}} successful · {{failed}} failed', {
total: deployments.length,
successful: successfulDeploys.length,
failed: failedDeploys.length,
})}
</span>
)}
</div>
{deploymentsLoading ? (
<div className="overview-tab__loading">{t('common.loading', 'Loading…')}</div>
) : deployments.length === 0 ? (
<div className="overview-tab__no-deploys">
<p>{t('app.overviewTab.noDeploymentsYetDeployYourService', 'No deployments yet. Deploy your service to see history here.')}</p>
</div>
) : (
<div className="overview-tab__deploy-list">
{deployments.slice(0, 5).map((deploy, idx) => {
const statusInfo = getDeployStatus(deploy.status);
const tone = statusKind(deploy.status);
const isLatest = idx === 0 && deploy.status === 'success';
return (
<div key={deploy.id} className="overview-tab__deploy-row">
<div className={`overview-tab__deploy-dot overview-tab__deploy-dot--${tone}`} />
<div className="overview-tab__deploy-info">
<span className="overview-tab__deploy-message">
{deploy.commitMessage || deploy.version || t('app.overviewTab.deploymentNumber', 'Deployment #{{number}}', { number: deployments.length - idx })}
</span>
<span className="overview-tab__deploy-meta">
{deploy.commitSha && (
<span className="overview-tab__deploy-sha">{deploy.commitSha.substring(0, 7)}</span>
)}
{deploy.branch && <span>{deploy.branch}</span>}
{deploy.duration && <span>{formatDuration(deploy.duration)}</span>}
<span>{formatRelativeTime(deploy.timestamp)}</span>
</span>
</div>
<Pill kind={isLatest ? 'green' : tone}>
{isLatest ? t('app.overviewTab.live', 'Live') : statusInfo.label}
</Pill>
</div>
);
})}
</div>
)}
</div>
<BandwidthSparkline
data={bandwidth.series.map(p => p.bytes_sent)}
width={600}
height={48}
className="bw-spark--wide"
/>
<span className="overview-tab__bandwidth-caption">{t('app.overviewTab.last90Days', 'Last 90 days')}</span>
</div>
)}
{/* Traffic (timed access log; hidden until requests exist) */}
<RequestMetricsCard appId={app.id} />
{/* Bottleneck hints from the traffic above */}
<HintsCard app={app} />
{/* Cache / storage / queue this app uses */}
<AttachmentsCard app={app} />
{/* PgBouncer beside an installed PostgreSQL */}
<PoolerCard app={app} />
{/* A/B slot deploys: live release, warm standby, switch back */}
<SlotsCard app={app} />
{/* Recent Deployments */}
<div className="overview-tab__card overview-tab__card--full">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.overviewTab.recentDeployments', 'Recent deployments')}</h3>
{deployments.length > 3 && (
<span className="overview-tab__see-all">
{deployments.length} total
</span>
)}
</div>
{deploymentsLoading ? (
<div className="overview-tab__loading">{t('common.loading', 'Loading…')}</div>
) : deployments.length === 0 ? (
<div className="overview-tab__no-deploys">
<p>{t('app.overviewTab.noDeploymentsYetDeployYourService', 'No deployments yet. Deploy your service to see history here.')}</p>
</div>
) : (
<div className="overview-tab__deploy-list">
{deployments.slice(0, 5).map((deploy, idx) => {
const statusInfo = getDeployStatus(deploy.status);
const tone = statusKind(deploy.status);
const isLatest = idx === 0 && deploy.status === 'success';
return (
<div key={deploy.id} className="overview-tab__deploy-row">
<div className={`overview-tab__deploy-dot overview-tab__deploy-dot--${tone}`} />
<div className="overview-tab__deploy-info">
<span className="overview-tab__deploy-message">
{deploy.commitMessage || deploy.version || t('app.overviewTab.deploymentNumber', 'Deployment #{{number}}', { number: deployments.length - idx })}
</span>
<span className="overview-tab__deploy-meta">
{deploy.commitSha && (
<span className="overview-tab__deploy-sha">{deploy.commitSha.substring(0, 7)}</span>
)}
{deploy.branch && <span>{deploy.branch}</span>}
{deploy.duration && <span>{formatDuration(deploy.duration)}</span>}
<span>{formatRelativeTime(deploy.timestamp)}</span>
</span>
</div>
<Pill kind={isLatest ? 'green' : tone}>
{isLatest ? t('app.overviewTab.live', 'Live') : statusInfo.label}
</Pill>
</div>
);
})}
</div>
)}
</div>
</OverviewSection>
</OverviewBoard>
</div>
);
};
@@ -46,7 +46,7 @@ export default function PoolerCard({ app }) {
}
return (
<div className="overview-tab__card overview-tab__card--full pooler">
<div className="overview-tab__card pooler">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.pooler.title', 'Connection pooling')}</h3>
<Switch
@@ -1,5 +1,6 @@
import { useEffect, useState, useId } from 'react';
import { useNavigate, useParams, Link } from 'react-router-dom';
import { DetailSettings } from '@/components/detail/DetailSettings';
import {
SlidersHorizontal,
GitBranch,
@@ -231,31 +232,16 @@ const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) =>
}
return (
<div className="svc-settings">
<nav className="svc-settings__nav" aria-label={t('app.settingsTab.serviceSettingsSections', 'Service settings sections')}>
{settingsGroups.map(g => (
<div className="svc-settings__group" key={g.label}>
<div className="svc-settings__grouplabel">{g.label}</div>
{g.items.map(s => (
<Button variant="unstyled"
type="button"
key={s.id}
className={`svc-settings__navitem ${section === s.id ? 'is-active' : ''}`}
onClick={() => setSection(s.id)}
>
<s.icon size={15} />
{s.label}
</Button>
))}
</div>
))}
</nav>
<div className="svc-settings__content">
<DetailSettings
groups={settingsGroups}
value={section}
onValueChange={setSection}
ariaLabel={t('app.settingsTab.serviceSettingsSections', 'Service settings sections')}
>
{/* Environment Configuration */}
{section === 'environment' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.environmentType', 'Environment type')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.environmentType', 'Environment type')}</h3>
<SharedCard variant="legacy" className="card settings-section">
<div className="settings-row">
<div className="settings-label">
@@ -317,8 +303,8 @@ const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) =>
{/* Domain & SSL — same information architecture as WordPress Settings → SSL. */}
{section === 'domain' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.domainSsl', 'Domain and SSL')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.domainSsl', 'Domain and SSL')}</h3>
<DomainSslPanel
app={app}
domains={domains}
@@ -331,8 +317,8 @@ const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) =>
{/* Container Ops (Docker only) — image updates, restart policy,
resource limits, auto-sleep. Relocated from the old top tab. */}
{section === 'ops' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.containerOps', 'Container ops')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.containerOps', 'Container ops')}</h3>
<ContainerOpsPanel app={app} onChanged={onUpdate} />
</div>
)}
@@ -340,8 +326,8 @@ const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) =>
{/* Resource Limits (Docker only) — first-class CPU/memory caps
with live usage, instead of compose-file-only limits. */}
{section === 'resources' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.resourceLimits', 'Resource limits')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.resourceLimits', 'Resource limits')}</h3>
<ResourceLimitsPanel app={app} onChanged={onUpdate} />
</div>
)}
@@ -350,8 +336,8 @@ const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) =>
short-TTL page cache with auth/admin/cart bypasses, stale
serving, and a per-site purge. */}
{section === 'cache' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.cache', 'Cache')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.cache', 'Cache')}</h3>
<MicroCachePanel app={app} onChanged={onUpdate} />
</div>
)}
@@ -359,8 +345,8 @@ const SettingsTab = ({ app, deployConfig, domains, primaryDomain, onUpdate }) =>
{/* Health & Rollout (Docker only) — the deploy health gate:
where a new release is asked, and for how long. */}
{section === 'health' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.healthRollout', 'Health and rollout')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.healthRollout', 'Health and rollout')}</h3>
<DeploySafetyPanel app={app} onChanged={onUpdate} />
<SlotDeploysPanel app={app} onChanged={onUpdate} />
</div>
@@ -369,8 +355,8 @@ where a new release is asked, and for how long. */}
{/* Storage (Docker only) — first-class managed volumes that
survive redeploys, replacing fragile relative bind mounts. */}
{section === 'storage' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('common.labels.storage', 'Storage')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('common.labels.storage', 'Storage')}</h3>
<VolumesPanel app={app} onChanged={onUpdate} />
</div>
)}
@@ -382,8 +368,8 @@ where a new release is asked, and for how long. */}
config checkpoints) as a separated subsection — no second repo
form, and nothing deploy-related shows before connecting. */}
{section === 'git' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.gitDeploy', 'Git and deploy')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.gitDeploy', 'Git and deploy')}</h3>
<RepoConnectForm
gitStatus={gitStatus}
onConnect={handleConnectRepo}
@@ -396,8 +382,8 @@ where a new release is asked, and for how long. */}
idPrefix="svc"
/>
{deployConfig && (
<div className="svc-settings__subsection">
<h4 className="svc-settings__subsection-title">{t('app.settingsTab.deployment', 'Deployment')}</h4>
<div className="sk-detail-settings__subsection">
<h4 className="sk-detail-settings__subsection-title">{t('app.settingsTab.deployment', 'Deployment')}</h4>
<DeployTab embedded appId={app.id} appPath={app.path} />
</div>
)}
@@ -407,8 +393,8 @@ where a new release is asked, and for how long. */}
{/* Build — build method, Dockerfile / build pack, cache, timeouts,
build logs. Relocated from the old top tab, beside Git & Deploy. */}
{section === 'build' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.build', 'Build')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.build', 'Build')}</h3>
<BuildTab appId={app.id} appPath={app.path} app={app} />
</div>
)}
@@ -417,16 +403,16 @@ where a new release is asked, and for how long. */}
when the app's project is manifest-managed, plus scaffold /
plan / apply actions. */}
{section === 'manifest' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.manifest', 'Manifest')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.manifest', 'Manifest')}</h3>
<ManifestSection app={app} />
</div>
)}
{/* WAF (Docker + Python) — per-app ModSecurity policy + matches. */}
{section === 'waf' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">WAF</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">WAF</h3>
<AppWafPanel app={app} onChanged={onUpdate} />
</div>
)}
@@ -435,8 +421,8 @@ where a new release is asked, and for how long. */}
cost, one-click restore), same component the WordPress
detail page renders. */}
{section === 'backups' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('common.labels.backups', 'Backups')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('common.labels.backups', 'Backups')}</h3>
<ProtectionPanel
targetType="application"
targetId={app.id}
@@ -447,8 +433,8 @@ where a new release is asked, and for how long. */}
{/* Danger Zone */}
{section === 'danger' && (
<div className="svc-settings__section">
<h3 className="svc-settings__section-title">{t('app.settingsTab.dangerZone', 'Delete service')}</h3>
<div className="sk-detail-settings__section">
<h3 className="sk-detail-settings__section-title">{t('app.settingsTab.dangerZone', 'Delete service')}</h3>
<DangerZone
description={t('app.settingsTab.onceYouDeleteAServiceThere', "Deleting a service removes all its data. You can't undo this.")}
action={
@@ -459,8 +445,7 @@ where a new release is asked, and for how long. */}
/>
</div>
)}
</div>
</div>
</DetailSettings>
);
};
@@ -100,7 +100,7 @@ export default function SlotsCard({ app }) {
}
return (
<div className="overview-tab__card overview-tab__card--full slots-card">
<div className="overview-tab__card slots-card">
<div className="overview-tab__card-header-row">
<h3 className="overview-tab__card-title">{t('app.slots.title', 'Slot deploys')}</h3>
<Pill kind={state.enabled ? 'green' : 'gray'}>
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "لا يمكن إعادة التعيين",
"couldNotSave": "لا يمكن الحفظ",
"dashboardSaved": "تم حفظ لوحة المعلومات",
"delete": "حذف {{name}}",
"deleteRemovesIt": "يؤدي الحذف إلى إزالتها",
"discard": "ينبذ",
"dragHeadersToMoveDragThe": "اسحب الرؤوس للتحرك · اسحب الزاوية لتغيير حجمها · انقر فوق عنصر واجهة المستخدم لتكوينه",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} غير مدعوم حتى الآن على الوكلاء البعيدين",
"isnTAvailableOnS3Buckets": "{{op}} غير متوفر في جرافات S3",
"keyboardShortcuts": "اختصارات لوحة المفاتيح",
"largest": "الأكبر",
"listView": "عرض القائمة",
"loadingFiles": "تحميل الملفات",
"localPanelHost": "مضيف اللوحة المحلي",
"modified": "معدل",
"nameAZ": "الاسم من الألف إلى الياء",
"nameZA": "الاسم Z-A",
"newFolder": "مجلد جديد",
"newName": "اسم جديد",
"newest": "الأحدث",
"noFiles": "لا توجد ملفات {{activeFilter}}",
"noMatches": "لا توجد مباريات",
"objectStorage": "تخزين الكائنات",
"oldest": "الأقدم",
"owner": "مالك",
"ownerRwGroupOtherRFiles": "المالك: rw، المجموعة/أخرى: r (ملفات)",
"ownerRwOnlyPrivateFiles": "المالك: rw فقط (ملفات خاصة)",
@@ -2753,17 +2747,12 @@
"selected": "تم التحديد ·",
"showSidebar": "إظهار الشريط الجانبي",
"sites": "مواقع",
"smallest": "الأصغر",
"sort": "نوع",
"stack": "المكدس",
"terminal": "الطرفية",
"thisFolderIsEmpty": "هذا المجلد فارغ",
"toggleHiddenFiles": "تبديل الملفات المخفية",
"total": "المجموع",
"tryADifferentFilter": "جرب مرشحًا مختلفًا.",
"tryADifferentSearchTermOr": "جرّب مصطلح بحث مختلفًا أو تصفح مجلدًا آخر.",
"typeZA": "اكتب Z-A",
"types": "أنواع",
"up": "أعلى",
"upDelDeleteF2RenameA": "⌫ لأعلى · ديل حذف · إعادة تسمية F2 · ⌘A الكل",
"updatedAt": "تم التحديث {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "إضافة شرط",
"conditions": "شروط",
"conditions_one": "شرط واحد",
"conditions_other": "{{count}} شرط",
"density": "كثافة",
"extraFieldsPrintedUnderTheFirst": "الحقول الإضافية المطبوعة تحت العمود الأول.",
"field": "مجال",
"fields": "الحقول ·",
"fieldsShown_one": "حقل واحد ظاهر",
"fieldsShown_other": "{{count}} حقل ظاهر",
"filtersFields": "المرشحات والحقول",
"match": "مباراة",
"noConditionsThisViewShowsEvery": "لا توجد شروط - يظهر هذا العرض كل",
"ofTheFollowing": "مما يلي",
"off": "عن",
"operator": "المشغل",
"removeCondition": "إزالة الشرط",
@@ -4290,9 +4270,7 @@
"securityPosture": "الموقف الأمني",
"serviceInfo": "معلومات الخدمة",
"startToViewMetrics": "شغّل الخدمة لعرض المقاييس.",
"successful": "ناجح",
"thisMonth": "هذا الشهر",
"totalDeploys": "إجمالي عمليات النشر",
"workers": "العمال"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "تم إنشاء المجموعة",
"groupDeleted": "تم حذف المجموعة",
"groupUpdated": "تم تحديث المجموعة",
"groups": "المجموعات",
"host": "يستضيف",
"hostname": "اسم المضيف:",
"lastSeen": "شوهد آخر مرة",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "أدخل اسم النطاق أولاً"
},
"setupHealthWidget": {
"allSet": "كل شيء جاهز —",
"criticalCount": "{{count}} حرجة",
"dismissHint": "تجاهل — تبقى صحة الإعداد في شريط الحالة",
"moreInDoctor": "المزيد في دكتور",
"progress": "تقدم صحة الإعداد",
"recommendedCount": "{{count}} موصى بها",
"review": "مراجعة",
"setupHealth": "صحة الإعداد",
"setupHealth2": "صحة الإعداد٪",
"unavailable": "غير متاح"
"setupHealth": "صحة الإعداد"
},
"setupStepAccount": {
"adminEmail": "البريد الإلكتروني المشرف",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "রিসেট করা যায়নি",
"couldNotSave": "বাঁচাতে পারেনি",
"dashboardSaved": "ড্যাশবোর্ড সংরক্ষিত",
"delete": "{{name}} মুছুন",
"deleteRemovesIt": "মুছলে এটি সরানো হয়",
"discard": "বাতিল করুন",
"dragHeadersToMoveDragThe": "সরাতে হেডার টেনে আনুন · আকার পরিবর্তন করতে কোণে টেনে আনুন · এটি কনফিগার করতে একটি উইজেট ক্লিক করুন",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} এখনও দূরবর্তী এজেন্টগুলিতে সমর্থিত নয়৷",
"isnTAvailableOnS3Buckets": "{{op}} S3 বাকেটগুলিতে উপলব্ধ নয়৷",
"keyboardShortcuts": "কীবোর্ড শর্টকাট",
"largest": "সবচেয়ে বড়",
"listView": "তালিকা ভিউ",
"loadingFiles": "ফাইল লোড হচ্ছে",
"localPanelHost": "লোকাল প্যানেল হোস্ট",
"modified": "পরিবর্তিত",
"nameAZ": "নাম A-Z",
"nameZA": "নাম Z-A",
"newFolder": "নতুন ফোল্ডার",
"newName": "নতুন নাম",
"newest": "নতুনতম",
"noFiles": "কোন {{activeFilter}} ফাইল নেই৷",
"noMatches": "কোন মিল নেই",
"objectStorage": "অবজেক্ট স্টোরেজ",
"oldest": "প্রাচীনতম",
"owner": "মালিক",
"ownerRwGroupOtherRFiles": "মালিক: rw, গ্রুপ/অন্যান্য: r (ফাইল)",
"ownerRwOnlyPrivateFiles": "মালিক: শুধুমাত্র rw (ব্যক্তিগত ফাইল)",
@@ -2753,17 +2747,12 @@
"selected": "নির্বাচিত ·",
"showSidebar": "সাইডবার দেখান",
"sites": "সাইট",
"smallest": "সবচেয়ে ছোট",
"sort": "সাজান",
"stack": "স্ট্যাক",
"terminal": "টার্মিনাল",
"thisFolderIsEmpty": "এই ফোল্ডারটি খালি",
"toggleHiddenFiles": "লুকানো ফাইল টগল করুন",
"total": "মোট",
"tryADifferentFilter": "একটি ভিন্ন ফিল্টার চেষ্টা করুন.",
"tryADifferentSearchTermOr": "একটি ভিন্ন অনুসন্ধান শব্দ চেষ্টা করুন বা অন্য ফোল্ডার ব্রাউজ করুন.",
"typeZA": "Z-A টাইপ করুন",
"types": "প্রকারভেদ",
"up": "উপরে",
"upDelDeleteF2RenameA": "⌫ Up · Del Delete · F2 Rename · ⌘A All",
"updatedAt": "আপডেট হয়েছে {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "শর্ত যোগ করুন",
"conditions": "শর্তাবলী",
"conditions_one": "1টি শর্ত",
"conditions_other": "{{count}}টি শর্ত",
"density": "ঘনত্ব",
"extraFieldsPrintedUnderTheFirst": "প্রথম কলামের অধীনে অতিরিক্ত ক্ষেত্র মুদ্রিত।",
"field": "মাঠ",
"fields": "ক্ষেত্র ·",
"fieldsShown_one": "1টি ফিল্ড দেখানো হচ্ছে",
"fieldsShown_other": "{{count}}টি ফিল্ড দেখানো হচ্ছে",
"filtersFields": "ফিল্টার এবং ক্ষেত্র",
"match": "ম্যাচ",
"noConditionsThisViewShowsEvery": "কোন শর্ত নেই — এই দৃশ্য প্রতিটি দেখায়",
"ofTheFollowing": "নিম্নলিখিত",
"off": "বন্ধ",
"operator": "অপারেটর",
"removeCondition": "শর্ত সরান",
@@ -4290,9 +4270,7 @@
"securityPosture": "নিরাপত্তা ভঙ্গি",
"serviceInfo": "পরিষেবা তথ্য",
"startToViewMetrics": "মেট্রিক দেখতে পরিষেবাটি চালু করুন।",
"successful": "সফল",
"thisMonth": "এই মাসে",
"totalDeploys": "মোট স্থাপনা",
"workers": "ওয়ার্কার"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "গ্রুপ তৈরি হয়েছে",
"groupDeleted": "গ্রুপ মুছে ফেলা হয়েছে",
"groupUpdated": "গ্রুপ আপডেট করা হয়েছে",
"groups": "গোষ্ঠী",
"host": "হোস্ট",
"hostname": "হোস্টনাম:",
"lastSeen": "শেষ দেখা",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "আগে ডোমেইনের নাম লিখুন"
},
"setupHealthWidget": {
"allSet": "সব প্রস্তুত -",
"criticalCount": "{{count}}টি গুরুতর",
"dismissHint": "খারিজ করুন — সেটআপ স্বাস্থ্য স্ট্যাটাস বারে থাকে",
"moreInDoctor": "ডাক্তারে আরও",
"progress": "সেটআপ স্বাস্থ্যের অগ্রগতি",
"recommendedCount": "{{count}}টি প্রস্তাবিত",
"review": "পর্যালোচনা",
"setupHealth": "সেটআপ স্বাস্থ্য",
"setupHealth2": "% সেটআপ স্বাস্থ্য",
"unavailable": "অনুপলব্ধ"
"setupHealth": "সেটআপ স্বাস্থ্য"
},
"setupStepAccount": {
"adminEmail": "অ্যাডমিন ইমেইল",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Konnte nicht zurückgesetzt werden",
"couldNotSave": "Konnte nicht gespeichert werden",
"dashboardSaved": "Dashboard gespeichert",
"delete": "{{name}} löschen",
"deleteRemovesIt": "Löschen entfernt es",
"discard": "Verwerfen",
"dragHeadersToMoveDragThe": "Ziehen Sie die Kopfzeilen, um sie zu verschieben. Ziehen Sie die Ecke, um die Größe zu ändern. Klicken Sie auf ein Widget, um es zu konfigurieren",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} wird auf Remote-Agenten noch nicht unterstützt",
"isnTAvailableOnS3Buckets": "{{op}} ist für S3-Buckets nicht verfügbar",
"keyboardShortcuts": "Tastaturkürzel",
"largest": "Größte",
"listView": "Listenansicht",
"loadingFiles": "Laden von Dateien",
"localPanelHost": "Lokaler Panel-Host",
"modified": "Geändert",
"nameAZ": "Name A–Z",
"nameZA": "Name Z–A",
"newFolder": "Neuer Ordner",
"newName": "Neuer Name",
"newest": "Neueste",
"noFiles": "Keine {{activeFilter}}-Dateien",
"noMatches": "Keine Übereinstimmungen",
"objectStorage": "Objektspeicher",
"oldest": "Älteste",
"owner": "Besitzer",
"ownerRwGroupOtherRFiles": "Besitzer: rw, Gruppe/Andere: r (Dateien)",
"ownerRwOnlyPrivateFiles": "Besitzer: nur rw (private Dateien)",
@@ -2753,17 +2747,12 @@
"selected": "ausgewählt ·",
"showSidebar": "Seitenleiste anzeigen",
"sites": "Websites",
"smallest": "Kleinste",
"sort": "Sortieren",
"stack": "Stack",
"terminal": "Terminal",
"thisFolderIsEmpty": "Dieser Ordner ist leer",
"toggleHiddenFiles": "Versteckte Dateien umschalten",
"total": "Insgesamt",
"tryADifferentFilter": "Versuchen Sie es mit einem anderen Filter.",
"tryADifferentSearchTermOr": "Versuchen Sie es mit einem anderen Suchbegriff oder durchsuchen Sie einen anderen Ordner.",
"typeZA": "Typ Z-A",
"types": "Typen",
"up": "Nach oben",
"upDelDeleteF2RenameA": "⌫ Nach oben · Entf Löschen · F2 Umbenennen · ⌘A Alle",
"updatedAt": "Aktualisiert {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Bedingung hinzufügen",
"conditions": "Bedingungen",
"conditions_one": "1 Bedingung",
"conditions_other": "{{count}} Bedingungen",
"density": "Dichte",
"extraFieldsPrintedUnderTheFirst": "Zusätzliche Felder werden unter der ersten Spalte gedruckt.",
"field": "Feld",
"fields": "Felder ·",
"fieldsShown_one": "1 Feld angezeigt",
"fieldsShown_other": "{{count}} Felder angezeigt",
"filtersFields": "Filter und Felder",
"match": "Spiel",
"noConditionsThisViewShowsEvery": "Keine Bedingungen – diese Ansicht zeigt alle",
"ofTheFollowing": "des Folgenden",
"off": "Aus",
"operator": "Betreiber",
"removeCondition": "Bedingung entfernen",
@@ -4290,9 +4270,7 @@
"securityPosture": "Sicherheitslage",
"serviceInfo": "Service-Info",
"startToViewMetrics": "Starten Sie den Dienst, um Metriken anzuzeigen.",
"successful": "Erfolgreich",
"thisMonth": "diesen Monat",
"totalDeploys": "Gesamtzahl der Bereitstellungen",
"workers": "Worker"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Gruppe erstellt",
"groupDeleted": "Gruppe gelöscht",
"groupUpdated": "Gruppe aktualisiert",
"groups": "Gruppen",
"host": "Gastgeber",
"hostname": "Hostname:",
"lastSeen": "Zuletzt gesehen",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Zuerst einen Domainnamen eingeben"
},
"setupHealthWidget": {
"allSet": "Alles klar –",
"criticalCount": "{{count}} kritisch",
"dismissHint": "Verwerfen — der Setup-Zustand bleibt in der Statusleiste",
"moreInDoctor": "mehr in Doktor",
"progress": "Fortschritt des Setup-Zustands",
"recommendedCount": "{{count}} empfohlen",
"review": "Überprüfen",
"setupHealth": "Setup-Zustand",
"setupHealth2": "% Setup-Zustand",
"unavailable": "Nicht verfügbar"
"setupHealth": "Setup-Zustand"
},
"setupStepAccount": {
"adminEmail": "Admin-E-Mail",
+71 -37
View File
@@ -768,6 +768,7 @@
"acrossDestinations_one": "across 1 destination",
"acrossDestinations_other": "across {{count}} destinations",
"allSnapshots": "All backups",
"atAGlance": "At a glance",
"backupActivity": "Backup activity",
"backupCompleted": "Backup completed ·",
"backupFailed": "Couldn't back up ·",
@@ -1704,8 +1705,10 @@
"buildThisDashboard": "Build this dashboard",
"couldNotReset": "Couldn't reset the board.",
"couldNotSave": "Couldn't save the board.",
"dashboardName": "Dashboard name",
"dashboardSaved": "Dashboard saved",
"delete": "Delete {{name}}",
"dashboards": "Dashboards",
"deleteDashboard": "Delete dashboard",
"deleteRemovesIt": "Delete removes it",
"discard": "Discard",
"dragHeadersToMoveDragThe": "Drag headers to move · drag the corner to resize · click a widget to configure it",
@@ -1718,9 +1721,11 @@
"reconnecting": "Reconnecting",
"refresh": "· refresh",
"refreshNow": "Refresh now",
"renameDashboard": "Rename dashboard",
"resetToTheShippedLayout": "Reset to the shipped layout",
"restoreDefaultLayout": "Restore default layout",
"restoreTheShippedLayout": "Restore the shipped layout",
"switchDashboard": "Switch dashboard",
"switchServer": "Switch server",
"thisBoardHasNoShippedDefault": "This board has no shipped default.",
"thisBoardHasNoWidgetsYet": "This board has no widgets yet. Add one, or restore the layout it shipped with.",
@@ -2744,6 +2749,7 @@
"alreadyAtTheTopFolder": "Already at the top folder",
"apply": "Apply",
"archives": "Archives",
"ascending": "Ascending",
"audio": "Audio",
"browsingOn": "Browsing on",
"browsingYour": "Browsing your",
@@ -2760,6 +2766,7 @@
"deleteConfirmation": "Delete confirmation",
"deletedItems_one": "Deleted 1 item",
"deletedItems_other": "Deleted {{count}} items",
"descending": "Descending",
"diskUsage": "Disk usage",
"documents": "Documents",
"dropFilesHereOrUseThe": "Drop files here, or use the buttons above to create something new.",
@@ -2785,22 +2792,17 @@
"isNotYetSupportedOnRemote": "{{op}} is not yet supported on remote agents",
"isnTAvailableOnS3Buckets": "{{op}} isn't available on S3 buckets",
"keyboardShortcuts": "Keyboard shortcuts",
"largest": "Largest",
"listView": "List view",
"loadingFiles": "Loading files",
"localPanelHost": "Panel server",
"modified": "Modified",
"nameAZ": "Name A-Z",
"nameZA": "Name Z-A",
"newFolder": "New folder",
"newName": "New name",
"newest": "Newest",
"noFiles": "No {{activeFilter}} files",
"noMatches": "No matches",
"nothingToGoBackTo": "Nothing to go back to",
"nothingToGoForwardTo": "Nothing to go forward to",
"objectStorage": "Object storage",
"oldest": "Oldest",
"owner": "Owner",
"ownerRwGroupOtherRFiles": "Owner: rw, Group/Other: r (files)",
"ownerRwOnlyPrivateFiles": "Owner: rw only (private files)",
@@ -2820,19 +2822,17 @@
"searchFailed": "Couldn't search. {{message}}",
"searchFiles": "Search files…",
"selected": "selected ·",
"show": "Show",
"showHiddenFiles": "Show hidden files",
"showSidebar": "Show sidebar",
"sites": "Sites",
"smallest": "Smallest",
"sort": "Sort",
"sortBy": "Sort by",
"stack": "Stack",
"terminal": "Terminal",
"thisFolderIsEmpty": "This folder is empty",
"toggleHiddenFiles": "Toggle hidden files",
"total": "Total",
"tryADifferentFilter": "Try a different filter.",
"tryADifferentSearchTermOr": "Try a different search term or browse another folder.",
"typeZA": "Type Z-A",
"types": "Types",
"up": "Up",
"upDelDeleteF2RenameA": "⌫ Up · Del Delete · F2 Rename · ⌘A All",
"updatedAt": "Updated {{time}}",
@@ -2845,6 +2845,7 @@
"uploadsComplete": "Uploads complete",
"users": "Users",
"videos": "Videos",
"viewOptions": "View options",
"volumes": "Volumes",
"webConfig": "Web config",
"willBeCreatedIn": "Will be created in:"
@@ -3039,25 +3040,32 @@
},
"gridFilterDrawer": {
"addCondition": "Add condition",
"conditions": "Conditions",
"conditions_one": "1 condition",
"conditions_other": "{{count}} conditions",
"and": "and",
"available": "More fields",
"combine": "How conditions combine",
"countAll": "{{count}} {{noun}}",
"countOf": "{{matching}} of {{total}} {{noun}}",
"density": "Density",
"extraFieldsPrintedUnderTheFirst": "Extra fields printed under the first column.",
"field": "Field",
"fields": "Fields ·",
"fieldsShown_one": "1 field shown",
"fieldsShown_other": "{{count}} fields shown",
"fieldsTab": "Fields",
"filterBy": "Filter by",
"filters": "Filters",
"filtersFields": "Filters and fields",
"match": "Match",
"noConditionsThisViewShowsEvery": "No conditions. This view shows every",
"ofTheFollowing": "of the following",
"findField": "Find a field",
"hide": "Hide {{value}}",
"noFieldMatches": "No field matches \"{{query}}\".",
"nothingFiltered_one": "The only {{noun}} is showing.",
"nothingFiltered_other": "All {{count}} {{noun}} are showing.",
"off": "Off",
"operator": "Operator",
"or": "or",
"pinned": "pinned",
"removeCondition": "Remove condition",
"reset": "Reset",
"rowDetail": "Row detail",
"show": "Show {{value}}"
"show": "Show {{value}}",
"shown": "In the table"
},
"gridFooter": {
"firstPage": "First page",
@@ -3091,7 +3099,11 @@
"duplicateView": "Duplicate view",
"eGCloudflareProd": "e.g. Cloudflare prod",
"enterAViewNameFirst": "Enter a view name first",
"filterCount_one": "1 filter",
"filterCount_other": "{{count}} filters",
"filtersAndFields": "Filters and fields",
"makeDefault": "Make default",
"moreFields": "{{count}} more fields",
"myViews": "My views",
"noPersonalViewsYetTuneThe": "No personal views yet. Tune the grid, then save it here.",
"reset": "Reset",
@@ -4098,6 +4110,7 @@
"memoryDisk": "Memory and disk",
"memoryUsage": "Memory usage",
"monitor": "Monitor {{name}}",
"monitors": "Monitors",
"noHistoryYetForThisHost": "No history yet for this host. Samples are collected on the monitoring interval.",
"noSpeedTestYetRunOne": "No speed test yet. Run one to measure this server's connection.",
"nothingIsOverItsLimitRight": "Nothing is over its limit right now.",
@@ -4375,6 +4388,18 @@
"vaults": "Vaults",
"workspaces": "Workspaces"
},
"overviewBoard": {
"addBlock": "Add block",
"couldNotSave": "Couldn't save the overview layout.",
"discardMessage": "Your saved overview layout stays as it was.",
"discardTitle": "Discard layout changes?",
"editHint": "Drag headers to move · drag the corner to resize · this layout applies to every {{kind}} page for your account",
"editHintPage": "Drag headers to move · drag the corner to resize · saved to your account",
"editLayout": "Edit overview layout",
"nothingToShow": "Nothing to show here right now.",
"restoreDefault": "Restore default layout",
"saved": "Overview layout saved"
},
"overviewTab": {
"active": "Active",
"addAlertDeliveryChannelsDiscordSlack": "Add alert delivery channels (Discord, Slack, Telegram) in Settings → Notifications.",
@@ -4385,6 +4410,7 @@
"checksNeedAttention_one": "1 check needs attention.",
"checksNeedAttention_other": "{{count}} checks need attention.",
"computing": "Computing…",
"deploySummary": "{{total}} total · {{successful}} successful · {{failed}} failed",
"deploymentNumber": "Deployment #{{number}}",
"deployments": "Deployments",
"enableAlerts": "Enable alerts",
@@ -4392,6 +4418,7 @@
"environment": "Environment",
"fileIntegrityMonitoringEnabled": "File integrity monitoring enabled",
"fixWorking": "Working…",
"hints": "Hints",
"inactive": "Inactive",
"initializeBaseline": "Initialize baseline",
"integrityBaselineInitialized": "Integrity baseline initialized",
@@ -4420,9 +4447,8 @@
"securityPosture": "Security posture",
"serviceInfo": "Service info",
"startToViewMetrics": "Start the service to view metrics.",
"successful": "Successful",
"thisMonth": "this month",
"totalDeploys": "Total deploys",
"traffic": "Traffic",
"workers": "Workers"
},
"packagesTab": {
@@ -5530,22 +5556,26 @@
"sshKeys": "SSH keys"
},
"serverDetail": {
"agentVersion": "agent {{version}}",
"alerts": "Alerts",
"areYouSureYouWantTo": "Remove this server? This can't be undone.",
"backToServers": "Back to servers",
"copyId": "Copy ID",
"connect": "Connect",
"copyServerId": "Copy server ID",
"cron": "Cron",
"details": "Server details",
"endpoint": "Endpoint",
"errorLoadingServer": "Couldn't load the server.",
"failedToAcknowledgeAlert": "Couldn't acknowledge the alert.",
"failedToPingServer": "Couldn't ping the server.",
"failedToRemoveServer": "Couldn't remove the server.",
"failedToResolveAlert": "Couldn't resolve the alert.",
"generateConnectionString": "Generate connection string",
"lastSeen": "last seen",
"limitedMode": "Limited mode",
"loadingServerDetails": "Loading server details",
"metrics": "Metrics",
"moreActions": "More actions",
"noEndpointConfigured": "No endpoint configured",
"openTerminal": "Terminal",
"packages": "Packages",
"pendingPairing": "Pending pairing",
"ping": "Ping",
@@ -5555,7 +5585,6 @@
"restorePoints": "Restore points",
"sections": "Server sections",
"serverDidNotRespond": "Server did not respond",
"serverId": "ID",
"serverNotFound": "Server not found",
"serverRemovedSuccessfully": "Server removed",
"serverRespondedInMs": "Server responded in {{latency}}ms",
@@ -5646,13 +5675,16 @@
"agentVersion": "Agent version",
"architecture": "Architecture",
"cantReachAgent": "Couldn't connect to the server agent.",
"connection": "Connection",
"dockerVersion": "Docker version",
"group": "Group",
"hostname": "Hostname",
"lastSeen": "Last seen",
"liveStatus": "Live status",
"operatingSystem": "Operating system",
"serverInformation": "Server information",
"serverOffline": "Server offline",
"sinceLastBoot": "since last boot",
"systemInformation": "System information",
"totalDisk": "Total disk",
"totalMemory": "Total memory",
@@ -5730,6 +5762,7 @@
"apiKeyRotation": "API key rotation",
"basicInformation": "Basic information",
"connectedSince": "Connected since",
"connection": "Connection",
"connectionIp": "Connection IP",
"connectionIpAllowlist": "Connection and IP allowlist",
"connectionString": "Connection string",
@@ -5755,6 +5788,7 @@
"identityAndGroupingForThisServer": "Identity and grouping for this server.",
"invalidIpPattern": "Enter an IP address or CIDR range, like 192.168.1.0/24.",
"ipAddressOrCidrEG": "IP address or CIDR (e.g. 192.168.1.0/24)",
"ipAllowlist": "IP allowlist",
"ipAllowlistUpdated": "IP allowlist updated",
"ipRemovedFromAllowlist": "IP removed from allowlist",
"lastRotated": "Last rotated:",
@@ -5780,6 +5814,7 @@
"serverMustBeOnlineToRotate": "Server must be online to rotate credentials.",
"serverName": "Server name",
"serverUpdatedSuccessfully": "Server updated",
"settingsSections": "Server settings sections",
"tags": "Tags",
"tokenExpires": "Token expires",
"windowsPowershell": "Windows (PowerShell)"
@@ -5842,10 +5877,12 @@
"abc123": "ABC-123",
"addServer": "Add server",
"addYourFirstServer": "Add your first server",
"added": "Added",
"adjustTheSearchOrClearThe": "Adjust the search or clear the column filters to see your servers.",
"agent": "Agent",
"agentFound": "Agent found",
"agentPairedSuccessfully": "Agent paired",
"architecture": "Architecture",
"autoDetectedFromAgentOptional": "Auto-detected from agent (optional)",
"capAllowed": "allowed",
"capBlocked": "blocked",
@@ -5855,6 +5892,7 @@
"connectionStringReady": "Connection string ready",
"couldNotSetTheGroup": "Couldn't set the group.",
"couldntLoadServers": "Couldn't load servers.",
"cpuCores": "CPU cores",
"curlTarSudoAndSystemd": "curl, tar, sudo, and systemd",
"deleteGroup": "Delete group",
"deleteServerGroup": "Delete server group",
@@ -5870,7 +5908,6 @@
"groupCreated": "Group created",
"groupDeleted": "Group deleted",
"groupUpdated": "Group updated",
"groups": "Groups",
"health": "Health",
"healthDegraded": "Degraded",
"healthFailing": "Failing",
@@ -5896,6 +5933,7 @@
"levelProtectCannot": "Cannot touch Docker, files, packages, services, shell or updates.",
"linkPanel": "Link panel",
"linux": "Linux",
"manageGroups": "Manage groups",
"manageServerGroups": "Manage server groups",
"movedServersTo_one": "Moved 1 server to {{groupName}}",
"movedServersTo_other": "Moved {{count}} servers to {{groupName}}",
@@ -5909,6 +5947,7 @@
"onTheTargetMachineStartThe": "On the target server, start the agent. It will display a 6-character pair code and a passphrase. Enter both below.",
"online": "Online",
"openTheAgentOnYourTarget": "Open the agent on your target server and paste the connection string.",
"os": "OS",
"pairAgentAction": "Pair agent",
"pairAnAgentAndTheMachine": "Pair an agent and the server shows up here with its CPU, memory and disk alongside every other server you run.",
"pairCode": "Pair code",
@@ -5935,6 +5974,7 @@
"stepStartAgent": "Start agent",
"sync": "Sync",
"syncShort": "Sync",
"tags": "Tags",
"theAgentRegistersAutomaticallyAndReports": "The agent registers automatically and reports its hostname back as the server name.",
"theCodeIsShownInThe": "The code is shown in the terminal output or system tray.",
"theRowInThisListWill": "The row in this list will switch from",
@@ -6412,16 +6452,8 @@
"usedForCertificateExpiryRemindersFrom": "Used for certificate expiry reminders from Let's Encrypt."
},
"setupHealthWidget": {
"allSet": "Setup complete:",
"criticalCount": "{{count}} critical",
"dismissHint": "Dismiss (setup health stays in the status bar)",
"moreInDoctor": "more in Doctor",
"progress": "Setup health progress",
"recommendedCount": "{{count}} recommended",
"review": "Review",
"setupHealth": "Setup health",
"setupHealth2": "% setup health",
"unavailable": "Unavailable"
"setupHealth": "Setup health"
},
"setupStepAccount": {
"adminEmail": "Admin email",
@@ -7307,6 +7339,7 @@
"searchPackages": "Search packages…",
"searchRightMostTheTabStrip": ", search right-most. The tab strip is the heading, so there is no title to repeat.",
"secondary": "Secondary",
"sections": "Style guide sections",
"securityTabContent": "Security tab content.",
"selectDropdown": "Select dropdown",
"selectTextarea": "Select and textarea",
@@ -8455,6 +8488,7 @@
"create": "Create",
"delete": "Delete",
"disable": "Disable",
"discard": "Discard",
"dismiss": "Dismiss",
"done": "Done",
"download": "Download",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "No se pudo restablecer",
"couldNotSave": "No se pudo guardar",
"dashboardSaved": "Panel guardado",
"delete": "Eliminar {{name}}",
"deleteRemovesIt": "Eliminar lo quita",
"discard": "Descartar",
"dragHeadersToMoveDragThe": "Arrastra los encabezados para mover · arrastra la esquina para redimensionar · haz clic en un widget para configurarlo",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} aún no está disponible en agentes remotos",
"isnTAvailableOnS3Buckets": "{{op}} no está disponible en buckets de S3",
"keyboardShortcuts": "Atajos de teclado",
"largest": "Más grandes",
"listView": "Vista de lista",
"loadingFiles": "Cargando archivos",
"localPanelHost": "Host local del panel",
"modified": "Modificado",
"nameAZ": "Nombre A-Z",
"nameZA": "Nombre Z-A",
"newFolder": "Nueva carpeta",
"newName": "Nuevo nombre",
"newest": "Más recientes",
"noFiles": "No hay archivos de tipo {{activeFilter}}",
"noMatches": "Sin coincidencias",
"objectStorage": "Almacenamiento de objetos",
"oldest": "Más antiguos",
"owner": "Propietario",
"ownerRwGroupOtherRFiles": "Propietario: rw, Grupo/Otros: r (archivos)",
"ownerRwOnlyPrivateFiles": "Propietario: solo rw (archivos privados)",
@@ -2753,17 +2747,12 @@
"selected": "seleccionados ·",
"showSidebar": "Mostrar la barra lateral",
"sites": "Sitios",
"smallest": "Más pequeños",
"sort": "Ordenar",
"stack": "Stack",
"terminal": "Terminal",
"thisFolderIsEmpty": "Esta carpeta está vacía",
"toggleHiddenFiles": "Mostrar u ocultar archivos ocultos",
"total": "Total",
"tryADifferentFilter": "Prueba con otro filtro.",
"tryADifferentSearchTermOr": "Prueba con otro término de búsqueda o navega a otra carpeta.",
"typeZA": "Tipo Z-A",
"types": "Tipos",
"up": "Subir",
"upDelDeleteF2RenameA": "⌫ Subir · Del Eliminar · F2 Renombrar · ⌘A Todo",
"updatedAt": "Actualizado {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Añadir condición",
"conditions": "Condiciones",
"conditions_one": "1 condición",
"conditions_other": "{{count}} condiciones",
"density": "Densidad",
"extraFieldsPrintedUnderTheFirst": "Los campos adicionales se muestran debajo de la primera columna.",
"field": "Campo",
"fields": "Campos ·",
"fieldsShown_one": "1 campo visible",
"fieldsShown_other": "{{count}} campos visibles",
"filtersFields": "Filtros y campos",
"match": "Cumplir",
"noConditionsThisViewShowsEvery": "Sin condiciones — esta vista muestra cada",
"ofTheFollowing": "de las siguientes",
"off": "Desactivado",
"operator": "Operador",
"removeCondition": "Quitar condición",
@@ -4291,9 +4271,7 @@
"securityPosture": "Postura de seguridad",
"serviceInfo": "Información del servicio",
"startToViewMetrics": "Inicia el servicio para ver las métricas.",
"successful": "Exitosos",
"thisMonth": "este mes",
"totalDeploys": "Despliegues totales",
"workers": "Workers"
},
"packagesTab": {
@@ -5657,7 +5635,6 @@
"groupCreated": "Grupo creado",
"groupDeleted": "Grupo eliminado",
"groupUpdated": "Grupo actualizado",
"groups": "Grupos",
"host": "Host",
"hostname": "Hostname:",
"lastSeen": "Visto por última vez",
@@ -6164,16 +6141,8 @@
"enterADomainNameFirst": "Introduce primero un nombre de dominio"
},
"setupHealthWidget": {
"allSet": "Todo listo —",
"criticalCount": "{{count}} críticos",
"dismissHint": "Descartar — el estado de la configuración permanece en la barra de estado",
"moreInDoctor": "más en Doctor",
"progress": "Progreso del estado de la configuración",
"recommendedCount": "{{count}} recomendados",
"review": "Revisar",
"setupHealth": "Estado de la configuración",
"setupHealth2": "% de estado de la configuración",
"unavailable": "No disponible"
"setupHealth": "Estado de la configuración"
},
"setupStepAccount": {
"adminEmail": "Correo electrónico del administrador",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Impossible de réinitialiser",
"couldNotSave": "Impossible d'enregistrer",
"dashboardSaved": "Tableau de bord enregistré",
"delete": "Supprimer {{name}}",
"deleteRemovesIt": "Supprimer le retire",
"discard": "Jeter",
"dragHeadersToMoveDragThe": "Faites glisser les en-têtes pour déplacer · faites glisser le coin pour redimensionner · cliquez sur un widget pour le configurer",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} n'est pas encore pris en charge sur les agents distants",
"isnTAvailableOnS3Buckets": "{{op}} n'est pas disponible sur les compartiments S3",
"keyboardShortcuts": "Raccourcis clavier",
"largest": "Le plus grand",
"listView": "Vue en liste",
"loadingFiles": "Chargement de fichiers",
"localPanelHost": "Hôte du panneau local",
"modified": "Modifié",
"nameAZ": "Nom A-Z",
"nameZA": "Nom Z-A",
"newFolder": "Nouveau dossier",
"newName": "Nouveau nom",
"newest": "Le plus récent",
"noFiles": "Aucun fichier {{activeFilter}}",
"noMatches": "Aucune correspondance",
"objectStorage": "Stockage d'objets",
"oldest": "Le plus ancien",
"owner": "Propriétaire",
"ownerRwGroupOtherRFiles": "Propriétaire : rw, Groupe/Autre : r (fichiers)",
"ownerRwOnlyPrivateFiles": "Propriétaire : rw uniquement (fichiers privés)",
@@ -2753,17 +2747,12 @@
"selected": "sélectionné ·",
"showSidebar": "Afficher la barre latérale",
"sites": "Sites",
"smallest": "Le plus petit",
"sort": "Trier",
"stack": "Pile",
"terminal": "Terminal",
"thisFolderIsEmpty": "Ce dossier est vide",
"toggleHiddenFiles": "Basculer les fichiers cachés",
"total": "Total",
"tryADifferentFilter": "Essayez un autre filtre.",
"tryADifferentSearchTermOr": "Essayez un autre terme de recherche ou parcourez un autre dossier.",
"typeZA": "Type Z-A",
"types": "Espèces",
"up": "Dossier parent",
"upDelDeleteF2RenameA": "⌫ Haut · Supprimer · F2 Renommer · ⌘A Tout",
"updatedAt": "Mis à jour {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Ajouter une condition",
"conditions": "Conditions",
"conditions_one": "1 condition",
"conditions_other": "{{count}} conditions",
"density": "Densité",
"extraFieldsPrintedUnderTheFirst": "Champs supplémentaires imprimés sous la première colonne.",
"field": "Champ",
"fields": "Champs ·",
"fieldsShown_one": "1 champ affiché",
"fieldsShown_other": "{{count}} champs affichés",
"filtersFields": "Filtres et champs",
"match": "Correspondre",
"noConditionsThisViewShowsEvery": "Aucune condition : cette vue affiche chaque",
"ofTheFollowing": "des éléments suivants",
"off": "Désactivé",
"operator": "Opérateur",
"removeCondition": "Supprimer la condition",
@@ -4290,9 +4270,7 @@
"securityPosture": "Posture de sécurité",
"serviceInfo": "Informations sur les services",
"startToViewMetrics": "Démarrez le service pour voir les métriques.",
"successful": "Réussi",
"thisMonth": "ce mois-ci",
"totalDeploys": "Total des déploiements",
"workers": "Workers"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Groupe créé",
"groupDeleted": "Groupe supprimé",
"groupUpdated": "Groupe mis à jour",
"groups": "Groupes",
"host": "Hôte",
"hostname": "Nom d'hôte :",
"lastSeen": "Vu pour la dernière fois",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Saisissez d'abord un nom de domaine"
},
"setupHealthWidget": {
"allSet": "Tout est prêt -",
"criticalCount": "{{count}} critiques",
"dismissHint": "Ignorer — la santé de la configuration reste dans la barre d'état",
"moreInDoctor": "plus dans Docteur",
"progress": "Progression de la santé de la configuration",
"recommendedCount": "{{count}} recommandés",
"review": "Examiner",
"setupHealth": "État de santé de la configuration",
"setupHealth2": "% de santé de la configuration",
"unavailable": "Indisponible"
"setupHealth": "État de santé de la configuration"
},
"setupStepAccount": {
"adminEmail": "E-mail de l'administrateur",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Tidak dapat menyetel ulang",
"couldNotSave": "Tidak dapat menyimpan",
"dashboardSaved": "Dasbor disimpan",
"delete": "Hapus {{name}}",
"deleteRemovesIt": "Hapus akan menghilangkannya",
"discard": "Membuang",
"dragHeadersToMoveDragThe": "Seret header untuk dipindahkan · seret sudut untuk mengubah ukurannya · klik widget untuk mengonfigurasinya",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} belum didukung pada agen jarak jauh",
"isnTAvailableOnS3Buckets": "{{op}} tidak tersedia di bucket S3",
"keyboardShortcuts": "Pintasan keyboard",
"largest": "Terbesar",
"listView": "Tampilan daftar",
"loadingFiles": "Memuat file",
"localPanelHost": "Host panel lokal",
"modified": "Dimodifikasi",
"nameAZ": "Nama A-Z",
"nameZA": "Nama Z-A",
"newFolder": "Folder baru",
"newName": "Nama Baru",
"newest": "Terbaru",
"noFiles": "Tidak ada file {{activeFilter}}",
"noMatches": "Tidak ada kecocokan",
"objectStorage": "Penyimpanan objek",
"oldest": "Tertua",
"owner": "Pemilik",
"ownerRwGroupOtherRFiles": "Pemilik: rw, Grup/Lainnya: r (file)",
"ownerRwOnlyPrivateFiles": "Pemilik: rw saja (file pribadi)",
@@ -2753,17 +2747,12 @@
"selected": "dipilih ·",
"showSidebar": "Tampilkan bilah sisi",
"sites": "Situs",
"smallest": "Terkecil",
"sort": "Menyortir",
"stack": "Stack",
"terminal": "Terminal",
"thisFolderIsEmpty": "Folder ini kosong",
"toggleHiddenFiles": "Alihkan file tersembunyi",
"total": "Total",
"tryADifferentFilter": "Coba filter lain.",
"tryADifferentSearchTermOr": "Coba istilah pencarian lain atau jelajahi folder lain.",
"typeZA": "Tipe Z-A",
"types": "Jenis",
"up": "Naik",
"upDelDeleteF2RenameA": "⌫ Atas · Del Hapus · F2 Ganti Nama · ⌘A Semua",
"updatedAt": "Diperbarui {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Tambahkan kondisi",
"conditions": "Kondisi",
"conditions_one": "1 kondisi",
"conditions_other": "{{count}} kondisi",
"density": "Kepadatan",
"extraFieldsPrintedUnderTheFirst": "Bidang tambahan dicetak di bawah kolom pertama.",
"field": "Bidang",
"fields": "Bidang ·",
"fieldsShown_one": "1 kolom ditampilkan",
"fieldsShown_other": "{{count}} kolom ditampilkan",
"filtersFields": "Filter & bidang",
"match": "Cocok",
"noConditionsThisViewShowsEvery": "Tanpa syarat — tampilan ini menunjukkan semuanya",
"ofTheFollowing": "berikut ini",
"off": "Mati",
"operator": "Operator",
"removeCondition": "Hapus kondisi",
@@ -4290,9 +4270,7 @@
"securityPosture": "Postur keamanan",
"serviceInfo": "Informasi Layanan",
"startToViewMetrics": "Mulai layanan untuk melihat metrik.",
"successful": "Berhasil",
"thisMonth": "bulan ini",
"totalDeploys": "Total Penerapan",
"workers": "Pekerja"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Grup dibuat",
"groupDeleted": "Grup dihapus",
"groupUpdated": "Grup diperbarui",
"groups": "Grup",
"host": "Tuan rumah",
"hostname": "Nama host:",
"lastSeen": "Terakhir terlihat",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Masukkan nama domain terlebih dahulu"
},
"setupHealthWidget": {
"allSet": "Semua siap —",
"criticalCount": "{{count}} kritis",
"dismissHint": "Tutup — kesehatan penyiapan tetap ada di bilah status",
"moreInDoctor": "lebih lanjut di Dokter",
"progress": "Progres kesehatan penyiapan",
"recommendedCount": "{{count}} direkomendasikan",
"review": "Tinjau",
"setupHealth": "Kesehatan Penyiapan",
"setupHealth2": "% kesehatan penyiapan",
"unavailable": "Tidak tersedia"
"setupHealth": "Kesehatan Penyiapan"
},
"setupStepAccount": {
"adminEmail": "Email Admin",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Impossibile reimpostare",
"couldNotSave": "Impossibile salvare",
"dashboardSaved": "Pannello di controllo salvato",
"delete": "Elimina {{name}}",
"deleteRemovesIt": "Elimina la rimuove",
"discard": "Scartare",
"dragHeadersToMoveDragThe": "Trascina le intestazioni per spostare · trascina l'angolo per ridimensionare · fai clic su un widget per configurarlo",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} non è ancora supportato sugli agenti remoti",
"isnTAvailableOnS3Buckets": "{{op}} non è disponibile sui bucket S3",
"keyboardShortcuts": "Scorciatoie da tastiera",
"largest": "Il più grande",
"listView": "Visualizzazione elenco",
"loadingFiles": "Caricamento file",
"localPanelHost": "Host locale del pannello",
"modified": "Modificato",
"nameAZ": "Nome dalla A alla Z",
"nameZA": "Nome ZA",
"newFolder": "Nuova cartella",
"newName": "Nuovo nome",
"newest": "Più recente",
"noFiles": "Nessun file {{activeFilter}}",
"noMatches": "Nessuna corrispondenza",
"objectStorage": "Object storage",
"oldest": "Il più antico",
"owner": "Proprietario",
"ownerRwGroupOtherRFiles": "Proprietario: rw, Gruppo/Altro: r (file)",
"ownerRwOnlyPrivateFiles": "Proprietario: solo rw (file privati)",
@@ -2753,17 +2747,12 @@
"selected": "selezionato ·",
"showSidebar": "Mostra barra laterale",
"sites": "Siti",
"smallest": "Il più piccolo",
"sort": "Ordinare",
"stack": "Stack",
"terminal": "Terminale",
"thisFolderIsEmpty": "Questa cartella è vuota",
"toggleHiddenFiles": "Attiva/disattiva i file nascosti",
"total": "Totale",
"tryADifferentFilter": "Prova un filtro diverso.",
"tryADifferentSearchTermOr": "Prova un termine di ricerca diverso o sfoglia un'altra cartella.",
"typeZA": "Digitare Z-A",
"types": "Tipi",
"up": "Su",
"upDelDeleteF2RenameA": "⌫ Su · Canc Elimina · F2 Rinomina · ⌘A Tutto",
"updatedAt": "Aggiornato {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Aggiungi condizione",
"conditions": "Condizioni",
"conditions_one": "1 condizione",
"conditions_other": "{{count}} condizioni",
"density": "Densità",
"extraFieldsPrintedUnderTheFirst": "Campi aggiuntivi stampati sotto la prima colonna.",
"field": "Campo",
"fields": "Campi ·",
"fieldsShown_one": "1 campo mostrato",
"fieldsShown_other": "{{count}} campi mostrati",
"filtersFields": "Filtri e campi",
"match": "Incontro",
"noConditionsThisViewShowsEvery": "Nessuna condizione: questa visualizzazione mostra ogni",
"ofTheFollowing": "di quanto segue",
"off": "Spento",
"operator": "Operatore",
"removeCondition": "Rimuovi condizione",
@@ -4290,9 +4270,7 @@
"securityPosture": "Atteggiamento di sicurezza",
"serviceInfo": "Informazioni sul servizio",
"startToViewMetrics": "Avvia il servizio per vedere le metriche.",
"successful": "Riuscito",
"thisMonth": "questo mese",
"totalDeploys": "Distribuzioni totali",
"workers": "Worker"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Gruppo creato",
"groupDeleted": "Gruppo eliminato",
"groupUpdated": "Gruppo aggiornato",
"groups": "Gruppi",
"host": "Ospite",
"hostname": "Nome host:",
"lastSeen": "Visto l'ultima volta",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Inserisci prima un nome di dominio"
},
"setupHealthWidget": {
"allSet": "Tutto pronto -",
"criticalCount": "{{count}} critici",
"dismissHint": "Ignora — l'integrità della configurazione resta nella barra di stato",
"moreInDoctor": "di più in Dottore",
"progress": "Avanzamento dell'integrità della configurazione",
"recommendedCount": "{{count}} consigliati",
"review": "Rivedi",
"setupHealth": "Stato della configurazione",
"setupHealth2": "% integrità configurazione",
"unavailable": "Non disponibile"
"setupHealth": "Stato della configurazione"
},
"setupStepAccount": {
"adminEmail": "E-mail dell'amministratore",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "재설정할 수 없습니다.",
"couldNotSave": "저장할 수 없습니다.",
"dashboardSaved": "대시보드가 저장되었습니다",
"delete": "{{name}} 삭제",
"deleteRemovesIt": "삭제하면 제거됩니다",
"discard": "폐기",
"dragHeadersToMoveDragThe": "이동하려면 헤더를 드래그하세요. 크기를 조정하려면 모서리를 드래그하세요. 위젯을 클릭하여 구성하세요.",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}}는 아직 원격 에이전트에서 지원되지 않습니다.",
"isnTAvailableOnS3Buckets": "S3 버킷에서는 {{op}}를 사용할 수 없습니다.",
"keyboardShortcuts": "키보드 단축키",
"largest": "가장 큰",
"listView": "목록 보기",
"loadingFiles": "파일 로드 중",
"localPanelHost": "로컬 패널 호스트",
"modified": "수정됨",
"nameAZ": "이름 A~Z",
"nameZA": "이름 Z-A",
"newFolder": "새 폴더",
"newName": "새 이름",
"newest": "최신",
"noFiles": "{{activeFilter}} 파일 없음",
"noMatches": "일치하는 항목 없음",
"objectStorage": "오브젝트 스토리지",
"oldest": "가장 오래된",
"owner": "소유자",
"ownerRwGroupOtherRFiles": "소유자: rw, 그룹/기타: r(파일)",
"ownerRwOnlyPrivateFiles": "소유자: rw 전용(개인 파일)",
@@ -2753,17 +2747,12 @@
"selected": "선택됨 ·",
"showSidebar": "사이드바 표시",
"sites": "사이트",
"smallest": "가장 작은",
"sort": "정렬",
"stack": "스택",
"terminal": "터미널",
"thisFolderIsEmpty": "이 폴더는 비어 있습니다.",
"toggleHiddenFiles": "숨겨진 파일 전환",
"total": "합계",
"tryADifferentFilter": "다른 필터를 사용해 보세요.",
"tryADifferentSearchTermOr": "다른 검색어를 사용해 보거나 다른 폴더를 찾아보세요.",
"typeZA": "Z-A형",
"types": "유형",
"up": "위로",
"upDelDeleteF2RenameA": "⌫ 위로 · Del 삭제 · F2 이름 바꾸기 · ⌘A 모두",
"updatedAt": "{{time}} 업데이트됨",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "조건 추가",
"conditions": "조건",
"conditions_one": "조건 1개",
"conditions_other": "조건 {{count}}개",
"density": "밀도",
"extraFieldsPrintedUnderTheFirst": "첫 번째 열 아래에 추가 필드가 인쇄됩니다.",
"field": "필드",
"fields": "분야 ·",
"fieldsShown_one": "필드 1개 표시됨",
"fieldsShown_other": "필드 {{count}}개 표시됨",
"filtersFields": "필터 및 필드",
"match": "경기",
"noConditionsThisViewShowsEvery": "조건 없음 - 이 보기에는 모든 조건이 표시됩니다.",
"ofTheFollowing": "다음 중",
"off": "끄기",
"operator": "운영자",
"removeCondition": "조건 제거",
@@ -4290,9 +4270,7 @@
"securityPosture": "보안 태세",
"serviceInfo": "서비스 정보",
"startToViewMetrics": "메트릭을 보려면 서비스를 시작하세요.",
"successful": "성공",
"thisMonth": "이번 달",
"totalDeploys": "총 배포",
"workers": "워커"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "그룹이 생성되었습니다.",
"groupDeleted": "그룹이 삭제되었습니다.",
"groupUpdated": "그룹이 업데이트되었습니다.",
"groups": "그룹",
"host": "호스트",
"hostname": "호스트 이름:",
"lastSeen": "마지막으로 본",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "먼저 도메인 이름을 입력하세요"
},
"setupHealthWidget": {
"allSet": "모든 설정 —",
"criticalCount": "심각 {{count}}개",
"dismissHint": "닫기 — 설정 상태는 상태 표시줄에 유지됩니다",
"moreInDoctor": "닥터에서 더 보기",
"progress": "설정 상태 진행률",
"recommendedCount": "권장 {{count}}개",
"review": "검토",
"setupHealth": "설정 상태",
"setupHealth2": "% 설정 상태",
"unavailable": "사용할 수 없음"
"setupHealth": "설정 상태"
},
"setupStepAccount": {
"adminEmail": "관리자 이메일",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Nie udało się zresetować",
"couldNotSave": "Nie udało się zapisać",
"dashboardSaved": "Panel został zapisany",
"delete": "Usuń {{name}}",
"deleteRemovesIt": "Usunięcie go usuwa",
"discard": "Wyrzucać",
"dragHeadersToMoveDragThe": "Przeciągnij nagłówki, aby przenieść · przeciągnij róg, aby zmienić rozmiar · kliknij widżet, aby go skonfigurować",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} nie jest jeszcze obsługiwany na zdalnych agentach",
"isnTAvailableOnS3Buckets": "{{op}} nie jest dostępny w segmentach S3",
"keyboardShortcuts": "Skróty klawiaturowe",
"largest": "Największy",
"listView": "Widok listy",
"loadingFiles": "Ładowanie plików",
"localPanelHost": "Lokalny host panelu",
"modified": "Zmodyfikowany",
"nameAZ": "Imię A-Z",
"nameZA": "Imię Z-A",
"newFolder": "Nowy folder",
"newName": "Nowa nazwa",
"newest": "Najnowszy",
"noFiles": "Brak plików {{activeFilter}}",
"noMatches": "Brak dopasowań",
"objectStorage": "Magazyn obiektowy",
"oldest": "Najstarszy",
"owner": "Właściciel",
"ownerRwGroupOtherRFiles": "Właściciel: rw, Grupa/Inne: r (pliki)",
"ownerRwOnlyPrivateFiles": "Właściciel: tylko rw (pliki prywatne)",
@@ -2753,17 +2747,12 @@
"selected": "wybrany ·",
"showSidebar": "Pokaż pasek boczny",
"sites": "Witryny",
"smallest": "Najmniejszy",
"sort": "Sortować",
"stack": "Stos",
"terminal": "Terminal",
"thisFolderIsEmpty": "Ten folder jest pusty",
"toggleHiddenFiles": "Przełącz ukryte pliki",
"total": "Całkowity",
"tryADifferentFilter": "Wypróbuj inny filtr.",
"tryADifferentSearchTermOr": "Wypróbuj inne wyszukiwane hasło lub przejrzyj inny folder.",
"typeZA": "Typ Z-A",
"types": "Typy",
"up": "W górę",
"upDelDeleteF2RenameA": "⌫ W górę · Usuń · F2 Zmień nazwę · ⌘A Wszystko",
"updatedAt": "Zaktualizowano {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Dodaj warunek",
"conditions": "Warunki",
"conditions_one": "1 warunek",
"conditions_other": "Warunki: {{count}}",
"density": "Gęstość",
"extraFieldsPrintedUnderTheFirst": "Dodatkowe pola wydrukowane pod pierwszą kolumną.",
"field": "Pole",
"fields": "Pola ·",
"fieldsShown_one": "Pokazano 1 pole",
"fieldsShown_other": "Pokazane pola: {{count}}",
"filtersFields": "Filtry i pola",
"match": "Mecz",
"noConditionsThisViewShowsEvery": "Brak warunków — ten widok pokazuje wszystkie",
"ofTheFollowing": "z poniższych",
"off": "Wyłączony",
"operator": "Operator",
"removeCondition": "Usuń warunek",
@@ -4290,9 +4270,7 @@
"securityPosture": "Postawa bezpieczeństwa",
"serviceInfo": "Informacje o usłudze",
"startToViewMetrics": "Uruchom usługę, aby zobaczyć metryki.",
"successful": "Udany",
"thisMonth": "w tym miesiącu",
"totalDeploys": "Łączna liczba wdrożeń",
"workers": "Procesy robocze"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Grupa utworzona",
"groupDeleted": "Grupa usunięta",
"groupUpdated": "Grupa zaktualizowana",
"groups": "Grupy",
"host": "Gospodarz",
"hostname": "Nazwa hosta:",
"lastSeen": "Ostatnio widziany",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Najpierw wpisz nazwę domeny"
},
"setupHealthWidget": {
"allSet": "Wszystko gotowe —",
"criticalCount": "{{count}} krytycznych",
"dismissHint": "Odrzuć — kondycja konfiguracji pozostaje na pasku stanu",
"moreInDoctor": "więcej w Doktorze",
"progress": "Postęp kondycji konfiguracji",
"recommendedCount": "{{count}} zalecanych",
"review": "Przejrzyj",
"setupHealth": "Kondycja konfiguracji",
"setupHealth2": "% kondycji konfiguracji",
"unavailable": "Niedostępne"
"setupHealth": "Kondycja konfiguracji"
},
"setupStepAccount": {
"adminEmail": "Adres e-mail administratora",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Não foi possível redefinir",
"couldNotSave": "Não foi possível salvar",
"dashboardSaved": "Painel salvo",
"delete": "Excluir {{name}}",
"deleteRemovesIt": "Excluir o remove",
"discard": "Descartar",
"dragHeadersToMoveDragThe": "Arraste os cabeçalhos para mover · arraste o canto para redimensionar · clique em um widget para configurá-lo",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} ainda não é compatível com agentes remotos",
"isnTAvailableOnS3Buckets": "{{op}} não está disponível em buckets S3",
"keyboardShortcuts": "Atalhos de teclado",
"largest": "Maior",
"listView": "Visualização de lista",
"loadingFiles": "Carregando arquivos",
"localPanelHost": "Host do painel local",
"modified": "Modificado",
"nameAZ": "Nome A-Z",
"nameZA": "Nome Z-A",
"newFolder": "Nova pasta",
"newName": "Novo nome",
"newest": "Mais recente",
"noFiles": "Nenhum arquivo {{activeFilter}}",
"noMatches": "Nenhuma correspondência",
"objectStorage": "Armazenamento de objetos",
"oldest": "Mais antigo",
"owner": "Proprietário",
"ownerRwGroupOtherRFiles": "Proprietário: rw, Grupo/Outro: r (arquivos)",
"ownerRwOnlyPrivateFiles": "Proprietário: somente rw (arquivos privados)",
@@ -2753,17 +2747,12 @@
"selected": "selecionado ·",
"showSidebar": "Mostrar barra lateral",
"sites": "Locais",
"smallest": "Menor",
"sort": "Classificar",
"stack": "Pilha",
"terminal": "Terminal",
"thisFolderIsEmpty": "Esta pasta está vazia",
"toggleHiddenFiles": "Alternar arquivos ocultos",
"total": "Total",
"tryADifferentFilter": "Experimente um filtro diferente.",
"tryADifferentSearchTermOr": "Experimente um termo de pesquisa diferente ou navegue em outra pasta.",
"typeZA": "Tipo Z-A",
"types": "Tipos",
"up": "Subir",
"upDelDeleteF2RenameA": "⌫ Para cima · Del Excluir · F2 Renomear · ⌘A Tudo",
"updatedAt": "Atualizado {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Adicionar condição",
"conditions": "Condições",
"conditions_one": "1 condição",
"conditions_other": "{{count}} condições",
"density": "Densidade",
"extraFieldsPrintedUnderTheFirst": "Campos extras impressos na primeira coluna.",
"field": "Campo",
"fields": "Campos ·",
"fieldsShown_one": "1 campo exibido",
"fieldsShown_other": "{{count}} campos exibidos",
"filtersFields": "Filtros e campos",
"match": "Partida",
"noConditionsThisViewShowsEvery": "Sem condições — esta visualização mostra todos",
"ofTheFollowing": "dos seguintes",
"off": "Desligado",
"operator": "Operador",
"removeCondition": "Remover condição",
@@ -4290,9 +4270,7 @@
"securityPosture": "Postura de segurança",
"serviceInfo": "Informações de serviço",
"startToViewMetrics": "Inicie o serviço para ver as métricas.",
"successful": "Bem sucedido",
"thisMonth": "este mês",
"totalDeploys": "Total de implantações",
"workers": "Workers"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Grupo criado",
"groupDeleted": "Grupo excluído",
"groupUpdated": "Grupo atualizado",
"groups": "Grupos",
"host": "Host",
"hostname": "Nome do host:",
"lastSeen": "Visto pela última vez",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Informe primeiro um nome de domínio"
},
"setupHealthWidget": {
"allSet": "Tudo pronto -",
"criticalCount": "{{count}} críticos",
"dismissHint": "Dispensar — a integridade da configuração permanece na barra de status",
"moreInDoctor": "mais em Doutor",
"progress": "Progresso da integridade da configuração",
"recommendedCount": "{{count}} recomendados",
"review": "Revisar",
"setupHealth": "Integridade da configuração",
"setupHealth2": "% de integridade da configuração",
"unavailable": "Indisponível"
"setupHealth": "Integridade da configuração"
},
"setupStepAccount": {
"adminEmail": "E-mail do administrador",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Не удалось сбросить",
"couldNotSave": "Не удалось сохранить",
"dashboardSaved": "Панель управления сохранена.",
"delete": "Удалить {{name}}",
"deleteRemovesIt": "Удаление уберёт её",
"discard": "Отказаться",
"dragHeadersToMoveDragThe": "Перетащите заголовки для перемещения · перетащите угол, чтобы изменить размер · щелкните виджет, чтобы настроить его",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} пока не поддерживается на удаленных агентах.",
"isnTAvailableOnS3Buckets": "{{op}} недоступен в сегментах S3.",
"keyboardShortcuts": "Сочетания клавиш",
"largest": "Самый большой",
"listView": "Просмотр списка",
"loadingFiles": "Загрузка файлов",
"localPanelHost": "Локальный хост панели",
"modified": "Модифицированный",
"nameAZ": "Имя от А до Я",
"nameZA": "Имя Z-A",
"newFolder": "Новая папка",
"newName": "Новое имя",
"newest": "Новейший",
"noFiles": "Нет файлов {{activeFilter}}.",
"noMatches": "Нет совпадений",
"objectStorage": "Объектное хранилище",
"oldest": "Самый старый",
"owner": "Владелец",
"ownerRwGroupOtherRFiles": "Владелец: rw, Группа/Другое: r (файлы)",
"ownerRwOnlyPrivateFiles": "Владелец: только rw (частные файлы)",
@@ -2753,17 +2747,12 @@
"selected": "выбрано ·",
"showSidebar": "Показать боковую панель",
"sites": "Сайты",
"smallest": "Самый маленький",
"sort": "Сортировать",
"stack": "Стек",
"terminal": "Терминал",
"thisFolderIsEmpty": "Эта папка пуста",
"toggleHiddenFiles": "Переключить скрытые файлы",
"total": "Всего",
"tryADifferentFilter": "Попробуйте другой фильтр.",
"tryADifferentSearchTermOr": "Попробуйте другой поисковый запрос или просмотрите другую папку.",
"typeZA": "Тип Z-A",
"types": "Типы",
"up": "Вверх",
"upDelDeleteF2RenameA": "⌫ Вверх · Удалить · Переименовать F2 · ⌘A Все",
"updatedAt": "Обновлено {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Добавить условие",
"conditions": "Условия",
"conditions_one": "1 условие",
"conditions_other": "Условий: {{count}}",
"density": "Плотность",
"extraFieldsPrintedUnderTheFirst": "Дополнительные поля печатаются под первым столбцом.",
"field": "Поле",
"fields": "Поля ·",
"fieldsShown_one": "Показано 1 поле",
"fieldsShown_other": "Показано полей: {{count}}",
"filtersFields": "Фильтры и поля",
"match": "Соответствовать",
"noConditionsThisViewShowsEvery": "Никаких условий — в этом представлении отображаются все",
"ofTheFollowing": "из следующих",
"off": "Выкл.",
"operator": "Оператор",
"removeCondition": "Удалить условие",
@@ -4290,9 +4270,7 @@
"securityPosture": "Положение безопасности",
"serviceInfo": "Информация о сервисе",
"startToViewMetrics": "Запустите сервис, чтобы увидеть метрики.",
"successful": "Успешный",
"thisMonth": "в этом месяце",
"totalDeploys": "Всего развертываний",
"workers": "Рабочие процессы"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Группа создана",
"groupDeleted": "Группа удалена",
"groupUpdated": "Группа обновлена",
"groups": "Группы",
"host": "Хост",
"hostname": "Имя хоста:",
"lastSeen": "Последняя активность",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Сначала введите имя домена"
},
"setupHealthWidget": {
"allSet": "Все готово —",
"criticalCount": "{{count}} критических",
"dismissHint": "Скрыть — состояние настройки остаётся в строке состояния",
"moreInDoctor": "подробнее в Докторе",
"progress": "Ход настройки",
"recommendedCount": "{{count}} рекомендуемых",
"review": "Просмотреть",
"setupHealth": "Состояние настройки",
"setupHealth2": "% работоспособности настройки",
"unavailable": "Недоступно"
"setupHealth": "Состояние настройки"
},
"setupStepAccount": {
"adminEmail": "Электронная почта администратора",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "ไม่สามารถรีเซ็ตได้",
"couldNotSave": "ไม่สามารถบันทึกได้",
"dashboardSaved": "บันทึกแดชบอร์ดแล้ว",
"delete": "ลบ {{name}}",
"deleteRemovesIt": "การลบจะนำออก",
"discard": "ทิ้ง",
"dragHeadersToMoveDragThe": "ลากส่วนหัวเพื่อย้าย · ลากมุมเพื่อปรับขนาด · คลิกวิดเจ็ตเพื่อกำหนดค่า",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} ยังไม่รองรับเอเจนต์ระยะไกล",
"isnTAvailableOnS3Buckets": "{{op}} ไม่พร้อมใช้งานบนบัคเก็ต S3",
"keyboardShortcuts": "แป้นพิมพ์ลัด",
"largest": "ใหญ่ที่สุด",
"listView": "มุมมองรายการ",
"loadingFiles": "กำลังโหลดไฟล์",
"localPanelHost": "โฮสต์แผงภายในเครื่อง",
"modified": "ดัดแปลง",
"nameAZ": "ชื่อ ก-ฮ",
"nameZA": "ชื่อ Z-A",
"newFolder": "โฟลเดอร์ใหม่",
"newName": "ชื่อใหม่",
"newest": "ใหม่ล่าสุด",
"noFiles": "ไม่มีไฟล์ {{activeFilter}}",
"noMatches": "ไม่มีการแข่งขัน",
"objectStorage": "ที่เก็บข้อมูลออบเจ็กต์",
"oldest": "เก่าแก่ที่สุด",
"owner": "เจ้าของ",
"ownerRwGroupOtherRFiles": "เจ้าของ: rw, กลุ่ม/อื่นๆ: r (ไฟล์)",
"ownerRwOnlyPrivateFiles": "เจ้าของ: rw เท่านั้น (ไฟล์ส่วนตัว)",
@@ -2753,17 +2747,12 @@
"selected": "เลือกแล้ว ·",
"showSidebar": "แสดงแถบด้านข้าง",
"sites": "เว็บไซต์",
"smallest": "เล็กที่สุด",
"sort": "เรียงลำดับ",
"stack": "สแต็ค",
"terminal": "เทอร์มินัล",
"thisFolderIsEmpty": "โฟลเดอร์นี้ว่างเปล่า",
"toggleHiddenFiles": "สลับไฟล์ที่ซ่อน",
"total": "ทั้งหมด",
"tryADifferentFilter": "ลองใช้ตัวกรองอื่น",
"tryADifferentSearchTermOr": "ลองใช้คำค้นหาอื่นหรือเรียกดูโฟลเดอร์อื่น",
"typeZA": "ประเภท Z-A",
"types": "ประเภท",
"up": "ขึ้น",
"upDelDeleteF2RenameA": "⌫ ขึ้น · ลบ ลบ · F2 เปลี่ยนชื่อ · ⌘A ทั้งหมด",
"updatedAt": "อัปเดต {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "เพิ่มเงื่อนไข",
"conditions": "เงื่อนไข",
"conditions_one": "1 เงื่อนไข",
"conditions_other": "{{count}} เงื่อนไข",
"density": "ความหนาแน่น",
"extraFieldsPrintedUnderTheFirst": "ช่องพิเศษที่พิมพ์ใต้คอลัมน์แรก",
"field": "สนาม",
"fields": "ทุ่งนา ·",
"fieldsShown_one": "แสดง 1 ฟิลด์",
"fieldsShown_other": "แสดง {{count}} ฟิลด์",
"filtersFields": "ตัวกรองและฟิลด์",
"match": "จับคู่",
"noConditionsThisViewShowsEvery": "ไม่มีเงื่อนไข — มุมมองนี้แสดงทุกรายการ",
"ofTheFollowing": "ดังต่อไปนี้",
"off": "ปิด",
"operator": "ผู้ดำเนินการ",
"removeCondition": "ถอนเงื่อนไข",
@@ -4290,9 +4270,7 @@
"securityPosture": "ท่าทางการรักษาความปลอดภัย",
"serviceInfo": "ข้อมูลการบริการ",
"startToViewMetrics": "เริ่มบริการเพื่อดูเมตริก",
"successful": "ประสบความสำเร็จ",
"thisMonth": "เดือนนี้",
"totalDeploys": "การปรับใช้ทั้งหมด",
"workers": "เวิร์กเกอร์"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "สร้างกลุ่มแล้ว",
"groupDeleted": "ลบกลุ่มแล้ว",
"groupUpdated": "อัปเดตกลุ่มแล้ว",
"groups": "กลุ่ม",
"host": "เจ้าภาพ",
"hostname": "ชื่อโฮสต์:",
"lastSeen": "เห็นครั้งสุดท้าย",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "กรอกชื่อโดเมนก่อน"
},
"setupHealthWidget": {
"allSet": "เรียบร้อยแล้ว —",
"criticalCount": "วิกฤต {{count}} รายการ",
"dismissHint": "ปิดทิ้ง — สถานะสุขภาพการตั้งค่ายังอยู่ในแถบสถานะ",
"moreInDoctor": "เพิ่มเติมในคุณหมอ",
"progress": "ความคืบหน้าสถานะการตั้งค่า",
"recommendedCount": "แนะนำ {{count}} รายการ",
"review": "ตรวจสอบ",
"setupHealth": "สถานะการตั้งค่า",
"setupHealth2": "% ความสมบูรณ์ของการตั้งค่า",
"unavailable": "ไม่พร้อมใช้งาน"
"setupHealth": "สถานะการตั้งค่า"
},
"setupStepAccount": {
"adminEmail": "อีเมล์ผู้ดูแลระบบ",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Sıfırlanamadı",
"couldNotSave": "Kaydedilemedi",
"dashboardSaved": "Kontrol paneli kaydedildi",
"delete": "{{name}}'yi sil",
"deleteRemovesIt": "Silmek onu kaldırır",
"discard": "At",
"dragHeadersToMoveDragThe": "Taşımak için başlıkları sürükleyin · yeniden boyutlandırmak için köşeyi sürükleyin · yapılandırmak için bir widget'ı tıklayın",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} henüz uzak aracılarda desteklenmiyor",
"isnTAvailableOnS3Buckets": "{{op}}, S3 paketlerinde mevcut değildir",
"keyboardShortcuts": "Klavye kısayolları",
"largest": "En büyük",
"listView": "Liste görünümü",
"loadingFiles": "Dosyalar yükleniyor",
"localPanelHost": "Yerel panel ana bilgisayarı",
"modified": "Değiştirildi",
"nameAZ": "A'dan Z'ye İsim",
"nameZA": "İsim Z-A",
"newFolder": "Yeni klasör",
"newName": "Yeni Ad",
"newest": "En yeni",
"noFiles": "{{activeFilter}} dosyası yok",
"noMatches": "Eşleşme yok",
"objectStorage": "Nesne depolama",
"oldest": "En eski",
"owner": "Mal sahibi",
"ownerRwGroupOtherRFiles": "Sahip: rw, Grup/Diğer: r (dosyalar)",
"ownerRwOnlyPrivateFiles": "Sahip: yalnızca rw (özel dosyalar)",
@@ -2753,17 +2747,12 @@
"selected": "seçilmiş ·",
"showSidebar": "Kenar çubuğunu göster",
"sites": "Siteler",
"smallest": "En küçük",
"sort": "Düzenlemek",
"stack": "Yığın",
"terminal": "Terminal",
"thisFolderIsEmpty": "Bu klasör boş",
"toggleHiddenFiles": "Gizli dosyaları değiştir",
"total": "Toplam",
"tryADifferentFilter": "Farklı bir filtre deneyin.",
"tryADifferentSearchTermOr": "Farklı bir arama terimi deneyin veya başka bir klasöre göz atın.",
"typeZA": "Tip Z-A",
"types": "Türler",
"up": "Yukarı",
"upDelDeleteF2RenameA": "⌫ Yukarı · Sil Sil · F2 Yeniden Adlandır · ⌘A Tümü",
"updatedAt": "{{time}} güncellendi",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Koşul ekle",
"conditions": "Koşullar",
"conditions_one": "1 koşul",
"conditions_other": "{{count}} koşul",
"density": "Yoğunluk",
"extraFieldsPrintedUnderTheFirst": "İlk sütunun altına yazdırılan ekstra alanlar.",
"field": "Alan",
"fields": "Alanlar ·",
"fieldsShown_one": "1 alan gösteriliyor",
"fieldsShown_other": "{{count}} alan gösteriliyor",
"filtersFields": "Filtreler ve alanlar",
"match": "Kibrit",
"noConditionsThisViewShowsEvery": "Koşul yok — bu görünüm her koşulu gösterir",
"ofTheFollowing": "aşağıdakilerden",
"off": "Kapalı",
"operator": "Operatör",
"removeCondition": "Koşulu kaldır",
@@ -4290,9 +4270,7 @@
"securityPosture": "Güvenlik duruşu",
"serviceInfo": "Servis Bilgisi",
"startToViewMetrics": "Metrikleri görmek için hizmeti başlatın.",
"successful": "Başarılı",
"thisMonth": "bu ay",
"totalDeploys": "Toplam Dağıtımlar",
"workers": "İşçiler"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Grup oluşturuldu",
"groupDeleted": "Grup silindi",
"groupUpdated": "Grup güncellendi",
"groups": "Gruplar",
"host": "Ev sahibi",
"hostname": "Ana makine adı:",
"lastSeen": "Son görülme",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Önce bir alan adı girin"
},
"setupHealthWidget": {
"allSet": "Her şey hazır —",
"criticalCount": "{{count}} kritik",
"dismissHint": "Kapat — kurulum durumu durum çubuğunda kalır",
"moreInDoctor": "Doktor'da daha fazlası",
"progress": "Kurulum durumu ilerlemesi",
"recommendedCount": "{{count}} önerilen",
"review": "İncele",
"setupHealth": "Kurulum Durumu",
"setupHealth2": "% kurulum durumu",
"unavailable": "Kullanılamıyor"
"setupHealth": "Kurulum Durumu"
},
"setupStepAccount": {
"adminEmail": "Yönetici E-postası",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "Không thể đặt lại",
"couldNotSave": "Không thể lưu",
"dashboardSaved": "Đã lưu trang tổng quan",
"delete": "Xóa {{name}}",
"deleteRemovesIt": "Xóa sẽ loại bỏ nó",
"discard": "Loại bỏ",
"dragHeadersToMoveDragThe": "Kéo tiêu đề để di chuyển · kéo góc để thay đổi kích thước · nhấp vào tiện ích để định cấu hình nó",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "{{op}} chưa được hỗ trợ trên các tác nhân từ xa",
"isnTAvailableOnS3Buckets": "{{op}} không có sẵn trên nhóm S3",
"keyboardShortcuts": "Phím tắt",
"largest": "lớn nhất",
"listView": "Chế độ xem danh sách",
"loadingFiles": "Đang tải tập tin",
"localPanelHost": "Máy chủ bảng điều khiển cục bộ",
"modified": "Đã sửa đổi",
"nameAZ": "Tên A-Z",
"nameZA": "Tên Z-A",
"newFolder": "Thư mục mới",
"newName": "Tên mới",
"newest": "Mới nhất",
"noFiles": "Không có tệp {{activeFilter}}",
"noMatches": "Không có kết quả phù hợp",
"objectStorage": "Lưu trữ đối tượng",
"oldest": "Cũ nhất",
"owner": "Người sở hữu",
"ownerRwGroupOtherRFiles": "Chủ sở hữu: rw, Nhóm/Khác: r (tệp)",
"ownerRwOnlyPrivateFiles": "Chủ sở hữu: chỉ rw (tệp riêng tư)",
@@ -2753,17 +2747,12 @@
"selected": "đã chọn ·",
"showSidebar": "Hiển thị thanh bên",
"sites": "Trang web",
"smallest": "Nhỏ nhất",
"sort": "Loại",
"stack": "Stack",
"terminal": "Terminal",
"thisFolderIsEmpty": "Thư mục này trống",
"toggleHiddenFiles": "Chuyển đổi tập tin ẩn",
"total": "Tổng cộng",
"tryADifferentFilter": "Hãy thử một bộ lọc khác.",
"tryADifferentSearchTermOr": "Hãy thử một cụm từ tìm kiếm khác hoặc duyệt qua một thư mục khác.",
"typeZA": "Loại Z-A",
"types": "Các loại",
"up": "Lên",
"upDelDeleteF2RenameA": "⌫ Lên · Xóa · F2 Đổi tên · ⌘A Tất cả",
"updatedAt": "Cập nhật {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "Thêm điều kiện",
"conditions": "Điều kiện",
"conditions_one": "1 điều kiện",
"conditions_other": "{{count}} điều kiện",
"density": "Tỉ trọng",
"extraFieldsPrintedUnderTheFirst": "Các trường bổ sung được in dưới cột đầu tiên.",
"field": "Cánh đồng",
"fields": "Cánh đồng ·",
"fieldsShown_one": "Hiển thị 1 trường",
"fieldsShown_other": "Hiển thị {{count}} trường",
"filtersFields": "Bộ lọc & trường",
"match": "Cuộc thi đấu",
"noConditionsThisViewShowsEvery": "Không có điều kiện - chế độ xem này hiển thị mọi",
"ofTheFollowing": "những điều sau đây",
"off": "Tắt",
"operator": "Toán tử",
"removeCondition": "Xóa điều kiện",
@@ -4290,9 +4270,7 @@
"securityPosture": "Tư thế an ninh",
"serviceInfo": "Thông tin dịch vụ",
"startToViewMetrics": "Khởi động dịch vụ để xem số liệu.",
"successful": "Thành công",
"thisMonth": "tháng này",
"totalDeploys": "Tổng số lần triển khai",
"workers": "Worker"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "Đã tạo nhóm",
"groupDeleted": "Đã xóa nhóm",
"groupUpdated": "Đã cập nhật nhóm",
"groups": "Nhóm",
"host": "Chủ nhà",
"hostname": "Tên máy chủ:",
"lastSeen": "Nhìn thấy lần cuối",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "Hãy nhập tên miền trước"
},
"setupHealthWidget": {
"allSet": "Mọi thứ đã sẵn sàng —",
"criticalCount": "{{count}} nghiêm trọng",
"dismissHint": "Bỏ qua — sức khỏe thiết lập vẫn nằm trên thanh trạng thái",
"moreInDoctor": "thêm trong Bác sĩ",
"progress": "Tiến độ tình trạng thiết lập",
"recommendedCount": "{{count}} được khuyến nghị",
"review": "Xem lại",
"setupHealth": "Tình trạng thiết lập",
"setupHealth2": "% tình trạng thiết lập",
"unavailable": "Không khả dụng"
"setupHealth": "Tình trạng thiết lập"
},
"setupStepAccount": {
"adminEmail": "Email quản trị",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "无法重置",
"couldNotSave": "无法保存",
"dashboardSaved": "仪表板已保存",
"delete": "删除{{name}}",
"deleteRemovesIt": "删除即移除",
"discard": "丢弃",
"dragHeadersToMoveDragThe": "拖动标题进行移动·拖动角部进行调整大小·单击小部件进行配置",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "远程代理尚不支持 {{op}}",
"isnTAvailableOnS3Buckets": "{{op}} 在 S3 存储桶上不可用",
"keyboardShortcuts": "键盘快捷键",
"largest": "最大",
"listView": "列表视图",
"loadingFiles": "加载文件",
"localPanelHost": "本地面板主机",
"modified": "修改的",
"nameAZ": "名称 A-Z",
"nameZA": "名称 Z-A",
"newFolder": "新建文件夹",
"newName": "新名称",
"newest": "最新",
"noFiles": "没有 {{activeFilter}} 文件",
"noMatches": "没有匹配项",
"objectStorage": "对象存储",
"oldest": "最古老的",
"owner": "所有者",
"ownerRwGroupOtherRFiles": "所有者:rw,组/其他:r(文件)",
"ownerRwOnlyPrivateFiles": "所有者:仅 rw(私有文件)",
@@ -2753,17 +2747,12 @@
"selected": "已选择·",
"showSidebar": "显示侧边栏",
"sites": "站点",
"smallest": "最小",
"sort": "种类",
"stack": "堆栈",
"terminal": "终端",
"thisFolderIsEmpty": "该文件夹是空的",
"toggleHiddenFiles": "切换隐藏文件",
"total": "总计",
"tryADifferentFilter": "尝试不同的过滤器。",
"tryADifferentSearchTermOr": "尝试不同的搜索词或浏览另一个文件夹。",
"typeZA": "Z-A型",
"types": "类型",
"up": "上一级",
"upDelDeleteF2RenameA": "⌫ 向上 · Del 删除 · F2 重命名 · ⌘A 全部",
"updatedAt": "更新于 {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "添加条件",
"conditions": "状况",
"conditions_one": "1 个条件",
"conditions_other": "{{count}} 个条件",
"density": "密度",
"extraFieldsPrintedUnderTheFirst": "额外字段打印在第一列下。",
"field": "场地",
"fields": "领域 ·",
"fieldsShown_one": "显示 1 个字段",
"fieldsShown_other": "显示 {{count}} 个字段",
"filtersFields": "过滤器和字段",
"match": "匹配",
"noConditionsThisViewShowsEvery": "无条件 — 该视图显示了所有",
"ofTheFollowing": "以下的",
"off": "关闭",
"operator": "操作员",
"removeCondition": "删除条件",
@@ -4290,9 +4270,7 @@
"securityPosture": "安全态势",
"serviceInfo": "服务信息",
"startToViewMetrics": "启动服务以查看指标。",
"successful": "成功的",
"thisMonth": "本月",
"totalDeploys": "部署总数",
"workers": "工作进程"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "群组已创建",
"groupDeleted": "群组已删除",
"groupUpdated": "群组已更新",
"groups": "团体",
"host": "主机",
"hostname": "主机名:",
"lastSeen": "上次在线",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "请先输入域名"
},
"setupHealthWidget": {
"allSet": "一切就绪——",
"criticalCount": "{{count}} 个严重问题",
"dismissHint": "忽略 — 设置健康状况会保留在状态栏中",
"moreInDoctor": "在医生中查看更多",
"progress": "设置健康状况进度",
"recommendedCount": "{{count}} 个建议项",
"review": "查看",
"setupHealth": "设置健康状况",
"setupHealth2": "% 设置健康状况",
"unavailable": "不可用"
"setupHealth": "设置健康状况"
},
"setupStepAccount": {
"adminEmail": "管理员电子邮件",
+1 -32
View File
@@ -1664,7 +1664,6 @@
"couldNotReset": "無法重設",
"couldNotSave": "無法儲存",
"dashboardSaved": "儀表板已儲存",
"delete": "刪除{{name}}",
"deleteRemovesIt": "刪除即會移除",
"discard": "丟棄",
"dragHeadersToMoveDragThe": "拖曳標題進行移動·拖曳角落進行調整大小·點選小工具進行設定",
@@ -2718,20 +2717,15 @@
"isNotYetSupportedOnRemote": "遠端代理程式尚不支援 {{op}}",
"isnTAvailableOnS3Buckets": "S3 儲存貯體不支援 {{op}} 操作",
"keyboardShortcuts": "鍵盤快速鍵",
"largest": "最大",
"listView": "清單檢視",
"loadingFiles": "載入檔案",
"localPanelHost": "本機面板主機",
"modified": "已修改",
"nameAZ": "名稱 A-Z",
"nameZA": "名稱 Z-A",
"newFolder": "建立資料夾",
"newName": "新名稱",
"newest": "最新",
"noFiles": "沒有 {{activeFilter}} 檔案",
"noMatches": "沒有相符項",
"objectStorage": "物件儲存",
"oldest": "最舊",
"owner": "擁有者",
"ownerRwGroupOtherRFiles": "所有者:rw,群組/其他:r(檔案)",
"ownerRwOnlyPrivateFiles": "所有者:僅 rw(私有檔案)",
@@ -2753,17 +2747,12 @@
"selected": "已選擇·",
"showSidebar": "顯示側邊欄",
"sites": "網站",
"smallest": "最小",
"sort": "排序",
"stack": "堆疊",
"terminal": "終端機",
"thisFolderIsEmpty": "該資料夾是空的",
"toggleHiddenFiles": "切換隱藏檔案",
"total": "總計",
"tryADifferentFilter": "嘗試不同的篩選器。",
"tryADifferentSearchTermOr": "嘗試不同的搜尋字詞或瀏覽另一個資料夾。",
"typeZA": "類型 Z-A",
"types": "類型",
"up": "上一層",
"upDelDeleteF2RenameA": "⌫ 向上 · Del 刪除 · F2 重新命名 · ⌘A 全部",
"updatedAt": "更新於 {{time}}",
@@ -2971,19 +2960,10 @@
},
"gridFilterDrawer": {
"addCondition": "新增條件",
"conditions": "條件",
"conditions_one": "1 個條件",
"conditions_other": "{{count}} 個條件",
"density": "密度",
"extraFieldsPrintedUnderTheFirst": "其他欄位顯示在第一欄下方。",
"field": "欄位",
"fields": "欄位 ·",
"fieldsShown_one": "顯示 1 個欄位",
"fieldsShown_other": "顯示 {{count}} 個欄位",
"filtersFields": "篩選器和欄位",
"match": "相符",
"noConditionsThisViewShowsEvery": "無條件 — 此檢視顯示了所有",
"ofTheFollowing": "以下的",
"off": "關閉",
"operator": "運算子",
"removeCondition": "刪除條件",
@@ -4290,9 +4270,7 @@
"securityPosture": "安全態勢",
"serviceInfo": "服務資訊",
"startToViewMetrics": "啟動服務以檢視指標。",
"successful": "成功",
"thisMonth": "本月",
"totalDeploys": "部署總數",
"workers": "工作程序"
},
"packagesTab": {
@@ -5656,7 +5634,6 @@
"groupCreated": "群組已建立",
"groupDeleted": "群組已刪除",
"groupUpdated": "群組已更新",
"groups": "群組",
"host": "主機",
"hostname": "主機名稱:",
"lastSeen": "最後一次見到",
@@ -6163,16 +6140,8 @@
"enterADomainNameFirst": "請先輸入網域名稱"
},
"setupHealthWidget": {
"allSet": "一切就緒——",
"criticalCount": "{{count}} 個嚴重",
"dismissHint": "關閉——設定健康狀態會保留在狀態列中",
"moreInDoctor": "前往 [診斷] 檢視更多資訊",
"progress": "設定健康進度",
"recommendedCount": "{{count}} 個建議",
"review": "檢視",
"setupHealth": "設定健康狀況",
"setupHealth2": "% 設定健康狀況",
"unavailable": "不可用"
"setupHealth": "設定健康狀況"
},
"setupStepAccount": {
"adminEmail": "管理員信箱",
+74 -60
View File
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import {
Grid2x2, History, Keyboard, Maximize2, Plus,
RefreshCw, SlidersHorizontal, X,
ChevronDown, Grid2x2, History, Keyboard, Maximize2, Pencil, Plus,
RefreshCw, SlidersHorizontal, Trash2, X,
} from 'lucide-react';
import api from '../services/api';
import { useAuth } from '../contexts/useAuth.js';
@@ -12,11 +12,14 @@ import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@
import ServerPicker from '../components/ServerPicker';
import { SegControl } from '@/components/ds';
import { Button } from '@/components/ui/button';
import {
DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel,
DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu';
import ChangeBar from '../components/ds/ChangeBar';
import ShortcutSheet from '../components/ds/ShortcutSheet';
import EmptyState from '../components/EmptyState';
import PluginSlot from '../components/PluginSlot';
import SetupHealthWidget from '../components/dashboard/SetupHealthWidget';
import { DashGrid } from '../components/dashboard/grid/DashGrid';
import { WidgetLibrary } from '../components/dashboard/grid/WidgetLibrary';
import { WidgetEditor } from '../components/dashboard/grid/WidgetEditor';
@@ -485,68 +488,79 @@ const Dashboard = () => {
{/* Extension slot: widgets contributed to the top of the dashboard */}
<PluginSlot name="dashboard.top" />
{/* Setup health. Deliberately NOT a placeable board widget: an
unfirewalled box must be visible without the operator first
opting into a widget, and the card collapses to a single "all
set" line once everything is done, so it costs nothing when
clean. Admin-only — the endpoint is too. */}
{isAdmin && <SetupHealthWidget />}
{/* Board tabs + board-wide controls */}
<div className="skw-bar">
<div className="skw-tabs">
{boards.map((board) => (
<div
key={board.id}
className={`skw-tab${board.id === activeBoardId ? ' is-on' : ''}`}
onClick={() => handleBoardSwitch(board.id)}
onDoubleClick={() => edit && setRenamingId(board.id)}
role="button"
tabIndex={0}
onKeyDown={(e) => { if (e.key === 'Enter') handleBoardSwitch(board.id); }}
>
<Grid2x2 size={14} aria-hidden="true" />
{renamingId === board.id ? (
<input
className="skw-rename"
autoFocus
defaultValue={board.name}
onBlur={(e) => {
renameBoard(board.id, e.target.value.trim() || board.name);
setRenamingId(null);
}}
onKeyDown={(e) => {
if (e.key === 'Enter') e.target.blur();
if (e.key === 'Escape') setRenamingId(null);
}}
/>
) : (
<span>{board.name}</span>
)}
<span className="skw-tab__count">
{board.id === activeBoardId && edit ? widgets.length : (board.widgets || []).length}
</span>
{edit && boards.length > 1 && board.id === activeBoardId && (
<Button variant="unstyled"
{/* One selector for every dashboard, however many there are: a
row of tabs wrapped the bar onto a second line and only got
longer with each board. */}
<div className="skw-boardpick">
{renamingId === activeBoardId && activeBoard ? (
<input
className="skw-rename"
autoFocus
aria-label={t('app.dashboard.dashboardName', 'Dashboard name')}
defaultValue={activeBoard.name}
onBlur={(e) => {
renameBoard(activeBoard.id, e.target.value.trim() || activeBoard.name);
setRenamingId(null);
}}
onKeyDown={(e) => {
if (e.key === 'Enter') e.target.blur();
if (e.key === 'Escape') setRenamingId(null);
}}
/>
) : (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button
variant="unstyled"
type="button"
className="skw-iconbtn skw-iconbtn--bare"
aria-label={t('app.dashboard.delete', 'Delete {{name}}', { name: board.name })}
onClick={(e) => { e.stopPropagation(); handleRemoveBoard(board.id); }}
className="skw-barbtn skw-boardpick__btn"
aria-label={t('app.dashboard.switchDashboard', 'Switch dashboard')}
>
<X size={12} />
<Grid2x2 size={14} aria-hidden="true" />
<span className="skw-boardpick__name">{activeBoard?.name}</span>
<span className="skw-boardpick__count">{widgets.length}</span>
<ChevronDown size={14} aria-hidden="true" />
</Button>
)}
</div>
))}
<Button variant="unstyled"
type="button"
className="skw-tab skw-tab--add"
onClick={handleCreateBoard}
aria-label={t('app.dashboard.newDashboard', 'New dashboard')}
title={t('app.dashboard.newDashboard', 'New dashboard')}
>
<Plus size={14} />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="start" className="skw-boardpick__menu">
<DropdownMenuLabel>{t('app.dashboard.dashboards', 'Dashboards')}</DropdownMenuLabel>
<DropdownMenuRadioGroup
value={String(activeBoardId)}
onValueChange={(value) => {
const next = boards.find((board) => String(board.id) === value);
if (next) handleBoardSwitch(next.id);
}}
>
{boards.map((board) => (
<DropdownMenuRadioItem key={board.id} value={String(board.id)}>
<span className="skw-boardpick__name">{board.name}</span>
<span className="skw-boardpick__count">
{board.id === activeBoardId ? widgets.length : (board.widgets || []).length}
</span>
</DropdownMenuRadioItem>
))}
</DropdownMenuRadioGroup>
<DropdownMenuSeparator />
<DropdownMenuItem onClick={handleCreateBoard}>
<Plus size={14} /> {t('app.dashboard.newDashboard', 'New dashboard')}
</DropdownMenuItem>
{edit && activeBoard && (
<>
<DropdownMenuItem onClick={() => setRenamingId(activeBoard.id)}>
<Pencil size={14} /> {t('app.dashboard.renameDashboard', 'Rename dashboard')}
</DropdownMenuItem>
{boards.length > 1 && (
<DropdownMenuItem className="text-destructive" onClick={() => handleRemoveBoard(activeBoard.id)}>
<Trash2 size={14} /> {t('app.dashboard.deleteDashboard', 'Delete dashboard')}
</DropdownMenuItem>
)}
</>
)}
</DropdownMenuContent>
</DropdownMenu>
)}
</div>
<div className="skw-bar__ctl">
+17 -6
View File
@@ -29,7 +29,8 @@ import ContextMenu from '../components/file-manager/ContextMenu';
import { formatBytes } from '../components/file-manager/fileTypes';
import { useClipboard } from '@/hooks/useClipboard';
import { useTranslation } from 'react-i18next';
import { useTopbarActions } from '@/hooks/useTopbarActions';
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
import FileSearchField from '../components/file-manager/FileSearchField';
import { useStableHandler } from '@/hooks/useStableHandler';
function FileManager() {
@@ -315,6 +316,19 @@ function FileManager() {
[isRemote, isS3, currentPath],
);
// Search rides in the top bar, right-most, like every other page's search.
// Without a top bar (the page mounted on its own) it falls back to the
// toolbar underneath.
const { portal: searchPortal, actions: inlineSearch } = useTopbarChrome(
<FileSearchField
searchQuery={searchQuery}
setSearchQuery={setSearchQuery}
handleSearch={handleSearch}
searchResults={searchResults}
clearSearch={clearSearch}
/>,
);
// ─── render ──────────────────────────────────────────
return (
<div
@@ -325,6 +339,7 @@ function FileManager() {
onDrop={handleDrop}
>
<input type="file" ref={fileInputRef} multiple className="hidden" onChange={handleUploadInput} />
{searchPortal}
{isRemote && (
<div className="file-manager-target-banner">
@@ -375,11 +390,7 @@ function FileManager() {
filterCounts={filterCounts}
sortValue={sortValue}
handleSortChange={handleSortChange}
searchQuery={searchQuery}
setSearchQuery={setSearchQuery}
handleSearch={handleSearch}
searchResults={searchResults}
clearSearch={clearSearch}
search={inlineSearch}
viewMode={viewMode}
setViewMode={setViewMode}
showHidden={showHidden}
+117 -44
View File
@@ -1,5 +1,7 @@
import { isPlaceholderServerName } from '../components/serverdetail/serverDetailData';
import ServerHeaderMeta from '../components/serverdetail/ServerHeaderMeta';
import { isPlaceholderServerName, serverStatusKind } from '../components/serverdetail/serverDetailData';
import { DetailPage, DetailIdentity, DetailMetaSep, DetailTabs } from '@/components/detail/DetailPage';
import FavoriteStar from '@/components/FavoriteStar';
import { Pill, ServiceTile } from '@/components/ds';
import { useState, useEffect, useCallback } from 'react';
import { useParams, Link, useNavigate } from 'react-router-dom';
import api from '../services/api';
@@ -7,10 +9,9 @@ import { useToast } from '../contexts/useToast.js';
import { useConfirm } from '../hooks/useConfirm';
import { useRecordVisit } from '@/hooks/useRecordVisit';
import { Button } from '@/components/ui/button';
import { Tabs, TabsContent } from '@/components/ui/tabs';
import { Tip } from '@/components/ui/tooltip';
import { Server, ArrowLeft } from 'lucide-react';
import PageLayout from '../layouts/PageLayout';
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
import { TabsContent } from '@/components/ui/tabs';
import { Server, Terminal, KeyRound, MoreVertical, Trash2, LayoutGrid, History, Container, Globe, Clock, Network, Package, Boxes, ScanSearch, Activity, Bell, Shield, Settings } from 'lucide-react';
import PackagesTab from '../components/serverdetail/PackagesTab';
import ServicesTab from '../components/serverdetail/ServicesTab';
import ServerOverviewTab from '../components/serverdetail/ServerOverviewTab';
@@ -22,6 +23,8 @@ import ServerMetricsTab from '../components/serverdetail/ServerMetricsTab';
import SurveyTab from '../components/serverdetail/SurveyTab';
import ServerSettingsTab, { TokenModal } from '../components/serverdetail/ServerSettingsTab';
import {
CopyChip,
FolderTinyIcon,
RefreshIcon,
} from '../components/serverdetail/serverDetailShared';
import ProxyStackPanel from '../components/proxy/ProxyStackPanel';
@@ -32,6 +35,10 @@ import { useTranslation } from 'react-i18next';
import { useAuth } from '../contexts/useAuth.js';
import ServerRestorePointsTab from '../components/serverdetail/ServerRestorePointsTab';
import { toastError } from '@/utils/errorMessage';
import { formatDateTime } from '@/utils/intl';
// Edge of the identity tile next to the entity name, in px.
const IDENTITY_TILE_SIZE = 52;
// Live host metrics cadence while the server is online.
const METRICS_POLL_MS = 10000;
@@ -254,56 +261,122 @@ const ServerDetail = () => {
// hiding the tab matches the rest of the panel's "don't expose what
// the host can't do" behaviour.
const tabs = [
{ id: 'overview', label: t('common.labels.overview', 'Overview') },
...(isDeveloper ? [{ id: 'restore-points', label: t('app.serverDetail.restorePoints', 'Restore points') }] : []),
{ id: 'docker', label: t('common.labels.docker', 'Docker') },
{ id: 'proxy', label: t('app.serverDetail.proxy', 'Proxy') },
...(server.capabilities?.cron ? [{ id: 'cron', label: t('app.serverDetail.cron', 'Cron') }] : []),
...(server.capabilities?.cloudflared ? [{ id: 'cloudflared', label: t('app.serverDetail.tunnels', 'Tunnels') }] : []),
...(server.capabilities?.packages ? [{ id: 'packages', label: t('app.serverDetail.packages', 'Packages') }] : []),
...(server.capabilities?.systemd ? [{ id: 'services', label: t('common.labels.services', 'Services') }] : []),
...(server.capabilities?.survey ? [{ id: 'survey', label: t('app.serverDetail.survey', 'Survey') }] : []),
{ id: 'metrics', label: t('app.serverDetail.metrics', 'Metrics') },
{ id: 'overview', icon: LayoutGrid, label: t('common.labels.overview', 'Overview') },
...(isDeveloper ? [{ id: 'restore-points', icon: History, label: t('app.serverDetail.restorePoints', 'Restore points') }] : []),
{ id: 'docker', icon: Container, label: t('common.labels.docker', 'Docker') },
{ id: 'proxy', icon: Globe, label: t('app.serverDetail.proxy', 'Proxy') },
...(server.capabilities?.cron ? [{ id: 'cron', icon: Clock, label: t('app.serverDetail.cron', 'Cron') }] : []),
...(server.capabilities?.cloudflared ? [{ id: 'cloudflared', icon: Network, label: t('app.serverDetail.tunnels', 'Tunnels') }] : []),
...(server.capabilities?.packages ? [{ id: 'packages', icon: Package, label: t('app.serverDetail.packages', 'Packages') }] : []),
...(server.capabilities?.systemd ? [{ id: 'services', icon: Boxes, label: t('common.labels.services', 'Services') }] : []),
...(server.capabilities?.survey ? [{ id: 'survey', icon: ScanSearch, label: t('app.serverDetail.survey', 'Survey') }] : []),
{ id: 'metrics', icon: Activity, label: t('app.serverDetail.metrics', 'Metrics') },
...(totalAlertCount > 0
? [{ id: 'alerts', label: t('app.serverDetail.alerts', 'Alerts'), badge: totalAlertCount }]
: [{ id: 'alerts', label: t('app.serverDetail.alerts', 'Alerts') }]),
...(server.capabilities?.wireguard ? [{ id: 'remote-access', label: t('app.serverDetail.remoteAccess', 'Remote access') }] : []),
{ id: 'settings', label: t('common.labels.settings', 'Settings') }
? [{ id: 'alerts', icon: Bell, label: t('app.serverDetail.alerts', 'Alerts'), badge: totalAlertCount }]
: [{ id: 'alerts', icon: Bell, label: t('app.serverDetail.alerts', 'Alerts') }]),
...(server.capabilities?.wireguard ? [{ id: 'remote-access', icon: Shield, label: t('app.serverDetail.remoteAccess', 'Remote access') }] : []),
{ id: 'settings', icon: Settings, label: t('common.labels.settings', 'Settings') }
];
const isOnline = server.status === 'online';
const canOpenShell = isOnline && Boolean(server.capabilities?.terminal);
const displayName = isPlaceholderServerName(server.name) ? t('app.serverDetail.pendingPairing', 'Pending pairing') : server.name;
return (
<PageLayout
<DetailPage
className="server-detail-page"
icon={<Server size={18} />}
title={isPlaceholderServerName(server.name) ? t('app.serverDetail.pendingPairing', 'Pending pairing') : server.name}
navLabel={t('app.serverDetail.sections', 'Server sections')}
meta={<ServerHeaderMeta server={server} />}
tabs={tabs.map((item) => ({
id: item.id,
label: item.badge ? <>{item.label}<span className="tab-badge">{item.badge}</span></> : item.label,
active: item.id === activeTab,
onSelect: () => navigate(item.id === 'overview' ? `/servers/${id}` : `/servers/${id}/${item.id}`, { replace: true }),
}))}
parentTo="/servers"
parentLabel={t('common.labels.servers', 'Servers')}
name={displayName}
favorite={<FavoriteStar type="server" id={server.id} path={`/servers/${server.id}`} label={server.name} />}
actions={(
<>
<Tip content={t('app.serverDetail.backToServers', 'Back to servers')}>
<Button asChild variant="ghost" size="icon" aria-label={t('app.serverDetail.backToServers', 'Back to servers')}>
<Link to="/servers"><ArrowLeft size={16} /></Link>
{/* Primary action follows the server's state: open a shell
when it is reachable, pair it when it is not. */}
{canOpenShell ? (
<Button asChild>
<Link to={`/terminal/shell?server=${server.id}`}>
<Terminal size={14} /> {t('app.serverDetail.openTerminal', 'Terminal')}
</Link>
</Button>
</Tip>
<Tip content={t('app.serverDetail.ping', 'Ping')}>
<Button variant="ghost" size="icon" aria-label={t('app.serverDetail.ping', 'Ping')} onClick={handlePingServer}>
<RefreshIcon />
) : !isOnline && (
<Button onClick={handleOpenTokenModal}>
<KeyRound size={14} /> {t('app.serverDetail.connect', 'Connect')}
</Button>
</Tip>
)}
<Button variant="outline" onClick={handlePingServer}>
<RefreshIcon /> {t('app.serverDetail.ping', 'Ping')}
</Button>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant="ghost" size="icon" aria-label={t('app.serverDetail.moreActions', 'More actions')}>
<MoreVertical size={16} />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem onClick={() => navigate(`/servers/${id}?layout=edit`)}>
<LayoutGrid size={14} /> {t('app.overviewBoard.editLayout', 'Edit overview layout')}
</DropdownMenuItem>
<DropdownMenuItem onClick={handleOpenTokenModal}>
<KeyRound size={14} /> {t('app.serverDetail.generateConnectionString', 'Generate connection string')}
</DropdownMenuItem>
<DropdownMenuSeparator />
<DropdownMenuItem className="text-destructive" onClick={handleDeleteServer}>
<Trash2 size={14} /> {t('app.serverDetail.removeServer', 'Remove server')}
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</>
)}
>
{server.description && (
<p className="server-detail-header__description">{server.description}</p>
)}
<DetailIdentity
avatar={<ServiceTile name={displayName} size={IDENTITY_TILE_SIZE} />}
name={displayName}
badges={(
<>
<Pill kind={serverStatusKind(server.status)}>{server.status || 'pending'}</Pill>
<CopyChip label="id" value={server.id} title={t('app.serverDetail.copyServerId', 'Copy server ID')} mono />
</>
)}
meta={(
<>
<span>{server.hostname || server.ip_address || t('app.serverDetail.noEndpointConfigured', 'No endpoint configured')}</span>
{server.group_name && (
<>
<DetailMetaSep />
<span><FolderTinyIcon /> {server.group_name}</span>
</>
)}
{server.os_type && (
<>
<DetailMetaSep />
<span>{server.os_type}</span>
</>
)}
{server.agent_version && (
<>
<DetailMetaSep />
<span>{t('app.serverDetail.agentVersion', 'agent {{version}}', { version: server.agent_version })}</span>
</>
)}
{server.last_seen && (
<>
<DetailMetaSep />
<span>{t('app.serverDetail.lastSeen', 'last seen')} {formatDateTime(server.last_seen)}</span>
</>
)}
</>
)}
description={server.description}
/>
<Tabs value={activeTab}>
<DetailTabs
items={tabs}
value={activeTab}
ariaLabel={t('app.serverDetail.sections', 'Server sections')}
onValueChange={(value) => navigate(value === 'overview' ? `/servers/${id}` : `/servers/${id}/${value}`, { replace: true })}
>
<div className="server-detail-content">
<TabsContent value="overview">
<ServerOverviewTab
@@ -372,7 +445,7 @@ const ServerDetail = () => {
/>
</TabsContent>
</div>
</Tabs>
</DetailTabs>
{showTokenModal && server && (
<TokenModal
@@ -381,7 +454,7 @@ const ServerDetail = () => {
onGenerated={handleTokenGenerated}
/>
)}
</PageLayout>
</DetailPage>
);
};
+201 -81
View File
@@ -18,16 +18,16 @@ import {
import {
DataTable, DataTableFooter, Drawer, Gauge, Pill, SearchField, statusKind,
} from '@/components/ds';
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
import { useTopbarActions } from '@/hooks/useTopbarActions';
import { useTableSort } from '@/hooks/useTableSort';
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
import { useConfirm } from '@/hooks/useConfirm';
import CopyField from '../components/CopyField';
import {
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
GridToolsMenu, GridFilterDrawer,
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
} from '@/components/ds/grid';
import useFocusParam from '@/hooks/useFocusParam';
import { formatBytes } from '@/utils/formatBytes';
import LinkPanelForm from '../components/servers/LinkPanelForm';
import { useTranslation } from 'react-i18next';
import { t } from '../i18n/t';
@@ -51,13 +51,22 @@ const NO_GROUP = '__none';
// NOTE for anyone adding a metric preset: only ever use `gt` on cpu/memory/disk.
// Their sortValue is null for a non-live row, and a `lt` rule would match every
// offline and pending server (see the null guard in ds/grid/fields.js).
// Fields a server HAS but the table does not open with. Everything here is one
// switch away in Filters and fields; the default table shows what you scan a
// fleet for (state, health, load, what it runs, when it last answered).
const DEFAULT_HIDDEN = [
'host', 'ip', 'group', 'level', 'agent', 'os', 'arch', 'cores',
'ram', 'diskTotal', 'docker', 'domains', 'tags', 'added',
];
const hiding = (...extra) => [...DEFAULT_HIDDEN, ...extra];
const STATUS = (...value) => ({ match: 'all', rules: [{ id: 'st', field: 'status', op: 'any', value }] });
const NO_RULES = { match: 'all', rules: [] };
const SERVER_BUILTIN_VIEWS = [
{ name: 'Online', state: { search: '', sorts: [], hiddenKeys: [], columnFilters: STATUS('online') } },
{ name: 'Offline', state: { search: '', sorts: [], hiddenKeys: [], columnFilters: STATUS('offline') } },
{ name: 'By CPU', state: { search: '', sorts: [{ key: 'cpu', direction: 'desc' }], hiddenKeys: [], columnFilters: NO_RULES } },
{ name: 'Online', state: { search: '', sorts: [], hiddenKeys: DEFAULT_HIDDEN, columnFilters: STATUS('online') } },
{ name: 'Offline', state: { search: '', sorts: [], hiddenKeys: DEFAULT_HIDDEN, columnFilters: STATUS('offline') } },
{ name: 'By CPU', state: { search: '', sorts: [{ key: 'cpu', direction: 'desc' }], hiddenKeys: DEFAULT_HIDDEN, columnFilters: NO_RULES } },
{
// Machines that HAVE an agent but stopped answering, longest silence
// first. `pending` is excluded — that means nobody ever installed one.
@@ -67,7 +76,7 @@ const SERVER_BUILTIN_VIEWS = [
state: {
search: '', groupBy: null,
sorts: [{ key: 'lastSeen', direction: 'asc' }],
hiddenKeys: ['cpu', 'memory', 'disk'],
hiddenKeys: hiding('cpu', 'memory', 'disk'),
columnFilters: {
match: 'all',
rules: [{ id: 'nr1', field: 'status', op: 'any', value: ['offline', 'connecting'] }],
@@ -85,7 +94,7 @@ const SERVER_BUILTIN_VIEWS = [
// only ever match a reporting machine.
name: 'Under load',
state: {
search: '', groupBy: null, hiddenKeys: [],
search: '', groupBy: null, hiddenKeys: DEFAULT_HIDDEN,
sorts: [{ key: 'cpu', direction: 'desc' }],
columnFilters: {
match: 'any',
@@ -102,7 +111,7 @@ const SERVER_BUILTIN_VIEWS = [
state: {
search: '', groupBy: null,
sorts: [{ key: 'disk', direction: 'desc' }],
hiddenKeys: ['agent', 'cpu', 'memory'],
hiddenKeys: hiding('cpu', 'memory'),
columnFilters: {
match: 'all',
rules: [
@@ -119,7 +128,8 @@ const SERVER_BUILTIN_VIEWS = [
// not a sentinel — see the `value` accessor on that column.
name: 'Ungrouped',
state: {
search: '', groupBy: null, hiddenKeys: [],
// The Group column is the point of this view, so it shows.
search: '', groupBy: null, hiddenKeys: DEFAULT_HIDDEN.filter((key) => key !== 'group'),
sorts: [{ key: 'name', direction: 'asc' }],
columnFilters: {
match: 'all',
@@ -169,6 +179,56 @@ const meterColumn = (key, header, metricKey) => ({
// Columns for the shared DataTable. Cell markup and classNames are identical
// to the hand-rolled table they replace, so _servers.scss keeps applying
// (.sk-cell-name, .sk-cell-mono, .servers-row__*, .servers-table__meter).
// A count column (services, domains): the number, or a dash for none so a
// column of zeros does not read as data.
const countColumn = (key, header, headerKey, field) => ({
key,
headerKey, header,
sortable: true,
type: 'num',
value: (server) => server[field] ?? 0,
sortValue: (server) => server[field] ?? 0,
width: '96px',
cellClassName: 'sk-cell-dim',
render: (server) => (server[field] ? server[field] : <span className="servers-row__nodata">&mdash;</span>),
});
// A plain text fact about the machine (IP, Docker version): filterable and
// sortable as text, shown in mono.
const factColumn = (key, header, headerKey, read) => ({
key,
headerKey, header,
sortable: true,
type: 'text',
value: (server) => read(server) || '',
sortValue: (server) => read(server) || '',
cellClassName: 'sk-cell-mono',
render: (server) => read(server) || <span className="servers-row__nodata">&mdash;</span>,
});
// A capacity (total memory, total disk): sorts by bytes, reads as a size. Not
// filterable: a rule would have to be typed in bytes.
const capacityColumn = (key, header, headerKey, field) => ({
key,
headerKey, header,
sortable: true,
filterable: false,
sortValue: (server) => server[field] ?? null,
width: '112px',
cellClassName: 'sk-cell-dim',
render: (server) => (server[field]
? formatBytes(server[field])
: <span className="servers-row__nodata">&mdash;</span>),
});
// Columns for the shared DataTable. Cell markup and classNames are identical
// to the hand-rolled table they replace, so _servers.scss keeps applying
// (.sk-cell-name, .sk-cell-mono, .servers-row__*, .servers-table__meter).
//
// Order is the table's default order: what you scan a fleet for first, then
// the facts about each machine. The second half is hidden until asked for
// (DEFAULT_HIDDEN); every field the list endpoint returns about a server is
// here, so "can I see / filter by X" is answered in Filters and fields.
const SERVER_COLUMNS = [
{
key: 'name',
@@ -191,36 +251,6 @@ const SERVER_COLUMNS = [
</div>
),
},
{
key: 'host',
headerKey: 'app.servers.host', header: 'Host',
cellClassName: 'sk-cell-mono',
render: (server) => server.hostname || server.ip_address || '\u2014',
},
{
key: 'agent',
headerKey: 'app.servers.agent', header: 'Agent',
cellClassName: 'sk-cell-dim servers-row__agent',
// The version is a machine value; the "not installed" fallback is words.
render: (server) => (server.agent_version
? <span className="mono">{server.agent_version}</span>
: 'not installed'),
},
{
key: 'group',
headerKey: 'app.servers.group', header: 'Group',
sortable: true,
type: 'enum',
// An ungrouped server needs a real LABEL, not null: the enum engine
// compares String(value), so a null would only ever be matchable as the
// literal string 'null'. This label is what the "Ungrouped" preset
// filters on, and what the column menu lists.
value: (server) => server.group_name || 'Ungrouped',
groupable: true,
render: (server) => (
server.group_name || <span className="servers-row__nodata">{t('app.servers.ungrouped', 'Ungrouped')}</span>
),
},
{
key: 'status',
headerKey: 'common.labels.status', header: 'Status',
@@ -238,6 +268,48 @@ const SERVER_COLUMNS = [
return <Pill kind={statusKind(status)}>{status}</Pill>;
},
},
{
key: 'health',
headerKey: 'app.servers.health', header: 'Health',
sortable: false,
render: (server) => {
const health = serverHealth(server);
const detail = health.failing.length ? ` (${health.failing.join(', ')})` : '';
return (
<Pill kind={health.kind} title={detail || undefined}>
{healthLabel(health.code) + detail}
</Pill>
);
},
},
meterColumn('cpu', 'CPU', 'cpu_percent'),
meterColumn('memory', 'Memory', 'memory_percent'),
meterColumn('disk', 'Disk', 'disk_percent'),
countColumn('services', 'Services', 'common.labels.services', 'services_count'),
countColumn('domains', 'Domains', 'common.labels.domains', 'domains_count'),
{
key: 'lastSeen',
headerKey: 'app.servers.lastSeen', header: 'Last seen',
sortable: true,
sortValue: (server) => (server.last_seen ? new Date(server.last_seen).getTime() : null),
cellClassName: 'sk-cell-dim servers-row__seen',
render: (server) => formatLastSeen(server.last_seen),
},
{
key: 'group',
headerKey: 'app.servers.group', header: 'Group',
sortable: true,
type: 'enum',
// An ungrouped server needs a real LABEL, not null: the enum engine
// compares String(value), so a null would only ever be matchable as the
// literal string 'null'. This label is what the "Ungrouped" preset
// filters on, and what the column menu lists.
value: (server) => server.group_name || 'Ungrouped',
groupable: true,
render: (server) => (
server.group_name || <span className="servers-row__nodata">{t('app.servers.ungrouped', 'Ungrouped')}</span>
),
},
{
key: 'level',
headerKey: 'app.servers.levelColumn', header: 'Level',
@@ -257,29 +329,80 @@ const SERVER_COLUMNS = [
},
},
{
key: 'health',
headerKey: 'app.servers.health', header: 'Health',
sortable: false,
render: (server) => {
const health = serverHealth(server);
const detail = health.failing.length ? ` (${health.failing.join(', ')})` : '';
return (
<Pill kind={health.kind} title={detail || undefined}>
{healthLabel(health.code) + detail}
</Pill>
);
},
key: 'host',
headerKey: 'app.servers.host', header: 'Host',
cellClassName: 'sk-cell-mono',
render: (server) => server.hostname || server.ip_address || '\u2014',
},
meterColumn('cpu', 'CPU', 'cpu_percent'),
meterColumn('memory', 'Memory', 'memory_percent'),
meterColumn('disk', 'Disk', 'disk_percent'),
factColumn('ip', 'IP address', 'common.labels.ipAddress', (server) => server.ip_address),
{
key: 'lastSeen',
headerKey: 'app.servers.lastSeen', header: 'Last seen',
key: 'agent',
headerKey: 'app.servers.agent', header: 'Agent',
sortable: true,
sortValue: (server) => (server.last_seen ? new Date(server.last_seen).getTime() : null),
cellClassName: 'sk-cell-dim servers-row__seen',
render: (server) => formatLastSeen(server.last_seen),
type: 'text',
value: (server) => server.agent_version || 'not installed',
sortValue: (server) => server.agent_version || '',
cellClassName: 'sk-cell-dim servers-row__agent',
// The version is a machine value; the "not installed" fallback is words.
render: (server) => (server.agent_version
? <span className="mono">{server.agent_version}</span>
: 'not installed'),
},
{
key: 'os',
headerKey: 'app.servers.os', header: 'OS',
sortable: true,
type: 'enum',
groupable: true,
value: (server) => server.os_type || 'unknown',
sortValue: (server) => `${server.os_type || ''} ${server.os_version || ''}`.trim(),
cellClassName: 'sk-cell-dim',
render: (server) => [server.os_type, server.os_version].filter(Boolean).join(' ')
|| <span className="servers-row__nodata">&mdash;</span>,
},
{
key: 'arch',
headerKey: 'app.servers.architecture', header: 'Architecture',
sortable: true,
type: 'enum',
groupable: true,
value: (server) => server.architecture || 'unknown',
cellClassName: 'sk-cell-mono',
render: (server) => server.architecture || <span className="servers-row__nodata">&mdash;</span>,
},
{
key: 'cores',
headerKey: 'app.servers.cpuCores', header: 'CPU cores',
sortable: true,
type: 'num',
value: (server) => server.cpu_cores ?? null,
sortValue: (server) => server.cpu_cores ?? null,
width: '104px',
cellClassName: 'sk-cell-dim',
render: (server) => server.cpu_cores || <span className="servers-row__nodata">&mdash;</span>,
},
capacityColumn('ram', 'Total memory', 'app.servers.totalMemory', 'total_memory'),
capacityColumn('diskTotal', 'Total disk', 'app.servers.totalDisk', 'total_disk'),
factColumn('docker', 'Docker', 'common.labels.docker', (server) => server.docker_version),
{
key: 'tags',
headerKey: 'app.servers.tags', header: 'Tags',
sortable: false,
type: 'text',
value: (server) => (server.tags || []).join(', '),
render: (server) => ((server.tags || []).length
? <span className="servers-row__tags">{server.tags.map((tag) => <Pill key={tag} kind="gray" dot={false}>{tag}</Pill>)}</span>
: <span className="servers-row__nodata">&mdash;</span>),
},
{
key: 'added',
headerKey: 'app.servers.added', header: 'Added',
sortable: true,
type: 'date',
value: (server) => (server.created_at || '').slice(0, 10),
sortValue: (server) => (server.created_at ? new Date(server.created_at).getTime() : null),
cellClassName: 'sk-cell-dim',
render: (server) => (server.created_at ? formatDate(server.created_at) : <span className="servers-row__nodata">&mdash;</span>),
},
{
key: 'open',
@@ -312,7 +435,7 @@ const Servers = () => {
const { sorts, setSorts } = useTableSort({ storageKey: 'serverkit-table-servers-sort' });
const {
hiddenKeys, setHiddenKeys,
} = useColumnVisibility({ storageKey: 'serverkit-table-servers-cols' });
} = useColumnVisibility({ storageKey: 'serverkit-table-servers-cols-v2', defaultHidden: DEFAULT_HIDDEN });
const [groupBy, setGroupBy] = useState(() => {
try {
return window.localStorage.getItem('serverkit-table-servers-group') || null;
@@ -381,9 +504,6 @@ const Servers = () => {
// The tab-group top bar owns this page's controls, search included.
useTopbarActions(() => (
<>
<Button variant="outline" size="sm" onClick={() => setShowGroupModal(true)}>
<Folder size={16} /> {t('app.servers.groups', 'Groups')}
</Button>
<Button variant="outline" size="sm" onClick={loadData} disabled={loading} title={t('app.servers.sync', 'Sync')} aria-label={t('app.servers.sync', 'Sync')}>
<RefreshCw size={16} className={loading ? 'spin' : ''} /> {t('app.servers.syncShort', 'Sync')}
</Button>
@@ -411,30 +531,22 @@ const Servers = () => {
setSorts,
hiddenKeys,
setHiddenKeys,
defaultHiddenKeys: DEFAULT_HIDDEN,
groupBy,
setGroupBy: changeGroupBy,
pageState: viewPageState,
applyPage: applyViewPageState,
});
// Filter + "⋮" ride in the top bar next to the actions and the search box,
// not in a toolbar under the view name. That toolbar was also repeating the
// row count the view row already showed, with an "N online" tacked on that
// no filter, sort or view ever referred to.
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
<>
<GridFilterButton
count={chrome.filterCount}
onClick={() => chrome.setDrawerOpen(true)}
/>
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadData} />
</>,
);
// Filters, the table tools and group management all live in the view
// selector's menu. The top bar keeps what creates or reloads (Sync, Add)
// and search; three more icons there said nothing a menu under the view's
// own name does not say better.
const hiddenFieldCount = SERVER_COLUMNS.filter((column) => column.header && hiddenKeys.includes(column.key)).length;
if (loading) {
return (
<div className="sk-tabgroup__inner servers-page">
{topbarChrome}
<EmptyState loading loadingVariant="table" title={t('app.servers.scanningFleet', 'Scanning fleet…')} />
</div>
);
@@ -442,13 +554,21 @@ const Servers = () => {
return (
<div className="sk-tabgroup__inner servers-page" data-walkthrough="server-list">
{topbarChrome}
<GridViewPicker
views={chrome.views}
label="servers"
onCreate={chrome.createView}
actions={chromeActions}
filters={{
count: chrome.filterCount,
hidden: hiddenFieldCount,
onOpen: () => chrome.setDrawerOpen(true),
}}
tools={chrome.toolsProps}
extra={[{
icon: Folder,
label: t('app.servers.manageGroups', 'Manage groups'),
onSelect: () => setShowGroupModal(true),
}]}
/>
<GridChips {...chrome.chipProps} />
+70 -52
View File
@@ -25,9 +25,9 @@ import EmptyState from '../components/EmptyState';
import PluginSlot from '../components/PluginSlot';
import { Layers, FileArchive, RotateCcw, LayoutDashboard, History, ScrollText, Variable, Terminal, Activity, Package, Server, SquareTerminal, Settings, Eye, ExternalLink } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Pill, statusKind } from '@/components/ds';
import PageLayout from '../layouts/PageLayout';
import { Pill, ServiceTile, statusKind } from '@/components/ds';
import FavoriteStar from '@/components/FavoriteStar';
import { DetailPage, DetailIdentity, DetailMetaSep, DetailTabs } from '@/components/detail/DetailPage';
import { useRecordVisit } from '@/hooks/useRecordVisit';
import { useTranslation } from 'react-i18next';
import { toastError } from '@/utils/errorMessage';
@@ -59,7 +59,7 @@ const RETIRED_TAB_REDIRECTS = {
deploy: 'settings/git',
};
// Per-tab glyph for the detail tab strip (matches the WordPress detail page).
// Per-tab glyph for the detail tab strip.
const TAB_ICONS = {
overview: LayoutDashboard,
events: History,
@@ -74,6 +74,9 @@ const TAB_ICONS = {
settings: Settings,
};
// Edge of the identity tile next to the entity name, in px.
const IDENTITY_TILE_SIZE = 52;
const ServiceDetail = () => {
const { t } = useTranslation();
const { id, tab: rawTab } = useParams();
@@ -280,52 +283,14 @@ const ServiceDetail = () => {
const openUrl = primaryDomain ? null : servicePortUrl(service);
return (
<PageLayout
fill
<DetailPage
className="svc-detail"
topbarClassName="svc-detail-topbar"
icon={<Layers size={18} />}
title={service.name}
navLabel={t('app.serviceDetail.sections', 'Service sections')}
meta={(
<>
<FavoriteStar type="service" id={service.id} path={`/services/${service.id}`} label={service.name} />
{openUrl && (
<a
href={openUrl}
target="_blank"
rel="noopener noreferrer"
className="svc-detail__open"
title={t('app.serviceDetail.open', 'Open {{openUrl}}', { openUrl: openUrl })}
aria-label={t('app.serviceDetail.openInANewTab', 'Open {{name}} in a new tab', { name: service.name })}
>
<ExternalLink size={15} />
</a>
)}
<Pill kind={statusKind(service.statusInfo.dotClass)}>{service.statusInfo.label}</Pill>
<span
className="svc-detail__type-badge"
style={{ backgroundColor: service.typeInfo.bgColor, color: service.typeInfo.color, borderColor: service.typeInfo.borderColor }}
>
{service.typeInfo.label}
</span>
{service.port && <span>{t('common.labels.port', 'Port')} {service.port}</span>}
<span>{t('common.labels.created', 'Created')} {formatDate(service.created_at)}</span>
{primaryDomain && (
<a href={`https://${primaryDomain}`} target="_blank" rel="noopener noreferrer">{primaryDomain}</a>
)}
</>
)}
tabs={availableTabs.map(tab => {
const Icon = TAB_ICONS[tab];
return {
id: tab,
label: TAB_LABELS[tab] || tab,
icon: Icon ? <Icon size={15} /> : null,
active: activeTab === tab,
onSelect: () => setActiveTab(tab),
};
})}
parentTo="/services"
parentLabel={t('common.labels.services', 'Services')}
name={service.name}
favorite={<FavoriteStar type="service" id={service.id} path={`/services/${service.id}`} label={service.name} />}
actions={(
<>
{/* Deploy dropdown */}
@@ -396,6 +361,12 @@ const ServiceDetail = () => {
</Button>
{showMoreMenu && (
<div className="svc-detail__dropdown-menu svc-detail__dropdown-menu--right">
<Button variant="unstyled" type="button"
onClick={() => { setShowMoreMenu(false); navigate(`/services/${id}?layout=edit`); }}
>
<LayoutDashboard size={14} />
{t('app.overviewBoard.editLayout', 'Edit overview layout')}
</Button>
{service.isRunning && (
<Button variant="unstyled" type="button" onClick={() => handleAction('stop')} disabled={actionLoading === 'stop'}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">
@@ -438,9 +409,51 @@ const ServiceDetail = () => {
)}
>
{/* Everything below the full-bleed top bar lives in a centered, padded
column (.app-detail-body), matching the WordPress detail page. */}
<div className="app-detail-body">
<DetailIdentity
avatar={<ServiceTile name={service.name} size={IDENTITY_TILE_SIZE} />}
name={service.name}
badges={(
<>
{openUrl && (
<a
href={openUrl}
target="_blank"
rel="noopener noreferrer"
className="svc-detail__open"
title={t('app.serviceDetail.open', 'Open {{openUrl}}', { openUrl: openUrl })}
aria-label={t('app.serviceDetail.openInANewTab', 'Open {{name}} in a new tab', { name: service.name })}
>
<ExternalLink size={15} />
</a>
)}
<Pill kind={statusKind(service.statusInfo.dotClass)}>{service.statusInfo.label}</Pill>
<span
className="svc-detail__type-badge"
style={{ backgroundColor: service.typeInfo.bgColor, color: service.typeInfo.color, borderColor: service.typeInfo.borderColor }}
>
{service.typeInfo.label}
</span>
</>
)}
meta={(
<>
{service.port && (
<>
<span>{t('common.labels.port', 'Port')} {service.port}</span>
<DetailMetaSep />
</>
)}
<span>{t('common.labels.created', 'Created')} {formatDate(service.created_at)}</span>
{primaryDomain && (
<>
<DetailMetaSep />
<a href={`https://${primaryDomain}`} target="_blank" rel="noopener noreferrer">{primaryDomain}</a>
</>
)}
</>
)}
/>
{/* Repo Connection Pill */}
<div className="svc-detail__repo-bar">
{isUpload ? (
@@ -537,7 +550,12 @@ const ServiceDetail = () => {
</div>
)}
{/* Tab Content */}
<DetailTabs
items={availableTabs.map((tab) => ({ id: tab, label: TAB_LABELS[tab] || tab, icon: TAB_ICONS[tab] }))}
value={activeTab}
onValueChange={setActiveTab}
ariaLabel={t('app.serviceDetail.sections', 'Service sections')}
>
<div className="app-detail-content">
{activeTab === 'overview' && <OverviewTab app={service} deployConfig={deployConfig} />}
{activeTab === 'events' && <EventsTab appId={service.id} />}
@@ -559,11 +577,11 @@ const ServiceDetail = () => {
/>
)}
</div>
</DetailTabs>
{/* Extension slot: widgets contributed to the service detail page */}
<PluginSlot name="service.detail.tab" context={{ serviceId: service.id }} />
</div>
</PageLayout>
</DetailPage>
);
};
+20 -19
View File
@@ -11,6 +11,7 @@ import {
GitBranch, WifiOff, Clock
} from 'lucide-react';
import { PageTopbar, SearchField, CatalogCard, CatalogGrid } from '@/components/ds';
import PageLayout from '@/layouts/PageLayout';
import CopyField from '../components/CopyField';
import PortField from '../components/PortField';
import EnvEditor from '../components/EnvEditor';
@@ -109,24 +110,24 @@ export default function StyleGuide() {
const sections = SECTIONS;
return (
<div className="styleguide">
<PageTopbar
icon={<Palette size={18} />}
title={t('app.styleGuide.styleGuide', 'Style guide')}
meta="Design system reference — dev only"
/>
<Tabs value={activeSection} onValueChange={setActiveSection}>
<TabsList>
{sections.map(s => (
<TabsTrigger key={s.id} value={s.id}>
<s.icon size={14} />
{s.label}
</TabsTrigger>
))}
</TabsList>
</Tabs>
// The same frame as every standalone page: PageLayout pins the bar to
// the top of the content region and carries the sections as its tabs.
// This page used to drop a PageTopbar and a tab strip into the padded
// content well, the exact arrangement its own "Page headers" section
// warns against.
<PageLayout
className="styleguide"
icon={<Palette size={18} />}
title={t('app.styleGuide.styleGuide', 'Style guide')}
navLabel={t('app.styleGuide.sections', 'Style guide sections')}
tabs={sections.map((section) => ({
id: section.id,
label: section.label,
icon: <section.icon size={15} />,
active: activeSection === section.id,
onSelect: () => setActiveSection(section.id),
}))}
>
<div className="styleguide__content">
{/* ── COLORS ── */}
@@ -1470,7 +1471,7 @@ export default function StyleGuide() {
</div>
)}
</div>
</div>
</PageLayout>
);
}
+8 -3
View File
@@ -1,4 +1,5 @@
import { useState, useEffect, useRef, useMemo } from 'react';
import { useSearchParams } from 'react-router-dom';
import useTabParam from '../hooks/useTabParam';
import api from '../services/api';
import { useToast } from '../contexts/useToast.js';
@@ -96,6 +97,9 @@ const TerminalShellTab = () => {
const [servers, setServers] = useState([]);
const [loading, setLoading] = useState(true);
const [selectedId, setSelectedId] = useState(null);
// A server detail page links here with ?server=<id> to open that server's shell.
const [searchParams] = useSearchParams();
const requestedId = searchParams.get('server');
useEffect(() => {
(async () => {
@@ -105,15 +109,16 @@ const TerminalShellTab = () => {
? list.filter(s => s.capabilities && s.capabilities.terminal)
: [];
setServers(eligible);
const firstOnline = eligible.find(s => s.status === 'online');
if (firstOnline) setSelectedId(firstOnline.id);
const online = eligible.filter(s => s.status === 'online');
const target = online.find(s => String(s.id) === requestedId) || online[0];
if (target) setSelectedId(target.id);
} catch (err) {
console.error('Failed to load servers:', err);
} finally {
setLoading(false);
}
})();
}, []);
}, [requestedId]);
const selected = servers.find(s => s.id === selectedId) || null;
const anyOnline = servers.some(s => s.status === 'online');
@@ -13,7 +13,7 @@ import {
} from '../routeManifest.js';
test('core route paths and ids are unique', () => {
assert.equal(CORE_ROUTES.length, 99, 'route changes must update the parity baseline intentionally');
assert.equal(CORE_ROUTES.length, 100, 'route changes must update the parity baseline intentionally');
assert.equal(new Set(CORE_ROUTES.map(({ id }) => id)).size, CORE_ROUTES.length);
assert.equal(new Set(CORE_ROUTES.map(({ path }) => path)).size, CORE_ROUTES.length);
});
+1
View File
@@ -62,6 +62,7 @@ export const CORE_ROUTES = Object.freeze([
{ id: 'server-templates', path: '/server-templates', placement: 'dashboard', group: 'servers', component: 'ServerTemplates', titleKey: 'app.routeManifest.serverTemplates', title: 'Server templates' },
{ id: 'server-detail', path: '/servers/:id', placement: 'dashboard', component: 'ServerDetail', titleKey: 'common.labels.servers', title: 'Servers' },
{ id: 'server-detail-tab', path: '/servers/:id/:tab', placement: 'dashboard', component: 'ServerDetail', titleKey: 'common.labels.servers', title: 'Servers' },
{ id: 'server-detail-section', path: '/servers/:id/:tab/:section', placement: 'dashboard', component: 'ServerDetail', titleKey: 'common.labels.servers', title: 'Servers' },
{ id: 'legacy-agent-plugins', path: '/agent-plugins', placement: 'dashboard', redirect: '/extensions', titleKey: 'common.labels.extensions', title: 'Extensions' },
{ id: 'projects', path: '/projects', placement: 'dashboard', group: 'organization', component: 'Projects', titleKey: 'app.routeManifest.projects', title: 'Projects' },
+18
View File
@@ -34,3 +34,21 @@ export async function deleteDashboard(id) {
export async function resetDashboard(id) {
return this.request(`/dashboards/${id}/reset`, { method: 'POST' });
}
// The Overview layout this user saved for one kind of detail page ('server' |
// 'service'), or null while they are still on the shipped layout. It is a
// board like any other, so deleteDashboard(id) is what puts the shipped layout
// back.
export async function getOverviewBoard(kind) {
const data = await this.request(`/dashboards?scope=entity:${kind}`);
return data?.boards?.[0] || null;
}
// Store (or replace) this user's Overview layout for one kind of detail page.
export async function saveOverviewBoard(kind, widgets) {
return this.request('/dashboards', {
method: 'POST',
body: JSON.stringify({ name: `${kind} overview`, scope: `entity:${kind}`, widgets }),
});
}
+1 -5
View File
@@ -10,7 +10,6 @@
.btn,
.quick-create,
.sk-notif__bell,
.skw-tab,
.skw-iconbtn,
.skw-barbtn,
.skw-actions__row,
@@ -19,7 +18,6 @@
.sk-viewpick,
.ui-select-trigger,
.settings-nav-item,
.setup-health-widget__dismiss,
.detail-tabs__tab,
[role='tab'],
input.ui-input,
@@ -31,9 +29,7 @@
.quick-create,
.sk-notif__bell,
.sk-gridicon,
.skw-iconbtn,
.setup-health-widget__dismiss,
.skw-tab--add {
.skw-iconbtn {
min-width: $control-lg;
}
@@ -48,7 +48,7 @@ $skw-z-tv: 200;
margin-bottom: $space-4;
// Range / refresh / variable pickers + edit toggle. `margin-left:auto`
// rather than a spacer element so the tabs keep their natural width.
// rather than a spacer element so the selector keeps its natural width.
&__ctl {
display: flex;
align-items: center;
@@ -127,47 +127,31 @@ $skw-z-tv: 200;
}
}
.skw-tabs {
// Dashboard selector: the active board's name on a bar button that opens the
// list of boards. One control whether there are three boards or thirty.
.skw-boardpick {
display: flex;
align-items: center;
gap: $space-1;
flex-wrap: wrap;
}
min-width: 0;
.skw-tab {
display: flex;
align-items: center;
gap: $space-2;
height: $control-md;
padding: 0 $space-3;
border: 1px solid transparent;
border-radius: $radius-control;
background: none;
color: var(--text-faint);
font-family: inherit;
font-size: $text-sm;
cursor: pointer;
transition: 0.13s;
&:hover {
&__btn {
height: $control-md;
max-width: 100%;
color: var(--text);
background: var(--surface-2);
> svg:first-child { color: var(--accent-bright); }
}
// Active board. Set apart by fill + border, never by weight, so switching
// boards cannot re-flow the row (same rule as .sk-topbar__tab).
&--on,
&.is-on,
&.is-active {
color: var(--text);
background: var(--surface-2);
border-color: var(--border-strong);
svg { color: var(--accent-bright); }
&__name {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Widget count on the tab.
// Widget count beside a board's name.
&__count {
margin-left: auto;
padding: 1px $space-tight;
border-radius: $radius-control;
background: var(--surface-3);
@@ -175,18 +159,17 @@ $skw-z-tv: 200;
font-size: $text-xs;
}
// "+" new-board affordance — icon only, so it drops the label padding.
&--add {
padding: $space-2;
color: var(--text-faint);
}
&__menu { min-width: 220px; } // geometry: menu width
&__menu [role='menuitemradio'] { gap: $space-3; }
}
// Inline board rename. Accent border rather than a focus ring: the input
// replaces the tab in place and has to read as "editing" without growing.
// replaces the selector in place and has to read as "editing" without growing.
.skw-rename {
width: 130px;
padding: $space-hair $space-tight;
width: 180px;
height: $control-md;
padding: $space-hair $space-3;
border: 1px solid var(--accent);
border-radius: $radius-control;
background: var(--surface-3);
@@ -1244,8 +1227,10 @@ $skw-z-tv: 200;
// ds/Drawer, whose .sk-drawer__body owns the scroll — so this bar has to
// stick to the top of THAT scroller or the search box leaves the screen
// as soon as you scroll to the widget you were searching for. Sticky
// demands an opaque background (it scrolls over the cards) and the
// negative top/side margins let it span the drawer's padding edge to edge.
// demands an opaque background (it scrolls over the cards). It stays
// inside the scroller's width: the padding it once cancelled with negative
// side margins is on the drawer, outside the scroller, so bleeding past
// the edge showed nothing and only gave the panel a horizontal scrollbar.
&__filters {
position: sticky;
top: 0;
@@ -1253,8 +1238,8 @@ $skw-z-tv: 200;
display: flex;
flex-direction: column;
gap: $space-3;
margin: -14px -16px $space-4;
padding: $space-4 $space-4 $space-3;
margin: -14px 0 $space-4;
padding: $space-4 0 $space-3;
background: var(--surface);
border-bottom: 1px solid var(--border-soft);
}
+127 -77
View File
@@ -825,55 +825,31 @@
padding: 0;
}
&__tabs {
// The pane switch is the drawer's header. The right padding keeps it clear
// of the sheet's close button, which sits in the same corner.
&__head {
display: flex;
gap: $space-hair;
padding: 0 $space-4;
align-items: center;
padding: $space-4 calc(#{$space-4} + #{$control-sm} + #{$space-3}) $space-4 $space-4;
border-bottom: 1px solid var(--border);
background: var(--surface-0);
flex-shrink: 0;
}
button {
position: relative;
display: flex;
align-items: center;
gap: $space-2;
height: $control-lg; // underline tabs: 40
padding: 0 $space-3;
border: none;
background: transparent;
font-size: $text-sm;
font-weight: $font-weight-medium;
font-family: inherit;
color: var(--text-faint);
cursor: pointer;
transition: color 0.13s;
&__switch button {
display: inline-flex;
align-items: center;
gap: $space-2;
font-size: $text-sm;
}
&:hover { color: var(--text-dim); }
&.is-on { color: var(--text); }
&.is-on::after {
content: '';
position: absolute;
left: 8px;
right: 8px;
bottom: -1px;
height: 2px;
border-radius: $radius-badge $radius-badge 0 0;
background: var(--accent);
}
.n {
font-size: $text-xs;
color: var(--text-ghost);
background: var(--surface-2);
border: 1px solid var(--border-soft);
border-radius: $radius-control;
padding: 1px $space-tight;
}
&.is-on .n { color: var(--text-dim); background: var(--surface-3); border-color: var(--border); }
}
// Count beside a pane's name: active conditions, or shown/total fields.
&__n {
padding: 0 $space-tight;
border-radius: $radius-control;
background: var(--surface-2);
color: var(--text-dim);
font-size: $text-xs;
font-variant-numeric: tabular-nums;
}
&__body { flex: 1; overflow-y: auto; }
@@ -882,15 +858,77 @@
display: flex;
align-items: center;
gap: $space-2;
padding: $space-4 $space-5;
padding: $space-3 $space-5;
border-top: 1px solid var(--border);
background: var(--surface-0);
flex-shrink: 0;
}
// How many rows the current conditions leave.
&__count {
font-size: $text-sm;
color: var(--text-dim);
font-variant-numeric: tabular-nums;
}
&__sp { flex: 1; }
}
// Field search at the top of the Fields pane.
.sk-gridfind {
display: flex;
align-items: center;
gap: $space-2;
margin: $space-4 $space-5 0;
padding: 0 $space-3;
height: $control-md;
border: 1px solid var(--border);
border-radius: $radius-control;
background: var(--surface-2);
color: var(--text-ghost);
&:focus-within { border-color: var(--accent-dim); box-shadow: $focus-ring; }
input {
flex: 1;
min-width: 0;
border: 0;
outline: none;
background: transparent;
color: var(--text);
font-size: $text-sm;
font-family: inherit;
&::placeholder { color: var(--text-ghost); }
}
}
// Empty filters pane: what is showing, and one tap to start narrowing it.
.sk-gridstart {
display: flex;
flex-direction: column;
gap: $space-3;
&__lead {
margin: 0;
font-size: $text-sm;
color: var(--text-dim);
}
// A field chip that adds a condition on that field. Doubled class: it is
// also a .sk-gridrule__tag, whose capitalize would turn "Last seen" into
// "Last Seen".
&__field.sk-gridrule__tag {
display: inline-flex;
align-items: center;
gap: $space-tight;
text-transform: none;
svg { color: var(--text-ghost); }
&:hover svg { color: var(--accent-bright); }
}
}
.sk-gridsec {
padding: $space-5 $space-5;
border-bottom: 1px solid var(--border-soft);
@@ -910,30 +948,35 @@
flex: 1;
}
// Right-hand figure on a section head ("9 of 12 shown").
&__meta {
font-size: $text-xs;
color: var(--text-ghost);
font-variant-numeric: tabular-nums;
}
// "Add condition": sits where the next condition will appear.
&__add {
display: flex;
align-items: center;
justify-content: center;
gap: $space-tight;
font-size: $text-xs;
font-family: inherit;
color: var(--accent-bright);
height: $control-sm;
padding: 0 $space-2;
border: none;
border-radius: $radius-control;
background: transparent;
cursor: pointer;
&:hover { background: var(--accent-bg); }
}
&__none {
padding: $space-4;
width: 100%;
height: $control-md;
margin-top: $space-3;
border: 1px dashed var(--border);
border-radius: $radius-card;
text-align: center;
background: transparent;
color: var(--text-dim);
font-size: $text-sm;
color: var(--text-ghost);
font-family: inherit;
cursor: pointer;
transition: 0.12s;
&:hover {
border-color: var(--accent-dim);
@include status-variant(var(--accent-bright), var(--accent-bg));
}
}
&__hint {
@@ -945,15 +988,6 @@
&__tags { display: flex; flex-wrap: wrap; gap: 6px; }
}
.sk-gridmatch {
display: inline-flex;
align-items: center;
gap: $space-2;
font-size: $text-sm;
color: var(--text-faint);
margin-bottom: $space-3;
}
.sk-gridseg {
display: inline-flex;
gap: $space-hair;
@@ -980,12 +1014,16 @@
&--wide { width: fit-content; }
}
// One condition: field, operator and remove on a row, its value underneath.
.sk-gridrule {
display: grid;
grid-template-columns: 1fr 116px $control-md;
gap: $space-tight;
grid-template-columns: 1fr 132px $control-md;
gap: $space-2 $space-tight;
align-items: center;
margin-bottom: $space-2;
padding: $space-3;
border: 1px solid var(--border-soft);
border-radius: $radius-card;
background: var(--surface-0);
&__value { grid-column: 1 / -1; }
@@ -1027,10 +1065,20 @@
&:hover { @include status-variant(var(--red), var(--red-bg)); }
}
// Between two conditions: the and/or switch, on a hairline that ties the
// two cards together.
&__join {
font-size: $text-xs;
color: var(--text-ghost);
padding: 1px 0 $space-tight $space-hair;
display: flex;
align-items: center;
gap: $space-2;
margin-block: $space-2;
&::before,
&::after {
content: '';
flex: 1;
border-top: 1px solid var(--border-soft);
}
}
&__enum { display: flex; flex-wrap: wrap; gap: 6px; }
@@ -1071,6 +1119,8 @@
&:hover { background: var(--surface-2); border-color: var(--border); }
&.is-drag { opacity: 0.35; }
&.is-off .sk-gridcol__nm { color: var(--text-ghost); }
// A pinned column cannot be moved, so it offers no handle.
&.is-locked .sk-gridcol__grip { visibility: hidden; }
&__grip { color: var(--text-ghost); display: grid; place-items: center; cursor: grab; }
&__nm { flex: 1; min-width: 0; }
@@ -213,6 +213,8 @@ $sk-tones: ('accent', 'green', 'cyan', 'amber', 'red', 'violet');
gap: $space-3;
flex-wrap: wrap;
}
// Optional thin meter under the label (usage tiles: CPU / memory / disk).
&__meter { margin-top: $space-2; }
&__trend {
grid-area: trend;
align-self: start;
@@ -0,0 +1,396 @@
// ============================================
// ENTITY DETAIL PAGE
// The frame the service and server detail pages share, so the two read as
// one layout (components/detail/DetailPage.jsx, DetailSettings.jsx):
//
// top bar Parent / Name [star] [actions]
// identity [tile] Name [status] [badges] + meta line
// tabs [Overview] [Logs] ... [Settings]
// content
//
// Feature stylesheets (_service-detail, _servers) own only what is inside
// the tabs.
// ============================================
// Top bar: breadcrumb in the title slot, the star beside it.
.sk-detail-page .sk-topbar {
&__titles { align-items: center; }
&__meta { display: inline-flex; align-items: center; gap: $space-2; }
.fav-star {
width: 24px; // geometry: icon-button footprint
height: 24px; // geometry: icon-button footprint
svg { width: 14px; height: 14px; } // geometry: inline icon
opacity: 0.6;
&:hover, &.is-on { opacity: 1; }
}
}
.sk-detail-crumbs {
display: inline-flex;
align-items: center;
flex-wrap: wrap;
gap: $space-2;
overflow-wrap: anywhere;
a {
color: var(--text-dim);
font-weight: $font-weight-medium;
text-decoration: none;
&:hover { color: var(--text); }
}
> [aria-hidden] { color: var(--text-ghost); }
}
// Identity: tile + name + status, a meta line and an optional description.
.sk-detail-identity {
display: flex;
align-items: flex-start;
gap: $space-4;
> :first-child { flex-shrink: 0; }
&__body { min-inline-size: 0; flex: 1; }
&__title {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: $space-3;
}
h2 {
margin: 0;
font-size: $text-lg;
font-weight: $font-weight-semibold;
letter-spacing: -0.02em;
color: var(--text);
overflow-wrap: anywhere;
}
&__meta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: $space-2;
margin-block-start: $space-1;
font-size: $text-xs;
color: var(--text-dim);
overflow-wrap: anywhere;
> span { display: inline-flex; align-items: center; gap: $space-1; }
a { color: var(--accent-bright); text-decoration: none; &:hover { text-decoration: underline; } }
}
&__sep { color: var(--text-ghost); }
&__description {
margin-block: $space-2 0;
font-size: $text-sm;
color: var(--text-dim);
}
.copy-chip {
display: inline-flex;
align-items: center;
gap: $space-2;
padding: $space-1 $space-2;
border: 1px solid var(--border-soft);
border-radius: $radius-control;
background: var(--surface);
color: var(--text-dim);
font-size: $text-xs;
cursor: pointer;
&:hover { border-color: var(--border-strong); color: var(--text); }
}
.copy-chip__value {
max-inline-size: 22ch;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
// Tab strip under the identity: one quiet bar, Settings pinned to the end.
.sk-detail-page .sk-detail-tabs {
min-inline-size: 0;
> .tabs {
gap: $space-1;
margin: 0;
padding: $space-1;
background: var(--surface);
border: 1px solid var(--border-soft);
border-radius: $radius-card;
}
> .tabs .tab {
display: inline-flex;
align-items: center;
gap: $space-2;
padding: $space-2 $space-3;
border: 0;
border-radius: $radius-control;
font-size: $text-sm;
font-weight: $font-weight-medium;
color: var(--text-dim);
white-space: nowrap;
&:hover { color: var(--text); }
&[data-state='active'] { background: var(--surface-hover); color: var(--text); }
}
> .tabs .sk-detail-tabs__end { margin-inline-start: auto; order: 2; }
> .tabs .tabs-overflow-trigger { order: 1; }
&__content { padding-block-start: $space-5; }
.tab-content-pane { margin: 0; padding: 0; }
}
// Body below the top bar: one column, one gap between its blocks.
.sk-detail-body {
display: flex;
flex-direction: column;
gap: $space-5;
}
// Overview board: the Overview tab laid out on the dashboard's widget grid
// (components/detail/OverviewBoard.jsx). The frames, library and editor are
// the dashboard's own (.skw-*); only the page blocks inside them live here.
.sk-overview-board {
min-inline-size: 0;
// Edit-mode controls above the grid.
&__bar {
display: flex;
flex-wrap: wrap;
gap: $space-2;
margin-block-end: $space-3;
.skw-barbtn { height: $control-md; }
}
// "Edit overview layout", under the blocks.
&__foot {
display: flex;
justify-content: flex-end;
margin-block-start: $space-3;
}
&__edit {
display: inline-flex;
align-items: center;
gap: $space-tight;
height: $control-sm;
padding: 0 $space-2;
border: 0;
border-radius: $radius-control;
background: transparent;
color: var(--text-ghost);
font-size: $text-xs;
font-family: inherit;
cursor: pointer;
&:hover { color: var(--text); background: var(--surface-2); }
}
}
// A page block inside a widget frame: it fills the frame and scrolls when the
// frame is shorter than its content.
.sk-overview-section {
flex: 1;
min-height: 0;
overflow: auto;
padding: $space-3 $space-4 $space-4;
// A block with nothing to render. Only seen while editing: outside edit
// mode an empty block is left out of the layout altogether.
&:has(> .sk-overview-section__host:empty)::before {
content: attr(data-empty);
color: var(--text-faint);
font-size: $text-sm;
}
// The frame already draws the card and its title, so a card placed in one
// drops its own.
&__host {
> .overview-tab__card,
> .scheduled-tasks-card,
> .monitoring-panel,
> .bk-panel {
padding: 0;
border: 0;
border-radius: 0;
background: none;
}
.overview-tab__card > .overview-tab__card-title,
.overview-tab__card-header-row > .overview-tab__card-title,
.system-status-card__title > h3,
.scheduled-tasks-card__header,
> .monitoring-panel > .monitoring-panel__header h3,
> .bk-panel > .bk-panel__head h3 { display: none; }
// With the title gone, what is left of a panel's head (a count, a
// link, a button) sits on the right, where it sat beside the title.
> .monitoring-panel > .monitoring-panel__header > h3 + *,
> .bk-panel > .bk-panel__head > h3 + * { margin-inline-start: auto; }
// A head that held nothing but its title goes with it.
> .bk-panel > .bk-panel__head:not(:has(> :not(h3))),
> .monitoring-panel > .monitoring-panel__header:not(:has(> :not(h3))) { display: none; }
// A header row keeps its action (Attach, a state pill) on the right.
.overview-tab__card-header-row { justify-content: flex-end; }
.overview-tab__card-header-row:not(:has(> :not(.overview-tab__card-title))) { display: none; }
.sk-kpiband-wrap { margin: 0; }
.offline-message { padding: $space-2; }
}
}
// Monitoring styles its panels under its own page class, which outranks the
// plain reset above; scoping to the board puts the reset back on top.
.sk-overview-board .sk-overview-section__host > .monitoring-panel {
padding: 0;
border: 0;
border-radius: 0;
background: none;
}
// Settings shell: grouped left nav + content column.
.sk-detail-settings {
display: grid;
grid-template-columns: 200px 1fr;
gap: $space-4;
align-items: start;
@media (max-width: $breakpoint-md) {
grid-template-columns: 1fr;
}
&__nav {
display: flex;
flex-direction: column;
gap: $space-hair;
position: sticky;
top: $space-4;
// Phones: one horizontally scrollable chip row. Groups are flattened
// (display: contents) so every item is a direct flex child; the group
// labels are hidden and the +$space-4 stagger margin disappears with
// the group boxes. The old wrap layout squeezed four group columns
// side by side, staggered them 16px apart and clipped the pills.
@media (max-width: $breakpoint-md) {
position: static;
flex-direction: row;
flex-wrap: nowrap;
gap: $space-tight;
overflow-x: auto;
padding-bottom: $space-hair; // keep the active pill's ring/shadow unclipped
scrollbar-width: none;
&::-webkit-scrollbar { display: none; }
}
}
// Grouped left nav — an uppercase mono label per group.
&__group + &__group {
margin-top: $space-4;
}
@media (max-width: $breakpoint-md) {
&__group { display: contents; }
&__grouplabel { display: none; }
}
&__grouplabel {
padding: 0 $space-3;
margin-bottom: $space-tight;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
&__navitem {
display: flex;
width: 100%; // fill the nav column — a flex <button> otherwise shrinks
// to its label, so each item's box was a different width
align-items: center;
gap: $space-2;
min-height: $control-md;
padding: 0 $space-3;
border: none;
border-radius: $radius-control;
background: none;
color: var(--text-dim);
font-size: $text-sm;
font-weight: $font-weight-medium;
text-align: left;
cursor: pointer;
transition: background 0.14s, color 0.14s;
svg { color: var(--text-faint); flex-shrink: 0; }
&:hover { background: var(--surface-hover); color: var(--text); }
&.is-active {
@include status-variant(var(--accent-bright), var(--accent-bg));
svg { color: var(--accent-bright); }
}
// Chip row on phones: shrink to the label, never wrap or stretch.
@media (max-width: $breakpoint-md) {
width: auto;
flex: 0 0 auto;
white-space: nowrap;
}
}
&__content {
min-width: 0;
// A form inside a section panel inherits the panel's surface instead
// of drawing a second card inside it.
.card .settings-form {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
> button[type='submit'] { margin-top: $space-4; }
}
}
&__section {
margin-bottom: $space-6;
&:last-child { margin-bottom: 0; }
}
&__section-title {
display: flex;
align-items: center;
gap: $space-tight;
margin: 0 0 $space-3;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
// A divided sub-block within a section — e.g. the Deployment pipeline under
// the Git connect form in "Git & Deploy". Mirrors the .svc-give-subdomain
// divider so stacked panels read as distinct steps rather than one slab.
&__subsection {
margin-top: $space-5;
padding-top: $space-5;
border-top: 1px solid var(--border-soft);
}
&__subsection-title {
margin: 0 0 $space-3;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
}
@@ -1,109 +0,0 @@
// ============================================
// SETUP HEALTH — dashboard card
// Compact "how set-up is this panel" card: score + top open items, each
// deep-linking to its fix. Collapses to a slim "all set" line when clean.
// Sits above the board as a direct child of .dashboard-page (a flex column),
// so vertical rhythm comes from that container's gap — no margin here.
// ============================================
.setup-health-widget {
display: flex;
align-items: center;
gap: $space-3;
min-width: 0;
padding: $space-2 $space-2 $space-2 $space-3;
border: 1px solid var(--border-soft, #{$border-default});
border-radius: $radius-card;
background: var(--surface, #{$bg-card});
&__title {
color: $text-primary;
font-size: $text-sm;
font-weight: $font-weight-semibold;
white-space: nowrap;
}
&__score {
color: var(--amber);
font-size: $text-xs;
font-weight: $font-weight-semibold;
font-variant-numeric: tabular-nums;
}
&__icon {
flex: 0 0 auto;
color: var(--amber);
}
> progress {
width: 88px;
height: 4px;
overflow: hidden;
border: 0;
border-radius: $radius-full;
background: var(--surface-3);
appearance: none;
&::-webkit-progress-bar { background: var(--surface-3); }
&::-webkit-progress-value { background: var(--amber); }
&::-moz-progress-bar { background: var(--amber); }
}
&__summary,
&__muted {
overflow: hidden;
color: $text-tertiary;
font-size: $text-xs;
text-overflow: ellipsis;
white-space: nowrap;
}
&__spacer {
flex: 1;
}
&__dismiss {
display: grid;
width: $control-sm;
height: $control-sm;
flex: 0 0 auto;
place-items: center;
border: 0;
border-radius: $radius-control;
background: transparent;
color: $text-tertiary;
cursor: pointer;
@include focus-ring();
&:hover { color: $text-primary; background: $bg-hover; }
}
// Slim "all set" state — a single clickable line, not a dead card.
&--clean {
flex-direction: row;
align-items: center;
gap: $space-2;
cursor: pointer;
color: $success;
font-size: $text-sm;
font-weight: $font-weight-medium;
&:hover {
border-color: var(--border-default, #{$border-default});
}
}
&__cleanlabel {
flex: 1;
color: $text-secondary;
}
&--loading {
min-height: 46px; // geometry: reserves the loaded banner's height (no layout jump)
}
@media (max-width: $breakpoint-md) {
> progress,
&__summary { display: none; }
}
}
+1 -1
View File
@@ -68,6 +68,7 @@
@import 'components/_status-badge';
@import 'components/_connection-status';
@import 'components/_detail-tabs';
@import 'components/_detail-page'; // header meta, body rhythm and settings shell shared by service + server detail
@import 'components/_server-selector';
@import 'components/_domain-field'; // shared domain input (DomainField.jsx)
@import 'components/_fields'; // CopyField, PortField, EnvEditor, ServerPicker
@@ -87,7 +88,6 @@
@import 'components/_resource-picker'; // scoped ResourceRef combobox
@import 'components/_datagrid'; // DataGrid list surface (sk-grid*, ds/grid/)
@import 'components/_dashboard-widgets'; // configurable dashboard grid (skw-* namespace)
@import 'components/_setup-health'; // dashboard setup-health card + account nudge
@import 'components/_global-statusbar'; // unified VS Code-style shell status edge + panels
@import 'components/_widget-editor'; // wide preview+settings widget drawer (skwe-* namespace)
@import 'components/_system-notices';
+26 -103
View File
@@ -270,58 +270,6 @@ $ft-default: #646b7a;
span { @include truncate(); max-width: 90px; }
}
// ─── Search field ───────────────────────────────────
.search-field {
position: relative;
display: flex;
align-items: center;
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: $radius-card;
width: clamp(160px, 18vw, 220px);
@include transition(all);
&:focus-within {
border-color: var(--accent-dim);
background: var(--surface);
}
.search-field-icon {
position: absolute;
left: $space-3;
color: $text-tertiary;
pointer-events: none;
}
input {
background: transparent;
border: none;
padding: $space-tight $space-3 $space-tight $space-8;
font-size: $text-xs;
color: $text-primary;
width: 100%;
&::placeholder { color: $text-tertiary; }
&:focus-visible { outline-offset: -2px; }
}
.search-field-clear {
position: absolute;
right: 6px;
background: transparent;
border: none;
padding: $space-1;
color: $text-tertiary;
cursor: pointer;
border-radius: $radius-badge;
display: flex;
align-items: center;
justify-content: center;
&:hover { background: $bg-hover; color: $text-primary; }
}
}
// ─── Toolbar chip / icon button ─────────────────────
.toolbar-chip {
display: inline-flex;
@@ -368,47 +316,6 @@ $ft-default: #646b7a;
&.small { padding: 4px; }
}
// Compact Radix Select trigger: icon · value · chevron.
.file-toolbar-select {
position: relative;
display: inline-flex;
align-items: center;
justify-content: flex-start;
width: auto;
height: $control-md;
min-width: 0;
gap: $space-tight;
padding-inline: $space-2 $space-tight;
border: 1px solid var(--border);
border-radius: $radius-card;
background: var(--surface-2);
color: var(--text-faint);
font-size: $text-xs;
transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
&:hover,
&:focus-visible {
border-color: var(--border-strong);
background: var(--surface-3);
color: var(--text-dim);
}
> span {
width: auto;
min-width: 78px;
white-space: nowrap;
text-align: start;
}
> svg { flex-shrink: 0; }
.ui-select-icon {
width: 12px;
height: 12px;
opacity: 0.58;
}
}
// ─── View toggles ───────────────────────────────────
.view-toggle {
display: flex;
@@ -1860,18 +1767,11 @@ $drawer-width: 520px;
.toolbar-right { flex-wrap: wrap; gap: $space-1; }
.search-field {
// Only present when the page has no top bar to host the search.
.fm-search {
order: -1;
width: 100%;
min-width: 0;
flex: 1 0 100%;
}
.file-toolbar-select {
flex: 0 1 auto;
> span { min-width: 0; }
> svg:not(.ui-select-icon) { display: none; }
max-width: none;
}
.file-mount-chip { display: none; }
@@ -1921,3 +1821,26 @@ $drawer-width: 520px;
border: 1px solid fade($accent-primary-raw, 25%);
flex-shrink: 0;
}
// The Files search box. Top-level rather than under .file-manager: it is
// hosted in the page's top bar, outside the page's own root.
.fm-search {
.sk-searchfield__input { padding-inline-end: $space-8; }
.search-field-clear {
position: absolute;
inset-inline-end: $space-2;
display: grid;
place-items: center;
width: $space-5;
height: $space-5;
padding: 0;
border: 0;
border-radius: $radius-badge;
background: transparent;
color: var(--text-faint);
cursor: pointer;
&:hover { color: var(--text); background: var(--surface-3); }
}
}
@@ -131,8 +131,6 @@
// like the existing info-card but with chip rows for the multi-value
// fields.
.system-status-card {
grid-column: span 2;
&__header {
display: flex;
align-items: center;
+2 -192
View File
@@ -310,11 +310,8 @@
// SERVER DETAIL PAGE
// ============================================
.server-detail-page {
padding: 0;
width: min(100%, 1400px);
margin: 0 auto;
}
// No width cap here: the page shell (PageLayout) owns the frame, so the top
// bar and body span the content region exactly like the service detail page.
// Mono breadcrumb (redesign) — only ServerDetail renders this class.
.page-breadcrumb {
@@ -369,14 +366,6 @@
}
}
.offline-card {
grid-column: span 2;
@media (max-width: $breakpoint-lg) {
grid-column: span 1;
}
}
.offline-message {
text-align: center;
padding: $space-6;
@@ -1876,29 +1865,6 @@
}
}
// Refine overview info cards (less marketing, more dashboard)
.overview-tab .info-card {
padding: $space-5;
border-radius: $radius-overlay;
background: $bg-card;
border: 1px solid $border-subtle;
box-shadow: none;
transition: border-color $transition-fast;
&:hover {
border-color: $border-active;
}
h3 {
margin: 0 0 $space-3;
padding-bottom: $space-2;
border-bottom: 1px solid $border-subtle;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: $text-tertiary;
}
}
.overview-tab .info-item {
padding: $space-2 0;
border-bottom: 1px dashed $border-subtle;
@@ -1928,87 +1894,6 @@
}
}
// Demo `.spec-card` look: quiet surface tile, mono uppercase label, big mono
// value. Gauge tiles carry a thin .sk-gauge meter (CPU=accent-bright,
// RAM=cyan, Disk=green; red>85 / amber>70 thresholds set in JSX).
.kpi-tile {
position: relative;
display: flex;
flex-direction: column;
gap: $space-2;
padding: $space-4 $space-4;
background: var(--surface);
border: 1px solid var(--border-soft);
border-radius: var(--radius);
transition: border-color $transition-fast;
&:hover {
border-color: var(--border-strong);
}
&__head {
display: flex;
align-items: center;
gap: $space-2;
color: var(--text-faint);
}
&__icon {
display: inline-flex;
align-items: center;
justify-content: center;
color: var(--text-ghost);
svg { width: 13px; height: 13px; }
}
&__label {
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
&__value {
font-size: $text-lg;
font-weight: $font-weight-semibold;
letter-spacing: -0.02em;
color: var(--text);
line-height: 1.15;
text-transform: capitalize;
}
&__sub {
font-size: $text-xs;
color: var(--text-faint);
}
&__meter {
margin-top: $space-hair;
}
// Tone variants (status tile + gauge thresholds)
&--success .kpi-tile__value { color: var(--green); }
&--danger .kpi-tile__value { color: var(--red); }
&--warning .kpi-tile__value,
&--warn .kpi-tile__value { color: var(--amber); }
}
// Iconified info rows replacing plain InfoList rows in overview cards
.overview-tab .info-card {
h3 {
display: flex;
align-items: center;
gap: $space-2;
color: $text-tertiary;
svg {
width: 14px;
height: 14px;
color: $accent-primary;
}
}
}
// Server overview spec rows (InfoList): icon + faint key, mono value
// right-aligned, soft separators.
.server-info-list {
@@ -2027,11 +1912,8 @@
.info-item {
gap: $space-3;
padding: $space-3 0;
border-bottom: 1px solid var(--border-soft);
min-height: 40px; // geometry: table-row height (40 default row)
font-size: $text-sm;
&:last-child { border-bottom: 0; }
}
.info-label {
@@ -2067,10 +1949,6 @@
}
}
.overview-grid__full {
grid-column: 1 / -1;
}
// ============================================
// TAB BADGE (notification count on tabs)
// ============================================
@@ -2301,40 +2179,6 @@
}
}
// ---- Overview info cards (quiet surface + mono eyebrow) ----
// `> h3` on purpose: SystemStatusCard nests its own h3 (styled in
// _server-packages.scss) and must not get a second eyebrow border.
.overview-tab .info-card {
padding: $space-4 $space-4;
border-radius: var(--radius);
background: var(--surface);
border: 1px solid var(--border-soft);
box-shadow: none;
transition: border-color $transition-fast;
&:hover {
border-color: var(--border-strong);
}
> h3 {
display: flex;
align-items: center;
gap: $space-2;
margin: 0 0 $space-2;
padding-bottom: $space-3;
border-bottom: 1px solid var(--border-soft);
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
svg {
width: 13px;
height: 13px;
color: var(--accent-bright);
}
}
}
.offline-message {
svg { color: var(--text-ghost); }
h4 { color: var(--text); }
@@ -2524,40 +2368,6 @@
gap: $space-3;
}
// Header: dot / (i) / star share one centered row beside the title; on narrow
// screens the title block and actions stay on ONE row (title truncates), tabs below.
.server-detail-page .sk-topbar {
&__titles { align-items: center; }
&__meta { display: inline-flex; align-items: center; gap: $space-2; }
.fav-star {
width: 24px; // geometry: matches the InfoTip md footprint
height: 24px; // geometry: matches the InfoTip md footprint
svg { width: 14px; height: 14px; } // geometry: inline icon
opacity: 0.6;
&:hover, &.is-on { opacity: 1; }
}
@media (max-width: 768px) {
&__titles { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; }
&__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
&__spacer { display: none; }
&__actions { order: 0; width: auto; margin-left: auto; justify-content: flex-end; overflow: visible; flex-wrap: nowrap; }
}
}
.server-detail-info {
display: grid;
grid-template-columns: auto 1fr;
gap: $space-1 $space-3;
margin: 0;
dt { color: var(--text-faint); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
&__id { display: flex; align-items: center; gap: $space-1; code { font-family: $font-mono; } }
}
// Permission-level picker in the Add Server drawer
.level-picker {
display: grid;
+16 -138
View File
@@ -1,14 +1,14 @@
// ============================================
// SERVICE DETAIL PAGE (redesign — infra console look)
// Shares the WordPress detail page's layout: a full-bleed PageTopbar
// (.sk-topbar) above a centered .app-detail-body, reusing the shared
// app-detail-* base chrome (_applications.scss). Tab bodies consume the
// Same frame as the server detail page: PageLayout's full-bleed top bar above
// the shell body (.sk-detail-body, components/_detail-page.scss), reusing the
// shared app-detail-* base chrome (_applications.scss). Tab bodies consume the
// shared sk- primitives (Pill / MetricCard / Gauge / .sk-info-row / .sk-dtable).
// ============================================
// Run the detail page FULL-BLEED like the list pages: drop the .main-content
// frame so the .sk-topbar spans edge-to-edge; .app-detail-body re-pads a
// centered column below. (Mirrors .main-content:has(.wp-detail-page).)
// frame so the .sk-topbar spans edge-to-edge; the page shell pads the body
// below. (Mirrors .main-content:has(.wp-detail-page).)
.main-content:has(.svc-detail) {
padding: 0;
@@ -27,16 +27,6 @@
// frame is dropped by the `:has()` rule at the bottom of this file.
gap: 0;
// Full-width body below the full-bleed top bar.
.app-detail-body {
display: flex;
flex-direction: column;
gap: $space-5;
width: 100%;
// Same full width and gutter as every page body (page-shell-inner).
padding: $space-5 $space-5 $space-8;
}
// Identity row — flat (no card): just the tile + name on the page.
.app-detail-header {
padding: $space-1 0 0;
@@ -162,7 +152,7 @@
}
}
// Repo Bar (spacing handled by the .app-detail-body flex gap)
// Repo Bar (spacing handled by the .sk-detail-body flex gap)
&__repo-bar {
display: flex;
}
@@ -513,128 +503,8 @@ h3.svc-eyebrow {
// Settings tab within service detail — grouped left sub-nav + content pane,
// mirroring the WordPress detail page's settings layout (.wp-settings).
.svc-settings {
display: grid;
grid-template-columns: 200px 1fr;
gap: $space-4;
align-items: start;
@media (max-width: $breakpoint-md) {
grid-template-columns: 1fr;
}
&__nav {
display: flex;
flex-direction: column;
gap: $space-hair;
position: sticky;
top: $space-4;
// Phones: one horizontally scrollable chip row. Groups are flattened
// (display: contents) so every item is a direct flex child; the group
// labels are hidden and the +$space-4 stagger margin disappears with
// the group boxes. The old wrap layout squeezed four group columns
// side by side, staggered them 16px apart and clipped the pills.
@media (max-width: $breakpoint-md) {
position: static;
flex-direction: row;
flex-wrap: nowrap;
gap: $space-tight;
overflow-x: auto;
padding-bottom: $space-hair; // keep the active pill's ring/shadow unclipped
scrollbar-width: none;
&::-webkit-scrollbar { display: none; }
}
}
// Grouped left nav — an uppercase mono label per group.
&__group + &__group {
margin-top: $space-4;
}
@media (max-width: $breakpoint-md) {
&__group { display: contents; }
&__grouplabel { display: none; }
}
&__grouplabel {
padding: 0 $space-3;
margin-bottom: $space-tight;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
&__navitem {
display: flex;
width: 100%; // fill the nav column — a flex <button> otherwise shrinks
// to its label, so each item's box was a different width
align-items: center;
gap: $space-2;
min-height: $control-md;
padding: 0 $space-3;
border: none;
border-radius: $radius-control;
background: none;
color: var(--text-dim);
font-size: $text-sm;
font-weight: $font-weight-medium;
text-align: left;
cursor: pointer;
transition: background 0.14s, color 0.14s;
svg { color: var(--text-faint); flex-shrink: 0; }
&:hover { background: var(--surface-hover); color: var(--text); }
&.is-active {
@include status-variant(var(--accent-bright), var(--accent-bg));
svg { color: var(--accent-bright); }
}
// Chip row on phones: shrink to the label, never wrap or stretch.
@media (max-width: $breakpoint-md) {
width: auto;
flex: 0 0 auto;
white-space: nowrap;
}
}
&__content {
min-width: 0;
}
&__section {
margin-bottom: $space-6;
&:last-child { margin-bottom: 0; }
}
&__section-title {
display: flex;
align-items: center;
gap: $space-tight;
margin: 0 0 $space-3;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
// A divided sub-block within a section — e.g. the Deployment pipeline under
// the Git connect form in "Git & Deploy". Mirrors the .svc-give-subdomain
// divider so stacked panels read as distinct steps rather than one slab.
&__subsection {
margin-top: $space-5;
padding-top: $space-5;
border-top: 1px solid var(--border-soft);
}
&__subsection-title {
margin: 0 0 $space-3;
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
}
}
// The settings nav + content frame moved to components/_detail-settings.scss
// (.sk-detail-settings), shared with the server detail page.
// Icon-only button (global utility consumed by several other components)
@@ -876,6 +746,11 @@ h3.svc-eyebrow {
@media (max-width: $breakpoint-md) {
grid-template-columns: 1fr;
}
// Cards that may or may not render: a lone card, or the odd one at
// the end, takes the whole row instead of leaving a hole beside it.
&--fill > :last-child:nth-child(odd) { grid-column: 1 / -1; }
&--fill:empty { display: none; }
}
&__card {
@@ -898,6 +773,9 @@ h3.svc-eyebrow {
font-size: $text-xs;
font-weight: $font-weight-semibold;
color: var(--text-faint);
// Title glyphs (server overview cards, scheduled tasks) share one size.
> svg { width: 14px; height: 14px; flex-shrink: 0; } // geometry: icon size
}
&__card-header-row {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 33 KiB