Compare commits
3
Commits
5200159d0b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc2e9c8bc1 | ||
|
|
e30a6dd2a1 | ||
|
|
dcb0c76ac8 |
@@ -12,7 +12,6 @@ import {
|
|||||||
ResourceList,
|
ResourceList,
|
||||||
ResourceRow,
|
ResourceRow,
|
||||||
HeaderNavigation,
|
HeaderNavigation,
|
||||||
HeaderProfile,
|
|
||||||
HeaderWorkspace,
|
HeaderWorkspace,
|
||||||
Icon,
|
Icon,
|
||||||
type IconName,
|
type IconName,
|
||||||
@@ -375,7 +374,6 @@ export function DeviceManagerApp() {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
right={
|
right={
|
||||||
<HeaderProfile>
|
|
||||||
<UserProfileMenu
|
<UserProfileMenu
|
||||||
displayName={session.user.displayName}
|
displayName={session.user.displayName}
|
||||||
subtitle={session.user.email}
|
subtitle={session.user.email}
|
||||||
@@ -391,7 +389,6 @@ export function DeviceManagerApp() {
|
|||||||
{ id: "logout", label: "Выйти", icon: "external", href: "/auth/logout" },
|
{ id: "logout", label: "Выйти", icon: "external", href: "/auth/logout" },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</HeaderProfile>
|
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useRef, useState } from 'react';
|
import { useEffect, useRef, useState } from 'react';
|
||||||
import { Button, FeatureSettingsWindow, Icon, IconButton, Select, SettingsCard, StatusBadge, TextField, TextAreaField, ConfirmationModal, ResourceList, ResourceRow } from '@nodedc/ui-react';
|
import { Button, FeatureSettingsWindow, GlassSurface, Icon, IconButton, Select, SettingsCard, StatusBadge, TextField, TextAreaField, ConfirmationModal, ResourceList, ResourceRow } from '@nodedc/ui-react';
|
||||||
import { archiveHost, loadProjects } from '../api';
|
import { archiveHost, loadProjects } from '../api';
|
||||||
import type { InfrastructureHostView, ProjectSummary, ProjectWorkspace } from '../types';
|
import type { InfrastructureHostView, ProjectSummary, ProjectWorkspace } from '../types';
|
||||||
import { b2Request, type B2Status, type B2Application } from './api';
|
import { b2Request, type B2Status, type B2Application } from './api';
|
||||||
@@ -165,6 +165,7 @@ export function B2HostSettings({ host, workspace, onClose, onChanged, onError }:
|
|||||||
</div></SettingsCard> : null}
|
</div></SettingsCard> : null}
|
||||||
</> : null}
|
</> : null}
|
||||||
{section === 'contours' ? <>
|
{section === 'contours' ? <>
|
||||||
|
<h3 id="b2-contours-heading" className="b2-section-heading b2-contours-heading">Контуры</h3>
|
||||||
{newContour ? <SettingsCard title="Новый контур VPS" description="Создаётся на этом VPS и связывается с выбранным проектом Device Core."><div className="b2-settings">
|
{newContour ? <SettingsCard title="Новый контур VPS" description="Создаётся на этом VPS и связывается с выбранным проектом Device Core."><div className="b2-settings">
|
||||||
<TextField label="Название контура" value={contourName} disabled={busy || Boolean(contourIntent)} maxLength={160} autoFocus onChange={event => setContourName(event.target.value)} />
|
<TextField label="Название контура" value={contourName} disabled={busy || Boolean(contourIntent)} maxLength={160} autoFocus onChange={event => setContourName(event.target.value)} />
|
||||||
<Select label="Проект Device Core" value={targetProject} disabled={busy || Boolean(contourIntent)} options={projects.filter(item => item.access.capabilities.includes('infrastructure.manage')).map(item => ({ value: item.projectRef, label: item.name }))} onChange={setTargetProject} />
|
<Select label="Проект Device Core" value={targetProject} disabled={busy || Boolean(contourIntent)} options={projects.filter(item => item.access.capabilities.includes('infrastructure.manage')).map(item => ({ value: item.projectRef, label: item.name }))} onChange={setTargetProject} />
|
||||||
@@ -174,14 +175,15 @@ export function B2HostSettings({ host, workspace, onClose, onChanged, onError }:
|
|||||||
}}>{contourIntent ? 'Уточнить создание' : 'Создать контур'}</Button></div>
|
}}>{contourIntent ? 'Уточнить создание' : 'Создать контур'}</Button></div>
|
||||||
</div></SettingsCard> : null}
|
</div></SettingsCard> : null}
|
||||||
{!status?.contours?.length && !busy ? <p>На VPS ещё нет контуров. Создайте первый кнопкой «+» в шапке настроек.</p> : null}
|
{!status?.contours?.length && !busy ? <p>На VPS ещё нет контуров. Создайте первый кнопкой «+» в шапке настроек.</p> : null}
|
||||||
<ResourceList>{(status?.contours || []).map(contour => {
|
<ResourceList className="b2-contours" aria-labelledby="b2-contours-heading">{(status?.contours || []).map(contour => {
|
||||||
const links = (status?.links || []).filter(link => link.contourId === contour.id);
|
const links = (status?.links || []).filter(link => link.contourId === contour.id);
|
||||||
const open = expanded.includes(contour.id);
|
const open = expanded.includes(contour.id);
|
||||||
const apps = (status?.applications || []).filter(app => app.authority !== 'host' && app.grants[contour.id]);
|
const apps = (status?.applications || []).filter(app => app.authority !== 'host' && app.grants[contour.id]);
|
||||||
const available = projects.filter(item => item.access.capabilities.includes('infrastructure.manage') && !links.some(link => link.projectRef === item.projectRef));
|
const available = projects.filter(item => item.access.capabilities.includes('infrastructure.manage') && !links.some(link => link.projectRef === item.projectRef));
|
||||||
const projectNames = links.map(link => projects.find(item => item.projectRef === link.projectRef)?.name || 'Недоступный проект');
|
const projectNames = links.map(link => projects.find(item => item.projectRef === link.projectRef)?.name || 'Недоступный проект');
|
||||||
return <li key={contour.id} className="b2-disclosure">
|
return <li key={contour.id}>
|
||||||
<ResourceRow title={contour.name} metadata={links.length ? `Проекты: ${projectNames.join(', ')}` : 'Не связан с проектами Device Core'} actions={<>
|
<GlassSurface className="b2-contour" data-expanded={open} materialRim={false}>
|
||||||
|
<ResourceRow className="b2-contour__header" title={contour.name} metadata={links.length ? `Проекты: ${projectNames.join(', ')}` : 'Не связан с проектами Device Core'} actions={<>
|
||||||
{open && canManage ? <IconButton label={`Добавить приложение в ${contour.name}`} disabled={busy} onClick={() => { setCreating(contour.id); setName(''); setAccess('read'); setCreationIntent(null); }}><Icon name="plus" /></IconButton> : null}
|
{open && canManage ? <IconButton label={`Добавить приложение в ${contour.name}`} disabled={busy} onClick={() => { setCreating(contour.id); setName(''); setAccess('read'); setCreationIntent(null); }}><Icon name="plus" /></IconButton> : null}
|
||||||
<IconButton label={`Контур ${contour.name}`} aria-expanded={open} aria-controls={`contour-${contour.id}`} onClick={() => setExpanded(toggle(expanded, contour.id))}><Icon name={open ? 'chevron-up' : 'chevron-down'} /></IconButton>
|
<IconButton label={`Контур ${contour.name}`} aria-expanded={open} aria-controls={`contour-${contour.id}`} onClick={() => setExpanded(toggle(expanded, contour.id))}><Icon name={open ? 'chevron-up' : 'chevron-down'} /></IconButton>
|
||||||
</>} />
|
</>} />
|
||||||
@@ -209,6 +211,7 @@ export function B2HostSettings({ host, workspace, onClose, onChanged, onError }:
|
|||||||
}}>{creationIntent ? 'Уточнить создание' : 'Создать ключ'}</Button></div>
|
}}>{creationIntent ? 'Уточнить создание' : 'Создать ключ'}</Button></div>
|
||||||
</div> : null}
|
</div> : null}
|
||||||
</div> : null}
|
</div> : null}
|
||||||
|
</GlassSurface>
|
||||||
</li>;
|
</li>;
|
||||||
})}</ResourceList>
|
})}</ResourceList>
|
||||||
</> : null}
|
</> : null}
|
||||||
|
|||||||
@@ -6,6 +6,11 @@
|
|||||||
.b2-disclosure { display: grid; gap: var(--nodedc-space-2); }
|
.b2-disclosure { display: grid; gap: var(--nodedc-space-2); }
|
||||||
.b2-disclosure__body { display: grid; gap: var(--nodedc-space-3); padding: var(--nodedc-space-2) var(--nodedc-space-3) var(--nodedc-space-4); }
|
.b2-disclosure__body { display: grid; gap: var(--nodedc-space-3); padding: var(--nodedc-space-2) var(--nodedc-space-3) var(--nodedc-space-4); }
|
||||||
.b2-section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--nodedc-space-3); font-size: var(--nodedc-font-size-sm); }
|
.b2-section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--nodedc-space-3); font-size: var(--nodedc-font-size-sm); }
|
||||||
|
.b2-contours-heading { margin: 0; padding-inline: var(--nodedc-space-3); font-weight: var(--nodedc-font-weight-strong); }
|
||||||
|
.b2-contours { gap: var(--nodedc-space-4); }
|
||||||
|
.b2-contour { display: grid; gap: var(--nodedc-space-2); }
|
||||||
|
.b2-contour[data-expanded="false"] { background: transparent; box-shadow: none; }
|
||||||
|
.b2-contour[data-expanded="true"] > .b2-contour__header { background: transparent; }
|
||||||
|
|
||||||
.b2-tracker-form { display: grid; min-width: 0; gap: 1rem; font-size: var(--nodedc-font-size-sm); }
|
.b2-tracker-form { display: grid; min-width: 0; gap: 1rem; font-size: var(--nodedc-font-size-sm); }
|
||||||
.b2-tracker-facts { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr); gap: .65rem 1rem; margin: 0; font-size: var(--nodedc-font-size-sm); }
|
.b2-tracker-facts { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 2fr); gap: .65rem 1rem; margin: 0; font-size: var(--nodedc-font-size-sm); }
|
||||||
|
|||||||
@@ -38,3 +38,9 @@ Legacy Mission Core access is visible as a compatible connection.
|
|||||||
- Verify the existing home video/media survives releases.
|
- Verify the existing home video/media survives releases.
|
||||||
- Full B2 command/settings parity remains a distinct domain integration task;
|
- Full B2 command/settings parity remains a distinct domain integration task;
|
||||||
a UI release or successful deployment must not be recorded as its completion.
|
a UI release or successful deployment must not be recorded as its completion.
|
||||||
|
|
||||||
|
|
||||||
|
The AppHeader right slot consumes the complete shared UserProfileMenu. Its
|
||||||
|
canonical order is profile label, inbox menu button, avatar; interface settings
|
||||||
|
remain a permission-controlled menu action. Do not add a HeaderProfile wrapper,
|
||||||
|
separate settings gear, or local spacing/geometry overrides.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"NODEDC_DESIGN_GUIDELINE": {
|
"NODEDC_DESIGN_GUIDELINE": {
|
||||||
"url": "https://git.dcserve.ru/SILVER/NODEDC_DESIGN_GUIDELINE.git",
|
"url": "https://git.dcserve.ru/SILVER/NODEDC_DESIGN_GUIDELINE.git",
|
||||||
"commit": "a6e6c8f2d9c3de8d98b60c30da6a70d9538c1ef2"
|
"commit": "06cb8ad4cd193ae1b4b1ac40a513fd642e12b878"
|
||||||
},
|
},
|
||||||
"NODEDC_LAUNCHER": {
|
"NODEDC_LAUNCHER": {
|
||||||
"url": "https://git.dcserve.ru/SILVER/NODEDC_LAUNCHER.git",
|
"url": "https://git.dcserve.ru/SILVER/NODEDC_LAUNCHER.git",
|
||||||
|
|||||||
Reference in New Issue
Block a user