mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-01 20:55:16 +09:00
Put Monitoring and Backups on the overview board
Their overviews are now boards like the server and service ones: each panel is a block that can be moved, resized, removed or opened fullscreen, with dashboard widgets alongside (Monitoring's follow the host the page is scoped to). Layouts are saved per user under two new board scopes. Every board gets a quiet "Edit overview layout" link under its blocks, so pages without a menu of their own have a way in. Monitoring layout baselines updated.
This commit is contained in:
1 parent
74c24b93b3
commit
5f23e9fe6d
12 files changed
+148
-43
No files matched your search
@@ -49,13 +49,17 @@ GRID_COLS = 12
|
||||
# JSON per board.
|
||||
MAX_WIDGETS_PER_BOARD = 100
|
||||
|
||||
# A board can also hold the Overview layout a user saved for one kind of
|
||||
# detail page (every server page shares the user's server layout, the page's
|
||||
# own server being the board's variable). It is an ordinary board row whose
|
||||
# slug names the kind, so it reuses the same storage, validation and
|
||||
# ownership rules; it is just never listed among the dashboard tabs.
|
||||
# A board can also hold the Overview layout a user saved for a page: one kind
|
||||
# of detail page (every server page shares the user's server layout, the
|
||||
# page's own server being the board's variable) or a single overview page
|
||||
# (Monitoring, Backups). It is an ordinary board row whose slug names the
|
||||
# page, so it reuses the same storage, validation and ownership rules; it is
|
||||
# just never listed among the dashboard tabs.
|
||||
ENTITY_SCOPE_PREFIX = 'entity:'
|
||||
ENTITY_SCOPES = ('entity:server', 'entity:service')
|
||||
ENTITY_SCOPES = (
|
||||
'entity:server', 'entity:service',
|
||||
'entity:monitoring', 'entity:backups',
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_BOARDS = [
|
||||
|
||||
@@ -485,11 +485,21 @@ def test_overview_layout_is_stored_but_is_not_a_dashboard_tab(client, auth_heade
|
||||
assert scoped[0]['widgets'] == [_widget()]
|
||||
|
||||
|
||||
def test_overview_layout_is_empty_until_saved(client, auth_headers):
|
||||
resp = client.get('/api/v1/dashboards?scope=entity:service', headers=auth_headers)
|
||||
@pytest.mark.parametrize('scope', [
|
||||
'entity:server', 'entity:service', 'entity:monitoring', 'entity:backups',
|
||||
])
|
||||
def test_overview_layout_is_empty_until_saved(client, auth_headers, scope):
|
||||
resp = client.get(f'/api/v1/dashboards?scope={scope}', headers=auth_headers)
|
||||
assert resp.status_code == 200
|
||||
assert resp.get_json()['boards'] == []
|
||||
|
||||
saved = client.post('/api/v1/dashboards', headers=auth_headers, json={
|
||||
'name': 'Overview', 'scope': scope, 'widgets': [_widget()],
|
||||
})
|
||||
assert saved.status_code == 201
|
||||
again = client.get(f'/api/v1/dashboards?scope={scope}', headers=auth_headers).get_json()['boards']
|
||||
assert [board['slug'] for board in again] == [scope]
|
||||
|
||||
|
||||
def test_saving_an_overview_layout_again_replaces_it(client, auth_headers):
|
||||
first = client.post('/api/v1/dashboards', headers=auth_headers, json={
|
||||
|
||||
@@ -10,6 +10,7 @@ import { formatBytes } from '@/utils/formatBytes';
|
||||
import { KpiBand, MetricCard, Pill, DataTable, DataTableFooter } from '@/components/ds';
|
||||
import EmptyState from '../EmptyState';
|
||||
import InfoTip from '../InfoTip';
|
||||
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { formatDuration, formatNumber } from '@/utils/intl';
|
||||
|
||||
@@ -100,6 +101,9 @@ const LATEST_COLUMNS = [
|
||||
// reliably it has been running, where the bytes live, and what happened lately.
|
||||
// The archive table lives on its own Snapshots section — this page answers
|
||||
// "is my data safe?", not "show me every file".
|
||||
// Dashboard widget types the Backups overview can carry besides its blocks.
|
||||
const BACKUPS_WIDGET_TYPES = ['note'];
|
||||
|
||||
export default function BackupsOverview({
|
||||
stats, storageConfig, costSummary, schedules = [], backups = [], onGo, storageWarning = false,
|
||||
}) {
|
||||
@@ -254,6 +258,8 @@ export default function BackupsOverview({
|
||||
|
||||
return (
|
||||
<div className="bk-overview">
|
||||
<OverviewBoard kind="backups" widgetTypes={BACKUPS_WIDGET_TYPES}>
|
||||
<OverviewSection id="glance" title={t('app.backupsOverview.atAGlance', 'At a glance')} w={12} h={4}>
|
||||
<KpiBand max={4}>
|
||||
<MetricCard
|
||||
tone="green"
|
||||
@@ -301,8 +307,9 @@ export default function BackupsOverview({
|
||||
</div>
|
||||
</MetricCard>
|
||||
</KpiBand>
|
||||
</OverviewSection>
|
||||
|
||||
<div className="bk-grid2">
|
||||
<OverviewSection id="activity" title={t('app.backupsOverview.backupActivity', 'Backup activity')} w={6} h={8}>
|
||||
<section className="bk-panel">
|
||||
<div className="bk-panel__head">
|
||||
<div>
|
||||
@@ -342,7 +349,9 @@ export default function BackupsOverview({
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="recent" title={t('app.backupsOverview.recentActivity', 'Recent activity')} w={6} h={8}>
|
||||
<section className="bk-panel">
|
||||
<div className="bk-panel__head">
|
||||
<h3>{t('app.backupsOverview.recentActivity', 'Recent activity')}</h3>
|
||||
@@ -378,9 +387,9 @@ export default function BackupsOverview({
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
</div>
|
||||
</OverviewSection>
|
||||
|
||||
<div className="bk-grid2">
|
||||
<OverviewSection id="destinations" title={t('app.backupsOverview.storageDestinations', 'Storage destinations')} w={6} h={7}>
|
||||
<section className="bk-panel">
|
||||
<div className="bk-panel__head">
|
||||
<h3>{t('app.backupsOverview.storageDestinations', 'Storage destinations')}</h3>
|
||||
@@ -420,7 +429,9 @@ export default function BackupsOverview({
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="latest" title={t('app.backupsOverview.latestSnapshots', 'Latest backups')} w={6} h={7}>
|
||||
<section className="bk-panel bk-panel--flush">
|
||||
<div className="bk-panel__head">
|
||||
<h3>{t('app.backupsOverview.latestSnapshots', 'Latest backups')}</h3>
|
||||
@@ -447,7 +458,8 @@ export default function BackupsOverview({
|
||||
/>
|
||||
)}
|
||||
</section>
|
||||
</div>
|
||||
</OverviewSection>
|
||||
</OverviewBoard>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Children, isValidElement, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { Grid2x2, History, LayoutGrid, Plus } from 'lucide-react';
|
||||
import { Grid2x2, History, LayoutGrid, Plus, SlidersHorizontal } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import api from '@/services/api';
|
||||
import { useAuth } from '@/contexts/useAuth';
|
||||
@@ -91,12 +91,17 @@ function SectionWidget({ widget, ctx }) {
|
||||
const NO_WIDGET_TYPES = [];
|
||||
const NO_LEADING_WIDGETS = [];
|
||||
|
||||
// kind what the layout is for: 'server' / 'service' (one layout shared
|
||||
// by every page of that kind) or a page such as 'monitoring'
|
||||
// shared true when `kind` covers many pages, so editing says so
|
||||
// serverVar what dashboard widgets bound to `$server` should read
|
||||
// widgetTypes ids of dashboard widget types offered on this board
|
||||
// leading dashboard widgets placed ahead of the sections in the default
|
||||
// layout: [{ type, w, h, cfg }], h in board rows
|
||||
// Pass both as module-level constants: they define the board, they are not state.
|
||||
export function OverviewBoard({
|
||||
kind, entityId, entityLabel, widgetTypes = NO_WIDGET_TYPES, leading = NO_LEADING_WIDGETS, children,
|
||||
kind, entityId, entityLabel, shared = false, serverVar,
|
||||
widgetTypes = NO_WIDGET_TYPES, leading = NO_LEADING_WIDGETS, children,
|
||||
}) {
|
||||
const sections = Children.toArray(children).filter(isValidElement).map((child) => child.props);
|
||||
return (
|
||||
@@ -105,6 +110,8 @@ export function OverviewBoard({
|
||||
kind={kind}
|
||||
entityId={entityId}
|
||||
entityLabel={entityLabel}
|
||||
shared={shared}
|
||||
serverVar={serverVar}
|
||||
widgetTypeIds={widgetTypes}
|
||||
leading={leading}
|
||||
sections={sections}
|
||||
@@ -112,7 +119,7 @@ export function OverviewBoard({
|
||||
);
|
||||
}
|
||||
|
||||
function OverviewBoardInner({ kind, entityId, entityLabel, widgetTypeIds, leading, sections }) {
|
||||
function OverviewBoardInner({ kind, entityId, entityLabel, shared, serverVar, widgetTypeIds, leading, sections }) {
|
||||
const { t } = useTranslation();
|
||||
const toast = useToast();
|
||||
const navigate = useNavigate();
|
||||
@@ -365,8 +372,8 @@ function OverviewBoardInner({ kind, entityId, entityLabel, widgetTypeIds, leadin
|
||||
const ctx = useMemo(() => ({
|
||||
range: BOARD_RANGE,
|
||||
tick,
|
||||
// Dashboard widgets bound to `$server` read this page's server.
|
||||
serverVar: kind === 'server' ? entityId : undefined,
|
||||
// What dashboard widgets bound to `$server` read on this page.
|
||||
serverVar,
|
||||
isAdmin,
|
||||
navigate,
|
||||
types,
|
||||
@@ -375,12 +382,12 @@ function OverviewBoardInner({ kind, entityId, entityLabel, widgetTypeIds, leadin
|
||||
adoptVersion,
|
||||
releaseSection,
|
||||
emptyLabel: t('app.overviewBoard.nothingToShow', 'Nothing to show here right now.'),
|
||||
}), [tick, kind, entityId, isAdmin, navigate, types, adoptVersion, releaseSection, t]);
|
||||
}), [tick, kind, entityId, serverVar, isAdmin, navigate, types, adoptVersion, releaseSection, t]);
|
||||
|
||||
// Page blocks already on the board are not offered again.
|
||||
const placedSections = new Set(widgets.filter(isSectionWidget).map((widget) => widget.cfg?.section));
|
||||
const libraryTypes = types.filter((type) => !type.section || !placedSections.has(type.section));
|
||||
const resources = kind === 'server' ? [{ id: entityId, label: entityLabel || String(entityId), kind: 'server' }] : [];
|
||||
const resources = serverVar ? [{ id: serverVar, label: entityLabel || String(serverVar), kind: 'server' }] : [];
|
||||
|
||||
return (
|
||||
<div className={`sk-overview-board${edit ? ' is-editing' : ''}`}>
|
||||
@@ -399,7 +406,9 @@ function OverviewBoardInner({ kind, entityId, entityLabel, widgetTypeIds, leadin
|
||||
</Button>
|
||||
</div>
|
||||
<div className="skw-hint">
|
||||
<Grid2x2 size={13} aria-hidden="true" /> {t('app.overviewBoard.editHint', 'Drag headers to move · drag the corner to resize · this layout applies to every {{kind}} page for your account', { kind })}
|
||||
<Grid2x2 size={13} aria-hidden="true" /> {shared
|
||||
? t('app.overviewBoard.editHint', 'Drag headers to move · drag the corner to resize · this layout applies to every {{kind}} page for your account', { kind })
|
||||
: t('app.overviewBoard.editHintPage', 'Drag headers to move · drag the corner to resize · saved to your account')}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
@@ -417,6 +426,15 @@ function OverviewBoardInner({ kind, entityId, entityLabel, widgetTypeIds, leadin
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* A quiet way in, under the blocks it rearranges. */}
|
||||
{!edit && board !== undefined && (
|
||||
<div className="sk-overview-board__foot">
|
||||
<Button variant="unstyled" type="button" className="sk-overview-board__edit" onClick={startEditing}>
|
||||
<SlidersHorizontal size={13} aria-hidden="true" /> {t('app.overviewBoard.editLayout', 'Edit overview layout')}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{edit && <ChangeBar session={editing} onDiscard={discard} onSave={save} />}
|
||||
|
||||
{edit && libraryOpen && (
|
||||
|
||||
@@ -9,6 +9,7 @@ import { AreaChart, KpiBand, MetricCard, Pill, Sparkline } from '@/components/ds
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Skeleton } from '../Skeleton';
|
||||
import MonitorsSummary from './MonitorsSummary';
|
||||
import { OverviewBoard, OverviewSection } from '@/components/detail/OverviewBoard';
|
||||
import DiskReclaimModal from './DiskReclaimModal';
|
||||
import { HOST_SCOPE, useScopeMetrics, trendOf } from './useMonitorScope';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -45,6 +46,9 @@ function last(series) {
|
||||
// the Host health grid below is how you switch between them. That grid is what
|
||||
// the standalone Fleet Monitor page used to be — a heatmap you had to leave
|
||||
// this page to read, for numbers that belong next to these ones.
|
||||
// Dashboard widget types the Monitoring overview can carry besides its blocks.
|
||||
const MONITORING_WIDGET_TYPES = ['stat', 'gauge', 'timeseries', 'specs', 'note'];
|
||||
|
||||
export default function MonitoringOverview({
|
||||
scope, isHost, scopeLabel, status, activeAlerts = [],
|
||||
speedTest, speedTestRunning, onRunSpeedTest,
|
||||
@@ -195,16 +199,21 @@ export default function MonitoringOverview({
|
||||
|
||||
return (
|
||||
<div className="mon-overview">
|
||||
<OverviewBoard
|
||||
kind="monitoring"
|
||||
// Dashboard widgets added here follow the host this page is scoped to.
|
||||
serverVar={isHost ? 'local' : scope}
|
||||
entityLabel={scopeLabel}
|
||||
widgetTypes={MONITORING_WIDGET_TYPES}
|
||||
>
|
||||
{/* Monitors first: "is the site up" is the question this page is
|
||||
for, and everything below describes the machines ServerKit runs
|
||||
on rather than the things it is watching. */}
|
||||
<MonitorsSummary summary={monitorsSummary} />
|
||||
|
||||
<div className="mon-section-head">
|
||||
<h3>{t('app.monitoringOverview.hostHealth', 'Host health')}</h3>
|
||||
<span className="mon-section-head__meta">{scopeLabel}</span>
|
||||
</div>
|
||||
<OverviewSection id="monitors" title={t('app.monitoringOverview.monitors', 'Monitors')} w={12} h={9}>
|
||||
<MonitorsSummary summary={monitorsSummary} />
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="health" title={t('app.monitoringOverview.hostHealth', 'Host health')} w={12} h={5}>
|
||||
{/* The shared DS tile, not a monitoring-only copy of it — same
|
||||
geometry as every other KPI strip in the panel, plus the
|
||||
sparkline slot this page needed. */}
|
||||
@@ -258,8 +267,9 @@ export default function MonitoringOverview({
|
||||
);
|
||||
})}
|
||||
</KpiBand>
|
||||
</OverviewSection>
|
||||
|
||||
<div className="mon-grid2">
|
||||
<OverviewSection id="processor" title={t('app.monitoringOverview.processor', 'Processor')} w={6} h={7}>
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
@@ -283,7 +293,9 @@ export default function MonitoringOverview({
|
||||
<AreaChart series={[series?.cpu || []]} colors={[TONE.cpu]} height={CHART_HEIGHT} />
|
||||
</ChartBody>
|
||||
</section>
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="memory" title={t('app.monitoringOverview.memoryDisk', 'Memory and disk')} w={6} h={7}>
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<div>
|
||||
@@ -303,16 +315,13 @@ export default function MonitoringOverview({
|
||||
/>
|
||||
</ChartBody>
|
||||
</section>
|
||||
</div>
|
||||
</OverviewSection>
|
||||
|
||||
{/* The fleet, inline. Clicking a card re-scopes everything above it,
|
||||
which is the whole reason this replaced a separate page. */}
|
||||
<OverviewSection id="hosts" title={t('app.monitoringOverview.allHosts', 'All hosts')} w={12} h={7}>
|
||||
{!fleetLoaded && (
|
||||
<div role="status" aria-busy="true" aria-label={t('app.monitoringOverview.loadingHosts', 'Loading hosts')}>
|
||||
<div className="mon-section-head">
|
||||
<h3>{t('app.monitoringOverview.allHosts', 'All hosts')}</h3>
|
||||
<Skeleton variant="line" width={160} height={18} />
|
||||
</div>
|
||||
<div className="mon-fleet-grid">
|
||||
<Skeleton variant="block" height={FLEET_CARD_HEIGHT} />
|
||||
</div>
|
||||
@@ -320,12 +329,9 @@ export default function MonitoringOverview({
|
||||
)}
|
||||
{fleet.length > 0 && (
|
||||
<>
|
||||
<div className="mon-section-head">
|
||||
<h3>{t('app.monitoringOverview.allHosts', 'All hosts')}</h3>
|
||||
<span className="mon-section-head__meta">
|
||||
{online}/{fleet.length} {t('app.monitoringOverview.onlineClickACardToRe', 'online · click a card to re-scope')}
|
||||
</span>
|
||||
</div>
|
||||
<p className="mon-panel-sub">
|
||||
{online}/{fleet.length} {t('app.monitoringOverview.onlineClickACardToRe', 'online · click a card to re-scope')}
|
||||
</p>
|
||||
<div className="mon-fleet-grid">
|
||||
{/* Always the panel host's own numbers, never the
|
||||
scoped ones — a card in this strip has to keep
|
||||
@@ -359,8 +365,9 @@ export default function MonitoringOverview({
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</OverviewSection>
|
||||
|
||||
<div className="mon-grid2">
|
||||
<OverviewSection id="alerts" title={t('app.monitoringOverview.activeAlerts', 'Active alerts')} w={6} h={5}>
|
||||
<section className={`monitoring-panel${activeAlerts.length ? ' monitoring-panel--warning' : ''}`}>
|
||||
<div className="monitoring-panel__header">
|
||||
<h3>{t('app.monitoringOverview.activeAlerts', 'Active alerts')}</h3>
|
||||
@@ -385,7 +392,9 @@ export default function MonitoringOverview({
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
</OverviewSection>
|
||||
|
||||
<OverviewSection id="speed" title={t('app.monitoringOverview.speedTest', 'Speed test')} w={6} h={5}>
|
||||
<section className="monitoring-panel">
|
||||
<div className="monitoring-panel__header">
|
||||
<h3>{t('app.monitoringOverview.speedTest', 'Speed test')}</h3>
|
||||
@@ -429,7 +438,8 @@ export default function MonitoringOverview({
|
||||
</p>
|
||||
)}
|
||||
</section>
|
||||
</div>
|
||||
</OverviewSection>
|
||||
</OverviewBoard>
|
||||
|
||||
<DiskReclaimModal open={reclaimOpen} onClose={() => setReclaimOpen(false)} />
|
||||
</div>
|
||||
|
||||
@@ -113,8 +113,10 @@ const ServerOverviewTab = ({ server, metrics, systemInfo, onRefreshServer }) =>
|
||||
)}
|
||||
<OverviewBoard
|
||||
kind="server"
|
||||
shared
|
||||
entityId={server.id}
|
||||
entityLabel={server.name}
|
||||
serverVar={server.id}
|
||||
widgetTypes={SERVER_WIDGET_TYPES}
|
||||
leading={SERVER_LEADING_WIDGETS}
|
||||
>
|
||||
|
||||
@@ -118,7 +118,7 @@ const OverviewTab = ({ app, deployConfig }) => {
|
||||
|
||||
return (
|
||||
<div className="overview-tab">
|
||||
<OverviewBoard kind="service" entityId={app.id} entityLabel={app.name} widgetTypes={SERVICE_WIDGET_TYPES}>
|
||||
<OverviewBoard kind="service" shared entityId={app.id} entityLabel={app.name} widgetTypes={SERVICE_WIDGET_TYPES}>
|
||||
<OverviewSection id="info" title={t('app.overviewTab.serviceInfo', 'Service info')} w={6} h={7}>
|
||||
<div className="overview-tab__card">
|
||||
<h3 className="overview-tab__card-title">{t('app.overviewTab.serviceInfo', 'Service info')}</h3>
|
||||
|
||||
@@ -768,6 +768,7 @@
|
||||
"acrossDestinations_one": "across 1 destination",
|
||||
"acrossDestinations_other": "across {{count}} destinations",
|
||||
"allSnapshots": "All backups",
|
||||
"atAGlance": "At a glance",
|
||||
"backupActivity": "Backup activity",
|
||||
"backupCompleted": "Backup completed ·",
|
||||
"backupFailed": "Couldn't back up ·",
|
||||
@@ -4113,6 +4114,7 @@
|
||||
"memoryDisk": "Memory and disk",
|
||||
"memoryUsage": "Memory usage",
|
||||
"monitor": "Monitor {{name}}",
|
||||
"monitors": "Monitors",
|
||||
"noHistoryYetForThisHost": "No history yet for this host. Samples are collected on the monitoring interval.",
|
||||
"noSpeedTestYetRunOne": "No speed test yet. Run one to measure this server's connection.",
|
||||
"nothingIsOverItsLimitRight": "Nothing is over its limit right now.",
|
||||
@@ -4396,6 +4398,7 @@
|
||||
"discardMessage": "Your saved overview layout stays as it was.",
|
||||
"discardTitle": "Discard layout changes?",
|
||||
"editHint": "Drag headers to move · drag the corner to resize · this layout applies to every {{kind}} page for your account",
|
||||
"editHintPage": "Drag headers to move · drag the corner to resize · saved to your account",
|
||||
"editLayout": "Edit overview layout",
|
||||
"nothingToShow": "Nothing to show here right now.",
|
||||
"restoreDefault": "Restore default layout",
|
||||
@@ -7340,6 +7343,7 @@
|
||||
"searchPackages": "Search packages…",
|
||||
"searchRightMostTheTabStrip": ", search right-most. The tab strip is the heading, so there is no title to repeat.",
|
||||
"secondary": "Secondary",
|
||||
"sections": "Style guide sections",
|
||||
"securityTabContent": "Security tab content.",
|
||||
"selectDropdown": "Select dropdown",
|
||||
"selectTextarea": "Select and textarea",
|
||||
|
||||
@@ -172,6 +172,30 @@
|
||||
|
||||
.skw-barbtn { height: $control-md; }
|
||||
}
|
||||
|
||||
// "Edit overview layout", under the blocks.
|
||||
&__foot {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-block-start: $space-3;
|
||||
}
|
||||
|
||||
&__edit {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: $space-tight;
|
||||
height: $control-sm;
|
||||
padding: 0 $space-2;
|
||||
border: 0;
|
||||
border-radius: $radius-control;
|
||||
background: transparent;
|
||||
color: var(--text-ghost);
|
||||
font-size: $text-xs;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover { color: var(--text); background: var(--surface-2); }
|
||||
}
|
||||
}
|
||||
|
||||
// A page block inside a widget frame: it fills the frame and scrolls when the
|
||||
@@ -194,7 +218,9 @@
|
||||
// drops its own.
|
||||
&__host {
|
||||
> .overview-tab__card,
|
||||
> .scheduled-tasks-card {
|
||||
> .scheduled-tasks-card,
|
||||
> .monitoring-panel,
|
||||
> .bk-panel {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
@@ -204,7 +230,17 @@
|
||||
.overview-tab__card > .overview-tab__card-title,
|
||||
.overview-tab__card-header-row > .overview-tab__card-title,
|
||||
.system-status-card__title > h3,
|
||||
.scheduled-tasks-card__header { display: none; }
|
||||
.scheduled-tasks-card__header,
|
||||
> .monitoring-panel > .monitoring-panel__header h3,
|
||||
> .bk-panel > .bk-panel__head h3 { display: none; }
|
||||
|
||||
// With the title gone, what is left of a panel's head (a count, a
|
||||
// link, a button) sits on the right, where it sat beside the title.
|
||||
> .monitoring-panel > .monitoring-panel__header > h3 + *,
|
||||
> .bk-panel > .bk-panel__head > h3 + * { margin-inline-start: auto; }
|
||||
// A head that held nothing but its title goes with it.
|
||||
> .bk-panel > .bk-panel__head:not(:has(> :not(h3))),
|
||||
> .monitoring-panel > .monitoring-panel__header:not(:has(> :not(h3))) { display: none; }
|
||||
|
||||
// A header row keeps its action (Attach, a state pill) on the right.
|
||||
.overview-tab__card-header-row { justify-content: flex-end; }
|
||||
@@ -215,6 +251,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Monitoring styles its panels under its own page class, which outranks the
|
||||
// plain reset above; scoping to the board puts the reset back on top.
|
||||
.sk-overview-board .sk-overview-section__host > .monitoring-panel {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
// Settings shell: grouped left nav + content column.
|
||||
.sk-detail-settings {
|
||||
display: grid;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 40 KiB |
Reference in new issue
Block a user