Имя входит в ключи бэкапов в S3 (backups/<имя>/…), поэтому после создания не меняется (docs/changes/015): - API: PATCH с другим именем → 400 «Имя устройства нельзя изменить», то же имя допустимо; - UI: в окне изменения поле имени только для чтения, форма изменения присланное имя игнорирует; - вёрстка: минимальная ширина таблиц устройств и файлов — в узком окне колонка с именем не схлопывается, включается горизонтальная прокрутка. Тесты: 12 из 12. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
208 lines
17 KiB
CSS
208 lines
17 KiB
CSS
/* ros_control UI — перенос утверждённого макета. Значения (размеры, радиусы, цвета) взяты из макета 1:1.
|
|
Формы: контролы h36 r8 · метки h22 r6 · панели/карточки r12. Шрифты — IBM Plex (локально, OFL). */
|
|
|
|
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
|
|
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
|
|
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
|
|
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
|
|
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
|
|
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
|
|
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
|
|
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
|
|
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
|
|
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
|
|
|
|
:root {
|
|
--font: "IBM Plex Sans", system-ui, sans-serif;
|
|
--mono: "IBM Plex Mono", ui-monospace, monospace;
|
|
--bg: #f4f6f9; --surf: #ffffff; --head: #f8fafc; --sel: #f3f7ff;
|
|
--line: #dde3ea; --line2: #c5ced9;
|
|
--text: #18212f; --muted: #58657a; --faint: #8a95a5;
|
|
--acc: #2450c8; --acc-solid: #2450c8; --acc50: #eaf0ff; --acc100: #d5e2ff; --accd: #1e449e;
|
|
--ok-t: #14683a; --ok-b: #e3f4ea; --warn-t: #7c4a00; --warn-b: #fdf0d5; --bad-t: #a32020; --bad-b: #fbe6e6;
|
|
--neu-t: #3c4859; --neu-b: #eef1f5;
|
|
--dot-on: #1f8a4c; --dot-off: #c62828; --dot-unk: #8a95a5;
|
|
--shadow-menu: 0 8px 24px rgba(20, 33, 60, .14); --shadow-modal: 0 16px 48px rgba(20, 33, 60, .25);
|
|
--backdrop: rgba(24, 33, 47, .45); --disabled-bg: #f4f6f9; --disabled-t: #8a95a5;
|
|
color-scheme: light;
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
:root {
|
|
--bg: #0f141b; --surf: #171e27; --head: #1b2430; --sel: #1a2540;
|
|
--line: #2a3441; --line2: #3a4759;
|
|
--text: #e6ebf2; --muted: #97a3b6; --faint: #7a8699;
|
|
--acc: #7ea1ff; --acc-solid: #3d68de; --acc50: #1c2a4a; --acc100: #26385f; --accd: #a9c1ff;
|
|
--ok-t: #6fd39a; --ok-b: #12301f; --warn-t: #f0b04a; --warn-b: #3a2a0c; --bad-t: #ff8f8f; --bad-b: #3b1616;
|
|
--neu-t: #b6c0cf; --neu-b: #232c39;
|
|
--dot-on: #3fbf78; --dot-off: #ff6b6b; --dot-unk: #7a8699;
|
|
--shadow-menu: 0 8px 24px rgba(0, 0, 0, .5); --shadow-modal: 0 16px 48px rgba(0, 0, 0, .6);
|
|
--backdrop: rgba(0, 0, 0, .6); --disabled-bg: #1b2430; --disabled-t: #6b7789;
|
|
color-scheme: dark;
|
|
}
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.4 var(--font); }
|
|
a { color: var(--acc); text-decoration: none; }
|
|
h1, h2 { margin: 0; }
|
|
[hidden] { display: none !important; }
|
|
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
|
|
.grow { flex: 1; }
|
|
.muted { color: var(--muted); }
|
|
.mono { font: 400 13px/1.2 var(--mono); }
|
|
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
|
|
.ico { flex: none; }
|
|
|
|
/* ---------- 1 · Приложение ---------- */
|
|
.app-header { height: 56px; display: flex; align-items: center; gap: 32px; padding: 0 24px; background: var(--surf); border-bottom: 1px solid var(--line); }
|
|
.brand { display: flex; align-items: center; gap: 10px; font: 600 16px/1 var(--font); color: var(--text); }
|
|
.brand-logo { width: 28px; height: 28px; border-radius: 8px; background: var(--acc-solid); color: #fff; display: flex; align-items: center; justify-content: center; }
|
|
.nav { display: flex; height: 100%; gap: 4px; }
|
|
.nav a { display: flex; align-items: center; height: 100%; padding: 0 14px; font: 500 14px/1 var(--font); color: var(--muted); border-bottom: 2px solid transparent; }
|
|
.nav a.on { color: var(--text); border-bottom-color: var(--acc); }
|
|
.user { color: var(--muted); }
|
|
.container { max-width: 1600px; margin: 0 auto; padding: 0 24px 48px; }
|
|
|
|
/* ---------- 2 · Страница ---------- */
|
|
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin: 24px 0 16px; gap: 16px; }
|
|
.page-head h1 { font: 600 24px/1.2 var(--font); }
|
|
.page-head .sub { margin-top: 4px; color: var(--muted); }
|
|
.page-head .actions { display: flex; gap: 8px; }
|
|
|
|
/* ---------- Кнопки: h36 · r8 · 14/500 ---------- */
|
|
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; margin: 0; padding: 0 14px; border-radius: 8px;
|
|
border: 1px solid var(--line2); background: var(--surf); color: var(--text); font: 500 14px/1 var(--font); white-space: nowrap; cursor: pointer; }
|
|
.btn:hover { border-color: var(--acc); }
|
|
.btn.primary { background: var(--acc-solid); border-color: var(--acc-solid); color: #fff; }
|
|
.btn.primary:hover { filter: brightness(1.08); }
|
|
.btn.ghost { background: transparent; border-color: transparent; color: var(--acc); padding: 0 10px; }
|
|
.btn.ghost-n { background: transparent; border-color: transparent; color: var(--muted); padding: 0 10px; }
|
|
.btn.ghost:hover, .btn.ghost-n:hover { background: var(--acc50); border-color: transparent; }
|
|
.btn.icon { width: 36px; padding: 0; }
|
|
.btn.danger { color: var(--bad-t); }
|
|
.btn:disabled { background: var(--disabled-bg); color: var(--disabled-t); border-color: var(--line); cursor: not-allowed; }
|
|
summary.btn { list-style: none; }
|
|
summary.btn::-webkit-details-marker { display: none; }
|
|
|
|
/* ---------- Поля: та же форма, что у кнопок ---------- */
|
|
.field, .input { height: 36px; margin: 0; border-radius: 8px; border: 1px solid var(--line2); background-color: var(--surf); color: var(--text); font: 400 14px/1 var(--font); }
|
|
.input { width: 100%; padding: 0 12px; }
|
|
.input[readonly] { background: var(--head); color: var(--muted); cursor: not-allowed; }
|
|
textarea.input { height: 72px; padding: 10px 12px; font-family: var(--font); line-height: 1.4; resize: vertical; }
|
|
select.field { appearance: none; -webkit-appearance: none; padding: 0 36px 0 14px; font-weight: 500; cursor: pointer;
|
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2358657a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
|
background-repeat: no-repeat; background-position: right 12px center; }
|
|
select.field.on { background-color: var(--acc50); border-color: var(--acc); color: var(--accd); }
|
|
select.field option { color: var(--text); background: var(--surf); font-weight: 400; }
|
|
.search { position: relative; display: inline-flex; align-items: center; flex: none; }
|
|
.search .ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
|
|
.search input { height: 36px; width: 280px; padding: 0 12px 0 36px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surf); color: var(--text); font: 400 14px/1 var(--font); }
|
|
.search input::placeholder { color: var(--faint); }
|
|
.datefield { display: inline-flex; align-items: center; gap: 8px; height: 36px; width: 170px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line2); background: var(--surf); color: var(--muted); font: 400 14px/1 var(--font); }
|
|
.datefield input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 400 13px/1 var(--mono); padding: 0; }
|
|
.datefield input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
|
|
|
|
/* ---------- Метки: h22 · r6 ---------- */
|
|
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--neu-b); color: var(--neu-t); font: 500 12px/1 var(--font); white-space: nowrap; }
|
|
.badge.warn { background: var(--warn-b); color: var(--warn-t); }
|
|
.badge.ok { background: var(--ok-b); color: var(--ok-t); }
|
|
.badge.bad { background: var(--bad-b); color: var(--bad-t); }
|
|
.badge.run { background: var(--acc50); color: var(--accd); }
|
|
.okmark { display: inline-flex; align-items: center; gap: 4px; color: var(--ok-t); font: 500 13px/1 var(--font); }
|
|
.dash { color: var(--faint); }
|
|
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--dot-unk); }
|
|
.dot.on { background: var(--dot-on); } .dot.off { background: var(--dot-off); }
|
|
|
|
/* ---------- 3 · Область: вкладки-подчёркивание ---------- */
|
|
.tabs { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
|
|
.tab { padding: 10px 2px 12px; margin-bottom: -1px; font: 500 14px/1 var(--font); color: var(--muted); border-bottom: 2px solid transparent; }
|
|
.tab:hover { color: var(--text); }
|
|
.tab.on { font-weight: 600; color: var(--text); border-bottom-color: var(--acc); }
|
|
.tab .count { margin-left: 2px; font-weight: 400; color: var(--muted); }
|
|
.tab-link { display: inline-flex; align-items: center; gap: 6px; padding-bottom: 10px; font: 500 14px/1 var(--font); color: var(--acc); }
|
|
|
|
/* ---------- Карточка, 4 · инструменты таблицы ---------- */
|
|
.card { background: var(--surf); border: 1px solid var(--line); border-radius: 12px; }
|
|
.tools { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 16px; }
|
|
.tools.bulk { background: var(--acc50); border-radius: 12px 12px 0 0; }
|
|
.tools form { display: contents; }
|
|
.sel-count { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; font: 600 14px/1 var(--font); color: var(--accd); }
|
|
.busy { opacity: 0; color: var(--muted); } .htmx-request .busy, .busy.htmx-request { opacity: 1; }
|
|
|
|
/* ---------- 5 · Данные: таблица ---------- */
|
|
table.grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
|
|
.grid th { height: 40px; padding: 0 6px; text-align: left; font: 600 12px/1 var(--font); color: var(--muted); background: var(--head); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
|
|
.grid td { height: 60px; padding: 0 6px; border-bottom: 1px solid var(--line); vertical-align: middle; font: 400 14px/1.3 var(--font); }
|
|
.grid th:first-child, .grid td:first-child { padding-left: 16px; }
|
|
.grid th:last-child, .grid td:last-child { padding-right: 16px; }
|
|
.grid tr.sel td { background: var(--sel); }
|
|
.grid input[type=checkbox], .modal input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--acc-solid); }
|
|
.dev { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
.dev-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.dev-link { color: inherit; }
|
|
.dev-link:hover { color: var(--acc); text-decoration: underline; }
|
|
.dev-sub { margin-top: 2px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.dev-sub.bad { color: var(--bad-t); }
|
|
.c-mono { font: 400 13px/1.2 var(--mono); }
|
|
.c-small { font-size: 13px; color: var(--muted); }
|
|
.c-menu { text-align: right; }
|
|
.tfoot { display: flex; align-items: center; height: 44px; padding: 0 16px; font: 400 13px/1 var(--font); color: var(--muted); }
|
|
.empty { height: 88px; text-align: center; color: var(--muted); }
|
|
.table-wrap { overflow-x: auto; }
|
|
@media (min-width: 1360px) { .table-wrap { overflow: visible; } }
|
|
/* при узком окне таблица прокручивается по горизонтали, а колонка с именем не схлопывается */
|
|
table.grid.devices { min-width: 1240px; }
|
|
table.grid.files { min-width: 1000px; }
|
|
.grid.jobs td { height: 48px; }
|
|
.grid.files td { height: 52px; }
|
|
.grid.groups td { height: 56px; }
|
|
.section-head { display: flex; align-items: center; gap: 12px; margin: 32px 0 12px; }
|
|
.section-head h2 { font: 600 16px/1.2 var(--font); }
|
|
.msg { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
|
|
.err { color: var(--bad-t); }
|
|
|
|
/* ---------- Меню «⋯» и выпадающие списки ---------- */
|
|
.menu { position: relative; display: inline-flex; }
|
|
.menu-panel { position: absolute; top: 40px; left: 0; z-index: 30; width: 250px; padding: 6px; text-align: left; background: var(--surf);
|
|
border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-menu); }
|
|
.menu.right .menu-panel { left: auto; right: 0; }
|
|
.w200 { width: 200px; } .w270 { width: 270px; } .w330 { width: 330px; }
|
|
.mi { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
|
|
color: var(--text); text-align: left; font: 500 14px/1.3 var(--font); cursor: pointer; }
|
|
.mi small { font: 400 12px/1.3 var(--font); color: var(--muted); }
|
|
.mi:hover { background: var(--acc50); }
|
|
.mi.warn { color: var(--warn-t); } .mi.bad { color: var(--bad-t); }
|
|
.mi.on { flex-direction: row; align-items: center; gap: 6px; }
|
|
.mi.on::before { content: "✓"; }
|
|
summary.mi { list-style: none; } summary.mi::-webkit-details-marker { display: none; }
|
|
.menu-panel hr { height: 1px; margin: 6px 0; border: 0; background: var(--line); }
|
|
details.sub .sub-list { padding-left: 10px; }
|
|
|
|
/* ---------- Окна ---------- */
|
|
dialog.modal { width: 560px; max-width: calc(100vw - 32px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surf); color: var(--text); box-shadow: var(--shadow-modal); }
|
|
dialog.modal::backdrop { background: var(--backdrop); }
|
|
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 0 24px; }
|
|
.modal-head h2 { font: 600 18px/1.2 var(--font); }
|
|
.modal-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 24px 24px; }
|
|
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); }
|
|
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
|
|
.form-row.host { grid-template-columns: 1fr 110px; }
|
|
.lbl { display: flex; flex-direction: column; gap: 6px; font: 500 13px/1.3 var(--font); }
|
|
.lbl small { font-size: inherit; font-weight: 400; color: var(--muted); }
|
|
.check { display: flex; align-items: flex-start; gap: 10px; font: 500 14px/1.3 var(--font); }
|
|
.check small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
|
|
.note { padding: 10px 12px; border-radius: 8px; background: var(--warn-b); color: var(--warn-t); font: 400 13px/1.4 var(--font); }
|
|
.form-ok { padding: 10px 12px; border-radius: 8px; background: var(--ok-b); color: var(--ok-t); font: 500 13px/1.4 var(--font); }
|
|
.form-err { padding: 10px 12px; border-radius: 8px; background: var(--bad-b); color: var(--bad-t); font: 500 13px/1.4 var(--font); }
|
|
.page-card { max-width: 560px; margin: 24px auto; }
|
|
|
|
/* ---------- Вход ---------- */
|
|
.login { max-width: 400px; margin: 96px auto 0; }
|
|
.login h1 { font: 600 24px/1.2 var(--font); margin-bottom: 16px; }
|
|
|
|
/* таблица в карточке без собственной верхней/нижней границы (её даёт карточка) */
|
|
.card > table.grid:first-child thead th { border-top: 0; }
|
|
.card > table.grid:first-child thead th:first-child { border-top-left-radius: 11px; }
|
|
.card > table.grid:first-child thead th:last-child { border-top-right-radius: 11px; }
|
|
.card > table.grid:last-child tbody tr:last-child td { border-bottom: 0; }
|