Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.ko.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- translated from README.md @ 0917488 -->
<!-- translated from README.md @ 4450d37 -->
# vmsctl

[![CI](https://github.com/with-developer/vmsctl/actions/workflows/ci.yml/badge.svg)](https://github.com/with-developer/vmsctl/actions/workflows/ci.yml)
Expand Down Expand Up @@ -63,7 +63,7 @@ kisa-2026: 67 controls — 10 FAIL, 11 MANUAL, 29 PASS, 17 NOT_APPLICABLE
호스트가 스스로 점검하고 결과를 `vmsctl server`로 보내면, 서버가 이력을 쌓아 두고 웹 대시보드로
보여 줍니다. 영어와 한국어, 라이트·다크 테마, 휴대폰 화면을 지원합니다.

![vmsctl 대시보드 투어: 개요, 호스트, 근거와 조치 방법이 있는 호스트, 점검 항목, 매트릭스, 한국어](docs/demo/dashboard-tour.gif)
![vmsctl 대시보드 투어: 먼저 고칠 것과 기준별 현황이 있는 개요, 조치 화면, 호스트의 지난 스캔 이후 변화와 근거, 점검 항목, 매트릭스, 한국어](docs/demo/dashboard-tour.gif)

```sh
vmsctl server demo # 가상의 호스트 12대로 둘러보기. 실제로 점검하거나 저장하지 않습니다. 출력된 주소를 여세요
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ telnet service added (the host name is shortened).
Hosts scan themselves and push the result to `vmsctl server`, which keeps the history and shows the
fleet in a web dashboard (English and Korean, light and dark, fits a phone):

![A tour of the vmsctl dashboard: overview, hosts, a host with evidence and how to fix it, a control, the matrix, Korean](docs/demo/dashboard-tour.gif)
![A tour of the vmsctl dashboard: the overview with what to fix first and each standard, the remediation page, what changed on a host since its previous scan and the evidence, a control, the matrix, Korean](docs/demo/dashboard-tour.gif)

```sh
vmsctl server demo # a made-up fleet of twelve hosts, nothing scanned, nothing written: open the address it prints
Expand Down
Binary file modified docs/demo/dashboard-fix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/demo/dashboard-host.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/demo/dashboard-hosts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/demo/dashboard-images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/demo/dashboard-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/demo/dashboard-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/demo/dashboard-tour.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/fleet.ko.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- translated from docs/fleet.md @ 0917488 -->
<!-- translated from docs/fleet.md @ 1c47549 -->
# 서버로 모아 보기

> 설계는 [ADR 0010](adr/0010-fleet-server-and-dashboard.md)에 있습니다. 호스트가 결과를 보내고, 서버가 저장해 두었다가 조회
Expand Down Expand Up @@ -288,7 +288,7 @@ server {

최신 스캔에 그 프로파일의 점검 항목이 하나도 없는 호스트는 숫자에 넣지 않습니다(보고를 멈춘 호스트는 어떤
프로파일로 스캔했든 보고가 끊긴(stale) 호스트로 셉니다). 대시보드는 이런 호스트가 몇 대인지 알려 주고 목록에 표시합니다.
프로파일이 둘 이상이면 사이드바의 선택기로 프로파일을 고르고, 고른 값은 기억합니다.
프로파일이 둘 이상이면 화면 위쪽의 선택기로 프로파일을 고르고, 고른 값은 기억합니다.

조회 토큰(`--scope api`)이 있으면 스크립트나 CI에서도 서버가 아는 것을 물어볼 수 있습니다.

Expand Down
2 changes: 1 addition & 1 deletion docs/fleet.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ your proxy: check it against its documentation. Things to know:
Hosts may scan with different profiles (`--profile`, `essentials`, a policy pack), so every number of the dashboard is of
**one profile**: the overview, the host list, the matrix and the control list take `?profile=ID` and, without it, use the
profile that most hosts scanned with (**a script that read these calls without `profile` before v0.19 now reads one profile: pass `?profile=all` for every profile added up, as before**). A host whose latest scan has none of its controls is not counted in the numbers (a silent host is still counted as stale, whatever it scanned with): the dashboard
says how many such hosts there are and marks them in the list. In the dashboard a selector in the sidebar picks the
says how many such hosts there are and marks them in the list. In the dashboard a selector in the top bar picks the
profile (and remembers it) when there is more than one.

A read token (`--scope api`) lets a script or CI ask the server what it knows:
Expand Down
Binary file modified site/img/dashboard-fix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/dashboard-host.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/dashboard-hosts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/dashboard-images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/dashboard-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/dashboard-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/ko/dashboard-fix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/ko/dashboard-host.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/ko/dashboard-hosts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/ko/dashboard-images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/ko/dashboard-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/ko/dashboard-overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 63 additions & 44 deletions web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { api, setUnauthorizedHandler } from "./lib/api";
import { useAsync, useHash } from "./lib/hooks";
import { ProfileProvider, useProfile } from "./lib/profile";
import { useI18n } from "./lib/i18n";
import { parseRoute } from "./lib/format";
import { hostsAddress, imagesAddress, parseHostsView, parseImagesView, parseRoute } from "./lib/format";
import { lastListAddress } from "./lib/listAddress";
import { Login } from "./pages/Login";
import { OverviewPage } from "./pages/Overview";
import { HostsPage } from "./pages/Hosts";
Expand All @@ -12,7 +13,7 @@ import { MatrixPage } from "./pages/Matrix";
import { ImagesPage } from "./pages/Images";
import { ControlPage, ControlsPage } from "./pages/Controls";
import { FixPage } from "./pages/Fix";
import { IconBox, IconGlobe, IconGrid, IconList, IconLogout, IconMoon, IconOverview, IconServer, IconShield, IconSun, IconWrench } from "./components/icons";
import { IconBox, IconGlobe, IconGrid, IconList, IconLogout, IconMoon, IconOverview, IconSearch, IconServer, IconShield, IconSun, IconWrench } from "./components/icons";

type Auth = "checking" | "in" | "out" | "failed";

Expand Down Expand Up @@ -102,7 +103,7 @@ export function App() {
);
}

/** The sidebar and the page, once the person is signed in and the profiles are known. */
/** The top bar and the page, once the person is signed in and the profiles are known. */
function Shell({ hash, dark, toggleTheme, logout }: { hash: string; dark: boolean; toggleTheme: () => void; logout: () => void }) {
const { t, toggle } = useI18n();
const { list, selected, select } = useProfile();
Expand All @@ -120,6 +121,7 @@ function Shell({ hash, dark, toggleTheme, logout }: { hash: string; dark: boolea
else if (page === "fix") view = <FixPage profile={arg} id={arg2} />;
else view = <OverviewPage />;
const current = page === "hosts" || page === "matrix" || page === "controls" || page === "images" || page === "fix" ? page : "overview";
const searchImages = current === "images"; // on the images, the top search looks for images

const nav: [string, string, string, JSX.Element][] = [
["overview", "#/", t("nav.overview"), <IconOverview key="o" />],
Expand All @@ -133,49 +135,66 @@ function Shell({ hash, dark, toggleTheme, logout }: { hash: string; dark: boolea

return (
<div className="app">
<aside className="sidebar">
<a className="brand" href="#/">
<IconShield size={24} />
<span>{t("app.name")}</span>
</a>
<nav aria-label={t("nav.section")}>
<span className="nav-section">{t("nav.section")}</span>
{nav.map(([key, href, label, icon]) => (
<a key={key} href={href} aria-current={current === key ? "page" : undefined}>
{icon}
<span>{label}</span>
</a>
))}
</nav>
{list && list.profiles.length > 1 && (
<div className="profile-select">
<label htmlFor="profile">{t("profile.label")}</label>
<select id="profile" value={selected} onChange={(e) => select(e.target.value)}>
{list.profiles.map((p) => (
<option key={p.id} value={p.id}>
{p.id} ({t("profile.hosts", { n: p.fleet?.hosts ?? p.hosts })})
</option>
))}
</select>
</div>
)}
<div className="sidebar-foot">
<button className="ghost" onClick={toggleTheme} aria-label={dark ? t("theme.light") : t("theme.dark")} title={dark ? t("theme.light") : t("theme.dark")}>
{dark ? <IconSun /> : <IconMoon />}
<span>{dark ? t("theme.light") : t("theme.dark")}</span>
</button>
<button className="ghost" onClick={toggle} aria-label={t("lang.switch")} title={t("lang.switch")}>
<IconGlobe />
<span>{t("lang.switch")}</span>
</button>
{!DEMO && (
<button className="ghost" onClick={logout} aria-label={t("nav.logout")} title={t("nav.logout")}>
<IconLogout />
<span>{t("nav.logout")}</span>
<header className="topbar">
<div className="topbar-in">
<a className="brand" href="#/">
<IconShield size={22} />
<span>{t("app.name")}</span>
</a>
<nav className="topnav" aria-label={t("nav.section")}>
{nav.map(([key, href, label, icon]) => (
<a key={key} href={href} aria-current={current === key ? "page" : undefined}>
{icon}
<span>{label}</span>
</a>
))}
</nav>
<div className="topbar-tools">
{list && list.profiles.length > 1 && (
<div className="profile-select">
<label htmlFor="profile" className="sr-only">
{t("profile.label")}
</label>
<select id="profile" value={selected} onChange={(e) => select(e.target.value)} title={t("profile.label")}>
{list.profiles.map((p) => (
<option key={p.id} value={p.id}>
{p.id} ({t("profile.hosts", { n: p.fleet?.hosts ?? p.hosts })})
</option>
))}
</select>
</div>
)}
<form
className="topsearch search"
role="search"
onSubmit={(e) => {
e.preventDefault();
const q = String(new FormData(e.currentTarget).get("q") ?? "").trim();
// the list's own filters stay; the list's search box takes the text from here, so this one empties
location.hash = searchImages
? imagesAddress({ ...parseImagesView(lastListAddress("images")), q })
: hostsAddress({ ...parseHostsView(lastListAddress("hosts")), q });
e.currentTarget.reset();
}}
>
<IconSearch />
<input type="search" name="q" placeholder={t(searchImages ? "top.searchImages" : "top.search")} aria-label={t(searchImages ? "top.searchImages" : "top.search")} />
</form>
<button className="ghost icon-only" onClick={toggleTheme} aria-label={dark ? t("theme.light") : t("theme.dark")} title={dark ? t("theme.light") : t("theme.dark")}>
{dark ? <IconSun /> : <IconMoon />}
</button>
)}
<button className="ghost lang-switch" onClick={toggle} aria-label={t("lang.switch")} title={t("lang.switch")}>
<IconGlobe />
<span>{t("lang.switch")}</span>
</button>
{!DEMO && (
<button className="ghost icon-only" onClick={logout} aria-label={t("nav.logout")} title={t("nav.logout")}>
<IconLogout />
</button>
)}
</div>
</div>
</aside>
</header>
<main key={selected}>
{DEMO && (
<p className="demo-banner" role="note">
Expand Down
8 changes: 6 additions & 2 deletions web/src/lib/i18n.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const en = {
"app.name": "vmsctl",
"nav.overview": "Overview",
"nav.fix": "Fix",
"top.search": "Search hosts",
"top.searchImages": "Search images",
"fix.title": "Fix",
"fix.subtitle": "The failing controls in the order to fix them, with how to fix each and the hosts to fix it on.",
"fix.queue": "Controls to fix",
Expand Down Expand Up @@ -180,7 +182,7 @@ const en = {
"profile.hosts": "{n} hosts",
"profile.other": "{n} hosts scanned with another profile are not counted here. Pick that profile to see them.",
"profile.otherHost": "another profile",
"profile.hostOther": "The latest scan of this host is of {profiles}. Choose that profile in the sidebar to see its controls.",
"profile.hostOther": "The latest scan of this host is of {profiles}. Choose that profile at the top of the page to see its controls.",
"hosts.sortBy": "Sort",
"hosts.more": "Show more",
"hosts.showing": "Showing {n} of {total}",
Expand Down Expand Up @@ -222,6 +224,8 @@ const ko: Record<Key, string> = {
"app.name": "vmsctl",
"nav.overview": "개요",
"nav.fix": "조치",
"top.search": "호스트 검색",
"top.searchImages": "이미지 검색",
"fix.title": "조치",
"fix.subtitle": "실패한 점검 항목을 고칠 순서대로 놓고, 항목마다 고치는 방법과 고칠 호스트를 함께 보여 줍니다.",
"fix.queue": "고칠 점검 항목",
Expand Down Expand Up @@ -396,7 +400,7 @@ const ko: Record<Key, string> = {
"profile.hosts": "호스트 {n}대",
"profile.other": "다른 프로파일로 스캔한 호스트 {n}대는 여기에 집계하지 않습니다. 그 프로파일을 고르면 볼 수 있습니다.",
"profile.otherHost": "다른 프로파일",
"profile.hostOther": "이 호스트의 최신 스캔은 {profiles} 프로파일 기준입니다. 사이드바에서 해당 프로파일을 고르면 점검 항목을 볼 수 있습니다.",
"profile.hostOther": "이 호스트의 최신 스캔은 {profiles} 프로파일 기준입니다. 화면 위쪽에서 해당 프로파일을 고르면 점검 항목을 볼 수 있습니다.",
"hosts.sortBy": "정렬",
"hosts.more": "더 보기",
"hosts.showing": "{total}대 중 {n}대 표시",
Expand Down
Loading