Merge pull request #258 from jhd3197/dev
One list-page shell and per-KPI overview blocks
No files matched your search
@@ -52,13 +52,14 @@ 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
|
||||
# (Monitoring, Backups, Security). 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',
|
||||
'entity:workspace',
|
||||
'entity:monitoring', 'entity:backups', 'entity:security',
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -486,7 +486,8 @@ def test_overview_layout_is_stored_but_is_not_a_dashboard_tab(client, auth_heade
|
||||
|
||||
|
||||
@pytest.mark.parametrize('scope', [
|
||||
'entity:server', 'entity:service', 'entity:monitoring', 'entity:backups',
|
||||
'entity:server', 'entity:service', 'entity:workspace',
|
||||
'entity:monitoring', 'entity:backups', 'entity:security',
|
||||
])
|
||||
def test_overview_layout_is_empty_until_saved(client, auth_headers, scope):
|
||||
resp = client.get(f'/api/v1/dashboards?scope={scope}', headers=auth_headers)
|
||||
|
||||
@@ -19,7 +19,7 @@ debt. Regenerate with `python scripts/generate-migration-inventory.py`.
|
||||
| Hand-shaped {'error': ...} bodies in app/api | typed errors + the global handler | 849 | 850 | migrate when touched; new endpoints raise |
|
||||
| Raw subprocess calls outside the runners | app/utils/system.py runners | 23 | 23 | migrate when touched |
|
||||
| Controller-boundary violations (routes doing service work) | service layer extraction | 453 | 453 | migrate when touched (first-wave ratchet) |
|
||||
| raw api.* calls in pages/ | E1: useServerQuery/useServerMutation | 371 | 371 | migrate when touched |
|
||||
| raw api.* calls in pages/ | E1: useServerQuery/useServerMutation | 363 | 371 | migrate when touched |
|
||||
| per-page toast.error extractions in pages/ | E1: query-layer error presentation | 185 | 206 | migrate when touched |
|
||||
| hand-rolled form-group blocks | F2: FormField/useForm | 206 | 206 | migrate when touched |
|
||||
| unencoded ?k=${v} query interpolations in services/api | C4: buildQuery/encoding template | 0 | 0 | INVARIANT at 0 |
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"test": "node --test",
|
||||
"test:browser": "node scripts/settings-browser.mjs",
|
||||
"test:settings-ui": "node scripts/settings-ui-browser.mjs",
|
||||
"lint": "node scripts/lint.mjs && node scripts/check-font-integrity.mjs && node scripts/check-settings-index.mjs && node scripts/check-theme-tokens.mjs && node scripts/check-frontend-boundaries.mjs && node scripts/check-style-ownership.mjs && node scripts/check-status-one-door.mjs && node scripts/check-shared-fields.mjs && node scripts/check-tables.mjs && node scripts/check-type-scale.mjs && node scripts/check-geometry.mjs && node scripts/check-status-scss.mjs && node scripts/check-i18n-literals.mjs && node scripts/check-intl-door.mjs && node scripts/extract-i18n.mjs --check && node scripts/check-i18n.mjs && node scripts/check-logical-properties.mjs && node scripts/generate-vendor-shims.mjs --check && node ../scripts/check-html-sinks.mjs && node scripts/check-orphan-files.mjs && node scripts/check-label-association.mjs",
|
||||
"lint": "node scripts/lint.mjs && node scripts/check-font-integrity.mjs && node scripts/check-settings-index.mjs && node scripts/check-theme-tokens.mjs && node scripts/check-frontend-boundaries.mjs && node scripts/check-style-ownership.mjs && node scripts/check-status-one-door.mjs && node scripts/check-shared-fields.mjs && node scripts/check-tables.mjs && node scripts/check-list-chrome.mjs && node scripts/check-type-scale.mjs && node scripts/check-geometry.mjs && node scripts/check-status-scss.mjs && node scripts/check-i18n-literals.mjs && node scripts/check-intl-door.mjs && node scripts/extract-i18n.mjs --check && node scripts/check-i18n.mjs && node scripts/check-logical-properties.mjs && node scripts/generate-vendor-shims.mjs --check && node ../scripts/check-html-sinks.mjs && node scripts/check-orphan-files.mjs && node scripts/check-label-association.mjs",
|
||||
"lint:baseline": "node scripts/lint.mjs --update",
|
||||
"test:layout": "node scripts/layout-screenshots-browser.mjs",
|
||||
"test:controls": "node scripts/controls-browser.mjs",
|
||||
@@ -27,6 +27,7 @@
|
||||
"lint:fonts": "node scripts/check-font-integrity.mjs",
|
||||
"lint:status": "node scripts/check-status-one-door.mjs",
|
||||
"lint:shared-fields": "node scripts/check-shared-fields.mjs",
|
||||
"lint:list-chrome": "node scripts/check-list-chrome.mjs",
|
||||
"lint:type-scale": "node scripts/check-type-scale.mjs",
|
||||
"lint:geometry": "node scripts/check-geometry.mjs",
|
||||
"lint:i18n": "node scripts/check-i18n-literals.mjs",
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
#!/usr/bin/env node
|
||||
// One list-page shell. Every page with a table puts its controls in the same
|
||||
// places, so the create button and the search box never move between pages:
|
||||
//
|
||||
// top bar [secondary …] [create] [search] (ds/ListActions)
|
||||
// view selector saved views · filters and fields · copy link / export /
|
||||
// reset · page extras (GridViewPicker)
|
||||
//
|
||||
// Fails when a page:
|
||||
//
|
||||
// - renders a filter icon or a "⋮" tools menu of its own (they are entries in
|
||||
// the view selector's menu: `<GridViewPicker {...chrome.pickerProps} />`),
|
||||
// - hoists table controls into the top bar with useTopbarChrome,
|
||||
// - puts a filter button in the top bar, or orders the bar differently
|
||||
// (create after search, anything after search),
|
||||
// - adds a KPI strip to a page that is not an overview.
|
||||
//
|
||||
// The allowlists are the known exceptions, each with its reason. They may only
|
||||
// shrink. Extension copies under src/plugins/ are out of scope.
|
||||
|
||||
import { readFileSync, readdirSync, statSync } from 'node:fs';
|
||||
import { join, relative, sep } from 'node:path';
|
||||
|
||||
const SRC = new URL('../src', import.meta.url).pathname.replace(/^\/([A-Za-z]:)/, '$1');
|
||||
|
||||
// Files that may render <GridFilterButton> / <GridToolsMenu>.
|
||||
const CHROME_OWNERS = new Set([
|
||||
// A table with no saved views has no selector to hold them (SDK surface).
|
||||
'components/layouts/ResourceListPage.jsx',
|
||||
// Living documentation of the primitives.
|
||||
'pages/StyleGuide.jsx',
|
||||
]);
|
||||
|
||||
// Files that may call useTopbarChrome.
|
||||
const TOPBAR_CHROME_USERS = new Set([
|
||||
'hooks/useTopbarActions.js',
|
||||
// A workspace, not a table: its view switch and path tools ride the bar.
|
||||
'pages/FileManager.jsx',
|
||||
]);
|
||||
|
||||
// Top bars that keep a filter button: card catalogues with no view selector.
|
||||
const TOPBAR_FILTER_USERS = new Set([
|
||||
'pages/Marketplace.jsx',
|
||||
]);
|
||||
|
||||
// Overview surfaces: the only places a KPI strip belongs. A list of records
|
||||
// gets none — its counts are the table footer and the saved views.
|
||||
const KPI_OWNERS = new Set([
|
||||
'components/ds/KpiBand.jsx',
|
||||
'pages/StyleGuide.jsx',
|
||||
'components/backups/ProtectionStatusCard.jsx',
|
||||
'pages/Monitoring.jsx',
|
||||
// The agent fleet's Dashboard tab and the FTP server's status block.
|
||||
'pages/AgentFleet.jsx',
|
||||
'pages/FTPServer.jsx',
|
||||
// Detail pages; they move to the shared detail header with the rest.
|
||||
'pages/MonitorDetail.jsx',
|
||||
'pages/QueueDetail.jsx',
|
||||
]);
|
||||
|
||||
function* walk(dir) {
|
||||
for (const name of readdirSync(dir)) {
|
||||
const p = join(dir, name);
|
||||
if (statSync(p).isDirectory()) {
|
||||
if (name === 'node_modules' || name === '__tests__' || name === 'plugins') continue;
|
||||
yield* walk(p);
|
||||
} else if (/\.jsx?$/.test(name)) {
|
||||
yield p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function stripComments(src) {
|
||||
return src
|
||||
.replace(/\{\/\*[\s\S]*?\*\/\}/g, (m) => m.replace(/[^\n]/g, ' '))
|
||||
.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '))
|
||||
.replace(/(^|[^:'"`])\/\/.*$/gm, (m, lead) => lead + ' '.repeat(m.length - lead.length));
|
||||
}
|
||||
|
||||
// The balanced (...) argument list of the call that starts at `from`.
|
||||
function callBlock(src, from) {
|
||||
const start = src.indexOf('(', from);
|
||||
let depth = 0;
|
||||
for (let i = start; i < src.length; i += 1) {
|
||||
if (src[i] === '(') depth += 1;
|
||||
else if (src[i] === ')') {
|
||||
depth -= 1;
|
||||
if (depth === 0) return src.slice(start, i + 1);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const lineOf = (src, index) => src.slice(0, index).split('\n').length;
|
||||
|
||||
const problems = [];
|
||||
for (const file of walk(SRC)) {
|
||||
const rel = relative(SRC, file).split(sep).join('/');
|
||||
const src = stripComments(readFileSync(file, 'utf8'));
|
||||
const inGrid = rel.startsWith('components/ds/grid/');
|
||||
|
||||
if (!inGrid && !CHROME_OWNERS.has(rel)) {
|
||||
for (const m of src.matchAll(/<(GridFilterButton|GridToolsMenu)\b/g)) {
|
||||
problems.push(`${rel}:${lineOf(src, m.index)} <${m[1]}> — fold it into the view selector: <GridViewPicker {...chrome.pickerProps} />`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!TOPBAR_CHROME_USERS.has(rel)) {
|
||||
for (const m of src.matchAll(/(?<![\w.])useTopbarChrome\(/g)) {
|
||||
problems.push(`${rel}:${lineOf(src, m.index)} useTopbarChrome — table controls live in the view selector, not the top bar`);
|
||||
}
|
||||
}
|
||||
|
||||
if (!KPI_OWNERS.has(rel)) {
|
||||
for (const m of src.matchAll(/<KpiBand\b/g)) {
|
||||
problems.push(`${rel}:${lineOf(src, m.index)} <KpiBand> — KPI strips belong to overview surfaces, not list pages`);
|
||||
}
|
||||
}
|
||||
|
||||
if (rel === 'hooks/useTopbarActions.js') continue;
|
||||
for (const m of src.matchAll(/(?<![\w.])(useTopbarActions|useListTopbar)\(/g)) {
|
||||
const block = callBlock(src, m.index);
|
||||
const at = `${rel}:${lineOf(src, m.index)}`;
|
||||
if (!TOPBAR_FILTER_USERS.has(rel) && /<(FilterButton|GridFilterButton|GridToolsMenu)\b/.test(block)) {
|
||||
problems.push(`${at} filter/tools button in the top bar — move it into the view selector's menu`);
|
||||
}
|
||||
if (m[1] !== 'useTopbarActions') continue;
|
||||
// Each fragment is one rendering of the bar (a page may switch between
|
||||
// two): within it, search is last and the create button precedes it.
|
||||
for (const part of block.split('<>').slice(1)) {
|
||||
const search = part.indexOf('<SearchField');
|
||||
if (search < 0) continue;
|
||||
const after = part.slice(search + 1);
|
||||
if (/<(PagePrimaryButton|Button|SearchField)\b/.test(after)) {
|
||||
problems.push(`${at} top-bar order — search goes last: [secondary] [create] [search]; use useListTopbar`);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (problems.length) {
|
||||
console.error(`check-list-chrome: ${problems.length} problem(s)\n`);
|
||||
for (const p of problems) console.error(` ${p}`);
|
||||
console.error('\nSee the header of scripts/check-list-chrome.mjs for the list-page shell.');
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('check-list-chrome: ok');
|
||||
@@ -15,8 +15,7 @@ import Modal from './Modal';
|
||||
import EmptyState from './EmptyState';
|
||||
import { DataTable, DataTableFooter, ListToolbar, SearchField } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -552,9 +551,9 @@ const EnvironmentVariables = ({ appId }) => {
|
||||
useTopbarChrome). No count on it — the footer reports
|
||||
that, under the rows it is counting. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadEnvVars }}
|
||||
label="variables"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -562,11 +561,6 @@ const EnvironmentVariables = ({ appId }) => {
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.environmentVariables.searchKeysOrDescriptions', 'Search keys or descriptions…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadEnvVars} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -6,8 +6,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { DataTable, DataTableFooter, SearchField } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -298,9 +297,9 @@ export function ProcessTable({
|
||||
{/* One row of chrome: the view name is the heading, and search, the
|
||||
host's own controls, the filter button and the "⋮" ride it. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh }}
|
||||
label="processes"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -309,11 +308,6 @@ export function ProcessTable({
|
||||
placeholder={t('app.processTable.filterPidNameCommand', 'Filter PID, name, command…')}
|
||||
/>
|
||||
{actions}
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={onRefresh} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from 'lucide-react';
|
||||
import api from '../../services/api';
|
||||
import { formatBytes } from '@/utils/formatBytes';
|
||||
import { KpiBand, MetricCard, Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import { MetricCard, Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import EmptyState from '../EmptyState';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
|
||||
@@ -103,6 +103,8 @@ const LATEST_COLUMNS = [
|
||||
// "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'];
|
||||
// Board rows a KPI tile takes: value, label and its sub line.
|
||||
const KPI_TILE_ROWS = 3;
|
||||
|
||||
export default function BackupsOverview({
|
||||
stats, storageConfig, costSummary, schedules = [], backups = [], onGo, storageWarning = false,
|
||||
@@ -259,8 +261,9 @@ 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}>
|
||||
{/* One block per KPI: each is its own tile on the board, never a
|
||||
section holding a strip of them. */}
|
||||
<OverviewSection id="kpi-protected" title={t('app.backupsOverview.protectedResources', 'Protected resources')} tile replaces="glance" w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard
|
||||
tone="green"
|
||||
icon={<ShieldCheck size={16} />}
|
||||
@@ -271,6 +274,8 @@ export default function BackupsOverview({
|
||||
<span>{protection.detail || t('app.backupsOverview.fromTheBackupArchive', 'from the backup archive')}</span>
|
||||
</div>
|
||||
</MetricCard>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="kpi-storage" title={t('app.backupsOverview.storageUsed', 'Storage used')} tile replaces="glance" w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard
|
||||
tone="accent"
|
||||
icon={<Database size={16} />}
|
||||
@@ -281,6 +286,8 @@ export default function BackupsOverview({
|
||||
<span>{t('app.backupsOverview.acrossDestinations', { count: destinations.count, defaultValue_one: 'across 1 destination', defaultValue_other: 'across {{count}} destinations' })}</span>
|
||||
</div>
|
||||
</MetricCard>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="kpi-success" title={t('app.backupsOverview.successRate', 'Success rate')} tile replaces="glance" w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard
|
||||
tone={successRate == null ? 'accent' : successRate >= 99 ? 'green' : successRate >= 90 ? 'amber' : 'red'}
|
||||
icon={<History size={16} />}
|
||||
@@ -292,6 +299,8 @@ export default function BackupsOverview({
|
||||
<span>{finished30.length ? t('app.backupsOverview.runsLast30Days', { count: finished30.length, defaultValue_one: '1 run · last 30 days', defaultValue_other: '{{count}} runs · last 30 days' }) : t('app.backupsOverview.noRunsRecordedYet', 'no runs recorded yet')}</span>
|
||||
</div>
|
||||
</MetricCard>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="kpi-next" title={t('app.backupsOverview.nextScheduled', 'Next scheduled')} tile replaces="glance" w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard
|
||||
tone="violet"
|
||||
icon={<Timer size={16} />}
|
||||
@@ -306,7 +315,6 @@ export default function BackupsOverview({
|
||||
</span>
|
||||
</div>
|
||||
</MetricCard>
|
||||
</KpiBand>
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="activity" title={t('app.backupsOverview.backupActivity', 'Backup activity')} w={6} h={8}>
|
||||
|
||||
@@ -50,6 +50,9 @@ export function WidgetFrame({
|
||||
|
||||
const className = [
|
||||
'skw-frame',
|
||||
// A bare widget is its own card (a KPI tile): no header outside edit
|
||||
// mode, where the header is still needed as the drag handle.
|
||||
type?.bare && 'skw-frame--bare',
|
||||
edit && 'skw-frame--edit',
|
||||
selected && 'skw-frame--selected',
|
||||
].filter(Boolean).join(' ');
|
||||
|
||||
@@ -6,8 +6,7 @@ import { useConfirm } from '../../hooks/useConfirm';
|
||||
import { formatBytes } from '@/utils/formatBytes';
|
||||
import { DataTable, DataTableFooter, SearchField } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -222,10 +221,9 @@ export default function BackupsTab() {
|
||||
return (
|
||||
<div className="dbx-backups">
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="backups"
|
||||
onCreate={chrome.createView}
|
||||
actions={<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />}
|
||||
/>
|
||||
<EmptyState
|
||||
icon={Archive}
|
||||
@@ -242,9 +240,9 @@ export default function BackupsTab() {
|
||||
bar, so it stays inline rather than being hoisted; refresh is in
|
||||
the "⋮" with the other table-wide actions. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="backups"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -252,11 +250,6 @@ export default function BackupsTab() {
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.backupsTab.filterDatabaseOrFile', 'Filter database or file…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -7,8 +7,7 @@ import { usePolling } from '../../hooks/usePolling';
|
||||
import EmptyState from '../EmptyState';
|
||||
import { DataTable, DataTableFooter, SearchField } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -320,9 +319,9 @@ export default function ProcessListPanel({ conn, engine, active, isAdmin }) {
|
||||
is in the "⋮". No process count here — the footer reports it,
|
||||
under the rows it is counting. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: () => load() }}
|
||||
label="sessions"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<label className="dbp-auto">
|
||||
@@ -338,11 +337,6 @@ export default function ProcessListPanel({ conn, engine, active, isAdmin }) {
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.processListPanel.filterSessions', 'Filter sessions…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={() => load()} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -4,8 +4,7 @@ import { runQuery, getStructure, buildBrowseQuery } from './dbAdapter';
|
||||
import ResultsGrid from './ResultsGrid';
|
||||
import { DataTable, DataTableFooter, SearchField } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -337,9 +336,9 @@ export default function TableDataTab({ conn, tabId, table, rowsEstimate, active,
|
||||
inside the explorer's own tab bar, so it stays inline
|
||||
rather than being hoisted. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: () => loadStructure(true) }}
|
||||
label="columns"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -347,14 +346,6 @@ export default function TableDataTab({ conn, tabId, table, rowsEstimate, active,
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.tableDataTab.filterColumnOrType', 'Filter column or type…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu
|
||||
{...chrome.toolsProps}
|
||||
onRefresh={() => loadStructure(true)}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -60,6 +60,11 @@ const isSectionWidget = (widget) => String(widget?.type || '').startsWith(SECTIO
|
||||
// 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)
|
||||
// tile the block is one KPI tile: its frame is the tile's card, with no
|
||||
// header of its own outside edit mode. A row of KPIs is a row of
|
||||
// these, each movable on its own — never one section holding a strip.
|
||||
// replaces id of a retired section this one was split out of, so a saved
|
||||
// layout that still names the old block gets the new ones in its place
|
||||
export function OverviewSection() {
|
||||
return null;
|
||||
}
|
||||
@@ -71,6 +76,7 @@ function SectionWidget({ widget, ctx }) {
|
||||
const slotRef = useRef(null);
|
||||
const host = ctx.sectionHosts.get(widget.cfg?.section);
|
||||
const { adoptVersion, releaseSection } = ctx;
|
||||
const tile = !!getWidgetType(ctx.types, widget.type)?.bare;
|
||||
|
||||
// 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).
|
||||
@@ -85,7 +91,13 @@ function SectionWidget({ widget, ctx }) {
|
||||
return () => releaseSection(host);
|
||||
}, [host, releaseSection]);
|
||||
|
||||
return <div className="sk-overview-section" ref={slotRef} data-empty={ctx.emptyLabel} />;
|
||||
return (
|
||||
<div
|
||||
className={tile ? 'sk-overview-section sk-overview-section--tile' : 'sk-overview-section'}
|
||||
ref={slotRef}
|
||||
data-empty={ctx.emptyLabel}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const NO_WIDGET_TYPES = [];
|
||||
@@ -144,7 +156,9 @@ function OverviewBoardInner({ kind, entityId, entityLabel, shared, serverVar, wi
|
||||
// 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(':'))
|
||||
.map((section) => [
|
||||
section.id, section.title, section.w, section.h, section.placed, section.lead, section.tile, section.replaces,
|
||||
].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.
|
||||
@@ -152,7 +166,9 @@ function OverviewBoardInner({ kind, entityId, entityLabel, shared, serverVar, wi
|
||||
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 })),
|
||||
meta: sections.map(({ id, title, icon, w, h, placed, lead, tile, replaces }) => (
|
||||
{ id, title, icon, w, h, placed, lead, tile, replaces }
|
||||
)),
|
||||
};
|
||||
}
|
||||
const sectionMeta = metaRef.current.meta;
|
||||
@@ -199,10 +215,12 @@ function OverviewBoardInner({ kind, entityId, entityLabel, shared, serverVar, wi
|
||||
desc: section.title,
|
||||
w: section.w || 6,
|
||||
h: section.h || 3,
|
||||
min: [3, 2],
|
||||
min: section.tile ? [2, 2] : [3, 2],
|
||||
defaultCfg: { section: section.id },
|
||||
component: SectionWidget,
|
||||
section: section.id,
|
||||
// A tile is its own card: WidgetFrame drops the header outside edit mode.
|
||||
bare: !!section.tile,
|
||||
}));
|
||||
// Dashboard widgets keep their size on the finer rows.
|
||||
const shared = registered.filter((type) => widgetTypeIds.includes(type.id)).map((type) => ({
|
||||
@@ -229,10 +247,32 @@ function OverviewBoardInner({ kind, entityId, entityLabel, shared, serverVar, wi
|
||||
}, [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],
|
||||
);
|
||||
// A page block that was split into smaller ones (`replaces`) is swapped for
|
||||
// them, so a saved layout keeps what the old block showed.
|
||||
const sanitize = useCallback((widgets) => {
|
||||
const kept = widgets.filter((widget) => getWidgetType(types, widget.type));
|
||||
const retired = widgets.filter((widget) => isSectionWidget(widget) && !getWidgetType(types, widget.type));
|
||||
if (!retired.length) return kept;
|
||||
const onBoard = new Set(kept.filter(isSectionWidget).map((widget) => widget.cfg?.section));
|
||||
retired.forEach((old) => {
|
||||
sectionMeta
|
||||
.filter((section) => section.replaces === old.cfg?.section && !onBoard.has(section.id))
|
||||
.forEach((section) => {
|
||||
const w = section.w || 6;
|
||||
const h = section.h || 3;
|
||||
kept.push({
|
||||
i: nextWidgetId(kept),
|
||||
type: sectionTypeId(kind, section.id),
|
||||
...findFreeSpot(kept, w, h),
|
||||
w,
|
||||
h,
|
||||
cfg: { section: section.id },
|
||||
});
|
||||
onBoard.add(section.id);
|
||||
});
|
||||
});
|
||||
return compact(kept);
|
||||
}, [types, sectionMeta, kind]);
|
||||
|
||||
// ---- persistence --------------------------------------------------------
|
||||
// `board` is the saved row, null while the user is on the shipped layout,
|
||||
|
||||
@@ -5,10 +5,9 @@ import { useConfirm } from '../../hooks/useConfirm';
|
||||
import EmptyState from '../EmptyState';
|
||||
import { ErrorState } from '../ErrorState';
|
||||
import Modal from '@/components/Modal';
|
||||
import { DataTable, DataTableFooter, SearchField } from '@/components/ds';
|
||||
import { DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -17,11 +16,10 @@ import { Select, SelectTrigger, SelectContent, SelectItem, SelectValue } from '@
|
||||
import { Package, Play, Square, RotateCw, FileText, Download } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
useServer,
|
||||
unwrapRemoteData,
|
||||
normalizeListResponse,
|
||||
useServer, unwrapRemoteData, normalizeListResponse,
|
||||
} from './dockerHelpers';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
// `docker compose ls --format json` capitalises its keys; the label-scanning
|
||||
// fallback in docker_service builds the same shape by hand. Read through one
|
||||
@@ -99,6 +97,12 @@ const ComposeTab = ({ onStatsChange }) => {
|
||||
const [logsProject, setLogsProject] = useState(null);
|
||||
const [actionLoading, setActionLoading] = useState({});
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
|
||||
// The Docker page's top bar: this tab's search, after the page-wide
|
||||
// buttons. Filters and the table tools are in the view selector's menu.
|
||||
useListTopbar(() => ({
|
||||
search: { value: searchTerm, onSearch: setSearchTerm, placeholder: t('app.composeTab.searchProjects', 'Search compose projects…') },
|
||||
}), [searchTerm]);
|
||||
const { sorts, setSorts } = useTableSort({
|
||||
defaultSorts: [{ key: 'name', direction: 'asc' }],
|
||||
storageKey: 'serverkit-table-docker-compose-sort',
|
||||
@@ -384,25 +388,9 @@ const ComposeTab = ({ onStatsChange }) => {
|
||||
return (
|
||||
<div className="dx-tab-pane dx-list-pane">
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadProjects }}
|
||||
label="projects"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
value={searchTerm}
|
||||
onSearch={setSearchTerm}
|
||||
placeholder={t('app.composeTab.filterProjectOrConfigPath', 'Filter compose project or config path…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
{/* Refresh is not repeated as its own icon: it rides the
|
||||
"⋮" with the other table-wide actions. */}
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadProjects} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -9,10 +9,9 @@ import EmptyState from '../EmptyState';
|
||||
import { ErrorState } from '../ErrorState';
|
||||
import Modal from '@/components/Modal';
|
||||
import { SheetPanel } from '@/components/ui/sheet';
|
||||
import { Drawer, DataTable, DataTableFooter, Pill, SearchField } from '@/components/ds';
|
||||
import { Drawer, DataTable, DataTableFooter, Pill } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer, GridBulkBar,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer, GridBulkBar,
|
||||
} from '@/components/ds/grid';
|
||||
import { formatRelativeTime } from '@/utils/time';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
@@ -24,31 +23,18 @@ import EnvEditor from '@/components/EnvEditor';
|
||||
import { CopyButton } from '@/components/CopyButton';
|
||||
import { envToObject } from '@/utils/dotenv';
|
||||
import {
|
||||
Box, X, Trash2, Play, Square, RotateCw,
|
||||
Terminal as TerminalLucide, FileText, Activity, Clock3, Plus,
|
||||
Database, Gauge, Package, Server as ServerIcon, Lock,
|
||||
Box, X, Trash2, Play, Square, SquareCheck, RotateCw, Terminal as TerminalLucide, FileText, Activity, Clock3, Plus, Database, Gauge, Package, Server as ServerIcon, Lock,
|
||||
} from 'lucide-react';
|
||||
import {
|
||||
useServer,
|
||||
unwrapRemoteData,
|
||||
formatPorts,
|
||||
normalizeListResponse,
|
||||
shortId,
|
||||
getContainerId,
|
||||
getContainerName,
|
||||
getContainerImage,
|
||||
getContainerStatus,
|
||||
isContainerRunning,
|
||||
isProtectedContainer,
|
||||
getContainerStatusLabel,
|
||||
containerHue,
|
||||
getContainerProjectName,
|
||||
useServer, unwrapRemoteData, formatPorts, normalizeListResponse, shortId, getContainerId, getContainerName, getContainerImage, getContainerStatus, isContainerRunning, isProtectedContainer, getContainerStatusLabel, containerHue, getContainerProjectName,
|
||||
} from './dockerHelpers';
|
||||
import { ContainerResourceBars } from './dockerShared';
|
||||
import { downloadBlob } from '@/utils/downloadBlob';
|
||||
import { usePolling } from '@/hooks/usePolling';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import PagePrimaryButton from '@/components/PagePrimaryButton';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
// Container stats cadence.
|
||||
const STATS_REFRESH_MS = 10000;
|
||||
@@ -63,13 +49,15 @@ export const RunContainerButton = () => {
|
||||
const { isRemote } = useServer();
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
<PagePrimaryButton
|
||||
id="docker-run-container"
|
||||
icon={Play}
|
||||
label={t('app.containersTab.runContainer2', 'Run container')}
|
||||
shortLabel={t('app.containersTab.run', 'Run')}
|
||||
onClick={() => setShowModal(true)}
|
||||
disabled={isRemote}
|
||||
title={isRemote ? t('app.containersTab.runningNewContainersIsOnlyAvailable', 'Running new containers is only available on the panel server right now') : t('app.containersTab.runContainer', 'Run container')}
|
||||
>
|
||||
<span>+</span> {t('app.containersTab.runContainer2', 'Run container')}
|
||||
</Button>
|
||||
disabledReason={isRemote ? t('app.containersTab.runningNewContainersIsOnlyAvailable', 'Running new containers is only available on the panel server right now') : undefined}
|
||||
/>
|
||||
{showModal && <RunContainerModal onClose={() => setShowModal(false)} onCreated={() => window.location.reload()} />}
|
||||
</>
|
||||
);
|
||||
@@ -203,6 +191,13 @@ const ContainersTab = ({ onStatsChange }) => {
|
||||
const [logsContainer, setLogsContainer] = useState(null);
|
||||
const [execContainer, setExecContainer] = useState(null);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
|
||||
// The Docker page's top bar: this tab's create button and search, after the page-wide
|
||||
// buttons. Filters and the table tools are in the view selector's menu.
|
||||
useListTopbar(() => ({
|
||||
primary: <RunContainerButton />,
|
||||
search: { value: searchTerm, onSearch: setSearchTerm, placeholder: t('app.containersTab.searchContainers', 'Search containers…') },
|
||||
}), [searchTerm]);
|
||||
// Native DataTable header sorting (the old <select> + direction button is
|
||||
// gone). Default keeps the previous behavior: running containers first.
|
||||
const { sorts, setSorts } = useTableSort({
|
||||
@@ -780,39 +775,18 @@ const ContainersTab = ({ onStatsChange }) => {
|
||||
|
||||
return (
|
||||
<div className="dx-tab-pane dx-containers-pane">
|
||||
{/* One row of chrome. The view name is this pane's heading and
|
||||
everything that acts on the table — the fetch scope, the search,
|
||||
the filter, the "⋮" — rides the same line. This pane is inside
|
||||
the Docker page's tab group, whose top bar belongs to that page,
|
||||
so the chrome stays here rather than being hoisted (see
|
||||
useTopbarChrome). Refresh is not repeated as an icon: it is in
|
||||
the "⋮" with the other table-wide actions. */}
|
||||
{/* The view name is this pane's heading. Its menu holds the fetch
|
||||
scope (Include stopped), filters and the table tools; search
|
||||
and Run ride the Docker page's top bar. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadContainers }}
|
||||
label="containers"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<label className="dx-toggle">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={showAll}
|
||||
onChange={(e) => setShowAll(e.target.checked)}
|
||||
/>
|
||||
<span>{t('app.containersTab.includeStopped', 'Include stopped')}</span>
|
||||
</label>
|
||||
<SearchField
|
||||
value={searchTerm}
|
||||
onSearch={setSearchTerm}
|
||||
placeholder={t('app.containersTab.filterNameImageOrId', 'Filter name, image, or ID…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadContainers} />
|
||||
</>
|
||||
)}
|
||||
extra={[{
|
||||
icon: showAll ? SquareCheck : Square,
|
||||
label: t('app.containersTab.includeStopped', 'Include stopped'),
|
||||
onSelect: () => setShowAll((value) => !value),
|
||||
}]}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -5,39 +5,38 @@ import { useConfirm } from '../../hooks/useConfirm';
|
||||
import EmptyState from '../EmptyState';
|
||||
import { ErrorState } from '../ErrorState';
|
||||
import Modal from '@/components/Modal';
|
||||
import { DataTable, DataTableFooter, SearchField } from '@/components/ds';
|
||||
import { DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Layers, Trash2 } from 'lucide-react';
|
||||
import { Download, Layers, Trash2 } from 'lucide-react';
|
||||
import { formatBytes } from '@/utils/formatBytes';
|
||||
import { formatRelativeTime } from '@/utils/time';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
useServer,
|
||||
normalizeListResponse,
|
||||
imageId,
|
||||
imageRef,
|
||||
imageSizeBytes,
|
||||
imageSizeMb,
|
||||
imageCreatedMs,
|
||||
useServer, normalizeListResponse, imageId, imageRef, imageSizeBytes, imageSizeMb, imageCreatedMs,
|
||||
} from './dockerHelpers';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { formatDateTime } from '@/utils/intl';
|
||||
import PagePrimaryButton from '@/components/PagePrimaryButton';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
export const PullImageButton = () => {
|
||||
const { t } = useTranslation();
|
||||
const [showModal, setShowModal] = useState(false);
|
||||
return (
|
||||
<>
|
||||
<Button onClick={() => setShowModal(true)}>
|
||||
<span>+</span> {t('app.imagesTab.pullImage', 'Pull image')}
|
||||
</Button>
|
||||
<PagePrimaryButton
|
||||
id="docker-pull-image"
|
||||
icon={Download}
|
||||
label={t('app.imagesTab.pullImage', 'Pull image')}
|
||||
shortLabel={t('app.imagesTab.pull', 'Pull')}
|
||||
onClick={() => setShowModal(true)}
|
||||
/>
|
||||
{showModal && <PullImageModal onClose={() => setShowModal(false)} onPulled={() => window.location.reload()} />}
|
||||
</>
|
||||
);
|
||||
@@ -113,6 +112,13 @@ const ImagesTab = ({ onStatsChange }) => {
|
||||
const [images, setImages] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
|
||||
// The Docker page's top bar: this tab's create button and search, after the page-wide
|
||||
// buttons. Filters and the table tools are in the view selector's menu.
|
||||
useListTopbar(() => ({
|
||||
primary: <PullImageButton />,
|
||||
search: { value: searchTerm, onSearch: setSearchTerm, placeholder: t('app.imagesTab.searchImages', 'Search images…') },
|
||||
}), [searchTerm]);
|
||||
const { sorts, setSorts } = useTableSort({
|
||||
defaultSorts: [{ key: 'repository', direction: 'asc' }],
|
||||
storageKey: 'serverkit-table-docker-images-sort',
|
||||
@@ -322,23 +328,9 @@ const ImagesTab = ({ onStatsChange }) => {
|
||||
return (
|
||||
<div className="dx-tab-pane dx-list-pane">
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadImages }}
|
||||
label="images"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
value={searchTerm}
|
||||
onSearch={setSearchTerm}
|
||||
placeholder={t('app.imagesTab.filterRepositoryTagOrId', 'Filter repository, tag, or ID…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadImages} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -5,10 +5,9 @@ import { useConfirm } from '../../hooks/useConfirm';
|
||||
import EmptyState from '../EmptyState';
|
||||
import { ErrorState } from '../ErrorState';
|
||||
import Modal from '@/components/Modal';
|
||||
import { DataTable, DataTableFooter, Pill, SearchField, SegControl } from '@/components/ds';
|
||||
import { DataTable, DataTableFooter, Pill, SegControl } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -17,11 +16,11 @@ import { Input } from '@/components/ui/input';
|
||||
import { Network as NetworkIcon, Trash2, Lock } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
useServer,
|
||||
normalizeListResponse,
|
||||
shortId,
|
||||
useServer, normalizeListResponse, shortId,
|
||||
} from './dockerHelpers';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import PagePrimaryButton from '@/components/PagePrimaryButton';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
export const CreateNetworkButton = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -29,13 +28,14 @@ export const CreateNetworkButton = () => {
|
||||
const { isRemote } = useServer();
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
<PagePrimaryButton
|
||||
id="docker-create-network"
|
||||
label={t('app.networksTab.createNetwork', 'Create network')}
|
||||
shortLabel={t('common.actions.new', 'New')}
|
||||
onClick={() => setShowModal(true)}
|
||||
disabled={isRemote}
|
||||
title={isRemote ? t('app.networksTab.creatingNetworksIsOnlyAvailableOn', 'Creating networks is only available on the panel server right now') : t('app.networksTab.createNetwork', 'Create network')}
|
||||
>
|
||||
<span>+</span> {t('app.networksTab.createNetwork2', 'Create network')}
|
||||
</Button>
|
||||
disabledReason={isRemote ? t('app.networksTab.creatingNetworksIsOnlyAvailableOn', 'Creating networks is only available on the panel server right now') : undefined}
|
||||
/>
|
||||
{showModal && <CreateNetworkModal onClose={() => setShowModal(false)} onCreated={() => window.location.reload()} />}
|
||||
</>
|
||||
);
|
||||
@@ -106,6 +106,13 @@ const NetworksTab = ({ onStatsChange }) => {
|
||||
const [networks, setNetworks] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
|
||||
// The Docker page's top bar: this tab's create button and search, after the page-wide
|
||||
// buttons. Filters and the table tools are in the view selector's menu.
|
||||
useListTopbar(() => ({
|
||||
primary: <CreateNetworkButton />,
|
||||
search: { value: searchTerm, onSearch: setSearchTerm, placeholder: t('app.networksTab.searchNetworks', 'Search networks…') },
|
||||
}), [searchTerm]);
|
||||
const { sorts, setSorts } = useTableSort({
|
||||
defaultSorts: [{ key: 'name', direction: 'asc' }],
|
||||
storageKey: 'serverkit-table-docker-networks-sort',
|
||||
@@ -306,23 +313,9 @@ const NetworksTab = ({ onStatsChange }) => {
|
||||
return (
|
||||
<div className="dx-tab-pane dx-list-pane">
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadNetworks }}
|
||||
label="networks"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
value={searchTerm}
|
||||
onSearch={setSearchTerm}
|
||||
placeholder={t('app.networksTab.filterNameOrId', 'Filter name or ID…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadNetworks} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -5,10 +5,9 @@ import { useConfirm } from '../../hooks/useConfirm';
|
||||
import EmptyState from '../EmptyState';
|
||||
import { ErrorState } from '../ErrorState';
|
||||
import Modal from '@/components/Modal';
|
||||
import { DataTable, DataTableFooter, Pill, SearchField } from '@/components/ds';
|
||||
import { DataTable, DataTableFooter, Pill } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -17,10 +16,11 @@ import { Input } from '@/components/ui/input';
|
||||
import { HardDrive, Trash2 } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
useServer,
|
||||
normalizeListResponse,
|
||||
useServer, normalizeListResponse,
|
||||
} from './dockerHelpers';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import PagePrimaryButton from '@/components/PagePrimaryButton';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
export const CreateVolumeButton = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -28,13 +28,14 @@ export const CreateVolumeButton = () => {
|
||||
const { isRemote } = useServer();
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
<PagePrimaryButton
|
||||
id="docker-create-volume"
|
||||
label={t('app.volumesTab.createVolume', 'Create volume')}
|
||||
shortLabel={t('common.actions.new', 'New')}
|
||||
onClick={() => setShowModal(true)}
|
||||
disabled={isRemote}
|
||||
title={isRemote ? t('app.volumesTab.creatingVolumesIsOnlyAvailableOn', 'Creating volumes is only available on the panel server right now') : t('app.volumesTab.createVolume', 'Create volume')}
|
||||
>
|
||||
<span>+</span> {t('app.volumesTab.createVolume2', 'Create volume')}
|
||||
</Button>
|
||||
disabledReason={isRemote ? t('app.volumesTab.creatingVolumesIsOnlyAvailableOn', 'Creating volumes is only available on the panel server right now') : undefined}
|
||||
/>
|
||||
{showModal && <CreateVolumeModal onClose={() => setShowModal(false)} onCreated={() => window.location.reload()} />}
|
||||
</>
|
||||
);
|
||||
@@ -110,6 +111,13 @@ const VolumesTab = ({ onStatsChange }) => {
|
||||
const [volumes, setVolumes] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [searchTerm, setSearchTerm] = useState('');
|
||||
|
||||
// The Docker page's top bar: this tab's create button and search, after the page-wide
|
||||
// buttons. Filters and the table tools are in the view selector's menu.
|
||||
useListTopbar(() => ({
|
||||
primary: <CreateVolumeButton />,
|
||||
search: { value: searchTerm, onSearch: setSearchTerm, placeholder: t('app.volumesTab.searchVolumes', 'Search volumes…') },
|
||||
}), [searchTerm]);
|
||||
const { sorts, setSorts } = useTableSort({
|
||||
defaultSorts: [{ key: 'name', direction: 'asc' }],
|
||||
storageKey: 'serverkit-table-docker-volumes-sort',
|
||||
@@ -302,23 +310,9 @@ const VolumesTab = ({ onStatsChange }) => {
|
||||
return (
|
||||
<div className="dx-tab-pane dx-list-pane">
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadVolumes }}
|
||||
label="volumes"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
value={searchTerm}
|
||||
onSearch={setSearchTerm}
|
||||
placeholder={t('app.volumesTab.filterNameOrMountpoint', 'Filter name or mountpoint…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadVolumes} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
import { SearchField } from './SearchField';
|
||||
|
||||
// The top-bar controls of a list page, in the one order every page uses:
|
||||
//
|
||||
// [secondary …] [primary] [search]
|
||||
//
|
||||
// secondary buttons that reload or import (Sync, Import) — outline, small
|
||||
// primary the page's create button, a <PagePrimaryButton>
|
||||
// search { value, onSearch, placeholder } for the page's search box
|
||||
//
|
||||
// Nothing else belongs in the bar. Filters, fields, export and page extras
|
||||
// live in the view selector's menu (GridViewPicker `filters` / `tools` /
|
||||
// `extra`), so the create button and the search box sit in the same place on
|
||||
// every page. Publish it with useListTopbar; a page that owns its own bar
|
||||
// (PageLayout) passes <ListActions … /> as `actions`.
|
||||
export function ListActions({ secondary, primary, search }) {
|
||||
return (
|
||||
<>
|
||||
{secondary}
|
||||
{primary}
|
||||
{search && <SearchField {...search} />}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default ListActions;
|
||||
@@ -14,9 +14,9 @@ import { cn } from '@/lib/utils';
|
||||
// {/* optional extras between filters and the right group (e.g. a select) */}
|
||||
// </ListToolbar>
|
||||
//
|
||||
// Placement rule (see AGENTS.md "Page anatomy"): a table gets ONE row of chrome
|
||||
// — the GridViewPicker line — carrying search, the filter button and the "⋮",
|
||||
// either inline or hoisted into the shared topbar (useTopbarChrome). This
|
||||
// Placement rule (scripts/check-list-chrome.mjs): a table gets ONE row of
|
||||
// chrome — the GridViewPicker line. Filters, fields and the table tools are
|
||||
// entries in that selector's menu; search rides the page's top bar. This
|
||||
// toolbar is for what is left: a quick-filter segment, a scope select, a
|
||||
// checkbox. A page with none of those renders no toolbar at all.
|
||||
//
|
||||
|
||||
@@ -16,20 +16,18 @@ import { GridToolsPanel } from './GridToolsMenu';
|
||||
// /api/v1/views by useTableViews. A modified view shows an asterisk plus an
|
||||
// inline Save / Reset strip, so tweaking a built-in never silently destroys it.
|
||||
//
|
||||
// `actions` is the table's own chrome — search, the filter button and the "⋮".
|
||||
// They belong on the SAME line as the view name, and this is the ONLY row of
|
||||
// chrome a table gets. A page that owns a top bar hoists that same node up
|
||||
// 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:
|
||||
// The table's controls are folded INTO this menu, so a 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, plus search. Spread
|
||||
// `chrome.pickerProps` (useTableChrome) to get all of it:
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// `actions` is what is left for the view row itself: an inner table's own
|
||||
// search box or a scope toggle. Never a filter icon or a "⋮".
|
||||
//
|
||||
// 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,
|
||||
|
||||
@@ -21,7 +21,7 @@ const NO_FILTERS = { match: 'all', rules: [] };
|
||||
* applyPage: (p) => { setFilter(p.filter); setSearch(p.search); },
|
||||
* });
|
||||
*
|
||||
* <GridViewPicker views={chrome.views} … />
|
||||
* <GridViewPicker {...chrome.pickerProps} />
|
||||
* <GridChips {...chrome.chipProps} />
|
||||
* <DataTable {…chrome.tableProps} columns={chrome.columns} … />
|
||||
* <GridFilterDrawer {...chrome.drawerProps} />
|
||||
@@ -165,6 +165,26 @@ export function useTableChrome({
|
||||
[rows, filters, orderedColumns],
|
||||
);
|
||||
|
||||
const openDrawer = useCallback(() => setDrawerOpen(true), []);
|
||||
|
||||
// Optional fields the table is not showing: what "Filters and fields" in
|
||||
// the view selector offers to bring back.
|
||||
const hiddenFieldCount = useMemo(
|
||||
() => orderedColumns.filter((c) => c.header && hiddenKeys.includes(c.key)).length,
|
||||
[orderedColumns, hiddenKeys],
|
||||
);
|
||||
|
||||
const toolsProps = {
|
||||
cfg,
|
||||
columns: orderedColumns,
|
||||
rows,
|
||||
viewName: views.activeView?.name || noun,
|
||||
noun,
|
||||
onReset: api.resetToView,
|
||||
onCopyLink: copyLink,
|
||||
showDensity: false,
|
||||
};
|
||||
|
||||
return {
|
||||
cfg,
|
||||
api,
|
||||
@@ -206,15 +226,19 @@ export function useTableChrome({
|
||||
showRowDetail: false,
|
||||
showDensity: false,
|
||||
},
|
||||
toolsProps: {
|
||||
cfg,
|
||||
columns: orderedColumns,
|
||||
rows,
|
||||
viewName: views.activeView?.name || noun,
|
||||
noun,
|
||||
onReset: api.resetToView,
|
||||
onCopyLink: copyLink,
|
||||
showDensity: false,
|
||||
toolsProps,
|
||||
// The view selector with the table's controls folded into its menu:
|
||||
// <GridViewPicker {...chrome.pickerProps} />
|
||||
// A list table has no filter icon and no "⋮" of its own; see
|
||||
// scripts/check-list-chrome.mjs. Extend `tools` for a table that can
|
||||
// refresh or export a selection:
|
||||
// tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
pickerProps: {
|
||||
views,
|
||||
label: noun,
|
||||
onCreate: createView,
|
||||
filters: { count: filters.rules.length, hidden: hiddenFieldCount, onOpen: openDrawer },
|
||||
tools: toolsProps,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export { CatalogCard, CatalogGrid } from './CatalogCard';
|
||||
export { SortChipBar } from './SortChipBar';
|
||||
export { DataTableFooter } from './DataTableFooter';
|
||||
export { ListToolbar } from './ListToolbar';
|
||||
export { ListActions } from './ListActions';
|
||||
|
||||
// DEPRECATED toolbar menus — ZERO render sites left in the app.
|
||||
//
|
||||
|
||||
@@ -3,15 +3,13 @@ import { Search, Rows3, LayoutGrid } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { SegControl, DataTableFooter, ListToolbar } from '@/components/ds';
|
||||
import {
|
||||
GridViewPicker, GridChips, GridFilterButton, GridToolsMenu, GridFilterDrawer, GridBulkBar,
|
||||
useTableChrome,
|
||||
GridViewPicker, GridChips, GridFilterButton, GridToolsMenu, GridFilterDrawer, GridBulkBar, useTableChrome,
|
||||
} from '@/components/ds/grid';
|
||||
import EmptyState from '../EmptyState';
|
||||
import ErrorState from '../ErrorState';
|
||||
import DataTable from '@/components/ds/DataTable';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button as SharedButton } from '@/components/ui/button';
|
||||
|
||||
@@ -113,13 +111,12 @@ export default function ResourceListPage({
|
||||
error = null,
|
||||
errorTitle,
|
||||
onRetry,
|
||||
// Where the table's chrome (filter · "⋮") goes. `true` publishes it into the
|
||||
// enclosing tab group's top bar, on the same line as the page's actions and
|
||||
// search — the shape every top-level list page has. Set it false for a
|
||||
// table nested inside a page that owns that bar already (a tab's inner
|
||||
// table), and the chrome renders in the view row instead. Outside a tab
|
||||
// group it falls back to the view row on its own.
|
||||
chromeInTopbar = true,
|
||||
// DEPRECATED, ignored. It used to pick between the top bar and the view row
|
||||
// for the filter button and the "⋮". Both now live in the view selector's
|
||||
// menu, wherever the table is. Accepted because this component is SDK
|
||||
// surface; remove on the next SDK major.
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
chromeInTopbar,
|
||||
// Opt-in card view: pass a renderer and the chrome grows a list/cards
|
||||
// switch. Pages that omit it are table-only exactly as before.
|
||||
//
|
||||
@@ -247,27 +244,27 @@ export default function ResourceListPage({
|
||||
});
|
||||
|
||||
const orderedColumns = chrome.columns;
|
||||
const tableViews = chrome.views;
|
||||
|
||||
// The table's own chrome, built once and rendered in exactly ONE place:
|
||||
// hoisted into the tab group's top bar next to the page's actions, or — for
|
||||
// an inner table, or a page reused outside a tab group — in the view row.
|
||||
// It used to be a second toolbar under the view row on every page, which
|
||||
// for most of them was an otherwise empty bar holding two icons.
|
||||
const chromeNode = (
|
||||
// The table's controls. With a view selector (every core page) the filter
|
||||
// drawer and the tools are entries in its menu, so the page has no filter
|
||||
// icon and no "⋮". A table with no saved views has no selector to hold
|
||||
// them, and keeps the two icons on a bar of its own.
|
||||
const hasPicker = !!viewPageKey && view === 'list';
|
||||
const toolsProps = {
|
||||
...chrome.toolsProps,
|
||||
selectedRows: selectable && selectedIds
|
||||
? items.filter((i) => selectedIds.has(i[keyField]))
|
||||
: [],
|
||||
};
|
||||
const inlineChrome = (
|
||||
<>
|
||||
{view === 'list' && (
|
||||
{view === 'list' && !hasPicker && (
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu
|
||||
{...chrome.toolsProps}
|
||||
selectedRows={selectable && selectedIds
|
||||
? items.filter((i) => selectedIds.has(i[keyField]))
|
||||
: []}
|
||||
/>
|
||||
<GridToolsMenu {...toolsProps} />
|
||||
</>
|
||||
)}
|
||||
{renderCard && (
|
||||
@@ -290,23 +287,11 @@ export default function ResourceListPage({
|
||||
</>
|
||||
);
|
||||
|
||||
// Nothing to host while the page is empty or still loading — the chrome
|
||||
// acts on a table that isn't there.
|
||||
// A refetch over existing rows keeps the chrome (and the search box's focus).
|
||||
const hasTable = resolvedTotal > 0;
|
||||
const { hosted: chromeHoisted, portal: chromePortal } = useTopbarChrome(
|
||||
chromeNode,
|
||||
{ enabled: chromeInTopbar && hasTable },
|
||||
);
|
||||
|
||||
// Where the chrome lands when the top bar didn't take it: the view row if
|
||||
// there is one, otherwise a bar of its own.
|
||||
const hasPicker = !!viewPageKey && view === 'list';
|
||||
const inlineChrome = chromeHoisted ? null : chromeNode;
|
||||
const hasInlineChrome = !hasPicker || !!renderCard;
|
||||
|
||||
// The quick-filter segment and any page extras still need a bar of their
|
||||
// own; pages that have neither get no second row at all.
|
||||
const hasToolbar = !!filters || !!toolbarExtra || (onSearchChange && !searchInTopbar);
|
||||
const hasToolbar = !!filters || !!toolbarExtra || (onSearchChange && !searchInTopbar) || hasInlineChrome;
|
||||
|
||||
// Paged AFTER the column rules, not before. Slicing `items` meant a page
|
||||
// size of 25 took 25 unfiltered rows and THEN filtered them, so "show 25"
|
||||
@@ -328,7 +313,6 @@ export default function ResourceListPage({
|
||||
// card grid when the page opted into one.
|
||||
return (
|
||||
<div className={cn('sk-tabgroup__inner', className)}>
|
||||
{chromePortal}
|
||||
<EmptyState
|
||||
loading
|
||||
loadingVariant={renderCard && view === 'cards' ? 'cards' : 'table'}
|
||||
@@ -340,7 +324,6 @@ export default function ResourceListPage({
|
||||
|
||||
return (
|
||||
<div className={cn('sk-tabgroup__inner', className)}>
|
||||
{chromePortal}
|
||||
{header}
|
||||
{error && resolvedTotal > 0 && (
|
||||
<ErrorState compact error={errorObj} onRetry={onRetry} />
|
||||
@@ -362,19 +345,15 @@ export default function ResourceListPage({
|
||||
) : (
|
||||
<div className="wp-list">
|
||||
{/* The saved view names what you are looking at, so it is the
|
||||
page's heading rather than another toolbar button. Sort,
|
||||
Group and Columns are gone from the toolbar entirely —
|
||||
they live in each column's own "⋮" now, next to the
|
||||
page's heading rather than another toolbar button, and
|
||||
its menu holds the table's controls: filters and
|
||||
fields, copy link, export, reset. Sort, Group and
|
||||
Columns live in each column's own "⋮", next to the
|
||||
column they act on. */}
|
||||
{hasPicker && (
|
||||
<GridViewPicker
|
||||
views={tableViews}
|
||||
label={noun}
|
||||
onCreate={chrome.createView}
|
||||
actions={inlineChrome}
|
||||
/>
|
||||
<GridViewPicker {...chrome.pickerProps} tools={toolsProps} />
|
||||
)}
|
||||
{(hasToolbar || (inlineChrome && !hasPicker)) && (
|
||||
{hasToolbar && (
|
||||
<ListToolbar
|
||||
filters={filters && (
|
||||
<SegControl
|
||||
@@ -383,7 +362,7 @@ export default function ResourceListPage({
|
||||
options={filters}
|
||||
/>
|
||||
)}
|
||||
tools={hasPicker ? undefined : inlineChrome}
|
||||
tools={hasInlineChrome ? inlineChrome : undefined}
|
||||
>
|
||||
{onSearchChange && !searchInTopbar && (
|
||||
<div className="wp-list__search">
|
||||
|
||||
@@ -5,14 +5,15 @@ import {
|
||||
} from 'lucide-react';
|
||||
import api from '../../services/api';
|
||||
import { formatBytes } from '@/utils/formatBytes';
|
||||
import { AreaChart, KpiBand, MetricCard, Pill, Sparkline } from '@/components/ds';
|
||||
import { AreaChart, MetricCard, Pill, Sparkline } from '@/components/ds';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Skeleton } from '../Skeleton';
|
||||
import MonitorsSummary from './MonitorsSummary';
|
||||
import { LiveChecks, MonitorKpi, MonitorsList, MonitorsNotice } 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';
|
||||
import { translateLabel } from '@/i18n/labels';
|
||||
import { formatDateTime } from '@/utils/intl';
|
||||
|
||||
const PERIODS = ['1h', '6h', '24h', '7d'];
|
||||
@@ -49,6 +50,27 @@ function last(series) {
|
||||
// Dashboard widget types the Monitoring overview can carry besides its blocks.
|
||||
const MONITORING_WIDGET_TYPES = ['stat', 'gauge', 'timeseries', 'specs', 'note'];
|
||||
|
||||
// Board rows a KPI tile takes: enough for value, label, a sub line and the
|
||||
// sparkline under them.
|
||||
const KPI_TILE_ROWS = 3;
|
||||
|
||||
const MONITOR_KPI_BLOCKS = [
|
||||
{ metric: 'availability', labelKey: 'app.monitorsSummary.availability30d', label: 'Availability (30d)' },
|
||||
{ metric: 'response', labelKey: 'app.monitorsSummary.avgResponse', label: 'Avg response' },
|
||||
{ metric: 'down', labelKey: 'app.monitorsSummary.monitorsDown', label: 'Monitors down' },
|
||||
{ metric: 'degraded', labelKey: 'app.monitorsSummary.degraded', label: 'Degraded' },
|
||||
];
|
||||
|
||||
// Board rows for the "nothing is watched yet" notice: a line and a button.
|
||||
const NOTICE_ROWS = 3;
|
||||
|
||||
// Board rows for the monitor list and the live check feed: five rows of each
|
||||
// without scrolling.
|
||||
const LIST_BLOCK_ROWS = 9;
|
||||
|
||||
// Block ids for the four host readings, in tile order.
|
||||
const HOST_TILE_IDS = ['host-cpu', 'host-memory', 'host-disk', 'host-extra'];
|
||||
|
||||
export default function MonitoringOverview({
|
||||
scope, isHost, scopeLabel, status, activeAlerts = [],
|
||||
speedTest, speedTestRunning, onRunSpeedTest,
|
||||
@@ -209,28 +231,50 @@ export default function MonitoringOverview({
|
||||
{/* 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. */}
|
||||
<OverviewSection id="monitors" title={t('app.monitoringOverview.monitors', 'Monitors')} w={12} h={9}>
|
||||
<MonitorsSummary summary={monitorsSummary} />
|
||||
{/* Only renders while nothing is watched (or the list failed to
|
||||
load), so it leaves the layout once a monitor exists. */}
|
||||
<OverviewSection id="monitor-notice" title={t('app.monitoringOverview.monitors', 'Monitors')} replaces="monitors" w={12} h={NOTICE_ROWS}>
|
||||
<MonitorsNotice 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. */}
|
||||
<KpiBand max={4}>
|
||||
{tiles.map((tile) => {
|
||||
const numeric = Number(tile.value);
|
||||
const alerting = tile.limit != null && !Number.isNaN(numeric) && numeric > tile.limit;
|
||||
const trend = trendOf(tile.spark);
|
||||
return (
|
||||
{MONITOR_KPI_BLOCKS.map((block) => (
|
||||
<OverviewSection key={block.metric} id={`monitor-${block.metric}`} title={translateLabel(t, block)} tile replaces="monitors" w={3} h={KPI_TILE_ROWS}>
|
||||
<MonitorKpi summary={monitorsSummary} metric={block.metric} />
|
||||
</OverviewSection>
|
||||
))}
|
||||
|
||||
<OverviewSection id="monitor-list" title={t('app.monitoringOverview.monitors', 'Monitors')} replaces="monitors" w={6} h={LIST_BLOCK_ROWS}>
|
||||
<MonitorsList summary={monitorsSummary} />
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="monitor-checks" title={t('app.monitorsSummary.liveChecks', 'Live checks')} replaces="monitors" w={6} h={LIST_BLOCK_ROWS}>
|
||||
<LiveChecks summary={monitorsSummary} />
|
||||
</OverviewSection>
|
||||
|
||||
{/* One block per reading, each the shared DS tile. The fourth
|
||||
slot is the scope's own question (load on the host, containers
|
||||
on an agent), so it keeps one id whichever it shows. */}
|
||||
{tiles.map((tile, index) => {
|
||||
const numeric = Number(tile.value);
|
||||
const alerting = tile.limit != null && !Number.isNaN(numeric) && numeric > tile.limit;
|
||||
const trend = trendOf(tile.spark);
|
||||
return (
|
||||
<OverviewSection
|
||||
key={HOST_TILE_IDS[index]}
|
||||
id={HOST_TILE_IDS[index]}
|
||||
title={translateLabel(t, tile)}
|
||||
tile
|
||||
replaces="health"
|
||||
w={3}
|
||||
h={KPI_TILE_ROWS}
|
||||
>
|
||||
<MetricCard
|
||||
key={tile.key}
|
||||
tone={alerting ? 'amber' : TILE_TONE[tile.tone]}
|
||||
className={alerting ? 'is-alerting' : undefined}
|
||||
icon={<tile.icon size={16} />}
|
||||
value={tile.value}
|
||||
unit={tile.unit || undefined}
|
||||
label={tile.label}
|
||||
label={translateLabel(t, tile)}
|
||||
trend={trend == null ? undefined : (
|
||||
<>
|
||||
{trend > 0 ? <ArrowUp size={11} /> : <ArrowDown size={11} />}
|
||||
@@ -264,10 +308,9 @@ export default function MonitoringOverview({
|
||||
</Button>
|
||||
)}
|
||||
</MetricCard>
|
||||
);
|
||||
})}
|
||||
</KpiBand>
|
||||
</OverviewSection>
|
||||
</OverviewSection>
|
||||
);
|
||||
})}
|
||||
|
||||
<OverviewSection id="processor" title={t('app.monitoringOverview.processor', 'Processor')} w={6} h={7}>
|
||||
<section className="monitoring-panel">
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
// The monitor half of the Monitoring overview: availability KPIs, the live
|
||||
// check feed and the monitor table.
|
||||
// The monitor half of the Monitoring overview, as separate board blocks: one
|
||||
// tile per availability KPI, the monitor list and the live check feed. Each is
|
||||
// its own <OverviewSection>, so it can be moved, resized or removed on its own.
|
||||
//
|
||||
// This is what the page was missing — everything else on Overview describes the
|
||||
// machines ServerKit runs on, and nothing described the things it is supposed to
|
||||
// be watching. Host health stays below; this sits above it because "is the site
|
||||
// up" is the question the page is actually for.
|
||||
// Everything else on Overview describes the machines ServerKit runs on; these
|
||||
// sit above it because "is the site up" is the question the page is for.
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import { Activity, Plus, Radar, ShieldAlert, Timer, Zap } from 'lucide-react';
|
||||
import { AreaChart, KpiBand, MetricCard, Pill } from '@/components/ds';
|
||||
import { AreaChart, MetricCard, Pill } from '@/components/ds';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { monitorStateOf } from './monitorShared';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -25,41 +24,41 @@ function relativeTime(iso) {
|
||||
return `${Math.floor(seconds / 3600)}h ago`;
|
||||
}
|
||||
|
||||
export default function MonitorsSummary({ summary }) {
|
||||
// One availability KPI: `metric` is availability | response | down | degraded.
|
||||
// Renders nothing while no monitor exists, so its block leaves the layout.
|
||||
|
||||
export function MonitorKpi({ summary, metric }) {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const { monitors, stats, feed, loadError, load } = summary;
|
||||
const { monitors, stats } = summary;
|
||||
if (!monitors.length) return null;
|
||||
const open = () => navigate('/monitoring/monitors');
|
||||
|
||||
// A failed fetch with nothing loaded is not "nothing is being watched".
|
||||
if (loadError && !monitors.length) {
|
||||
if (metric === 'availability') {
|
||||
return (
|
||||
<section className="monitoring-panel mon-nomonitors">
|
||||
<ErrorState
|
||||
compact
|
||||
title={t('app.monitorsSummary.couldntLoadMonitors', "Couldn't load monitors.")}
|
||||
error={loadError}
|
||||
onRetry={load}
|
||||
/>
|
||||
</section>
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.availability30d', 'Availability (30d)')} tone="green" icon={<Activity size={17} />}
|
||||
value={stats?.overall_uptime_30d != null ? `${stats.overall_uptime_30d}%` : '—'}
|
||||
onClick={open}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (!monitors.length) {
|
||||
if (metric === 'down') {
|
||||
return (
|
||||
<section className="monitoring-panel mon-nomonitors">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
<h3>{t('app.monitorsSummary.monitors', 'Monitors')}</h3>
|
||||
<span className="mon-panel-sub">{t('app.monitorsSummary.nothingIsBeingWatchedYet', 'Nothing is being watched yet')}</span>
|
||||
</div>
|
||||
<Button size="sm" onClick={() => navigate('/monitoring/monitors')}>
|
||||
<Plus size={14} /> {t('app.monitorsSummary.addMonitor', 'New monitor')}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="mon-panel-hint">
|
||||
{t('app.monitorsSummary.everythingBelowDescribesTheMachinesServerkitShort', 'Below: the servers ServerKit runs on.')} <InfoTip>{t('app.monitorsSummary.everythingBelowDescribesTheMachinesServerkit', 'Everything below describes the servers ServerKit runs on. Add a monitor to watch a website, an API endpoint, a database port or a WordPress site and get an incident when it stops answering.')}</InfoTip>
|
||||
</p>
|
||||
</section>
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.monitorsDown', 'Monitors down')} tone={stats?.down ? 'red' : 'green'} icon={<ShieldAlert size={17} />}
|
||||
value={stats?.down ?? 0}
|
||||
onClick={open}
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (metric === 'degraded') {
|
||||
return (
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.degraded', 'Degraded')} tone="amber" icon={<Timer size={17} />}
|
||||
value={stats?.degraded ?? 0}
|
||||
onClick={open}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -77,109 +76,147 @@ export default function MonitorsSummary({ summary }) {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="mon-monitors-summary">
|
||||
<KpiBand max={4}>
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.availability30d', 'Availability (30d)')} tone="green" icon={<Activity size={17} />}
|
||||
value={stats?.overall_uptime_30d != null ? `${stats.overall_uptime_30d}%` : '—'}
|
||||
onClick={() => navigate('/monitoring/monitors')}
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.avgResponse', 'Avg response')} tone="cyan" icon={<Zap size={17} />}
|
||||
value={avgResponse ?? '—'} unit={avgResponse != null ? 'ms' : undefined}
|
||||
spark={leadSpark?.spark?.length > 1 ? (
|
||||
<AreaChart series={[leadSpark.spark]} colors={['var(--cyan)']} height={34} grid={false} />
|
||||
) : undefined}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// What the monitor blocks say when there is nothing to list: no monitor exists
|
||||
// yet, or the request failed. Its own short block, so an empty page is one
|
||||
// line and a button rather than a tall empty list.
|
||||
export function MonitorsNotice({ summary }) {
|
||||
const { t } = useTranslation();
|
||||
const navigate = useNavigate();
|
||||
const { monitors, loadError, load } = summary;
|
||||
if (monitors.length) return null;
|
||||
|
||||
// A failed fetch with nothing loaded is not "nothing is being watched".
|
||||
if (loadError) {
|
||||
return (
|
||||
<section className="monitoring-panel mon-nomonitors">
|
||||
<ErrorState
|
||||
compact
|
||||
title={t('app.monitorsSummary.couldntLoadMonitors', "Couldn't load monitors.")}
|
||||
error={loadError}
|
||||
onRetry={load}
|
||||
/>
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.avgResponse', 'Avg response')} tone="cyan" icon={<Zap size={17} />}
|
||||
value={avgResponse ?? '—'} unit={avgResponse != null ? 'ms' : undefined}
|
||||
spark={leadSpark?.spark?.length > 1 ? (
|
||||
<AreaChart series={[leadSpark.spark]} colors={['var(--cyan)']} height={34} grid={false} />
|
||||
) : undefined}
|
||||
/>
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.monitorsDown', 'Monitors down')} tone={stats?.down ? 'red' : 'green'} icon={<ShieldAlert size={17} />}
|
||||
value={stats?.down ?? 0}
|
||||
onClick={() => navigate('/monitoring/monitors')}
|
||||
/>
|
||||
<MetricCard
|
||||
label={t('app.monitorsSummary.degraded', 'Degraded')} tone="amber" icon={<Timer size={17} />}
|
||||
value={stats?.degraded ?? 0}
|
||||
onClick={() => navigate('/monitoring/monitors')}
|
||||
/>
|
||||
</KpiBand>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="monitoring-panel mon-nomonitors">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
<h3>{t('app.monitorsSummary.monitors', 'Monitors')}</h3>
|
||||
<span className="mon-panel-sub">{t('app.monitorsSummary.nothingIsBeingWatchedYet', 'Nothing is being watched yet')}</span>
|
||||
</div>
|
||||
<Button size="sm" onClick={() => navigate('/monitoring/monitors')}>
|
||||
<Plus size={14} /> {t('app.monitorsSummary.addMonitor', 'New monitor')}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="mon-panel-hint">
|
||||
{t('app.monitorsSummary.everythingBelowDescribesTheMachinesServerkitShort', 'Below: the servers ServerKit runs on.')} <InfoTip>{t('app.monitorsSummary.everythingBelowDescribesTheMachinesServerkit', 'Everything below describes the servers ServerKit runs on. Add a monitor to watch a website, an API endpoint, a database port or a WordPress site and get an incident when it stops answering.')}</InfoTip>
|
||||
</p>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
// The watched monitors.
|
||||
export function MonitorsList({ summary }) {
|
||||
const { t } = useTranslation();
|
||||
const { monitors } = summary;
|
||||
if (!monitors.length) return null;
|
||||
|
||||
return (
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
<h3>{t('app.monitorsSummary.monitors', 'Monitors')}</h3>
|
||||
<span className="mon-panel-sub">{monitors.length} watched</span>
|
||||
</div>
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link to="/monitoring/monitors"><Radar size={14} /> {t('app.monitorsSummary.manage', 'Manage')}</Link>
|
||||
</Button>
|
||||
</div>
|
||||
<div className="mon-monitor-list">
|
||||
{monitors.slice(0, 8).map((monitor) => {
|
||||
const state = monitorStateOf(monitor);
|
||||
return (
|
||||
<Link
|
||||
key={monitor.id}
|
||||
className="mon-monitor-row"
|
||||
to={`/monitoring/monitors/${monitor.id}`}
|
||||
>
|
||||
<span className="mon-monitor-row__body">
|
||||
<span className="mon-monitor-row__name">{monitor.name}</span>
|
||||
<span className="mon-monitor-row__sub">
|
||||
{monitor.check_type} · {monitor.check_target || t('app.monitorsSummary.boundSite', 'bound site')}
|
||||
</span>
|
||||
</span>
|
||||
<span className="mon-monitor-row__ms">
|
||||
{monitor.last_response_time == null ? '—' : `${monitor.last_response_time} ms`}
|
||||
</span>
|
||||
<Pill kind={state.tone}>{state.label}</Pill>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
<div className="mon-grid2">
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
<h3>{t('app.monitorsSummary.monitors', 'Monitors')}</h3>
|
||||
<span className="mon-panel-sub">{monitors.length} watched</span>
|
||||
</div>
|
||||
<Button variant="outline" size="sm" asChild>
|
||||
<Link to="/monitoring/monitors"><Radar size={14} /> {t('app.monitorsSummary.manage', 'Manage')}</Link>
|
||||
</Button>
|
||||
</div>
|
||||
<div className="mon-monitor-list">
|
||||
{monitors.slice(0, 8).map((monitor) => {
|
||||
const state = monitorStateOf(monitor);
|
||||
return (
|
||||
<Link
|
||||
key={monitor.id}
|
||||
className="mon-monitor-row"
|
||||
to={`/monitoring/monitors/${monitor.id}`}
|
||||
>
|
||||
<span className="mon-monitor-row__body">
|
||||
<span className="mon-monitor-row__name">{monitor.name}</span>
|
||||
<span className="mon-monitor-row__sub">
|
||||
{monitor.check_type} · {monitor.check_target || t('app.monitorsSummary.boundSite', 'bound site')}
|
||||
</span>
|
||||
</span>
|
||||
<span className="mon-monitor-row__ms">
|
||||
{monitor.last_response_time == null ? '—' : `${monitor.last_response_time} ms`}
|
||||
</span>
|
||||
<Pill kind={state.tone}>{state.label}</Pill>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</section>
|
||||
// The most recent check results across every monitor.
|
||||
export function LiveChecks({ summary }) {
|
||||
const { t } = useTranslation();
|
||||
const { monitors, feed } = summary;
|
||||
if (!monitors.length) return null;
|
||||
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
<h3>{t('app.monitorsSummary.liveChecks', 'Live checks')}</h3>
|
||||
<span className="mon-panel-sub">{t('app.monitorsSummary.mostRecentResults', 'Most recent results')}</span>
|
||||
</div>
|
||||
</div>
|
||||
{feed.length === 0 ? (
|
||||
<p className="mon-panel-hint">
|
||||
{t('app.monitorsSummary.noChecksRecordedYetTheScheduler', "No checks recorded yet. The scheduler polls on each monitor's interval.")}
|
||||
</p>
|
||||
) : (
|
||||
<div className="mon-feed">
|
||||
{feed.map((monitor) => {
|
||||
const state = monitorStateOf(monitor);
|
||||
const ok = state.key === 'up';
|
||||
return (
|
||||
<Link
|
||||
key={monitor.id}
|
||||
className="mon-feed-row"
|
||||
to={`/monitoring/monitors/${monitor.id}`}
|
||||
>
|
||||
<span className={`mon-code mon-code--${ok ? 'ok' : 'bad'}`}>
|
||||
{ok ? 'ok' : state.label.toLowerCase()}
|
||||
</span>
|
||||
<span className="mon-feed-row__body">
|
||||
<span className="mon-feed-row__name">{monitor.name}</span>
|
||||
<span className="mon-feed-row__sub">
|
||||
{relativeTime(monitor.last_check_at)}
|
||||
</span>
|
||||
</span>
|
||||
<span className="mon-feed-row__ms">
|
||||
{monitor.last_response_time == null ? 'fail' : `${monitor.last_response_time}ms`}
|
||||
</span>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
return (
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
<h3>{t('app.monitorsSummary.liveChecks', 'Live checks')}</h3>
|
||||
<span className="mon-panel-sub">{t('app.monitorsSummary.mostRecentResults', 'Most recent results')}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{feed.length === 0 ? (
|
||||
<p className="mon-panel-hint">
|
||||
{t('app.monitorsSummary.noChecksRecordedYetTheScheduler', "No checks recorded yet. The scheduler polls on each monitor's interval.")}
|
||||
</p>
|
||||
) : (
|
||||
<div className="mon-feed">
|
||||
{feed.map((monitor) => {
|
||||
const state = monitorStateOf(monitor);
|
||||
const ok = state.key === 'up';
|
||||
return (
|
||||
<Link
|
||||
key={monitor.id}
|
||||
className="mon-feed-row"
|
||||
to={`/monitoring/monitors/${monitor.id}`}
|
||||
>
|
||||
<span className={`mon-code mon-code--${ok ? 'ok' : 'bad'}`}>
|
||||
{ok ? 'ok' : state.label.toLowerCase()}
|
||||
</span>
|
||||
<span className="mon-feed-row__body">
|
||||
<span className="mon-feed-row__name">{monitor.name}</span>
|
||||
<span className="mon-feed-row__sub">
|
||||
{relativeTime(monitor.last_check_at)}
|
||||
</span>
|
||||
</span>
|
||||
<span className="mon-feed-row__ms">
|
||||
{monitor.last_response_time == null ? 'fail' : `${monitor.last_response_time}ms`}
|
||||
</span>
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -14,8 +14,7 @@ import { Label } from '@/components/ui/label';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import { DataTable, DataTableFooter, ListToolbar, Pill, SegControl } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer, applyFilters,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer, applyFilters,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -552,18 +551,9 @@ const FirewallTab = () => {
|
||||
"Firewall Rules" <h3> would title the same table
|
||||
twice, and the segment above already says Rules. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadData }}
|
||||
label="rules"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadData} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
{/* The toolbar survives only because Add Rule needs a
|
||||
home: this tab is nested, so there is no top bar
|
||||
|
||||
@@ -10,8 +10,7 @@ import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer, applyFilters,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer, applyFilters,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -264,20 +263,11 @@ const IPListsTab = () => {
|
||||
is inside that name, since the pair sits side by side and
|
||||
used to be told apart by this line alone. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadLists }}
|
||||
label={listType === 'allowlist'
|
||||
? t('app.iPListsTab.allowlistEntries', 'Allowlist entries')
|
||||
: t('app.iPListsTab.blocklistEntries', 'Blocklist entries')}
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadLists} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
<div className="sec-tableactions">
|
||||
<Button variant="default" size="sm" onClick={() => setShowAddModal(listType)}>
|
||||
|
||||
@@ -6,8 +6,7 @@ import EmptyState from '@/components/EmptyState';
|
||||
import ErrorState from '@/components/ErrorState';
|
||||
import { DataTable, DataTableFooter, ListToolbar } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer, applyFilters,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer, applyFilters,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -380,18 +379,9 @@ const IntegrityTab = () => {
|
||||
{isOpen && (
|
||||
<>
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="changes"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
<GridChips {...chrome.chipProps} />
|
||||
</>
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Link } from 'react-router-dom';
|
||||
import api from '../../services/api';
|
||||
import { useContributions } from '@/plugins/contributions';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Pill, ScoreGauge, KpiBand, MetricCard } from '@/components/ds';
|
||||
import { Pill, ScoreGauge, MetricCard } from '@/components/ds';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import useMediaQuery from '../../hooks/useMediaQuery';
|
||||
import {
|
||||
@@ -18,14 +18,20 @@ import {
|
||||
Radar,
|
||||
Puzzle,
|
||||
Bell,
|
||||
ListChecks,
|
||||
} from 'lucide-react';
|
||||
import InfoTip from '@/components/InfoTip';
|
||||
import { Card as SharedCard, CardHeader as SharedCardHeader, CardContent as SharedCardContent } from '@/components/ui/card';
|
||||
import { translateLabel } from '@/i18n/labels';
|
||||
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
|
||||
|
||||
// Status glyph per check state — paired with the label so state never relies on
|
||||
// color alone (color-blind operators), per the product a11y bar.
|
||||
const STATE_ICON = { pass: CheckCircle2, warn: AlertTriangle, unknown: Circle };
|
||||
|
||||
// Board rows: a KPI tile (the score block shares the row), and the checks list.
|
||||
const KPI_TILE_ROWS = 3;
|
||||
const CHECKS_ROWS = 6;
|
||||
|
||||
const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
|
||||
const { t } = useTranslation();
|
||||
const phone = useMediaQuery('(max-width: 640px)'); // = $breakpoint-sm
|
||||
@@ -127,14 +133,10 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
|
||||
<div className="security-overview">
|
||||
{error && <div className="alert alert-danger">{error}</div>}
|
||||
|
||||
<SharedCard variant="legacy" className="card sec-posture-card">
|
||||
<SharedCardHeader variant="legacy" className="card-header">
|
||||
<h3><ShieldCheck size={13} /> {t('app.overviewTab.securityPosture', 'Security posture')}</h3>
|
||||
<Button variant="outline" size="sm" onClick={() => runFix('recheck', async () => {})} disabled={busy}>
|
||||
<RefreshCw size={13} className={busyKey === 'recheck' ? 'sec-spin' : undefined} /> {t('app.overviewTab.reCheck', 'Re-check')}
|
||||
</Button>
|
||||
</SharedCardHeader>
|
||||
<SharedCardContent variant="legacy" className="card-body">
|
||||
{/* The posture as separate board blocks: the score, one tile per
|
||||
live count, then the checks behind the score. */}
|
||||
<OverviewBoard kind="security">
|
||||
<OverviewSection id="posture" title={t('app.overviewTab.securityPosture', 'Security posture')} icon={ShieldCheck} tile w={6} h={KPI_TILE_ROWS}>
|
||||
<div className="sec-posture__top">
|
||||
{score !== null ? (
|
||||
<ScoreGauge value={score} size={phone ? 72 : 104} stroke={phone ? 7 : 9} color={scoreColor} label="posture" />
|
||||
@@ -144,7 +146,6 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
|
||||
<span>{t('app.overviewTab.computing', 'Computing…')}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="sec-posture__summary">
|
||||
<p className="sec-posture__verdict">
|
||||
{score === null
|
||||
@@ -157,23 +158,24 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
|
||||
defaultValue_other: '{{count}} checks need attention.',
|
||||
})}
|
||||
</p>
|
||||
<KpiBand dense className="sec-posture__kpis">
|
||||
{kpis.map((k) => {
|
||||
const Icon = k.icon;
|
||||
return (
|
||||
<MetricCard
|
||||
key={k.key}
|
||||
icon={<Icon size={16} />}
|
||||
tone={k.tone}
|
||||
value={k.value}
|
||||
label={k.label}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</KpiBand>
|
||||
<Button variant="outline" size="sm" onClick={() => runFix('recheck', async () => {})} disabled={busy}>
|
||||
<RefreshCw size={13} className={busyKey === 'recheck' ? 'sec-spin' : undefined} /> {t('app.overviewTab.reCheck', 'Re-check')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</OverviewSection>
|
||||
|
||||
{kpis.map((k) => {
|
||||
const Icon = k.icon;
|
||||
const label = translateLabel(t, k);
|
||||
return (
|
||||
<OverviewSection key={k.key} id={`kpi-${k.key}`} title={label} tile w={2} h={KPI_TILE_ROWS}>
|
||||
<MetricCard icon={<Icon size={16} />} tone={k.tone} value={k.value} label={label} />
|
||||
</OverviewSection>
|
||||
);
|
||||
})}
|
||||
|
||||
<OverviewSection id="checks" title={t('app.overviewTab.hardeningChecks', 'Hardening checks')} icon={ListChecks} w={12} h={CHECKS_ROWS}>
|
||||
<div className="sec-posture__checks">
|
||||
{checks.map((c) => {
|
||||
const Icon = STATE_ICON[c.state];
|
||||
@@ -217,8 +219,8 @@ const OverviewTab = ({ status, onRefresh, onNavigateTab }) => {
|
||||
</Link>
|
||||
<InfoTip subject={t('app.overviewTab.notificationsLink', 'Notifications')}>{t('app.overviewTab.addAlertDeliveryChannelsDiscordSlack', 'Add alert delivery channels (Discord, Slack, Telegram) in Settings → Notifications.')}</InfoTip>
|
||||
</div>
|
||||
</SharedCardContent>
|
||||
</SharedCard>
|
||||
</OverviewSection>
|
||||
</OverviewBoard>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -12,8 +12,7 @@ import { Textarea } from '@/components/ui/textarea';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { DataTable, DataTableFooter, ListToolbar } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer, applyFilters,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer, applyFilters,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -212,18 +211,9 @@ const SSHKeysTab = () => {
|
||||
because it acts on the file, not on what you are looking at.
|
||||
Refresh is gone from it — it is in the "⋮". */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadKeys }}
|
||||
label="keys"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadKeys} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
<ListToolbar>
|
||||
<Button variant="default" size="sm" onClick={() => setShowAddModal(true)}>
|
||||
|
||||
@@ -7,8 +7,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { DataTable, DataTableFooter, Pill } from '../ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -21,8 +20,7 @@ import DomainField from '@/components/DomainField';
|
||||
import { rooms } from '@/constants/events';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
OfflineIcon,
|
||||
TrashIcon,
|
||||
OfflineIcon, TrashIcon,
|
||||
} from './serverDetailShared';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { formatDateTime } from '@/utils/intl';
|
||||
@@ -463,18 +461,9 @@ const CloudflaredTab = ({ serverId, serverStatus }) => {
|
||||
the filter button and "⋮" ride it rather than a
|
||||
second bar that would hold nothing else. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadTunnels }}
|
||||
label="tunnels"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadTunnels} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -8,8 +8,7 @@ import { Input } from '@/components/ui/input';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
import { DataTable, DataTableFooter, Pill } from '../ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -20,17 +19,10 @@ import Modal from '@/components/Modal';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import {
|
||||
OfflineIcon,
|
||||
StopIcon,
|
||||
PlayIcon,
|
||||
TrashIcon,
|
||||
OfflineIcon, StopIcon, PlayIcon, TrashIcon,
|
||||
} from './serverDetailShared';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
|
||||
@@ -353,18 +345,9 @@ const CronTab = ({ serverId, serverStatus }) => {
|
||||
filter button and "⋮" ride it rather than a second bar
|
||||
that would hold nothing else. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadJobs }}
|
||||
label="jobs"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadJobs} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { serverStatusKind } from './serverDetailData';
|
||||
import { Pill, KpiBand, MetricCard, Gauge } from '../ds';
|
||||
import { Pill, MetricCard, Gauge } from '../ds';
|
||||
import OnboardingWizard from '../server/OnboardingWizard';
|
||||
import SystemStatusCard from './SystemStatusCard';
|
||||
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
|
||||
@@ -46,6 +46,8 @@ const SERVER_LEADING_WIDGETS = [
|
||||
// Usage thresholds for the CPU / memory / disk tiles.
|
||||
const USAGE_DANGER_PERCENT = 85;
|
||||
const USAGE_WARN_PERCENT = 70;
|
||||
// Board rows a KPI tile takes: value, label, a meter and its sub line.
|
||||
const KPI_TILE_ROWS = 3;
|
||||
|
||||
// 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.
|
||||
@@ -136,47 +138,53 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) =>
|
||||
)}
|
||||
</OverviewSection>
|
||||
|
||||
{/* 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>
|
||||
{/* The agent's live readings (no history needed), one tile
|
||||
each. Offered in the block library; the default layout
|
||||
opens with the dashboard's metric widgets instead. */}
|
||||
<OverviewSection id="live-status" title={t('common.labels.status', 'Status')} tile replaces="live" w={3} h={KPI_TILE_ROWS} placed={false}>
|
||||
<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')}
|
||||
/>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="live-uptime" title={t('common.labels.uptime', 'Uptime')} tile replaces="live" w={3} h={KPI_TILE_ROWS} placed={false}>
|
||||
<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>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="live-cpu" title="CPU" tile replaces="live" w={3} h={KPI_TILE_ROWS} placed={false}>
|
||||
<UsageTile
|
||||
icon={<CpuIcon />}
|
||||
label="CPU"
|
||||
percent={isOnline ? metrics?.cpu_percent : null}
|
||||
color="var(--accent-bright)"
|
||||
sub={cpuCores ? `${cpuCores} cores` : null}
|
||||
/>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="live-memory" title={t('common.labels.memory', 'Memory')} tile replaces="live" w={3} h={KPI_TILE_ROWS} placed={false}>
|
||||
<UsageTile
|
||||
icon={<MemoryIcon />}
|
||||
label={t('common.labels.memory', 'Memory')}
|
||||
percent={isOnline ? metrics?.memory_percent : null}
|
||||
color="var(--cyan)"
|
||||
sub={totalMemory ? formatBytes(totalMemory) : null}
|
||||
/>
|
||||
</OverviewSection>
|
||||
<OverviewSection id="live-disk" title={t('common.labels.disk', 'Disk')} tile replaces="live" w={3} h={KPI_TILE_ROWS} placed={false}>
|
||||
<UsageTile
|
||||
icon={<DiskIcon />}
|
||||
label={t('common.labels.disk', 'Disk')}
|
||||
percent={isOnline ? metrics?.disk_percent : null}
|
||||
color="var(--green)"
|
||||
sub={totalDisk ? formatBytes(totalDisk) : null}
|
||||
/>
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="info" title={t('app.serverOverviewTab.serverInformation', 'Server information')} icon={ServerGlyph} w={4} h={6}>
|
||||
|
||||
@@ -5,8 +5,7 @@ import { useConfirm } from '@/hooks/useConfirm';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Pill, Drawer, DataTable, DataTableFooter, ListToolbar, SearchField, serviceStatusKind } from '../ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -417,9 +416,9 @@ const ServicesTab = ({ serverId = null, serverStatus = 'online' }) => {
|
||||
keeps only what belongs to systemd rather than to the table —
|
||||
and not Refresh, which is "Refresh data" in the "⋮". */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadUnits }}
|
||||
label="units"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -427,11 +426,6 @@ const ServicesTab = ({ serverId = null, serverStatus = 'online' }) => {
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.servicesTab.filterByUnitName', 'Filter by unit name…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadUnits} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -3,8 +3,7 @@ import { History } from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { DataTable, DataTableFooter, Drawer, Pill, SearchField, statusKind, envActionKind } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -332,9 +331,9 @@ const EventsTab = ({ appId }) => {
|
||||
than being hoisted (see useTopbarChrome). Refresh is not
|
||||
repeated as a button — it is in the "⋮". */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: refresh }}
|
||||
label="events"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -342,11 +341,6 @@ const EventsTab = ({ appId }) => {
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.eventsTab.searchActivity', 'Search activity…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={refresh} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -5,8 +5,7 @@ import useSettingFocus from '../../hooks/useSettingFocus';
|
||||
import ApiKeyModal from './ApiKeyModal';
|
||||
import WebhookSubscriptionModal from './WebhookSubscriptionModal';
|
||||
import {
|
||||
Key, Plus, Trash2, RotateCcw, Activity, AlertCircle,
|
||||
Check, Send, ChevronDown, ChevronUp, Zap, BarChart3, RefreshCw
|
||||
Key, Plus, Trash2, RotateCcw, Activity, AlertCircle, Check, Send, ChevronDown, ChevronUp, Zap, BarChart3, RefreshCw,
|
||||
} from 'lucide-react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
@@ -15,8 +14,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
import { Pill } from '@/components/ds/Pill';
|
||||
import { DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -314,19 +312,14 @@ const ApiKeysSection = () => {
|
||||
return (
|
||||
<div {...register('api-keys', 'settings-card')}>
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadKeys }}
|
||||
label="keys"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<Button variant="default" size="sm" onClick={() => setShowModal(true)}>
|
||||
<Plus size={14} /> {t('app.apiSettingsTab.createKey', 'New key')}
|
||||
</Button>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadKeys} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -5,8 +5,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { DataTable } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -298,9 +297,9 @@ const InvitationsTab = () => {
|
||||
{/* The view name replaces the old "Invitations" h4: it names the
|
||||
section AND says which slice of it you are looking at. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadInvitations }}
|
||||
label="invitations"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
{/* Same shape as the users table above it — the two sit
|
||||
@@ -315,11 +314,6 @@ const InvitationsTab = () => {
|
||||
</svg>
|
||||
{t('app.invitationsTab.inviteUser', 'Invite user')}
|
||||
</Button>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadInvitations} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -4,8 +4,7 @@ import { Database, Loader, CheckCircle, ArrowUpCircle, ShieldCheck } from 'lucid
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { DataTable } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -314,18 +313,9 @@ const MigrationHistoryTab = () => {
|
||||
banner as well as the table, so the picker sits with
|
||||
the table it actually belongs to. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="migrations"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -8,8 +8,7 @@ import EmptyState from '@/components/EmptyState';
|
||||
import ErrorState from '@/components/ErrorState';
|
||||
import { Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -253,18 +252,9 @@ export default function RecycleBinTab() {
|
||||
<>
|
||||
{loadError && <ErrorState compact error={loadError} onRetry={load} />}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="items"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -10,8 +10,7 @@ import { Button } from '@/components/ui/button';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { DataTable } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -426,9 +425,9 @@ const UsersTab = () => {
|
||||
what the tab strip already said, and stacking it above the
|
||||
picker would have been two titles for one table. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadUsers }}
|
||||
label="users"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
{/* Add User rides the chrome line rather than a bar of
|
||||
@@ -442,11 +441,6 @@ const UsersTab = () => {
|
||||
</svg>
|
||||
{t('app.usersTab.addUser', 'New user')}
|
||||
</Button>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadUsers} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -2,8 +2,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { Box, Globe, Plus } from 'lucide-react';
|
||||
import { ServiceTile, Pill, DataTable, DataTableFooter, serviceStatusKind } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -128,18 +127,8 @@ const WorkspaceApplicationsTab = ({ kind, wsId, rows, appsOut, onMoveApp, onShar
|
||||
{/* Inline chrome, not hoisted: this is a tab inside a detail page
|
||||
that already owns the top bar, so hoisting would hijack it. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
label={kind}
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Plus } from 'lucide-react';
|
||||
import { ServiceTile, Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -120,18 +119,8 @@ const WorkspaceMembersTab = ({ members, allUsers, onAddMember, onRemoveMember, l
|
||||
{/* Inline chrome, not hoisted: this is a tab inside a detail page
|
||||
that already owns the top bar, so hoisting would hijack it. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
label="members"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,31 +1,40 @@
|
||||
import { KpiBand, MetricCard } from '@/components/ds';
|
||||
import { MetricCard } from '@/components/ds';
|
||||
import { Server, Boxes, Globe, Users } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { InfoList, InfoItem } from '../InfoList';
|
||||
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
|
||||
|
||||
// Board rows a KPI tile takes: a count and its label.
|
||||
const KPI_TILE_ROWS = 2;
|
||||
|
||||
// The workspace's Overview tab on the overview board: its facts, then one tile
|
||||
// per resource count. One layout per user, shared by every workspace page.
|
||||
const WorkspaceOverviewTab = ({ ws, since, members, srvIn, services, sites }) => {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div className="ws-detail__grid">
|
||||
<section className="ws-detail__card">
|
||||
<h3>{t('common.labels.workspace', 'Workspace')}</h3>
|
||||
<OverviewBoard kind="workspace" shared entityId={ws.id} entityLabel={ws.name}>
|
||||
<OverviewSection id="count-servers" title={t('common.labels.servers', 'Servers')} tile w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard icon={<Server size={16} />} tone="accent" value={srvIn.length} label={t('common.labels.servers', 'Servers')} />
|
||||
</OverviewSection>
|
||||
<OverviewSection id="count-services" title={t('common.labels.services', 'Services')} tile w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard icon={<Boxes size={16} />} tone="accent" value={services.length} label={t('common.labels.services', 'Services')} />
|
||||
</OverviewSection>
|
||||
<OverviewSection id="count-sites" title={t('app.workspaceOverviewTab.sites', 'Sites')} tile w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard icon={<Globe size={16} />} tone="accent" value={sites.length} label={t('app.workspaceOverviewTab.sites', 'Sites')} />
|
||||
</OverviewSection>
|
||||
<OverviewSection id="count-members" title={t('app.workspaceOverviewTab.members', 'Members')} tile w={3} h={KPI_TILE_ROWS}>
|
||||
<MetricCard icon={<Users size={16} />} tone="accent" value={members.length} label={t('app.workspaceOverviewTab.members', 'Members')} />
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="info" title={t('common.labels.workspace', 'Workspace')} w={6} h={5}>
|
||||
<InfoList>
|
||||
<InfoItem label={t('app.workspaceOverviewTab.slug', 'Slug')} value={`/${ws.slug}`} mono />
|
||||
<InfoItem label={t('common.labels.created', 'Created')} value={since || '—'} />
|
||||
<InfoItem label={t('app.workspaceOverviewTab.maxServers', 'Max servers')} value={ws.max_servers > 0 ? ws.max_servers : t('app.workspaceOverviewTab.unlimited', 'Unlimited')} />
|
||||
<InfoItem label={t('app.workspaceOverviewTab.maxUsers', 'Max users')} value={ws.max_users > 0 ? ws.max_users : t('app.workspaceOverviewTab.unlimited', 'Unlimited')} />
|
||||
</InfoList>
|
||||
</section>
|
||||
<section className="ws-detail__card">
|
||||
<h3>{t('app.workspaceOverviewTab.resources', 'Resources')}</h3>
|
||||
<KpiBand>
|
||||
<MetricCard icon={<Server size={16} />} tone="accent" value={srvIn.length} label={t('common.labels.servers', 'Servers')} />
|
||||
<MetricCard icon={<Boxes size={16} />} tone="accent" value={services.length} label={t('common.labels.services', 'Services')} />
|
||||
<MetricCard icon={<Globe size={16} />} tone="accent" value={sites.length} label={t('app.workspaceOverviewTab.sites', 'Sites')} />
|
||||
<MetricCard icon={<Users size={16} />} tone="accent" value={members.length} label={t('app.workspaceOverviewTab.members', 'Members')} />
|
||||
</KpiBand>
|
||||
</section>
|
||||
</div>
|
||||
</OverviewSection>
|
||||
</OverviewBoard>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -2,8 +2,7 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { Server, Plus } from 'lucide-react';
|
||||
import { ServiceTile, Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -125,18 +124,8 @@ const WorkspaceServersTab = ({ wsId, srvIn, srvOut, onMoveServer, loadError, onR
|
||||
{/* Inline chrome, not hoisted: this is a tab inside a detail page
|
||||
that already owns the top bar, so hoisting would hijack it. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
label="servers"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
import { useEffect } from 'react';
|
||||
import { createContext, createElement, useContext, useEffect } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { useOutletContext } from 'react-router-dom';
|
||||
import { ListActions } from '@/components/ds/ListActions';
|
||||
|
||||
// The top bar a page's sections publish into when the page owns its own bar
|
||||
// (PageLayout) instead of sharing a tab group's. PageLayout provides it, so a
|
||||
// tab component inside a standalone page — a Docker tab, say — publishes its
|
||||
// create button and search exactly the way a tab-group page does.
|
||||
export const PageTopbarContext = createContext(null);
|
||||
|
||||
// The nearest bar wins: a PageLayout around the caller, else the tab group.
|
||||
function useTopbarHost() {
|
||||
const page = useContext(PageTopbarContext);
|
||||
const group = useOutletContext();
|
||||
return page || group;
|
||||
}
|
||||
|
||||
// Publish a page's top-bar actions into the enclosing TabGroupLayout header.
|
||||
// Pages in a tab group render no PageTopbar of their own, so the shared layout
|
||||
@@ -14,7 +28,7 @@ import { useOutletContext } from 'react-router-dom';
|
||||
// [loading, isAdmin]); the node/thunk itself is intentionally not a dependency.
|
||||
// No-op when rendered outside a tab group (e.g. a page reused as a plain route).
|
||||
export function useTopbarActions(actions, deps = []) {
|
||||
const ctx = useOutletContext();
|
||||
const ctx = useTopbarHost();
|
||||
const setTopbarActions = ctx?.setTopbarActions;
|
||||
|
||||
useEffect(() => {
|
||||
@@ -32,8 +46,28 @@ export function useTopbarActions(actions, deps = []) {
|
||||
}, [setTopbarActions]);
|
||||
}
|
||||
|
||||
// The SECOND top-bar slot: a table's own chrome — search, the filter button and
|
||||
// the "⋮". It is separate from useTopbarActions because the two are published
|
||||
// A list page's top bar, in the one fixed order: secondary buttons, the create
|
||||
// button, then search (see ds/ListActions). Pass a thunk returning
|
||||
// `{ secondary, primary, search }` — same reason as above — and the reactive
|
||||
// values it reads as `deps`:
|
||||
//
|
||||
// useListTopbar(() => ({
|
||||
// secondary: <Button variant="outline" size="sm" onClick={load}>Sync</Button>,
|
||||
// primary: <PagePrimaryButton id="servers-add" label="Add server" onClick={open} />,
|
||||
// search: { value: q, onSearch: setQ, placeholder: 'Search servers…' },
|
||||
// }), [q]);
|
||||
export function useListTopbar(spec, deps = []) {
|
||||
useTopbarActions(
|
||||
() => createElement(ListActions, typeof spec === 'function' ? spec() : spec),
|
||||
deps,
|
||||
);
|
||||
}
|
||||
|
||||
// The SECOND top-bar slot, for a workspace's own controls (the file manager's
|
||||
// view switch). List tables do NOT use it: their filter and tools live in the
|
||||
// view selector's menu (GridViewPicker `filters` / `tools`), and
|
||||
// scripts/check-list-chrome.mjs fails a table that hoists them here.
|
||||
// It is separate from useTopbarActions because the two are published
|
||||
// by different owners at different times. A page's actions ("Add domain") are
|
||||
// the page's; the chrome belongs to whichever table is on it, which may be a
|
||||
// shared wrapper like ResourceListPage that has no business overwriting what
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "فشل إيقاف مشروع compose.",
|
||||
"couldntUpdateProject": "فشل تحديث مشروع compose.",
|
||||
"dockerComposeUpD": "عامل ميناء يؤلف -d",
|
||||
"filterProjectOrConfigPath": "تصفية المشروع أو مسار التكوين...",
|
||||
"imagesPulled": "الصور سحبت",
|
||||
"lines": "الخطوط:",
|
||||
"loadingComposeProjects": "جارٍ تحميل مشاريع الإنشاء...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "تنفيذي",
|
||||
"exec3": "المدير التنفيذي: {{value}}",
|
||||
"executeCommandsInContainer": "تنفيذ الأوامر في الحاوية",
|
||||
"filterNameImageOrId": "اسم الفلتر أو الصورة أو المعرف...",
|
||||
"health": "صحة",
|
||||
"hostPort": "منفذ المضيف",
|
||||
"image": "صورة",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "فشلت إزالة الصورة. قد يكون قيد الاستخدام بواسطة حاوية.",
|
||||
"filterRepositoryTagOrId": "مستودع التصفية أو العلامة أو المعرف...",
|
||||
"imageName": "اسم الصورة *",
|
||||
"imageRemovedSuccessfully": "تمت إزالة الصورة بنجاح",
|
||||
"loadingImages": "جارٍ تحميل الصور...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "استخدام وحدة المعالجة المركزية",
|
||||
"diskUsage": "استخدام القرص",
|
||||
"down": "تحت",
|
||||
"hostHealth": "صحة المضيف",
|
||||
"latency": "كمون",
|
||||
"loadAverage": "متوسط التحميل",
|
||||
"loadingMetrics": "جارٍ تحميل المقاييس",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "إنشاء الشبكات متاح فقط على هدف Docker المحلي في الوقت الحالي",
|
||||
"driver": "سائق",
|
||||
"failedToRemoveNetworkItMay": "فشل في إزالة الشبكة. قد يكون قيد الاستخدام.",
|
||||
"filterNameOrId": "اسم المرشح أو معرفه...",
|
||||
"loadingNetworks": "جارٍ تحميل الشبكات...",
|
||||
"networkName": "اسم الشبكة *",
|
||||
"networkRemovedSuccessfully": "تمت إزالة الشبكة بنجاح",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "إنشاء وحدات التخزين متاح فقط على هدف Docker المحلي في الوقت الحالي",
|
||||
"driver": "سائق",
|
||||
"failedToRemoveVolumeItMay": "فشل في إزالة وحدة التخزين. قد يكون قيد الاستخدام.",
|
||||
"filterNameOrMountpoint": "اسم الفلتر أو نقطة التثبيت...",
|
||||
"loadingVolumes": "جارٍ تحميل وحدات التخزين...",
|
||||
"mountpoint": "نقطة التثبيت",
|
||||
"noMatchingVolumes": "لا توجد وحدات تخزين مطابقة",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "خوادم ماكس",
|
||||
"maxUsers": "ماكس المستخدمين",
|
||||
"members": "أعضاء",
|
||||
"resources": "موارد",
|
||||
"sites": "مواقع",
|
||||
"slug": "سبيكة",
|
||||
"unlimited": "غير محدود"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "compose প্রকল্প থামাতে ব্যর্থ হয়েছে।",
|
||||
"couldntUpdateProject": "compose প্রকল্প আপডেট করতে ব্যর্থ হয়েছে।",
|
||||
"dockerComposeUpD": "ডকার কম্পোজ আপ -d",
|
||||
"filterProjectOrConfigPath": "ফিল্টার প্রকল্প বা কনফিগার পাথ...",
|
||||
"imagesPulled": "ইমেজ পুল করা হয়েছে",
|
||||
"lines": "লাইন:",
|
||||
"loadingComposeProjects": "রচনা প্রকল্প লোড হচ্ছে...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Exec",
|
||||
"exec3": "Exec: {{value}}",
|
||||
"executeCommandsInContainer": "কন্টেইনারে কমান্ড চালান",
|
||||
"filterNameImageOrId": "ফিল্টার নাম, ছবি বা আইডি...",
|
||||
"health": "স্বাস্থ্য",
|
||||
"hostPort": "হোস্ট পোর্ট",
|
||||
"image": "ইমেজ",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "ছবি সরাতে ব্যর্থ হয়েছে৷ এটি একটি ধারক দ্বারা ব্যবহার করা হতে পারে.",
|
||||
"filterRepositoryTagOrId": "ফিল্টার রিপোজিটরি, ট্যাগ বা আইডি...",
|
||||
"imageName": "ইমেজের নাম *",
|
||||
"imageRemovedSuccessfully": "ইমেজ মুছে ফেলা হয়েছে",
|
||||
"loadingImages": "ইমেজ লোড হচ্ছে...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "CPU ব্যবহার",
|
||||
"diskUsage": "ডিস্ক ব্যবহার",
|
||||
"down": "নিচে",
|
||||
"hostHealth": "হোস্ট স্বাস্থ্য",
|
||||
"latency": "লেটেন্সি",
|
||||
"loadAverage": "লোড গড়",
|
||||
"loadingMetrics": "মেট্রিক্স লোড হচ্ছে",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "নেটওয়ার্ক তৈরি করা শুধুমাত্র স্থানীয় Docker লক্ষ্যে উপলব্ধ",
|
||||
"driver": "ড্রাইভার",
|
||||
"failedToRemoveNetworkItMay": "নেটওয়ার্ক সরাতে ব্যর্থ হয়েছে৷ এটি ব্যবহার হতে পারে।",
|
||||
"filterNameOrId": "ফিল্টার নাম বা আইডি...",
|
||||
"loadingNetworks": "নেটওয়ার্ক লোড হচ্ছে...",
|
||||
"networkName": "নেটওয়ার্কের নাম *",
|
||||
"networkRemovedSuccessfully": "নেটওয়ার্ক সফলভাবে সরানো হয়েছে",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "ভলিউম তৈরি করা শুধুমাত্র স্থানীয় Docker টার্গেটে উপলব্ধ",
|
||||
"driver": "ড্রাইভার",
|
||||
"failedToRemoveVolumeItMay": "ভলিউম সরাতে ব্যর্থ হয়েছে৷ এটি ব্যবহার হতে পারে।",
|
||||
"filterNameOrMountpoint": "ফিল্টার নাম বা মাউন্টপয়েন্ট...",
|
||||
"loadingVolumes": "ভলিউম লোড হচ্ছে...",
|
||||
"mountpoint": "মাউন্টপয়েন্ট",
|
||||
"noMatchingVolumes": "কোনো মিলে যাওয়া ভলিউম নেই",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "সর্বোচ্চ সার্ভার",
|
||||
"maxUsers": "সর্বোচ্চ ব্যবহারকারী",
|
||||
"members": "সদস্যরা",
|
||||
"resources": "সম্পদ",
|
||||
"sites": "সাইট",
|
||||
"slug": "স্লাগ",
|
||||
"unlimited": "সীমাহীন"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Das Compose-Projekt konnte nicht gestoppt werden.",
|
||||
"couldntUpdateProject": "Das Compose-Projekt konnte nicht aktualisiert werden.",
|
||||
"dockerComposeUpD": "Docker komponieren -d",
|
||||
"filterProjectOrConfigPath": "Projekt- oder Konfigurationspfad filtern…",
|
||||
"imagesPulled": "Images abgerufen",
|
||||
"lines": "Zeilen:",
|
||||
"loadingComposeProjects": "Compose-Projekte werden geladen...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Geschäftsführer",
|
||||
"exec3": "Exec: {{value}}",
|
||||
"executeCommandsInContainer": "Befehle im Container ausführen",
|
||||
"filterNameImageOrId": "Name, Bild oder ID filtern…",
|
||||
"health": "Gesundheit",
|
||||
"hostPort": "Host-Port",
|
||||
"image": "Image",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Das Bild konnte nicht entfernt werden. Es kann von einem Container verwendet werden.",
|
||||
"filterRepositoryTagOrId": "Repository, Tag oder ID filtern …",
|
||||
"imageName": "Image-Name *",
|
||||
"imageRemovedSuccessfully": "Image erfolgreich entfernt",
|
||||
"loadingImages": "Images werden geladen...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "CPU-Auslastung",
|
||||
"diskUsage": "Festplattennutzung",
|
||||
"down": "Runter",
|
||||
"hostHealth": "Host-Zustand",
|
||||
"latency": "Latenz",
|
||||
"loadAverage": "Durchschnittliche Belastung",
|
||||
"loadingMetrics": "Messwerte werden geladen",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Das Erstellen von Netzwerken ist derzeit nur auf dem lokalen Docker-Ziel verfügbar",
|
||||
"driver": "Fahrer",
|
||||
"failedToRemoveNetworkItMay": "Netzwerk konnte nicht entfernt werden. Möglicherweise wird es verwendet.",
|
||||
"filterNameOrId": "Name oder ID filtern…",
|
||||
"loadingNetworks": "Netzwerke werden geladen...",
|
||||
"networkName": "Netzwerkname *",
|
||||
"networkRemovedSuccessfully": "Netzwerk erfolgreich entfernt",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Das Erstellen von Volumes ist derzeit nur auf dem lokalen Docker-Ziel verfügbar",
|
||||
"driver": "Fahrer",
|
||||
"failedToRemoveVolumeItMay": "Das Volume konnte nicht entfernt werden. Möglicherweise wird es verwendet.",
|
||||
"filterNameOrMountpoint": "Filtername oder Mountpoint…",
|
||||
"loadingVolumes": "Volumes werden geladen...",
|
||||
"mountpoint": "Mountpoint",
|
||||
"noMatchingVolumes": "Keine passenden Volumes",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Maximale Anzahl an Servern",
|
||||
"maxUsers": "Max. Benutzer",
|
||||
"members": "Mitglieder",
|
||||
"resources": "Ressourcen",
|
||||
"sites": "Websites",
|
||||
"slug": "Schnecke",
|
||||
"unlimited": "Unbegrenzt"
|
||||
|
||||
@@ -768,7 +768,6 @@
|
||||
"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 ·",
|
||||
@@ -1059,7 +1058,6 @@
|
||||
"couldntStopProject": "Couldn't stop the compose project.",
|
||||
"couldntUpdateProject": "Couldn't update the compose project.",
|
||||
"dockerComposeUpD": "docker compose up -d",
|
||||
"filterProjectOrConfigPath": "Filter compose project or config path…",
|
||||
"imagesPulled": "Images pulled",
|
||||
"lines": "Lines:",
|
||||
"loadingComposeProjects": "Loading compose projects…",
|
||||
@@ -1073,6 +1071,7 @@
|
||||
"projectStarted": "Compose project started",
|
||||
"projectStopped": "Compose project stopped",
|
||||
"pullImages": "Pull images",
|
||||
"searchProjects": "Search compose projects…",
|
||||
"service": "Service:",
|
||||
"stopComposeProject": "Stop Compose project",
|
||||
"stopThisComposeProjectContainersWill": "Stop this compose project? Containers will be removed."
|
||||
@@ -1481,7 +1480,6 @@
|
||||
"exec": "Exec",
|
||||
"exec3": "Exec: {{value}}",
|
||||
"executeCommandsInContainer": "Execute commands in container",
|
||||
"filterNameImageOrId": "Filter name, image, or ID…",
|
||||
"health": "Health",
|
||||
"hostPort": "Host port",
|
||||
"image": "Image",
|
||||
@@ -1516,6 +1514,7 @@
|
||||
"running": "Running…",
|
||||
"runningNewContainersIsOnlyAvailable": "Running new containers is only available on the panel server right now",
|
||||
"runtime": "Runtime",
|
||||
"searchContainers": "Search containers…",
|
||||
"serverkitSystemContainerManagedByThe": "ServerKit system container: managed by the panel, so lifecycle controls are disabled",
|
||||
"systemContainer": "System container",
|
||||
"systemSkipped_one": "1 system container skipped",
|
||||
@@ -3210,7 +3209,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Couldn't delete the image. A container may still use it.",
|
||||
"filterRepositoryTagOrId": "Filter repository, tag, or ID…",
|
||||
"imageName": "Image name *",
|
||||
"imageRemovedSuccessfully": "Image deleted",
|
||||
"loadingImages": "Loading images…",
|
||||
@@ -3218,6 +3216,7 @@
|
||||
"noImages": "No images",
|
||||
"noImagesMatchTheCurrentSearch": "No images match the current search.",
|
||||
"noMatchingImages": "No matching images",
|
||||
"pull": "Pull",
|
||||
"pullAnImageToSeeIt": "Pull an image to see it here.",
|
||||
"pullImage": "Pull image",
|
||||
"pulling": "Pulling…",
|
||||
@@ -3225,6 +3224,7 @@
|
||||
"removeImage2": "Delete image",
|
||||
"removeThisImage": "Delete this image?",
|
||||
"repository": "Repository",
|
||||
"searchImages": "Search images…",
|
||||
"tag": "Tag"
|
||||
},
|
||||
"importDumpModal": {
|
||||
@@ -4102,7 +4102,6 @@
|
||||
"cpuUsage": "CPU usage",
|
||||
"diskUsage": "Disk usage",
|
||||
"down": "Down",
|
||||
"hostHealth": "Host health",
|
||||
"latency": "Latency",
|
||||
"loadAverage": "Load average",
|
||||
"loadingHosts": "Loading hosts",
|
||||
@@ -4193,7 +4192,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Creating networks is only available on the panel server right now",
|
||||
"driver": "Driver",
|
||||
"failedToRemoveNetworkItMay": "Couldn't delete the network. A container may still use it.",
|
||||
"filterNameOrId": "Filter name or ID…",
|
||||
"loadingNetworks": "Loading networks…",
|
||||
"networkName": "Network name *",
|
||||
"networkRemovedSuccessfully": "Network deleted",
|
||||
@@ -4204,6 +4202,7 @@
|
||||
"removeNetwork2": "Delete network",
|
||||
"removeThisNetwork": "Delete this network?",
|
||||
"scope": "Scope",
|
||||
"searchNetworks": "Search networks…",
|
||||
"shipsWithTheDockerDaemonIt": "Ships with the Docker daemon, so it cannot be deleted"
|
||||
},
|
||||
"newService": {
|
||||
@@ -4418,6 +4417,7 @@
|
||||
"environment": "Environment",
|
||||
"fileIntegrityMonitoringEnabled": "File integrity monitoring enabled",
|
||||
"fixWorking": "Working…",
|
||||
"hardeningChecks": "Hardening checks",
|
||||
"hints": "Hints",
|
||||
"inactive": "Inactive",
|
||||
"initializeBaseline": "Initialize baseline",
|
||||
@@ -5680,7 +5680,6 @@
|
||||
"group": "Group",
|
||||
"hostname": "Hostname",
|
||||
"lastSeen": "Last seen",
|
||||
"liveStatus": "Live status",
|
||||
"operatingSystem": "Operating system",
|
||||
"serverInformation": "Server information",
|
||||
"serverOffline": "Server offline",
|
||||
@@ -8028,7 +8027,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Creating volumes is only available on the panel server right now",
|
||||
"driver": "Driver",
|
||||
"failedToRemoveVolumeItMay": "Couldn't delete the volume. A container may still use it.",
|
||||
"filterNameOrMountpoint": "Filter name or mountpoint…",
|
||||
"loadingVolumes": "Loading volumes…",
|
||||
"mountpoint": "Mountpoint",
|
||||
"noMatchingVolumes": "No matching volumes",
|
||||
@@ -8037,6 +8035,7 @@
|
||||
"removeThisVolumeAllDataWill": "Delete this volume? All data will be lost.",
|
||||
"removeVolume": "Delete volume",
|
||||
"removeVolume2": "Delete volume",
|
||||
"searchVolumes": "Search volumes…",
|
||||
"volumeName": "Volume name *",
|
||||
"volumeRemovedSuccessfully": "Volume deleted"
|
||||
},
|
||||
@@ -8361,7 +8360,6 @@
|
||||
"maxServers": "Max servers",
|
||||
"maxUsers": "Max users",
|
||||
"members": "Members",
|
||||
"resources": "Resources",
|
||||
"sites": "Sites",
|
||||
"slug": "Slug",
|
||||
"unlimited": "Unlimited"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "No se pudo detener el proyecto de Compose.",
|
||||
"couldntUpdateProject": "No se pudo actualizar el proyecto de Compose.",
|
||||
"dockerComposeUpD": "docker compose up -d",
|
||||
"filterProjectOrConfigPath": "Filtrar por proyecto o ruta de configuración…",
|
||||
"imagesPulled": "Imágenes descargadas",
|
||||
"lines": "Líneas:",
|
||||
"loadingComposeProjects": "Cargando proyectos de Compose...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Ejecutar",
|
||||
"exec3": "Ejecutar: {{value}}",
|
||||
"executeCommandsInContainer": "Ejecutar comandos en el contenedor",
|
||||
"filterNameImageOrId": "Filtrar por nombre, imagen o ID…",
|
||||
"health": "Salud",
|
||||
"hostPort": "Puerto del host",
|
||||
"image": "Imagen",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "No se pudo eliminar la imagen. Puede que esté en uso por un contenedor.",
|
||||
"filterRepositoryTagOrId": "Filtrar por repositorio, etiqueta o ID…",
|
||||
"imageName": "Nombre de la imagen *",
|
||||
"imageRemovedSuccessfully": "Imagen eliminada correctamente",
|
||||
"loadingImages": "Cargando imágenes...",
|
||||
@@ -3955,7 +3952,6 @@
|
||||
"cpuUsage": "Uso de CPU",
|
||||
"diskUsage": "Uso de disco",
|
||||
"down": "Caído",
|
||||
"hostHealth": "Salud del host",
|
||||
"latency": "Latencia",
|
||||
"loadAverage": "Carga promedio",
|
||||
"loadingMetrics": "Cargando métricas",
|
||||
@@ -4042,7 +4038,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Por ahora, crear redes solo está disponible en el destino Docker local",
|
||||
"driver": "Driver",
|
||||
"failedToRemoveNetworkItMay": "No se pudo quitar la red. Puede que esté en uso.",
|
||||
"filterNameOrId": "Filtrar por nombre o ID…",
|
||||
"loadingNetworks": "Cargando redes...",
|
||||
"networkName": "Nombre de la red *",
|
||||
"networkRemovedSuccessfully": "Red quitada correctamente",
|
||||
@@ -7567,7 +7562,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Por ahora, la creación de volúmenes solo está disponible en el destino Docker local",
|
||||
"driver": "Driver",
|
||||
"failedToRemoveVolumeItMay": "No se pudo quitar el volumen. Puede que esté en uso.",
|
||||
"filterNameOrMountpoint": "Filtrar por nombre o punto de montaje…",
|
||||
"loadingVolumes": "Cargando volúmenes…",
|
||||
"mountpoint": "Punto de montaje",
|
||||
"noMatchingVolumes": "No hay volúmenes que coincidan",
|
||||
@@ -7898,7 +7892,6 @@
|
||||
"maxServers": "Máx. servidores",
|
||||
"maxUsers": "Máx. usuarios",
|
||||
"members": "Miembros",
|
||||
"resources": "Recursos",
|
||||
"sites": "Sitios",
|
||||
"slug": "Slug",
|
||||
"unlimited": "Ilimitado"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Impossible d'arrêter le projet compose.",
|
||||
"couldntUpdateProject": "Impossible de mettre à jour le projet compose.",
|
||||
"dockerComposeUpD": "docker compose -d",
|
||||
"filterProjectOrConfigPath": "Filtrer le chemin du projet ou de la configuration…",
|
||||
"imagesPulled": "Images extraites",
|
||||
"lines": "Lignes :",
|
||||
"loadingComposeProjects": "Chargement des projets de composition...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Exécutif",
|
||||
"exec3": "Exécutif : {{value}}",
|
||||
"executeCommandsInContainer": "Exécuter des commandes dans le conteneur",
|
||||
"filterNameImageOrId": "Filtrer le nom, l’image ou l’identifiant…",
|
||||
"health": "Santé",
|
||||
"hostPort": "Port de l'hôte",
|
||||
"image": "Image",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Échec de la suppression de l'image. Il peut être utilisé par un conteneur.",
|
||||
"filterRepositoryTagOrId": "Filtrer le référentiel, la balise ou l'ID…",
|
||||
"imageName": "Nom de l'image *",
|
||||
"imageRemovedSuccessfully": "Image supprimée avec succès",
|
||||
"loadingImages": "Chargement des images...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "Utilisation du processeur",
|
||||
"diskUsage": "Utilisation du disque",
|
||||
"down": "Vers le bas",
|
||||
"hostHealth": "Santé de l'hôte",
|
||||
"latency": "Latence",
|
||||
"loadAverage": "Charge moyenne",
|
||||
"loadingMetrics": "Chargement des métriques",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "La création de réseaux n'est disponible que sur la cible locale Docker pour le moment.",
|
||||
"driver": "Conducteur",
|
||||
"failedToRemoveNetworkItMay": "Échec de la suppression du réseau. Il est peut-être utilisé.",
|
||||
"filterNameOrId": "Filtrer le nom ou l'identifiant…",
|
||||
"loadingNetworks": "Chargement des réseaux...",
|
||||
"networkName": "Nom du réseau *",
|
||||
"networkRemovedSuccessfully": "Réseau supprimé avec succès",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "La création de volumes n'est disponible que sur la cible locale Docker pour le moment",
|
||||
"driver": "Conducteur",
|
||||
"failedToRemoveVolumeItMay": "Échec de la suppression du volume. Il est peut-être utilisé.",
|
||||
"filterNameOrMountpoint": "Nom du filtre ou point de montage…",
|
||||
"loadingVolumes": "Chargement des volumes...",
|
||||
"mountpoint": "Point de montage",
|
||||
"noMatchingVolumes": "Aucun volume correspondant",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Nombre maximum de serveurs",
|
||||
"maxUsers": "Nombre maximum d'utilisateurs",
|
||||
"members": "Membres",
|
||||
"resources": "Ressources",
|
||||
"sites": "Sites",
|
||||
"slug": "Limace",
|
||||
"unlimited": "Illimité"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Gagal menghentikan proyek compose.",
|
||||
"couldntUpdateProject": "Gagal memperbarui proyek compose.",
|
||||
"dockerComposeUpD": "buruh pelabuhan menyusun -d",
|
||||
"filterProjectOrConfigPath": "Filter proyek atau jalur konfigurasi…",
|
||||
"imagesPulled": "Image ditarik",
|
||||
"lines": "Garis:",
|
||||
"loadingComposeProjects": "Memuat proyek penulisan...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Eksekutif",
|
||||
"exec3": "Eksekutif: {{value}}",
|
||||
"executeCommandsInContainer": "Jalankan perintah dalam wadah",
|
||||
"filterNameImageOrId": "Filter nama, gambar, atau ID…",
|
||||
"health": "Kesehatan",
|
||||
"hostPort": "Port host",
|
||||
"image": "Image",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Gagal menghapus gambar. Ini mungkin digunakan oleh sebuah wadah.",
|
||||
"filterRepositoryTagOrId": "Filter repositori, tag, atau ID…",
|
||||
"imageName": "Nama Image *",
|
||||
"imageRemovedSuccessfully": "Image berhasil dihapus",
|
||||
"loadingImages": "Memuat image...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "penggunaan CPU",
|
||||
"diskUsage": "Penggunaan disk",
|
||||
"down": "Turun",
|
||||
"hostHealth": "Kesehatan host",
|
||||
"latency": "Latensi",
|
||||
"loadAverage": "Rata-rata beban",
|
||||
"loadingMetrics": "Memuat metrik",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Saat ini pembuatan jaringan hanya tersedia pada target Docker lokal",
|
||||
"driver": "Pengemudi",
|
||||
"failedToRemoveNetworkItMay": "Gagal menghapus jaringan. Ini mungkin sedang digunakan.",
|
||||
"filterNameOrId": "Filter nama atau ID…",
|
||||
"loadingNetworks": "Memuat jaringan...",
|
||||
"networkName": "Nama Jaringan *",
|
||||
"networkRemovedSuccessfully": "Jaringan berhasil dihapus",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Pembuatan volume saat ini hanya tersedia pada target Docker lokal",
|
||||
"driver": "Pengemudi",
|
||||
"failedToRemoveVolumeItMay": "Gagal menghapus volume. Ini mungkin sedang digunakan.",
|
||||
"filterNameOrMountpoint": "Nama filter atau titik pemasangan…",
|
||||
"loadingVolumes": "Memuat volume...",
|
||||
"mountpoint": "titik pemasangan",
|
||||
"noMatchingVolumes": "Tidak ada volume yang cocok",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Server maksimal",
|
||||
"maxUsers": "Pengguna maksimal",
|
||||
"members": "Anggota",
|
||||
"resources": "Sumber daya",
|
||||
"sites": "Situs",
|
||||
"slug": "Siput",
|
||||
"unlimited": "Tidak terbatas"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Impossibile arrestare il progetto compose",
|
||||
"couldntUpdateProject": "Impossibile aggiornare il progetto compose",
|
||||
"dockerComposeUpD": "la finestra mobile compone -d",
|
||||
"filterProjectOrConfigPath": "Filtra il progetto o il percorso di configurazione...",
|
||||
"imagesPulled": "Immagini scaricate",
|
||||
"lines": "Linee:",
|
||||
"loadingComposeProjects": "Caricamento progetti di composizione...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Esecutivo",
|
||||
"exec3": "Esecuzione: {{value}}",
|
||||
"executeCommandsInContainer": "Esegui comandi nel contenitore",
|
||||
"filterNameImageOrId": "Filtra nome, immagine o ID…",
|
||||
"health": "Salute",
|
||||
"hostPort": "Porta dell'host",
|
||||
"image": "Immagine",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Impossibile rimuovere l'immagine. Potrebbe essere utilizzato da un contenitore.",
|
||||
"filterRepositoryTagOrId": "Filtra repository, tag o ID…",
|
||||
"imageName": "Nome immagine *",
|
||||
"imageRemovedSuccessfully": "Immagine rimossa con successo",
|
||||
"loadingImages": "Caricamento immagini...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "Utilizzo della CPU",
|
||||
"diskUsage": "Utilizzo del disco",
|
||||
"down": "Giù",
|
||||
"hostHealth": "Stato dell'host",
|
||||
"latency": "Latenza",
|
||||
"loadAverage": "Carica media",
|
||||
"loadingMetrics": "Caricamento delle metriche",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Al momento la creazione di reti è disponibile solo sul target locale Docker",
|
||||
"driver": "Autista",
|
||||
"failedToRemoveNetworkItMay": "Impossibile rimuovere la rete. Potrebbe essere in uso.",
|
||||
"filterNameOrId": "Filtra nome o ID...",
|
||||
"loadingNetworks": "Caricamento reti...",
|
||||
"networkName": "Nome della rete *",
|
||||
"networkRemovedSuccessfully": "Rete rimossa con successo",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Al momento la creazione di volumi è disponibile solo sul target Docker locale",
|
||||
"driver": "Autista",
|
||||
"failedToRemoveVolumeItMay": "Impossibile rimuovere il volume. Potrebbe essere in uso.",
|
||||
"filterNameOrMountpoint": "Nome del filtro o punto di montaggio...",
|
||||
"loadingVolumes": "Caricamento volumi...",
|
||||
"mountpoint": "Punto di montaggio",
|
||||
"noMatchingVolumes": "Nessun volume corrispondente",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Server massimi",
|
||||
"maxUsers": "Utenti massimi",
|
||||
"members": "Membri",
|
||||
"resources": "Risorse",
|
||||
"sites": "Siti",
|
||||
"slug": "Lumaca",
|
||||
"unlimited": "Illimitato"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Compose 프로젝트를 중지하지 못했습니다.",
|
||||
"couldntUpdateProject": "Compose 프로젝트를 업데이트하지 못했습니다.",
|
||||
"dockerComposeUpD": "docker compose up -d",
|
||||
"filterProjectOrConfigPath": "프로젝트 또는 구성 경로 필터링…",
|
||||
"imagesPulled": "가져온 이미지",
|
||||
"lines": "라인:",
|
||||
"loadingComposeProjects": "작성 프로젝트 로드 중...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "임원",
|
||||
"exec3": "실행: {{value}}",
|
||||
"executeCommandsInContainer": "컨테이너에서 명령 실행",
|
||||
"filterNameImageOrId": "필터 이름, 이미지, ID…",
|
||||
"health": "상태",
|
||||
"hostPort": "호스트 포트",
|
||||
"image": "이미지",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "이미지를 제거하지 못했습니다. 컨테이너에서 사용 중일 수 있습니다.",
|
||||
"filterRepositoryTagOrId": "저장소, 태그 또는 ID 필터링…",
|
||||
"imageName": "이미지 이름 *",
|
||||
"imageRemovedSuccessfully": "이미지가 성공적으로 제거되었습니다.",
|
||||
"loadingImages": "이미지 로드 중...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "CPU 사용량",
|
||||
"diskUsage": "디스크 사용량",
|
||||
"down": "아래로",
|
||||
"hostHealth": "호스트 상태",
|
||||
"latency": "대기 시간",
|
||||
"loadAverage": "평균 부하",
|
||||
"loadingMetrics": "측정항목 로드 중",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "네트워크 생성은 현재 로컬 Docker 대상에서만 가능합니다.",
|
||||
"driver": "드라이버",
|
||||
"failedToRemoveNetworkItMay": "네트워크를 제거하지 못했습니다. 사용 중일 수도 있습니다.",
|
||||
"filterNameOrId": "필터 이름 또는 ID…",
|
||||
"loadingNetworks": "네트워크 로드 중...",
|
||||
"networkName": "네트워크 이름 *",
|
||||
"networkRemovedSuccessfully": "네트워크가 성공적으로 제거되었습니다.",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "볼륨 생성은 현재 로컬 Docker 대상에서만 가능합니다.",
|
||||
"driver": "드라이버",
|
||||
"failedToRemoveVolumeItMay": "볼륨을 제거하지 못했습니다. 사용 중일 수도 있습니다.",
|
||||
"filterNameOrMountpoint": "필터 이름 또는 마운트 지점…",
|
||||
"loadingVolumes": "볼륨 로드 중...",
|
||||
"mountpoint": "마운트포인트",
|
||||
"noMatchingVolumes": "일치하는 볼륨 없음",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "최대 서버",
|
||||
"maxUsers": "최대 사용자",
|
||||
"members": "회원",
|
||||
"resources": "자원",
|
||||
"sites": "사이트",
|
||||
"slug": "슬러그",
|
||||
"unlimited": "무제한"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Nie udało się zatrzymać projektu compose.",
|
||||
"couldntUpdateProject": "Nie udało się zaktualizować projektu compose.",
|
||||
"dockerComposeUpD": "doker komponuj -d",
|
||||
"filterProjectOrConfigPath": "Filtruj projekt lub ścieżkę konfiguracji…",
|
||||
"imagesPulled": "Obrazy pobrane",
|
||||
"lines": "Kwestia:",
|
||||
"loadingComposeProjects": "Ładowanie projektów tworzenia...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Wykonawczy",
|
||||
"exec3": "Wykonanie: {{value}}",
|
||||
"executeCommandsInContainer": "Wykonuj polecenia w kontenerze",
|
||||
"filterNameImageOrId": "Filtruj nazwę, obraz lub identyfikator…",
|
||||
"health": "Zdrowie",
|
||||
"hostPort": "Port hosta",
|
||||
"image": "Obraz",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Nie udało się usunąć obrazu. Może być używany przy pojemniku.",
|
||||
"filterRepositoryTagOrId": "Filtruj repozytorium, tag lub identyfikator…",
|
||||
"imageName": "Nazwa obrazu *",
|
||||
"imageRemovedSuccessfully": "Obraz został pomyślnie usunięty",
|
||||
"loadingImages": "Ładowanie obrazów...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "Użycie procesora",
|
||||
"diskUsage": "Użycie dysku",
|
||||
"down": "W dół",
|
||||
"hostHealth": "Kondycja hosta",
|
||||
"latency": "Utajenie",
|
||||
"loadAverage": "Średnie obciążenie",
|
||||
"loadingMetrics": "Ładowanie metryk",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Tworzenie sieci jest obecnie dostępne tylko na lokalnym obiekcie docelowym Docker",
|
||||
"driver": "Kierowca",
|
||||
"failedToRemoveNetworkItMay": "Nie udało się usunąć sieci. Może być w użyciu.",
|
||||
"filterNameOrId": "Filtruj nazwę lub identyfikator…",
|
||||
"loadingNetworks": "Ładowanie sieci...",
|
||||
"networkName": "Nazwa sieci *",
|
||||
"networkRemovedSuccessfully": "Sieć została pomyślnie usunięta",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Tworzenie woluminów jest obecnie dostępne tylko w lokalnym obiekcie docelowym Docker",
|
||||
"driver": "Kierowca",
|
||||
"failedToRemoveVolumeItMay": "Nie udało się usunąć woluminu. Może być w użyciu.",
|
||||
"filterNameOrMountpoint": "Nazwa filtra lub punkt podłączenia…",
|
||||
"loadingVolumes": "Ładowanie woluminów...",
|
||||
"mountpoint": "Punkt mocowania",
|
||||
"noMatchingVolumes": "Brak pasujących woluminów",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Maksymalne serwery",
|
||||
"maxUsers": "Maksymalna liczba użytkowników",
|
||||
"members": "Członkowie",
|
||||
"resources": "Zasoby",
|
||||
"sites": "Witryny",
|
||||
"slug": "Ślimak",
|
||||
"unlimited": "Bez limitu"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Falha ao parar o projeto compose.",
|
||||
"couldntUpdateProject": "Falha ao atualizar o projeto compose.",
|
||||
"dockerComposeUpD": "docker compose up -d",
|
||||
"filterProjectOrConfigPath": "Filtrar projeto ou caminho de configuração…",
|
||||
"imagesPulled": "Imagens baixadas",
|
||||
"lines": "Linhas:",
|
||||
"loadingComposeProjects": "Carregando projetos de composição...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Executivo",
|
||||
"exec3": "Executivo: {{value}}",
|
||||
"executeCommandsInContainer": "Executar comandos no contêiner",
|
||||
"filterNameImageOrId": "Nome do filtro, imagem ou ID…",
|
||||
"health": "Saúde",
|
||||
"hostPort": "Porta do host",
|
||||
"image": "Imagem",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Falha ao remover a imagem. Pode estar em uso por um contêiner.",
|
||||
"filterRepositoryTagOrId": "Filtrar repositório, tag ou ID…",
|
||||
"imageName": "Nome da imagem *",
|
||||
"imageRemovedSuccessfully": "Imagem removida com sucesso",
|
||||
"loadingImages": "Carregando imagens...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "Uso da CPU",
|
||||
"diskUsage": "Uso de disco",
|
||||
"down": "Para baixo",
|
||||
"hostHealth": "Saúde do host",
|
||||
"latency": "Latência",
|
||||
"loadAverage": "Média de carga",
|
||||
"loadingMetrics": "Carregando métricas",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "A criação de redes está disponível apenas no destino local do Docker no momento",
|
||||
"driver": "Motorista",
|
||||
"failedToRemoveNetworkItMay": "Falha ao remover rede. Pode estar em uso.",
|
||||
"filterNameOrId": "Nome ou ID do filtro…",
|
||||
"loadingNetworks": "Carregando redes...",
|
||||
"networkName": "Nome da rede *",
|
||||
"networkRemovedSuccessfully": "Rede removida com sucesso",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "A criação de volumes está disponível apenas no destino local do Docker no momento",
|
||||
"driver": "Motorista",
|
||||
"failedToRemoveVolumeItMay": "Falha ao remover o volume. Pode estar em uso.",
|
||||
"filterNameOrMountpoint": "Nome do filtro ou ponto de montagem…",
|
||||
"loadingVolumes": "Carregando volumes...",
|
||||
"mountpoint": "Ponto de montagem",
|
||||
"noMatchingVolumes": "Nenhum volume correspondente",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Máximo de servidores",
|
||||
"maxUsers": "Máximo de usuários",
|
||||
"members": "Membros",
|
||||
"resources": "Recursos",
|
||||
"sites": "Locais",
|
||||
"slug": "Lesma",
|
||||
"unlimited": "Ilimitado"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Не удалось остановить проект compose.",
|
||||
"couldntUpdateProject": "Не удалось обновить проект compose.",
|
||||
"dockerComposeUpD": "docker compose up -d",
|
||||
"filterProjectOrConfigPath": "Фильтровать проект или путь конфигурации…",
|
||||
"imagesPulled": "Образы загружены",
|
||||
"lines": "Линии:",
|
||||
"loadingComposeProjects": "Загрузка проектов создания...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Исполнительный директор",
|
||||
"exec3": "Исполнитель: {{value}}",
|
||||
"executeCommandsInContainer": "Выполнять команды в контейнере",
|
||||
"filterNameImageOrId": "Имя фильтра, изображение или идентификатор…",
|
||||
"health": "Здоровье",
|
||||
"hostPort": "Порт хоста",
|
||||
"image": "Образ",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Не удалось удалить изображение. Он может использоваться контейнером.",
|
||||
"filterRepositoryTagOrId": "Фильтрация репозитория, тега или идентификатора…",
|
||||
"imageName": "Имя образа *",
|
||||
"imageRemovedSuccessfully": "Образ удален",
|
||||
"loadingImages": "Загрузка образов...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "Использование процессора",
|
||||
"diskUsage": "Использование диска",
|
||||
"down": "Недоступен",
|
||||
"hostHealth": "Состояние хоста",
|
||||
"latency": "Задержка",
|
||||
"loadAverage": "Средняя нагрузка",
|
||||
"loadingMetrics": "Загрузка показателей",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Создание сетей сейчас доступно только для локальной цели Docker.",
|
||||
"driver": "Драйвер",
|
||||
"failedToRemoveNetworkItMay": "Не удалось удалить сеть. Возможно, он используется.",
|
||||
"filterNameOrId": "Имя или идентификатор фильтра…",
|
||||
"loadingNetworks": "Загрузка сетей...",
|
||||
"networkName": "Имя сети *",
|
||||
"networkRemovedSuccessfully": "Сеть успешно удалена",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Создание томов сейчас доступно только для локальной цели Docker.",
|
||||
"driver": "Драйвер",
|
||||
"failedToRemoveVolumeItMay": "Не удалось удалить том. Возможно, он используется.",
|
||||
"filterNameOrMountpoint": "Имя фильтра или точка монтирования…",
|
||||
"loadingVolumes": "Загрузка томов...",
|
||||
"mountpoint": "Точка монтирования",
|
||||
"noMatchingVolumes": "Нет соответствующих томов",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Макс серверов",
|
||||
"maxUsers": "Максимальное количество пользователей",
|
||||
"members": "Члены",
|
||||
"resources": "Ресурсы",
|
||||
"sites": "Сайты",
|
||||
"slug": "Идентификатор",
|
||||
"unlimited": "Без ограничений"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "ไม่สามารถหยุดโปรเจกต์ compose ได้",
|
||||
"couldntUpdateProject": "ไม่สามารถอัปเดตโปรเจกต์ compose ได้",
|
||||
"dockerComposeUpD": "นักเทียบท่าเขียน -d",
|
||||
"filterProjectOrConfigPath": "กรองโปรเจ็กต์หรือเส้นทางการกำหนดค่า...",
|
||||
"imagesPulled": "ดึงอิมเมจแล้ว",
|
||||
"lines": "เส้น:",
|
||||
"loadingComposeProjects": "กำลังโหลดโปรเจ็กต์การเขียน...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "ผู้บริหาร",
|
||||
"exec3": "ดำเนินการ: {{value}}",
|
||||
"executeCommandsInContainer": "ดำเนินการคำสั่งในคอนเทนเนอร์",
|
||||
"filterNameImageOrId": "ชื่อตัวกรอง รูปภาพ หรือรหัส...",
|
||||
"health": "สุขภาพ",
|
||||
"hostPort": "พอร์ตโฮสต์",
|
||||
"image": "อิมเมจ",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "ไม่สามารถลบรูปภาพได้ มันอาจจะถูกใช้โดยภาชนะ",
|
||||
"filterRepositoryTagOrId": "กรองที่เก็บ แท็ก หรือ ID...",
|
||||
"imageName": "ชื่ออิมเมจ *",
|
||||
"imageRemovedSuccessfully": "ลบอิมเมจแล้ว",
|
||||
"loadingImages": "กำลังโหลดอิมเมจ...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "การใช้งานซีพียู",
|
||||
"diskUsage": "การใช้งานดิสก์",
|
||||
"down": "ลง",
|
||||
"hostHealth": "สถานะของโฮสต์",
|
||||
"latency": "เวลาแฝง",
|
||||
"loadAverage": "โหลดเฉลี่ย",
|
||||
"loadingMetrics": "กำลังโหลดเมตริก",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "ขณะนี้การสร้างเครือข่ายใช้ได้เฉพาะกับเป้าหมาย Docker ในเครื่องเท่านั้น",
|
||||
"driver": "คนขับ",
|
||||
"failedToRemoveNetworkItMay": "ไม่สามารถลบเครือข่าย มันอาจจะใช้งานได้",
|
||||
"filterNameOrId": "ชื่อหรือรหัสตัวกรอง...",
|
||||
"loadingNetworks": "กำลังโหลดเครือข่าย...",
|
||||
"networkName": "ชื่อเครือข่าย *",
|
||||
"networkRemovedSuccessfully": "ลบเครือข่ายเรียบร้อยแล้ว",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "ขณะนี้การสร้างวอลุ่มสามารถทำได้บนเป้าหมาย Docker ในเครื่องเท่านั้น",
|
||||
"driver": "คนขับ",
|
||||
"failedToRemoveVolumeItMay": "ไม่สามารถลบโวลุ่มได้ มันอาจจะใช้งานได้",
|
||||
"filterNameOrMountpoint": "ชื่อตัวกรองหรือจุดเมานท์...",
|
||||
"loadingVolumes": "กำลังโหลดวอลุ่ม...",
|
||||
"mountpoint": "จุดเมานต์",
|
||||
"noMatchingVolumes": "ไม่มีโวลุ่มที่ตรงกัน",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "เซิร์ฟเวอร์สูงสุด",
|
||||
"maxUsers": "ผู้ใช้สูงสุด",
|
||||
"members": "สมาชิก",
|
||||
"resources": "ทรัพยากร",
|
||||
"sites": "เว็บไซต์",
|
||||
"slug": "กระสุน",
|
||||
"unlimited": "ไม่จำกัด"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Compose projesi durdurulamadı.",
|
||||
"couldntUpdateProject": "Compose projesi güncellenemedi.",
|
||||
"dockerComposeUpD": "liman işçisi oluştur -d",
|
||||
"filterProjectOrConfigPath": "Projeyi veya yapılandırma yolunu filtreleyin…",
|
||||
"imagesPulled": "İmajlar çekildi",
|
||||
"lines": "Satırlar:",
|
||||
"loadingComposeProjects": "Proje oluşturma yükleniyor...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Yönetici",
|
||||
"exec3": "Yürütme: {{value}}",
|
||||
"executeCommandsInContainer": "Komutları kapsayıcıda yürütün",
|
||||
"filterNameImageOrId": "Adı, resmi veya kimliği filtreleyin…",
|
||||
"health": "Sağlık",
|
||||
"hostPort": "Ana makine portu",
|
||||
"image": "İmaj",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Resim kaldırılamadı. Bir konteyner tarafından kullanılıyor olabilir.",
|
||||
"filterRepositoryTagOrId": "Depoyu, etiketi veya kimliği filtreleyin…",
|
||||
"imageName": "İmaj Adı *",
|
||||
"imageRemovedSuccessfully": "İmaj silindi",
|
||||
"loadingImages": "İmajlar yükleniyor...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "CPU kullanımı",
|
||||
"diskUsage": "Disk kullanımı",
|
||||
"down": "Aşağı",
|
||||
"hostHealth": "Ana bilgisayar sağlığı",
|
||||
"latency": "Gecikme",
|
||||
"loadAverage": "Yük ortalaması",
|
||||
"loadingMetrics": "Metrikler yükleniyor",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Ağ oluşturmak şu anda yalnızca yerel Docker hedefinde mümkündür",
|
||||
"driver": "Sürücü",
|
||||
"failedToRemoveNetworkItMay": "Ağ kaldırılamadı. Kullanımda olabilir.",
|
||||
"filterNameOrId": "Adı veya kimliği filtrele…",
|
||||
"loadingNetworks": "Ağlar yükleniyor...",
|
||||
"networkName": "Ağ Adı *",
|
||||
"networkRemovedSuccessfully": "Ağ başarıyla kaldırıldı",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Birim oluşturma şu anda yalnızca yerel Docker hedefinde mümkündür",
|
||||
"driver": "Sürücü",
|
||||
"failedToRemoveVolumeItMay": "Birim kaldırılamadı. Kullanımda olabilir.",
|
||||
"filterNameOrMountpoint": "Filtre adı veya bağlama noktası…",
|
||||
"loadingVolumes": "Birimler yükleniyor...",
|
||||
"mountpoint": "Bağlantı Noktası",
|
||||
"noMatchingVolumes": "Eşleşen birim yok",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Maksimum sunucular",
|
||||
"maxUsers": "Maksimum kullanıcı",
|
||||
"members": "Üyeler",
|
||||
"resources": "Kaynaklar",
|
||||
"sites": "Siteler",
|
||||
"slug": "Sümüklüböcek",
|
||||
"unlimited": "Sınırsız"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "Không thể dừng dự án compose.",
|
||||
"couldntUpdateProject": "Không thể cập nhật dự án compose.",
|
||||
"dockerComposeUpD": "docker soạn thảo -d",
|
||||
"filterProjectOrConfigPath": "Lọc dự án hoặc đường dẫn cấu hình…",
|
||||
"imagesPulled": "Đã kéo các image",
|
||||
"lines": "Dòng:",
|
||||
"loadingComposeProjects": "Đang tải dự án soạn thư...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "Thực thi",
|
||||
"exec3": "Thực thi: {{value}}",
|
||||
"executeCommandsInContainer": "Thực thi các lệnh trong vùng chứa",
|
||||
"filterNameImageOrId": "Lọc tên, hình ảnh hoặc ID…",
|
||||
"health": "Sức khỏe",
|
||||
"hostPort": "Cổng máy chủ",
|
||||
"image": "Image",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "Không thể xóa hình ảnh. Nó có thể được sử dụng bởi một container.",
|
||||
"filterRepositoryTagOrId": "Lọc kho lưu trữ, thẻ hoặc ID…",
|
||||
"imageName": "Tên image *",
|
||||
"imageRemovedSuccessfully": "Đã xóa image",
|
||||
"loadingImages": "Đang tải image...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "mức sử dụng CPU",
|
||||
"diskUsage": "Sử dụng đĩa",
|
||||
"down": "Xuống",
|
||||
"hostHealth": "Tình trạng máy chủ",
|
||||
"latency": "Độ trễ",
|
||||
"loadAverage": "Tải trung bình",
|
||||
"loadingMetrics": "Đang tải số liệu",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "Tạo mạng hiện chỉ khả dụng trên mục tiêu Docker cục bộ",
|
||||
"driver": "Tài xế",
|
||||
"failedToRemoveNetworkItMay": "Không xóa được mạng. Nó có thể được sử dụng.",
|
||||
"filterNameOrId": "Lọc tên hoặc ID…",
|
||||
"loadingNetworks": "Đang tải mạng...",
|
||||
"networkName": "Tên mạng *",
|
||||
"networkRemovedSuccessfully": "Đã xóa mạng thành công",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "Việc tạo khối hiện chỉ khả dụng trên mục tiêu Docker cục bộ",
|
||||
"driver": "Tài xế",
|
||||
"failedToRemoveVolumeItMay": "Không thể xóa âm lượng. Nó có thể được sử dụng.",
|
||||
"filterNameOrMountpoint": "Tên bộ lọc hoặc điểm gắn kết…",
|
||||
"loadingVolumes": "Đang tải volume...",
|
||||
"mountpoint": "điểm gắn kết",
|
||||
"noMatchingVolumes": "Không có volume nào phù hợp",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "Máy chủ tối đa",
|
||||
"maxUsers": "Số người dùng tối đa",
|
||||
"members": "Thành viên",
|
||||
"resources": "Tài nguyên",
|
||||
"sites": "Trang web",
|
||||
"slug": "sên",
|
||||
"unlimited": "Không giới hạn"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "停止 Compose 项目失败",
|
||||
"couldntUpdateProject": "更新 Compose 项目失败",
|
||||
"dockerComposeUpD": "docker 组成-d",
|
||||
"filterProjectOrConfigPath": "过滤项目或配置路径...",
|
||||
"imagesPulled": "镜像已拉取",
|
||||
"lines": "线路:",
|
||||
"loadingComposeProjects": "正在加载撰写项目...",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "执行者",
|
||||
"exec3": "执行:{{value}}",
|
||||
"executeCommandsInContainer": "在容器中执行命令",
|
||||
"filterNameImageOrId": "过滤器名称、图像或 ID...",
|
||||
"health": "健康",
|
||||
"hostPort": "主机端口",
|
||||
"image": "镜像",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "删除图像失败。它可能正在被容器使用。",
|
||||
"filterRepositoryTagOrId": "过滤存储库、标签或 ID...",
|
||||
"imageName": "镜像名称 *",
|
||||
"imageRemovedSuccessfully": "镜像已删除",
|
||||
"loadingImages": "正在加载镜像...",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "CPU 使用率",
|
||||
"diskUsage": "磁盘使用率",
|
||||
"down": "向下",
|
||||
"hostHealth": "主机健康状况",
|
||||
"latency": "延迟",
|
||||
"loadAverage": "平均负载",
|
||||
"loadingMetrics": "加载指标",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "目前只能在本地 Docker 目标上创建网络",
|
||||
"driver": "驱动",
|
||||
"failedToRemoveNetworkItMay": "删除网络失败。它可能正在使用中。",
|
||||
"filterNameOrId": "过滤器名称或 ID...",
|
||||
"loadingNetworks": "正在加载网络...",
|
||||
"networkName": "网络名称 *",
|
||||
"networkRemovedSuccessfully": "网络删除成功",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "目前只能在本地 Docker 目标上创建卷",
|
||||
"driver": "驱动",
|
||||
"failedToRemoveVolumeItMay": "删除音量失败。它可能正在使用中。",
|
||||
"filterNameOrMountpoint": "过滤器名称或安装点...",
|
||||
"loadingVolumes": "正在加载卷...",
|
||||
"mountpoint": "挂载点",
|
||||
"noMatchingVolumes": "没有匹配的卷",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "最大服务器数",
|
||||
"maxUsers": "最大用户数",
|
||||
"members": "会员",
|
||||
"resources": "资源",
|
||||
"sites": "站点",
|
||||
"slug": "标识符",
|
||||
"unlimited": "无限制"
|
||||
|
||||
@@ -1020,7 +1020,6 @@
|
||||
"couldntStopProject": "無法停止 Compose 專案",
|
||||
"couldntUpdateProject": "無法更新 Compose 專案",
|
||||
"dockerComposeUpD": "docker compose up -d",
|
||||
"filterProjectOrConfigPath": "篩選專案或設定路徑…",
|
||||
"imagesPulled": "已下載的映像檔",
|
||||
"lines": "行數",
|
||||
"loadingComposeProjects": "正在載入 Compose 專案…",
|
||||
@@ -1441,7 +1440,6 @@
|
||||
"exec": "執行",
|
||||
"exec3": "執行:{{value}}",
|
||||
"executeCommandsInContainer": "在容器中執行命令",
|
||||
"filterNameImageOrId": "篩選名稱、映像檔或 ID…",
|
||||
"health": "健康",
|
||||
"hostPort": "主機連接埠",
|
||||
"image": "映像檔",
|
||||
@@ -3109,7 +3107,6 @@
|
||||
},
|
||||
"imagesTab": {
|
||||
"failedToRemoveImageItMay": "無法移除映像檔,可能正由容器使用。",
|
||||
"filterRepositoryTagOrId": "篩選儲存庫、標籤或 ID…",
|
||||
"imageName": "映像檔名稱 *",
|
||||
"imageRemovedSuccessfully": "已移除映像檔",
|
||||
"loadingImages": "正在載入映像檔…",
|
||||
@@ -3954,7 +3951,6 @@
|
||||
"cpuUsage": "CPU 使用率",
|
||||
"diskUsage": "磁碟使用情況",
|
||||
"down": "異常",
|
||||
"hostHealth": "主機健康狀況",
|
||||
"latency": "延遲",
|
||||
"loadAverage": "平均負載",
|
||||
"loadingMetrics": "載入指標",
|
||||
@@ -4041,7 +4037,6 @@
|
||||
"creatingNetworksIsOnlyAvailableOn": "目前建立網路僅可在本機 Docker 目標上使用",
|
||||
"driver": "驅動程式",
|
||||
"failedToRemoveNetworkItMay": "刪除網路失敗。它可能正在使用中。",
|
||||
"filterNameOrId": "依名稱或 ID 篩選…",
|
||||
"loadingNetworks": "正在載入網路…",
|
||||
"networkName": "網路名稱 *",
|
||||
"networkRemovedSuccessfully": "網路刪除成功",
|
||||
@@ -7566,7 +7561,6 @@
|
||||
"creatingVolumesIsOnlyAvailableOn": "目前只能在本機 Docker 目標上建立磁碟區",
|
||||
"driver": "驅動程式",
|
||||
"failedToRemoveVolumeItMay": "刪除磁碟區失敗。它可能正在使用中。",
|
||||
"filterNameOrMountpoint": "篩選名稱或掛載點…",
|
||||
"loadingVolumes": "正在載入磁碟區…",
|
||||
"mountpoint": "掛載點",
|
||||
"noMatchingVolumes": "沒有符合條件的磁碟區",
|
||||
@@ -7897,7 +7891,6 @@
|
||||
"maxServers": "最大伺服器數",
|
||||
"maxUsers": "最大使用者數",
|
||||
"members": "成員",
|
||||
"resources": "資源",
|
||||
"sites": "網站",
|
||||
"slug": "網址代稱",
|
||||
"unlimited": "無限制"
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { useMemo, useState } from 'react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { PageTopbar } from '@/components/ds';
|
||||
import { PageTopbarContext } from '@/hooks/useTopbarActions';
|
||||
|
||||
// Shell for a STANDALONE page — one that owns its whole route rather than
|
||||
// living inside a PageTopbar tab group. It is the exact same frame
|
||||
@@ -17,6 +19,11 @@ import { PageTopbar } from '@/components/ds';
|
||||
// sidebar's surface and a bottom border precisely because it is meant to be
|
||||
// chrome pinned to the frame, not the first row of the page body.
|
||||
//
|
||||
// Sections inside the page can publish into its bar with useListTopbar /
|
||||
// useTopbarActions, the same way a tab-group page does: what they publish
|
||||
// renders after `actions`, so a page-wide button (Prune) stays put while the
|
||||
// create button and search follow the active section.
|
||||
//
|
||||
// `fill` hands the body the whole region to manage its own scrolling (log
|
||||
// consoles, file trees, terminals); the default centers and pads it.
|
||||
export default function PageLayout({
|
||||
@@ -32,7 +39,12 @@ export default function PageLayout({
|
||||
contentClassName,
|
||||
children,
|
||||
}) {
|
||||
const [published, setPublished] = useState(null);
|
||||
const host = useMemo(() => ({ setTopbarActions: setPublished }), []);
|
||||
const barActions = actions || published ? <>{actions}{published}</> : null;
|
||||
|
||||
return (
|
||||
<PageTopbarContext.Provider value={host}>
|
||||
<div className={cn('page-container page-container--full-bleed sk-pageshell', className)}>
|
||||
<PageTopbar
|
||||
className={topbarClassName}
|
||||
@@ -41,7 +53,7 @@ export default function PageLayout({
|
||||
meta={meta}
|
||||
tabs={tabs}
|
||||
navLabel={navLabel}
|
||||
actions={actions}
|
||||
actions={barActions}
|
||||
/>
|
||||
<div className="sk-pageshell__content">
|
||||
{fill ? (
|
||||
@@ -51,5 +63,6 @@ export default function PageLayout({
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</PageTopbarContext.Provider>
|
||||
);
|
||||
}
|
||||
@@ -20,8 +20,7 @@ import {
|
||||
Pill, SearchField, SegControl, DataTable, DataTableFooter,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import BackupStorageNotice from '../components/backups/BackupStorageNotice';
|
||||
import BackupsOverview from '../components/backups/BackupsOverview';
|
||||
@@ -31,7 +30,7 @@ import { useBackupSchedules } from '../hooks/useBackupSchedules';
|
||||
import StorageDestinations from '../components/backups/StorageDestinations';
|
||||
import { useManagedProfile } from '../contexts/useManagedProfile';
|
||||
import ManagedCard from '../components/ManagedCard';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -730,20 +729,10 @@ const Backups = () => {
|
||||
// The chrome acts on the snapshot table, so it is only published while that
|
||||
// section is on screen — the other tabs are forms and a KPI band, with
|
||||
// nothing to filter, sort or export.
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadData} />
|
||||
</>, { enabled: activeTab === 'snapshots' },
|
||||
);
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="sk-tabgroup__inner backups-page">
|
||||
{topbarChrome}
|
||||
<EmptyState loading loadingVariant="table" size="lg" title={t('app.backups.loadingBackupData', 'Loading backup data…')} />
|
||||
</div>
|
||||
);
|
||||
@@ -751,7 +740,6 @@ const Backups = () => {
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner backups-page">
|
||||
{topbarChrome}
|
||||
{error && (
|
||||
<div className="alert alert-danger">
|
||||
{error}
|
||||
@@ -785,11 +773,10 @@ const Backups = () => {
|
||||
and the row count belongs to the footer, under the rows
|
||||
it is counting. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadData }}
|
||||
label="snapshots"
|
||||
onCreate={chrome.createView}
|
||||
|
||||
actions={chromeActions}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import PagePrimaryButton from '@/components/PagePrimaryButton';
|
||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -13,11 +14,10 @@ import {
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Switch } from '@/components/ui/switch';
|
||||
import {
|
||||
Pill, SearchField, DataTable, Drawer, DataTableFooter,
|
||||
Pill, DataTable, Drawer, DataTableFooter, ListActions,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -432,19 +432,26 @@ const CronJobs = () => {
|
||||
icon={<Clock size={18} />}
|
||||
title={t('app.cronJobs.cronJobs', 'Cron jobs')}
|
||||
actions={(
|
||||
<>
|
||||
<Button variant="outline" size="sm" onClick={loadData}>
|
||||
<RefreshCw size={15} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
<Button size="sm" onClick={openCreateDrawer}>
|
||||
<Plus size={15} /> {t('app.cronJobs.newCronJob', 'New cron job')}
|
||||
</Button>
|
||||
<SearchField
|
||||
value={search}
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.cronJobs.searchJobsOrCommands', 'Search jobs or commands…')}
|
||||
/>
|
||||
</>
|
||||
<ListActions
|
||||
secondary={(
|
||||
<Button variant="outline" size="sm" onClick={loadData}>
|
||||
<RefreshCw size={15} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
)}
|
||||
primary={(
|
||||
<PagePrimaryButton
|
||||
id="cron-new"
|
||||
label={t('app.cronJobs.newCronJob', 'New cron job')}
|
||||
shortLabel={t('common.actions.new', 'New')}
|
||||
onClick={openCreateDrawer}
|
||||
/>
|
||||
)}
|
||||
search={{
|
||||
value: search,
|
||||
onSearch: setSearch,
|
||||
placeholder: t('app.cronJobs.searchJobsOrCommands', 'Search jobs or commands…'),
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
>
|
||||
{error && (
|
||||
@@ -480,9 +487,9 @@ const CronJobs = () => {
|
||||
{/* No KPI strip: every number it carried is already on the
|
||||
segment you'd click to act on it (mirrors /domains). */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadData }}
|
||||
label="jobs"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
{/* The daemon's health rides with the chrome
|
||||
@@ -490,11 +497,6 @@ const CronJobs = () => {
|
||||
reason a "next run" may never happen, so it
|
||||
belongs beside the table it invalidates. */}
|
||||
{serviceNote && <span className="cron-servicenote">{serviceNote}</span>}
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadData} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { Send, Inbox } from 'lucide-react';
|
||||
import { Send, Inbox, ListFilter } from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import {
|
||||
FilterDrawer, FilterButton, DataTable, DataTableFooter,
|
||||
FilterDrawer, DataTable, DataTableFooter,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -252,16 +251,6 @@ export default function DeliveryLog() {
|
||||
icon={<Send size={18} />}
|
||||
title={t('app.deliveryLog.notificationDeliveryLog', 'Notification delivery log')}
|
||||
meta="Outbound deliveries across all channels"
|
||||
actions={(
|
||||
// Labelled "Server filters" to keep it apart from the toolbar's
|
||||
// filter icon: this one re-queries the whole table, that one
|
||||
// narrows the rows already on screen.
|
||||
<FilterButton
|
||||
label={t('app.deliveryLog.serverFilters', 'Server filters')}
|
||||
count={serverFilterCount}
|
||||
onClick={() => setFiltersOpen(true)}
|
||||
/>
|
||||
)}
|
||||
>
|
||||
<div className="sk-dlog">
|
||||
<EmailProviders />
|
||||
@@ -270,9 +259,16 @@ export default function DeliveryLog() {
|
||||
three built-in views, and the row count belongs to the
|
||||
footer, under the rows it is counting. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="deliveries"
|
||||
onCreate={chrome.createView}
|
||||
// "Server filters" re-queries the whole table; "Filters and
|
||||
// fields" above it narrows the rows already on screen.
|
||||
extra={[{
|
||||
icon: ListFilter,
|
||||
label: `${t('app.deliveryLog.serverFilters', 'Server filters')}${serverFilterCount > 0 ? ` (${serverFilterCount})` : ''}`,
|
||||
onSelect: () => setFiltersOpen(true),
|
||||
}]}
|
||||
actions={(
|
||||
<>
|
||||
{/* The chips only ever show CLIENT rules, so the
|
||||
@@ -285,11 +281,6 @@ export default function DeliveryLog() {
|
||||
<i>·</i>
|
||||
{channel === 'all' ? t('app.deliveryLog.allChannelsLower', 'all channels') : channel}
|
||||
</span>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -6,12 +6,11 @@ import Modal from '../components/Modal';
|
||||
import EmptyState from '../components/EmptyState';
|
||||
import ErrorState from '../components/ErrorState';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { DataTable, DataTableFooter, Pill, SearchField, SegControl, statusKind } from '@/components/ds';
|
||||
import { DataTable, DataTableFooter, Pill, SegControl, statusKind } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import RequiresDocker from '../components/RequiresDocker';
|
||||
@@ -26,12 +25,7 @@ const DEPLOY_POLL_MS = 3000;
|
||||
// fetched, so this is the reach of a filter until the user asks for more.
|
||||
const PAGE = 100;
|
||||
import {
|
||||
KIND_CHIP,
|
||||
stepTicks,
|
||||
sourceRef,
|
||||
formatDuration,
|
||||
relativeTime,
|
||||
activityGroup,
|
||||
KIND_CHIP, stepTicks, sourceRef, formatDuration, relativeTime, activityGroup,
|
||||
} from '../utils/deployActivity';
|
||||
|
||||
// Built-in saved views. These replace the segmented All/Running/Succeeded/Failed
|
||||
@@ -320,56 +314,43 @@ const Deployments = () => {
|
||||
setGroupBy,
|
||||
});
|
||||
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<>
|
||||
<SearchField
|
||||
value={search}
|
||||
onSearch={setSearch}
|
||||
placeholder={t('app.deployments.searchDeploys', 'Search deploys…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadJobs} />
|
||||
</>,
|
||||
);
|
||||
|
||||
useTopbarActions(() =>
|
||||
<>
|
||||
{/* No "New service" button here: unlike the design mock, this tab
|
||||
group already carries a New Service tab, and a second entry
|
||||
point crowded the strip into overflow. No Refresh button
|
||||
either — the chrome's "⋮" owns "Refresh data" on every page. */}
|
||||
{simInfo?.enabled && (
|
||||
<Button variant="outline" size="sm" onClick={() => setSimOpen(true)}>
|
||||
<FlaskConical size={16} />
|
||||
{t('app.deployments.testDeployment', 'Test deployment')}
|
||||
// No create button: this tab group already carries a New service tab.
|
||||
// Refresh is in the view selector's menu with the other table tools.
|
||||
useListTopbar(() => ({
|
||||
secondary: (
|
||||
<>
|
||||
{simInfo?.enabled && (
|
||||
<Button variant="outline" size="sm" onClick={() => setSimOpen(true)}>
|
||||
<FlaskConical size={16} />
|
||||
{t('app.deployments.testDeployment', 'Test deployment')}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
aria-pressed={autoRefresh}
|
||||
onClick={() => setAutoRefresh((v) => !v)}
|
||||
title={t('app.deployments.autoRefreshEvery3s', 'Auto-refresh every 3s')}
|
||||
>
|
||||
<RefreshCw size={16} className={autoRefresh ? 'spin' : ''} />
|
||||
{autoRefresh ? t('app.deployments.live', 'Live') : t('app.deployments.paused', 'Paused')}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant={autoRefresh ? 'default' : 'outline'}
|
||||
size="sm"
|
||||
onClick={() => setAutoRefresh((v) => !v)}
|
||||
title={t('app.deployments.autoRefreshEvery3s', 'Auto-refresh every 3s')}
|
||||
>
|
||||
<RefreshCw size={16} className={autoRefresh ? 'spin' : ''} />
|
||||
{autoRefresh ? t('app.deployments.live', 'Live') : t('app.deployments.paused', 'Paused')}
|
||||
</Button>
|
||||
</>,
|
||||
[autoRefresh, simInfo?.enabled]
|
||||
);
|
||||
</>
|
||||
),
|
||||
search: {
|
||||
value: search,
|
||||
onSearch: setSearch,
|
||||
placeholder: t('app.deployments.searchDeploys', 'Search deploys…'),
|
||||
},
|
||||
}), [autoRefresh, simInfo?.enabled, search]);
|
||||
|
||||
return (
|
||||
<RequiresDocker what="Deployments">
|
||||
<div className="sk-tabgroup__inner deployments-page">
|
||||
{topbarChrome}
|
||||
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadJobs }}
|
||||
label="deploys"
|
||||
onCreate={chrome.createView}
|
||||
actions={chromeActions}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -3,7 +3,6 @@ import useTabParam from '../hooks/useTabParam';
|
||||
import api from '../services/api';
|
||||
import EmptyState from '../components/EmptyState';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { MetricCard, KpiBand } from '@/components/ds';
|
||||
import ServerPicker from '../components/ServerPicker';
|
||||
import PageLayout from '@/layouts/PageLayout';
|
||||
import { Box, Boxes, ChevronDown, Download, Power, RefreshCw, UserCheck, Layers, HardDrive, Network as NetworkIcon, Package } from 'lucide-react';
|
||||
@@ -11,13 +10,12 @@ import {
|
||||
ServerContext,
|
||||
VALID_TABS,
|
||||
LOCAL_DOCKER_TARGET,
|
||||
normalizeListResponse,
|
||||
} from '../components/docker/dockerHelpers';
|
||||
import ContainersTab, { RunContainerButton } from '../components/docker/ContainersTab';
|
||||
import ContainersTab from '../components/docker/ContainersTab';
|
||||
import ComposeTab from '../components/docker/ComposeTab';
|
||||
import ImagesTab, { PullImageButton } from '../components/docker/ImagesTab';
|
||||
import NetworksTab, { CreateNetworkButton } from '../components/docker/NetworksTab';
|
||||
import VolumesTab, { CreateVolumeButton } from '../components/docker/VolumesTab';
|
||||
import ImagesTab from '../components/docker/ImagesTab';
|
||||
import NetworksTab from '../components/docker/NetworksTab';
|
||||
import VolumesTab from '../components/docker/VolumesTab';
|
||||
import PruneButton from '../components/docker/PruneButton';
|
||||
import RequiresDocker from '../components/RequiresDocker';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -30,13 +28,6 @@ const Docker = () => {
|
||||
const [retrying, setRetrying] = useState(false);
|
||||
const [selectedServer, setSelectedServer] = useState(LOCAL_DOCKER_TARGET);
|
||||
const [availableServers, setAvailableServers] = useState([LOCAL_DOCKER_TARGET]);
|
||||
const [stats, setStats] = useState({
|
||||
containers: { total: 0, running: 0, stopped: 0 },
|
||||
images: { total: 0, size: '0 B' },
|
||||
volumes: { total: 0 },
|
||||
networks: { total: 0 }
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
checkDockerStatus();
|
||||
}, [selectedServer]); // eslint-disable-line react-hooks/exhaustive-deps
|
||||
@@ -73,7 +64,7 @@ const Docker = () => {
|
||||
const status = await api.getDockerStatus();
|
||||
setDockerStatus(status);
|
||||
if (status.installed) {
|
||||
loadStats();
|
||||
setLoading(false);
|
||||
} else {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -82,7 +73,7 @@ const Docker = () => {
|
||||
const serverData = await api.getServer(selectedServer.id);
|
||||
if (serverData.status === 'online' || serverData.server?.status === 'online') {
|
||||
setDockerStatus({ installed: true, running: true });
|
||||
loadStats();
|
||||
setLoading(false);
|
||||
} else {
|
||||
setDockerStatus({ installed: false, error: 'Server agent is offline' });
|
||||
setLoading(false);
|
||||
@@ -100,78 +91,6 @@ const Docker = () => {
|
||||
setRetrying(false);
|
||||
}
|
||||
|
||||
async function loadStats() {
|
||||
try {
|
||||
let containersData, imagesData, volumesData, networksData;
|
||||
|
||||
if (selectedServer.id === 'local') {
|
||||
[containersData, imagesData, volumesData, networksData] = await Promise.all([
|
||||
api.getContainers(true),
|
||||
api.getImages(),
|
||||
api.getVolumes(),
|
||||
api.getNetworks()
|
||||
]);
|
||||
} else {
|
||||
[containersData, imagesData, volumesData, networksData] = await Promise.all([
|
||||
api.getRemoteContainers(selectedServer.id, true),
|
||||
api.getRemoteImages(selectedServer.id),
|
||||
api.getRemoteVolumes(selectedServer.id),
|
||||
api.getRemoteNetworks(selectedServer.id)
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
const containers = selectedServer.id === 'local'
|
||||
? containersData.containers || []
|
||||
: normalizeListResponse(containersData, 'containers');
|
||||
const images = selectedServer.id === 'local'
|
||||
? imagesData.images || []
|
||||
: normalizeListResponse(imagesData, 'images');
|
||||
const volumes = selectedServer.id === 'local'
|
||||
? volumesData.volumes || []
|
||||
: normalizeListResponse(volumesData, 'volumes');
|
||||
const networks = selectedServer.id === 'local'
|
||||
? networksData.networks || []
|
||||
: normalizeListResponse(networksData, 'networks');
|
||||
|
||||
const running = containers.filter(c => c.state === 'running').length;
|
||||
|
||||
setStats({
|
||||
containers: {
|
||||
total: containers.length,
|
||||
running,
|
||||
stopped: containers.length - running
|
||||
},
|
||||
images: {
|
||||
total: images.length,
|
||||
size: formatTotalImageSize(images)
|
||||
},
|
||||
volumes: { total: volumes.length },
|
||||
networks: { total: networks.length }
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Failed to load stats:', err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}
|
||||
|
||||
function formatTotalImageSize(images) {
|
||||
const sizes = images.map(img => {
|
||||
const size = img.size || '0 B';
|
||||
const match = size.match(/^([\d.]+)\s*(B|KB|MB|GB|TB)?$/i);
|
||||
if (!match) return 0;
|
||||
const [, num, unit = 'B'] = match;
|
||||
const multipliers = { B: 1, KB: 1024, MB: 1024**2, GB: 1024**3, TB: 1024**4 };
|
||||
return parseFloat(num) * (multipliers[unit.toUpperCase()] || 1);
|
||||
});
|
||||
const total = sizes.reduce((a, b) => a + b, 0);
|
||||
if (total >= 1024**3) return `${(total / 1024**3).toFixed(1)} GB`;
|
||||
if (total >= 1024**2) return `${(total / 1024**2).toFixed(1)} MB`;
|
||||
if (total >= 1024) return `${(total / 1024).toFixed(1)} KB`;
|
||||
return `${total} B`;
|
||||
}
|
||||
|
||||
const tabs = [
|
||||
{ id: 'containers', label: t('app.docker.containers', 'Containers'), icon: Box },
|
||||
{ id: 'compose', label: t('app.docker.compose', 'Compose'), icon: Package },
|
||||
@@ -182,7 +101,7 @@ const Docker = () => {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<PageLayout className="docker-page" icon={<Box size={18} />} title={t('common.labels.docker', 'Docker')} tabs={tabs}>
|
||||
<PageLayout className="docker-page" navLabel={t('common.labels.docker', 'Docker')} tabs={tabs}>
|
||||
<EmptyState loading loadingVariant="table" title={t('app.docker.checkingDockerStatus', 'Checking Docker status…')} />
|
||||
</PageLayout>
|
||||
);
|
||||
@@ -249,8 +168,9 @@ const Docker = () => {
|
||||
className="docker-page"
|
||||
contentClassName="dx-page"
|
||||
fill
|
||||
icon={<Box size={18} />}
|
||||
title={t('common.labels.docker', 'Docker')}
|
||||
// No title: like every tab group, the tab strip is the heading and
|
||||
// the sidebar already names the section.
|
||||
navLabel={t('common.labels.docker', 'Docker')}
|
||||
tabs={tabs}
|
||||
actions={(
|
||||
<>
|
||||
@@ -266,31 +186,18 @@ const Docker = () => {
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
<PruneButton onPruned={loadStats} />
|
||||
{activeTab === 'containers' && <RunContainerButton />}
|
||||
{activeTab === 'images' && <PullImageButton />}
|
||||
{activeTab === 'networks' && <CreateNetworkButton />}
|
||||
{activeTab === 'volumes' && <CreateVolumeButton />}
|
||||
{/* Page-wide. Each tab publishes its own create button and
|
||||
search after these (useListTopbar). */}
|
||||
<PruneButton />
|
||||
</>
|
||||
)}
|
||||
>
|
||||
<KpiBand>
|
||||
<MetricCard tone="accent" icon={<Box size={16} />} value={stats.containers.total} label={t('app.docker.containers', 'Containers')}>
|
||||
<div className="sk-kpi__sub"><span>{stats.containers.running} running</span></div>
|
||||
</MetricCard>
|
||||
<MetricCard tone="cyan" icon={<Layers size={16} />} value={stats.images.total} label={t('app.docker.images', 'Images')}>
|
||||
<div className="sk-kpi__sub"><span>{stats.images.size}</span></div>
|
||||
</MetricCard>
|
||||
<MetricCard tone="violet" icon={<HardDrive size={16} />} value={stats.volumes.total} label={t('app.docker.volumes', 'Volumes')} />
|
||||
<MetricCard tone="green" icon={<NetworkIcon size={16} />} value={stats.networks.total} label={t('app.docker.networks', 'Networks')} />
|
||||
</KpiBand>
|
||||
|
||||
<div className="dx-panel">
|
||||
{activeTab === 'containers' && <ContainersTab onStatsChange={loadStats} />}
|
||||
{activeTab === 'compose' && <ComposeTab onStatsChange={loadStats} />}
|
||||
{activeTab === 'images' && <ImagesTab onStatsChange={loadStats} />}
|
||||
{activeTab === 'networks' && <NetworksTab onStatsChange={loadStats} />}
|
||||
{activeTab === 'volumes' && <VolumesTab onStatsChange={loadStats} />}
|
||||
{activeTab === 'containers' && <ContainersTab />}
|
||||
{activeTab === 'compose' && <ComposeTab />}
|
||||
{activeTab === 'images' && <ImagesTab />}
|
||||
{activeTab === 'networks' && <NetworksTab />}
|
||||
{activeTab === 'volumes' && <VolumesTab />}
|
||||
</div>
|
||||
</PageLayout>
|
||||
</ServerContext.Provider>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { useState, useEffect, useCallback, useMemo, useId } from 'react';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import {
|
||||
Globe, Plus, ShieldCheck, RefreshCw, Trash2, ExternalLink,
|
||||
AlertTriangle, Lock, Search, ChevronRight,
|
||||
Globe, Plus, ShieldCheck, RefreshCw, Trash2, ExternalLink, AlertTriangle, Lock, Search, ChevronRight,
|
||||
} from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -23,13 +22,11 @@ import { Checkbox } from '@/components/ui/checkbox';
|
||||
import {
|
||||
Select, SelectTrigger, SelectContent, SelectItem, SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import { SearchField, Pill, Drawer } from '@/components/ds';
|
||||
import { Pill, Drawer } from '@/components/ds';
|
||||
import {
|
||||
DataGrid, GridViewPicker, GridChips, GridBulkBar, GridFooter,
|
||||
GridToolsMenu, GridFilterDrawer, GridFilterButton,
|
||||
useGridConfig, useGridRows, exportRows,
|
||||
DataGrid, GridViewPicker, GridChips, GridBulkBar, GridFooter, GridFilterDrawer, useGridConfig, useGridRows, exportRows,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
import { useConfirm } from '@/hooks/useConfirm';
|
||||
import useFocusParam from '@/hooks/useFocusParam';
|
||||
import RegistrarPortfolio from '../components/domains/RegistrarPortfolio';
|
||||
@@ -631,38 +628,38 @@ const Domains = () => {
|
||||
};
|
||||
|
||||
// ── top bar ──────────────────────────────────────────────
|
||||
// Fixed shape on every page: page actions, then search, then the filter
|
||||
// icon, then the overflow "⋮". The search box must not move when a page
|
||||
// adds or removes an action, so it sits AFTER the actions and before the
|
||||
// two fixed-width icon buttons.
|
||||
useTopbarActions(() => (
|
||||
<>
|
||||
// The table's tools, shown in the view selector's menu.
|
||||
const toolsProps = {
|
||||
cfg,
|
||||
columns,
|
||||
rows: view.filtered,
|
||||
selectedRows: pickedRows,
|
||||
viewName: grid.views.activeView?.name || 'domains',
|
||||
noun: 'domains',
|
||||
onRefresh: loadData,
|
||||
onReset: grid.resetToView,
|
||||
onCopyLink: grid.copyLink,
|
||||
onDensity: grid.setDensity,
|
||||
onExported: (n, fields, format) => toast.success(t('app.domains.rowsFields', '{{n}} rows · {{fields}} fields · {{value}}', { n: n, fields: fields, value: format.toUpperCase() })),
|
||||
};
|
||||
const hiddenFieldCount = columns.filter((column) => column.header && !cfg.cols.includes(column.key)).length;
|
||||
|
||||
useListTopbar(() => ({
|
||||
secondary: (
|
||||
<Button variant="outline" size="sm" onClick={loadData}>
|
||||
<RefreshCw size={15} /> {t('app.domains.checkDns', 'Check DNS')}
|
||||
</Button>
|
||||
),
|
||||
primary: (
|
||||
<PagePrimaryButton
|
||||
id="domains-add"
|
||||
label={t('app.domains.addDomain', 'Add domain')}
|
||||
shortLabel={t('common.actions.add', 'Add')}
|
||||
onClick={() => setShowAddModal(true)}
|
||||
/>
|
||||
<Button variant="outline" size="sm" onClick={loadData}>
|
||||
<RefreshCw size={15} /> {t('app.domains.checkDns', 'Check DNS')}
|
||||
</Button>
|
||||
<SearchField value={search} onSearch={setSearch} placeholder={t('app.domains.searchDomains', 'Search domains…')} />
|
||||
<GridFilterButton count={cfg.filters.rules.length} onClick={() => setFilterOpen(true)} />
|
||||
<GridToolsMenu
|
||||
cfg={cfg}
|
||||
columns={columns}
|
||||
rows={view.filtered}
|
||||
selectedRows={pickedRows}
|
||||
viewName={grid.views.activeView?.name || 'domains'}
|
||||
noun="domains"
|
||||
onRefresh={loadData}
|
||||
onReset={grid.resetToView}
|
||||
onCopyLink={grid.copyLink}
|
||||
onDensity={grid.setDensity}
|
||||
onExported={(n, fields, format) => toast.success(t('app.domains.rowsFields', '{{n}} rows · {{fields}} fields · {{value}}', { n: n, fields: fields, value: format.toUpperCase() }))}
|
||||
/>
|
||||
</>
|
||||
), [search, cfg, columns, view.filtered, pickedRows, grid.views.activeView]);
|
||||
),
|
||||
search: { value: search, onSearch: setSearch, placeholder: t('app.domains.searchDomains', 'Search domains…') },
|
||||
}), [search]);
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner domains-page">
|
||||
@@ -703,6 +700,12 @@ const Domains = () => {
|
||||
views={grid.views}
|
||||
label="domains"
|
||||
onCreate={createView}
|
||||
filters={{
|
||||
count: cfg.filters.rules.length,
|
||||
hidden: hiddenFieldCount,
|
||||
onOpen: () => setFilterOpen(true),
|
||||
}}
|
||||
tools={toolsProps}
|
||||
/>
|
||||
|
||||
<GridChips
|
||||
|
||||
@@ -10,10 +10,9 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { AlertOctagon, CheckCheck, RefreshCw, Trash2, Undo2 } from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import {
|
||||
DataTable, DataTableFooter, Drawer, ListToolbar, Pill, SearchField, SegControl,
|
||||
DataTable, DataTableFooter, Drawer, ListToolbar, Pill, SegControl,
|
||||
} from '@/components/ds';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import { useConfirm } from '@/hooks/useConfirm';
|
||||
import { useAuth } from '../contexts/useAuth.js';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -22,6 +21,7 @@ import { timeAgo } from '../utils/time';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { formatDateTime } from '@/utils/intl';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
|
||||
@@ -131,17 +131,14 @@ export default function Errors() {
|
||||
|
||||
// Search + Refresh live in the group's shared top bar, the way every other
|
||||
// list page in the panel does it.
|
||||
useTopbarActions(() => {
|
||||
if (!isAdmin) return null;
|
||||
return (
|
||||
<>
|
||||
<SearchField value={q} onSearch={onSearch} placeholder={t('app.errors.searchMessagesOrTypes', 'Search messages or types…')} />
|
||||
<Button variant="outline" size="sm" onClick={refresh} disabled={loading}>
|
||||
<RefreshCw size={14} className={loading ? 'spin' : ''} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
}, [isAdmin, q, loading, load, loadStats]);
|
||||
useListTopbar(() => (isAdmin ? {
|
||||
secondary: (
|
||||
<Button variant="outline" size="sm" onClick={refresh} disabled={loading}>
|
||||
<RefreshCw size={14} className={loading ? 'spin' : ''} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
),
|
||||
search: { value: q, onSearch, placeholder: t('app.errors.searchMessagesOrTypes', 'Search messages or types…') },
|
||||
} : {}), [isAdmin, q, loading, load, loadStats]);
|
||||
|
||||
// The list rows already carry the full record (traceback, context); the
|
||||
// detail call only refreshes count/resolved while the drawer is open.
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
import { useCallback, useState, useEffect, useId } from 'react';
|
||||
import {
|
||||
FolderUp, UserPlus, Network, Activity, Server, Users as UsersIcon,
|
||||
Cable, KeyRound, Ban, Check, Trash2, RefreshCw, X,
|
||||
FolderUp, UserPlus, Network, Activity, Server, Users as UsersIcon, Cable, KeyRound, Ban, Check, Trash2, RefreshCw, X,
|
||||
} from 'lucide-react';
|
||||
import useTabParam from '../hooks/useTabParam';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import { api } from '../services/api';
|
||||
import { DataTable, DataTableFooter, MetricCard, KpiBand, Pill, ListToolbar, SegControl } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -667,18 +665,9 @@ function FTPServer() {
|
||||
on what you are looking at; Refresh is in
|
||||
the "⋮". */}
|
||||
<GridViewPicker
|
||||
views={userChrome.views}
|
||||
{...userChrome.pickerProps}
|
||||
tools={{ ...userChrome.toolsProps, onRefresh: loadUsers }}
|
||||
label="users"
|
||||
onCreate={userChrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={userChrome.filterCount}
|
||||
onClick={() => userChrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...userChrome.toolsProps} onRefresh={loadUsers} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
<ListToolbar>
|
||||
<Button onClick={() => setShowUserModal(true)}>
|
||||
@@ -726,18 +715,9 @@ function FTPServer() {
|
||||
reachable even with nothing connected —
|
||||
the empty state is the table's now. */}
|
||||
<GridViewPicker
|
||||
views={connChrome.views}
|
||||
{...connChrome.pickerProps}
|
||||
tools={{ ...connChrome.toolsProps, onRefresh: loadConnections }}
|
||||
label="connections"
|
||||
onCreate={connChrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={connChrome.filterCount}
|
||||
onClick={() => connChrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...connChrome.toolsProps} onRefresh={loadConnections} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
<GridChips {...connChrome.chipProps} />
|
||||
|
||||
@@ -3,14 +3,12 @@ import { Link } from 'react-router-dom';
|
||||
import { AlertTriangle, Network, RefreshCw, Server as ServerIcon } from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { DataTable, Pill, serviceStatusKind, statusLabel as dsStatusLabel } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import EmptyState from '../components/EmptyState';
|
||||
import InfoTip from '../components/InfoTip';
|
||||
@@ -19,6 +17,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { t } from '../i18n/t';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { formatDateTime } from '@/utils/intl';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
// Fleet-wide reverse-proxy dashboard (Phase 4 of C6). Aggregates every
|
||||
// server's managed-proxy posture into one table: which proxy each server runs
|
||||
@@ -338,12 +337,14 @@ const FleetProxy = () => {
|
||||
}, [load]);
|
||||
|
||||
// Publish a Refresh button into the shared Servers tab-group top bar.
|
||||
useTopbarActions(() => (
|
||||
<Button size="sm" onClick={load} disabled={loading}>
|
||||
<RefreshCw size={16} className={loading ? 'animate-spin' : ''} />
|
||||
{t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
), [loading]);
|
||||
useListTopbar(() => ({
|
||||
secondary: (
|
||||
<Button variant="outline" size="sm" onClick={load} disabled={loading}>
|
||||
<RefreshCw size={16} className={loading ? 'animate-spin' : ''} />
|
||||
{t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
),
|
||||
}), [loading]);
|
||||
|
||||
// No KPI band and no page title: every tile it held was a re-count of a
|
||||
// column already on the table below, and the tab strip names the page.
|
||||
@@ -368,19 +369,9 @@ const FleetProxy = () => {
|
||||
|
||||
// Filter + "⋮" ride in the shared Servers top bar. The toolbar they used to
|
||||
// sit in held nothing else but a re-count of the table underneath it.
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>,
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner fleet-proxy">
|
||||
{topbarChrome}
|
||||
{error ? (
|
||||
<div className="fleet-proxy__error">
|
||||
<p>{error}</p>
|
||||
@@ -389,11 +380,10 @@ const FleetProxy = () => {
|
||||
) : (
|
||||
<>
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="servers"
|
||||
onCreate={chrome.createView}
|
||||
|
||||
actions={chromeActions}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -19,14 +19,13 @@ import EmptyState from '../components/EmptyState';
|
||||
import ErrorState from '../components/ErrorState';
|
||||
import { DataTable, DataTableFooter, Drawer, Pill, SearchField } from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import { describeAlert, formatReading, metricLabel } from '../components/monitoring/alertCopy';
|
||||
import { impactTone, INCIDENT_STATES } from '../components/monitoring/monitorShared';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -478,17 +477,6 @@ export default function Incidents() {
|
||||
applyPage: applyViewPageState,
|
||||
});
|
||||
|
||||
const tableChrome = (
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
);
|
||||
const { hosted, portal: topbarChrome } = useTopbarChrome(tableChrome);
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div className="sk-tabgroup__inner incidents-page">
|
||||
@@ -503,12 +491,10 @@ export default function Incidents() {
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner incidents-page">
|
||||
{topbarChrome}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="incidents"
|
||||
onCreate={chrome.createView}
|
||||
actions={hosted ? null : tableChrome}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -15,17 +15,15 @@ import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { ListChecks, RefreshCw, RotateCcw, XCircle, Play, Clock } from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import {
|
||||
Pill, DataTable, DataTableFooter, SegControl,
|
||||
SearchField, FilterDrawer, FilterButton, countActiveFilters,
|
||||
statusKind,
|
||||
Pill, DataTable, DataTableFooter, SegControl, FilterDrawer, countActiveFilters, statusKind,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridToolsMenu,
|
||||
useTableChrome, GridViewPicker, GridChips,
|
||||
} from '@/components/ds/grid';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import EmptyState from '../components/EmptyState';
|
||||
import ErrorState from '../components/ErrorState';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { useAuth } from '../contexts/useAuth.js';
|
||||
@@ -272,22 +270,18 @@ export default function Jobs() {
|
||||
// Activity tab; the Scheduled tab just gets Refresh. The view picker is NOT
|
||||
// here any more — it is the Activity table's own heading, because it
|
||||
// describes that table and nothing else on the page.
|
||||
useTopbarActions(() => {
|
||||
if (!isAdmin) return null;
|
||||
return (
|
||||
<>
|
||||
{!scheduledView && (
|
||||
<>
|
||||
<SearchField value={q} onSearch={onSearch} placeholder={t('app.jobs.searchByKindOrOwner', 'Search by kind or owner…')} />
|
||||
<FilterButton count={activeFilterCount} onClick={() => setFiltersOpen(true)} />
|
||||
</>
|
||||
)}
|
||||
<Button variant="outline" size="sm" onClick={load}>
|
||||
<RefreshCw size={14} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
}, [isAdmin, scheduledView, q, activeFilterCount, load]);
|
||||
useListTopbar(() => (isAdmin ? {
|
||||
secondary: (
|
||||
<Button variant="outline" size="sm" onClick={load}>
|
||||
<RefreshCw size={14} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
),
|
||||
search: scheduledView ? null : {
|
||||
value: q,
|
||||
onSearch,
|
||||
placeholder: t('app.jobs.searchByKindOrOwner', 'Search by kind or owner…'),
|
||||
},
|
||||
} : {}), [isAdmin, scheduledView, q, load]);
|
||||
|
||||
const onRetry = async (id) => {
|
||||
try { await api.retryJob(id); toast.success(t('app.jobs.jobReQueued', 'Job re-queued')); load(); }
|
||||
@@ -396,10 +390,6 @@ export default function Jobs() {
|
||||
// SERVER query drawer, which sees rows this client never loaded, and a
|
||||
// second one would open a weaker drawer over the loaded page only. Gated on
|
||||
// the Activity tab because the chrome describes that table, not Scheduled.
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />, { enabled: isAdmin && !scheduledView },
|
||||
);
|
||||
|
||||
if (!isAdmin) {
|
||||
return (
|
||||
<div className="sk-tabgroup__inner jobs-page">
|
||||
@@ -456,7 +446,6 @@ export default function Jobs() {
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner jobs-page">
|
||||
{topbarChrome}
|
||||
<div className="sk-jobs">
|
||||
<div className="sk-jobs__viewswitch">
|
||||
<SegControl
|
||||
@@ -499,12 +488,11 @@ export default function Jobs() {
|
||||
now. The rest was whole-table arithmetic that only
|
||||
ever restated what the view picker offers. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="jobs"
|
||||
onCreate={chrome.createView}
|
||||
|
||||
actions={chromeActions}
|
||||
/>
|
||||
filters={{ count: activeFilterCount, hidden: 0, onOpen: () => setFiltersOpen(true) }}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
|
||||
@@ -286,16 +286,6 @@ const Marketplace = () => {
|
||||
// reconciles the input in place (focus is preserved between keystrokes).
|
||||
useTopbarActions(() =>
|
||||
<>
|
||||
{showSearch && (
|
||||
<SearchField
|
||||
value={installedView ? installedSearch : search}
|
||||
onSearch={installedView ? setInstalledSearch : setSearch}
|
||||
placeholder={t('app.marketplace.searchExtensions', 'Search extensions…')}
|
||||
/>
|
||||
)}
|
||||
{!installedView && !updatesView && (
|
||||
<FilterButton count={activeFilterCount} onClick={() => setFiltersOpen(true)} />
|
||||
)}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
@@ -306,6 +296,16 @@ const Marketplace = () => {
|
||||
<UploadCloud aria-hidden="true" />
|
||||
{t('app.marketplace.installShort', 'Install')}
|
||||
</Button>
|
||||
{showSearch && (
|
||||
<SearchField
|
||||
value={installedView ? installedSearch : search}
|
||||
onSearch={installedView ? setInstalledSearch : setSearch}
|
||||
placeholder={t('app.marketplace.searchExtensions', 'Search extensions…')}
|
||||
/>
|
||||
)}
|
||||
{!installedView && !updatesView && (
|
||||
<FilterButton count={activeFilterCount} onClick={() => setFiltersOpen(true)} />
|
||||
)}
|
||||
</>,
|
||||
[installedView, updatesView, search, installedSearch, activeFilterCount],
|
||||
);
|
||||
|
||||
@@ -8,8 +8,7 @@
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||
import {
|
||||
Activity, ArrowLeft, BarChart3, CheckCircle2, Clock, ExternalLink, Lock,
|
||||
Pause, Play, RefreshCw, Rows3, ShieldAlert, SlidersHorizontal, Trash2, Zap,
|
||||
Activity, ArrowLeft, BarChart3, CheckCircle2, Clock, ExternalLink, Lock, Pause, Play, RefreshCw, Rows3, ShieldAlert, SlidersHorizontal, Trash2, Zap,
|
||||
} from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -21,12 +20,10 @@ import ErrorState from '../components/ErrorState';
|
||||
import UptimeBars from '../components/monitoring/UptimeBars';
|
||||
import { monitorStateOf } from '../components/monitoring/monitorShared';
|
||||
import {
|
||||
AreaChart, DataTable, DataTableFooter, KpiBand, MetricCard,
|
||||
Pill, SegControl,
|
||||
AreaChart, DataTable, DataTableFooter, KpiBand, MetricCard, Pill, SegControl,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import PageLayout from '../layouts/PageLayout';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@@ -603,9 +600,9 @@ export default function MonitorDetail() {
|
||||
{section === 'checks' && (
|
||||
<>
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="checks"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
{frozen && newSinceFreeze > 0 && (
|
||||
@@ -614,11 +611,6 @@ export default function MonitorDetail() {
|
||||
<Button variant="outline" size="sm" onClick={() => setFrozen(frozen ? null : checks)}>
|
||||
{frozen ? <><Play size={14} /> {t('app.monitorDetail.resume', 'Resume')}</> : <><Pause size={14} /> {t('app.monitorDetail.hold', 'Hold')}</>}
|
||||
</Button>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -20,11 +20,10 @@ import EmptyState from '../components/EmptyState';
|
||||
import InfoTip from '@/components/InfoTip';
|
||||
import ErrorState from '../components/ErrorState';
|
||||
import {
|
||||
DataTable, DataTableFooter, Drawer, FilterButton, FilterDrawer,
|
||||
Pill, SearchField, Sparkline, countActiveFilters,
|
||||
DataTable, DataTableFooter, Drawer, FilterDrawer, Pill, Sparkline, countActiveFilters,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridToolsMenu,
|
||||
useTableChrome, GridViewPicker, GridChips,
|
||||
} from '@/components/ds/grid';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import PagePrimaryButton from '@/components/PagePrimaryButton';
|
||||
@@ -35,7 +34,7 @@ import { Switch } from '@/components/ui/switch';
|
||||
import {
|
||||
Select, SelectTrigger, SelectContent, SelectItem, SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import useFocusParam from '@/hooks/useFocusParam';
|
||||
@@ -268,21 +267,26 @@ export default function Monitors() {
|
||||
// Quick-create deep link: /monitoring/monitors?focus=create:monitor opens the form.
|
||||
useFocusParam('create', openCreate);
|
||||
|
||||
useTopbarActions(() => (
|
||||
<>
|
||||
<SearchField value={q} onSearch={(value) => setQ(value.trim())} placeholder={t('app.monitors.searchMonitorsOrTargets', 'Search monitors or targets…')} />
|
||||
<FilterButton count={activeFilterCount} onClick={() => setFiltersOpen(true)} />
|
||||
useListTopbar(() => ({
|
||||
secondary: (
|
||||
<Button variant="outline" size="sm" onClick={load}>
|
||||
<RefreshCw size={14} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
),
|
||||
primary: (
|
||||
<PagePrimaryButton
|
||||
id="monitors-new"
|
||||
label={t('app.monitors.addMonitor', 'New monitor')}
|
||||
shortLabel={t('common.actions.new', 'New')}
|
||||
onClick={openCreate}
|
||||
/>
|
||||
</>
|
||||
), [q, activeFilterCount, load]);
|
||||
),
|
||||
search: {
|
||||
value: q,
|
||||
onSearch: (value) => setQ(value.trim()),
|
||||
placeholder: t('app.monitors.searchMonitorsOrTargets', 'Search monitors or targets…'),
|
||||
},
|
||||
}), [q, load]);
|
||||
|
||||
const onSave = async (e) => {
|
||||
e.preventDefault();
|
||||
@@ -495,16 +499,11 @@ export default function Monitors() {
|
||||
// page has exactly ONE filter button and it is the top bar's, which opens
|
||||
// the SERVER query drawer. Column rules come from each column's own header
|
||||
// menu and show up in the chips.
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={load} />,
|
||||
);
|
||||
|
||||
const hasFilters = Boolean(q || filters.status || filters.type);
|
||||
const isHttpish = ['http', 'keyword'].includes(form.check_type);
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner monitors-page">
|
||||
{topbarChrome}
|
||||
{/* No KPI band: Operational / Degraded / Down are each a saved view
|
||||
you can act from, so the band was three numbers you had to
|
||||
re-filter by hand. The fleet's 30-day mean went with the view
|
||||
@@ -512,11 +511,10 @@ export default function Monitors() {
|
||||
and now with nowhere to sit — so /monitors/stats is not fetched
|
||||
any more either. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: load }}
|
||||
label="monitors"
|
||||
onCreate={chrome.createView}
|
||||
|
||||
actions={chromeActions}
|
||||
filters={{ count: activeFilterCount, hidden: 0, onOpen: () => setFiltersOpen(true) }}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { useParams, useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
ArrowLeft,
|
||||
Inbox,
|
||||
Send,
|
||||
Trash2,
|
||||
RefreshCw,
|
||||
Lock,
|
||||
X,
|
||||
ArrowLeft, Inbox, Send, Trash2, RefreshCw, Lock, X,
|
||||
} from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -25,12 +19,10 @@ import {
|
||||
Select, SelectTrigger, SelectContent, SelectItem, SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import {
|
||||
DataTable, DataTableFooter, MetricCard, KpiBand, Pill, SortChipBar,
|
||||
statusKind, statusLabel,
|
||||
DataTable, DataTableFooter, MetricCard, KpiBand, Pill, SortChipBar, statusKind, statusLabel,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -410,21 +402,9 @@ const QueueDetail = () => {
|
||||
in the detail header above — a view here is about the
|
||||
messages, and is shared by every queue. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: () => { loadMeta(); loadMessages(statusFilter); } }}
|
||||
label="messages"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu
|
||||
{...chrome.toolsProps}
|
||||
onRefresh={() => { loadMeta(); loadMessages(statusFilter); }}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
{/* The status select stays on its own line: it is a SERVER
|
||||
|
||||
@@ -1,16 +1,7 @@
|
||||
import { useState, useEffect, useCallback, useMemo, useId } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Layers,
|
||||
Inbox,
|
||||
Send,
|
||||
Trash2,
|
||||
RefreshCw,
|
||||
Plus,
|
||||
Activity,
|
||||
Folder,
|
||||
Server,
|
||||
AlertCircle,
|
||||
Layers, Inbox, Send, Trash2, RefreshCw, Plus, Activity, Folder, Server, AlertCircle,
|
||||
} from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -31,12 +22,10 @@ import {
|
||||
Select, SelectTrigger, SelectContent, SelectItem, SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import {
|
||||
DataTable, DataTableFooter, MetricCard, Pill, SearchField, SortChipBar,
|
||||
statusKind, statusLabel,
|
||||
DataTable, DataTableFooter, MetricCard, Pill, SearchField, SortChipBar, statusKind, statusLabel, ListActions,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -476,24 +465,30 @@ const QueueOperations = () => {
|
||||
title={t('app.queueOperations.queueBus', 'Queue bus')}
|
||||
meta={`${activeGroupLabel} · ${activeStatusLabel} · ${filteredQueues.length} visible`}
|
||||
actions={(
|
||||
<>
|
||||
<Tip content={t('app.queueOperations.group', 'Group')}>
|
||||
<Button variant="ghost" size="icon" aria-label={t('app.queueOperations.group', 'Group')} onClick={() => setShowGroupModal(true)}>
|
||||
<Folder size={16} />
|
||||
</Button>
|
||||
</Tip>
|
||||
<PagePrimaryButton
|
||||
id="queue-new"
|
||||
iconOnly
|
||||
label={t('app.queueOperations.newQueue', 'New queue')}
|
||||
onClick={() => setShowQueueModal(true)}
|
||||
/>
|
||||
<Tip content={t('common.actions.refresh', 'Refresh')}>
|
||||
<Button variant="ghost" size="icon" aria-label={t('common.actions.refresh', 'Refresh')} onClick={() => { loadData(); loadQueues(selectedGroup); }}>
|
||||
<RefreshCw size={16} />
|
||||
</Button>
|
||||
</Tip>
|
||||
</>
|
||||
<ListActions
|
||||
secondary={(
|
||||
<>
|
||||
<Tip content={t('app.queueOperations.group', 'Group')}>
|
||||
<Button variant="ghost" size="icon" aria-label={t('app.queueOperations.group', 'Group')} onClick={() => setShowGroupModal(true)}>
|
||||
<Folder size={16} />
|
||||
</Button>
|
||||
</Tip>
|
||||
<Tip content={t('common.actions.refresh', 'Refresh')}>
|
||||
<Button variant="ghost" size="icon" aria-label={t('common.actions.refresh', 'Refresh')} onClick={() => { loadData(); loadQueues(selectedGroup); }}>
|
||||
<RefreshCw size={16} />
|
||||
</Button>
|
||||
</Tip>
|
||||
</>
|
||||
)}
|
||||
primary={(
|
||||
<PagePrimaryButton
|
||||
id="queue-new"
|
||||
label={t('app.queueOperations.newQueue', 'New queue')}
|
||||
shortLabel={t('common.actions.new', 'New')}
|
||||
onClick={() => setShowQueueModal(true)}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
>
|
||||
<div className={`queue-ops-workspace${groups.length === 0 ? ' queue-ops-workspace--no-groups' : ''}`}>
|
||||
@@ -580,9 +575,9 @@ const QueueOperations = () => {
|
||||
{/* The view name is the page's heading for the list, and
|
||||
the table's own chrome sits on that same line. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: () => { loadData(); loadQueues(selectedGroup); } }}
|
||||
label="queues"
|
||||
onCreate={chrome.createView}
|
||||
actions={(
|
||||
<>
|
||||
<SearchField
|
||||
@@ -590,14 +585,6 @@ const QueueOperations = () => {
|
||||
onSearch={setSearchTerm}
|
||||
placeholder={t('app.queueOperations.searchQueues', 'Search queues…')}
|
||||
/>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu
|
||||
{...chrome.toolsProps}
|
||||
onRefresh={() => { loadData(); loadQueues(selectedGroup); }}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect, useCallback, useMemo, useId } from 'react';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useTopbarActions } from '@/hooks/useTopbarActions';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import api from '../services/api';
|
||||
@@ -25,8 +25,7 @@ import { Tabs, TabsContent } from '@/components/ui/tabs';
|
||||
import { DataTable, Pill, SegControl, CatalogCard, CatalogGrid } from '@/components/ds';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterButton,
|
||||
GridToolsMenu, GridFilterDrawer,
|
||||
useTableChrome, GridViewPicker, GridChips, GridFilterDrawer,
|
||||
} from '@/components/ds/grid';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { formatDateTime } from '@/utils/intl';
|
||||
@@ -553,22 +552,6 @@ const ServerTemplates = () => {
|
||||
setGroupBy,
|
||||
});
|
||||
|
||||
// Filter + "⋮" ride the group's top bar, so the view row is the view name
|
||||
// alone. Gated on the tab that owns the table: the Library is a card
|
||||
// catalogue these do not act on, and the drawer the filter button opens is
|
||||
// rendered inside the Templates tab, so hoisting it unconditionally would
|
||||
// leave a button whose panel does not exist.
|
||||
const gridIsOnScreen = activeTab === 'templates' && templates.length > 0;
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<>
|
||||
<GridFilterButton
|
||||
count={chrome.filterCount}
|
||||
onClick={() => chrome.setDrawerOpen(true)}
|
||||
/>
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={loadData} />
|
||||
</>, { enabled: gridIsOnScreen },
|
||||
);
|
||||
|
||||
if (loading) return <PageLoader />;
|
||||
|
||||
return (
|
||||
@@ -584,7 +567,6 @@ const ServerTemplates = () => {
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
{topbarChrome}
|
||||
<Tabs value={activeTab || 'library'} onValueChange={setActiveTab}>
|
||||
<TabsContent value="templates">
|
||||
{loadErrors.templates && templates.length > 0 && (
|
||||
@@ -610,11 +592,10 @@ const ServerTemplates = () => {
|
||||
) : (
|
||||
<>
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: loadData }}
|
||||
label="templates"
|
||||
onCreate={chrome.createView}
|
||||
|
||||
actions={chromeActions}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -24,16 +24,15 @@ import {
|
||||
} from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import {
|
||||
DataTable, DataTableFooter, Drawer, FilterButton, FilterDrawer,
|
||||
Pill, SearchField, countActiveFilters,
|
||||
DataTable, DataTableFooter, Drawer, FilterDrawer, Pill, countActiveFilters,
|
||||
} from '@/components/ds';
|
||||
import {
|
||||
useTableChrome, GridViewPicker, GridChips, GridToolsMenu,
|
||||
useTableChrome, GridViewPicker, GridChips,
|
||||
} from '@/components/ds/grid';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useTopbarActions, useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
import { useConfirm } from '@/hooks/useConfirm';
|
||||
import { useTableSort } from '@/hooks/useTableSort';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
@@ -237,25 +236,30 @@ export default function Telemetry() {
|
||||
|
||||
// Search + advanced filters + Refresh live in the group's shared top bar,
|
||||
// the way every other list page in the panel does it.
|
||||
useTopbarActions(() => (
|
||||
<>
|
||||
<SearchField value={q} onSearch={(value) => setQ(value.trim())} placeholder={t('app.telemetry.searchMessages', 'Search messages…')} />
|
||||
<FilterButton count={activeFilterCount} onClick={() => setFiltersOpen(true)} />
|
||||
{isAdmin && (
|
||||
<Button variant="outline" size="sm" onClick={emitTestEvent}>
|
||||
<Activity size={14} /> {t('app.telemetry.testEvent', 'Test event')}
|
||||
useListTopbar(() => ({
|
||||
secondary: (
|
||||
<>
|
||||
{isAdmin && (
|
||||
<Button variant="outline" size="sm" onClick={emitTestEvent}>
|
||||
<Activity size={14} /> {t('app.telemetry.testEvent', 'Test event')}
|
||||
</Button>
|
||||
)}
|
||||
{isAdmin && (
|
||||
<Button variant="outline" size="sm" onClick={cleanupOldEvents}>
|
||||
<Trash2 size={14} /> {t('app.telemetry.cleanup', 'Cleanup')}
|
||||
</Button>
|
||||
)}
|
||||
<Button variant="outline" size="sm" onClick={() => fetchEvents(1, true)} disabled={loading}>
|
||||
<RefreshCw size={14} className={loading ? 'spin' : ''} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
)}
|
||||
{isAdmin && (
|
||||
<Button variant="outline" size="sm" onClick={cleanupOldEvents}>
|
||||
<Trash2 size={14} /> {t('app.telemetry.cleanup', 'Cleanup')}
|
||||
</Button>
|
||||
)}
|
||||
<Button variant="outline" size="sm" onClick={() => fetchEvents(1, true)} disabled={loading}>
|
||||
<RefreshCw size={14} className={loading ? 'spin' : ''} /> {t('common.actions.refresh', 'Refresh')}
|
||||
</Button>
|
||||
</>
|
||||
), [q, activeFilterCount, isAdmin, loading, fetchEvents]);
|
||||
</>
|
||||
),
|
||||
search: {
|
||||
value: q,
|
||||
onSearch: (value) => setQ(value.trim()),
|
||||
placeholder: t('app.telemetry.searchMessages', 'Search messages…'),
|
||||
},
|
||||
}), [q, isAdmin, loading, fetchEvents]);
|
||||
|
||||
const filterGroups = useMemo(() => ([
|
||||
{
|
||||
@@ -379,23 +383,17 @@ export default function Telemetry() {
|
||||
// view row as just the view name. It is NOT joined by a grid filter button:
|
||||
// this page's one filter button is the top bar's, which opens the SERVER
|
||||
// query drawer (eight keys, applied to the query rather than the loaded 50).
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={() => fetchEvents(1, true)} />,
|
||||
);
|
||||
|
||||
const hasFilters = Boolean(q || activeFilterCount);
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner telemetry-page">
|
||||
{topbarChrome}
|
||||
{/* Outside the empty check below on purpose: a view that returns
|
||||
no events must still be swappable for another one. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: () => fetchEvents(1, true) }}
|
||||
label="events"
|
||||
onCreate={chrome.createView}
|
||||
|
||||
actions={chromeActions}
|
||||
filters={{ count: activeFilterCount, hidden: 0, onOpen: () => setFiltersOpen(true) }}
|
||||
/>
|
||||
|
||||
<GridChips {...chrome.chipProps} />
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import { useCallback, useState, useEffect, useMemo, useRef, useId } from 'react';
|
||||
import { useCallback, useState, useEffect, useMemo, useRef, useId } from 'react';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import {
|
||||
Search, BookOpen, Container, Globe, BarChart3,
|
||||
Database, Shield, Cloud, MessageSquare, Video, Music, Image, Home,
|
||||
Code, Server, GitBranch, Workflow, HardDrive, Lock, Users, FileText,
|
||||
Layers, LayoutTemplate, Check, Cpu,
|
||||
Newspaper, TrendingUp, Rocket, Box, Download, ChevronRight,
|
||||
CheckCircle2, AlertTriangle, XCircle, HelpCircle
|
||||
Search, BookOpen, Container, Globe, BarChart3, Database, Shield, Cloud, MessageSquare, Video, Music, Image, Home, Code, Server, GitBranch, Workflow, HardDrive, Lock, Users, FileText, Layers, LayoutTemplate, Check, Cpu, Newspaper, TrendingUp, Rocket, Box, Download, ChevronRight, CheckCircle2, AlertTriangle, XCircle, HelpCircle,
|
||||
} from 'lucide-react';
|
||||
import api from '../services/api';
|
||||
import { useToast } from '../contexts/useToast.js';
|
||||
@@ -16,16 +11,14 @@ import {
|
||||
Select, SelectTrigger, SelectContent, SelectItem, SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import {
|
||||
SearchField, FilterDrawer, countActiveFilters, Drawer,
|
||||
DataTableFooter, CatalogCard, CatalogGrid,
|
||||
FilterDrawer, countActiveFilters, Drawer, DataTableFooter, CatalogCard, CatalogGrid,
|
||||
} from '@/components/ds';
|
||||
import { useTableChrome, GridViewPicker, GridToolsMenu, GridFilterButton } from '@/components/ds/grid';
|
||||
import { useTableChrome, GridViewPicker } from '@/components/ds/grid';
|
||||
import ServerPicker from '@/components/ServerPicker';
|
||||
import PortField from '@/components/PortField';
|
||||
import { FormField } from '@/components/FormField';
|
||||
import useFieldErrors from '@/hooks/useFieldErrors';
|
||||
import { LOCAL_SERVER_ID } from '@/utils/serverTarget';
|
||||
import { useTopbarChrome } from '@/hooks/useTopbarActions';
|
||||
import { applyTableSorts, useTableSort } from '@/hooks/useTableSort';
|
||||
import EmptyState from '../components/EmptyState';
|
||||
import ErrorState from '../components/ErrorState';
|
||||
@@ -33,6 +26,7 @@ import { useManagedProfile } from '../contexts/useManagedProfile';
|
||||
import ManagedCard from '../components/ManagedCard';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { toastError } from '@/utils/errorMessage';
|
||||
import { useListTopbar } from '@/hooks/useTopbarActions';
|
||||
|
||||
// Featured templates (curated list)
|
||||
const FEATURED_TEMPLATES = [
|
||||
@@ -506,23 +500,18 @@ const Templates = () => {
|
||||
[chrome.shownRows, sorts, chrome.columns],
|
||||
);
|
||||
|
||||
// Search, the filter button and the "⋮" ride the tab group's top bar, so the
|
||||
// view row below is the view name alone.
|
||||
const { portal: topbarChrome, actions: chromeActions } = useTopbarChrome(
|
||||
<>
|
||||
<SearchField
|
||||
value={searchQuery}
|
||||
onSearch={setSearchQueryFilter}
|
||||
placeholder={t('app.templates.searchTemplates', 'Search templates…')}
|
||||
/>
|
||||
<GridFilterButton count={activeFilterCount} onClick={() => setFiltersOpen(true)} />
|
||||
<GridToolsMenu {...chrome.toolsProps} onRefresh={() => Promise.all([loadCategories(), loadTemplates()])} />
|
||||
</>,
|
||||
);
|
||||
// Search rides the tab group's top bar; filters and the table tools are in
|
||||
// the view selector's menu.
|
||||
useListTopbar(() => ({
|
||||
search: {
|
||||
value: searchQuery,
|
||||
onSearch: setSearchQueryFilter,
|
||||
placeholder: t('app.templates.searchTemplates', 'Search templates…'),
|
||||
},
|
||||
}), [searchQuery]);
|
||||
|
||||
return (
|
||||
<div className="sk-tabgroup__inner templates-page">
|
||||
{topbarChrome}
|
||||
{/* The catalog is not the only way in: a repo or an archive skips
|
||||
templates entirely, so both routes lead the page rather than
|
||||
hiding behind the New Service tab. */}
|
||||
@@ -549,10 +538,10 @@ const Templates = () => {
|
||||
at, and its actions ride the top bar. The count that used to sit
|
||||
here is under the cards now, next to what it is counting. */}
|
||||
<GridViewPicker
|
||||
views={chrome.views}
|
||||
{...chrome.pickerProps}
|
||||
tools={{ ...chrome.toolsProps, onRefresh: () => Promise.all([loadCategories(), loadTemplates()]) }}
|
||||
label="templates"
|
||||
onCreate={chrome.createView}
|
||||
actions={chromeActions}
|
||||
filters={{ count: activeFilterCount, hidden: 0, onOpen: () => setFiltersOpen(true) }}
|
||||
/>
|
||||
|
||||
{deployManaged && (
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
// SCSS only needs them for the responsive stack-down below.
|
||||
$skw-grid-gap: 12px;
|
||||
$skw-stack-row-h: 260px;
|
||||
// A bare tile (one KPI) in the stacked layout: two to a row, this tall.
|
||||
$skw-stack-tile-h: 96px;
|
||||
|
||||
// Inspector panel width + the gutter the page reserves for it while open.
|
||||
|
||||
@@ -366,6 +368,11 @@ $skw-z-tv: 200;
|
||||
box-shadow: $focus-ring;
|
||||
}
|
||||
|
||||
// A bare widget is its own card (a KPI tile): the frame draws the card and
|
||||
// the body says what it is, so there is no header. Edit mode keeps the
|
||||
// header, which is the drag handle.
|
||||
&--bare:not(.skw-frame--edit) > .skw-frame__head { display: none; }
|
||||
|
||||
&__head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -1595,7 +1602,9 @@ $skw-z-tv: 200;
|
||||
height: auto !important;
|
||||
min-height: 0 !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
// Wrapping rows rather than a column: a full-width widget still takes
|
||||
// a row to itself, and KPI tiles can share one.
|
||||
flex-flow: row wrap;
|
||||
gap: $skw-grid-gap;
|
||||
|
||||
&__ghost { display: none; }
|
||||
@@ -1609,6 +1618,14 @@ $skw-z-tv: 200;
|
||||
height: $skw-stack-row-h !important;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
// A KPI tile does not need a chart's height or the whole width: two
|
||||
// sit side by side, as tall as a count and its label.
|
||||
> .skw-frame--bare {
|
||||
width: calc(50% - #{$skw-grid-gap} / 2) !important;
|
||||
height: auto !important;
|
||||
min-height: $skw-stack-tile-h;
|
||||
}
|
||||
}
|
||||
|
||||
// Dragging and resizing are pointer-precision gestures; neither survives
|
||||
|
||||
@@ -251,6 +251,32 @@
|
||||
}
|
||||
}
|
||||
|
||||
// A KPI tile block: the frame is the tile's card, so the tile inside fills it
|
||||
// edge to edge and drops its own border and surface.
|
||||
.sk-overview-section--tile {
|
||||
display: flex;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
|
||||
> .sk-overview-section__host {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-inline-size: 0;
|
||||
}
|
||||
|
||||
.sk-kpi {
|
||||
flex: 1;
|
||||
min-inline-size: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
|
||||
// A tile with no sparkline sits in the middle of its block instead of
|
||||
// leaving the lower half empty.
|
||||
&:not(:has(> .sk-kpi__spark)) { align-content: center; }
|
||||
}
|
||||
}
|
||||
|
||||
// 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 {
|
||||
|
||||
@@ -400,10 +400,6 @@
|
||||
}
|
||||
|
||||
// Full-width manager shell
|
||||
.dx-page > .sk-kpiband-wrap {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dx-panel {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -435,10 +431,11 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
// No margin of its own: the view row above already carries the same
|
||||
// 16px every other list page has between the view name and the table.
|
||||
.dx-resource-list {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
margin-top: $space-3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -917,10 +914,6 @@
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dx-containers-pane {
|
||||
gap: $space-2;
|
||||
}
|
||||
|
||||
.dx-manager-layout {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 0;
|
||||
|
||||
@@ -256,22 +256,16 @@
|
||||
flex-direction: column;
|
||||
gap: $space-4;
|
||||
|
||||
.sec-posture-card .card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
// ── Posture header: ScoreGauge + verdict + live readouts ──
|
||||
// ── Posture block: ScoreGauge + verdict + Re-check. Its own board block,
|
||||
// so it pads itself and fills the frame. ──
|
||||
.sec-posture__top {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
gap: $space-6;
|
||||
padding-bottom: $space-4;
|
||||
margin-bottom: $space-2;
|
||||
border-bottom: 1px solid var(--border-soft);
|
||||
padding: $space-3 $space-4;
|
||||
|
||||
// Phone: gauge beside the verdict, KPI row below at full width
|
||||
// Phone: a smaller gauge beside the verdict
|
||||
@media (max-width: $breakpoint-sm) {
|
||||
display: grid;
|
||||
grid-template-columns: 72px minmax(0, 1fr); // gauge size
|
||||
@@ -297,14 +291,6 @@
|
||||
.sec-posture__summary {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
|
||||
// Dissolve so verdict joins the gauge row and the KPIs span below
|
||||
@media (max-width: $breakpoint-sm) {
|
||||
display: contents;
|
||||
|
||||
// KpiBand's wrapper is the grid item, so it must do the spanning
|
||||
.sk-kpiband-wrap { grid-column: 1 / -1; margin-bottom: 0; }
|
||||
}
|
||||
}
|
||||
|
||||
.sec-posture__verdict {
|
||||
@@ -316,21 +302,6 @@
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
// Live event readouts — relocated from the old page-wide KPI strip
|
||||
.sec-posture__kpis {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: $space-2 $space-5;
|
||||
|
||||
@media (max-width: $breakpoint-sm) {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: $space-2;
|
||||
|
||||
.sk-kpi { padding: $space-2; gap: $space-2; }
|
||||
}
|
||||
}
|
||||
|
||||
.sec-kpi {
|
||||
display: grid;
|
||||
grid-template-columns: auto auto;
|
||||
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 113 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |