@exagone313/dsh-podman 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/card-route.d.ts +8 -0
- package/dist/card-route.js +19 -8
- package/dist/client/ContainerCard.js +147 -110
- package/dist/client/card-protocol.d.ts +4 -0
- package/dist/client/card-protocol.js +34 -0
- package/dist/client/container-card-caches.d.ts +1 -1
- package/dist/client/container-card-caches.js +19 -17
- package/dist/client/container-card-config.d.ts +47 -0
- package/dist/client/container-card-config.js +160 -0
- package/dist/client/container-card-controller.d.ts +35 -3
- package/dist/client/container-card-controller.js +263 -41
- package/dist/client/container-card-create-modal.d.ts +5 -1
- package/dist/client/container-card-create-modal.js +111 -94
- package/dist/client/container-card-defaults.d.ts +16 -0
- package/dist/client/container-card-defaults.js +147 -0
- package/dist/client/container-card-dialog-styles.d.ts +7 -0
- package/dist/client/container-card-dialog-styles.js +70 -0
- package/dist/client/container-card-dialog.d.ts +12 -0
- package/dist/client/container-card-dialog.js +47 -0
- package/dist/client/container-card-directory-styles.d.ts +1 -1
- package/dist/client/container-card-directory-styles.js +5 -5
- package/dist/client/container-card-directory.js +8 -7
- package/dist/client/container-card-edit-modal.d.ts +39 -0
- package/dist/client/container-card-edit-modal.js +29 -0
- package/dist/client/container-card-editors.d.ts +5 -2
- package/dist/client/container-card-editors.js +109 -134
- package/dist/client/container-card-field-styles.d.ts +7 -0
- package/dist/client/container-card-field-styles.js +63 -0
- package/dist/client/container-card-form.d.ts +47 -0
- package/dist/client/container-card-form.js +61 -0
- package/dist/client/container-card-group.d.ts +9 -0
- package/dist/client/container-card-group.js +22 -0
- package/dist/client/container-card-images.d.ts +6 -2
- package/dist/client/container-card-images.js +63 -23
- package/dist/client/container-card-paths.js +43 -52
- package/dist/client/container-card-ports.d.ts +3 -4
- package/dist/client/container-card-ports.js +74 -38
- package/dist/client/container-card-resources.d.ts +38 -0
- package/dist/client/container-card-resources.js +73 -0
- package/dist/client/container-card-row.d.ts +11 -19
- package/dist/client/container-card-row.js +122 -122
- package/dist/client/container-card-secrets.d.ts +31 -3
- package/dist/client/container-card-secrets.js +174 -56
- package/dist/client/container-card-shared.d.ts +173 -6
- package/dist/client/container-card-shared.js +616 -57
- package/dist/client/container-card-status.d.ts +18 -0
- package/dist/client/container-card-status.js +166 -0
- package/dist/client/container-card-styles.d.ts +49 -7
- package/dist/client/container-card-styles.js +396 -40
- package/dist/client/container-card-table-styles.d.ts +15 -0
- package/dist/client/container-card-table-styles.js +237 -0
- package/dist/client/container-card-tabs-styles.d.ts +5 -0
- package/dist/client/container-card-tabs-styles.js +46 -0
- package/dist/client/container-card-toast.d.ts +5 -0
- package/dist/client/container-card-toast.js +10 -0
- package/dist/client/container-card-volumes.d.ts +1 -0
- package/dist/client/container-card-volumes.js +14 -19
- package/dist/client/container-card-workspace.d.ts +8 -12
- package/dist/client/container-card-workspace.js +76 -14
- package/dist/client/index.js +6488 -3474
- package/dist/client/locales.d.ts +10 -1
- package/dist/client/locales.js +268 -114
- package/dist/client/relative-time.d.ts +10 -0
- package/dist/client/relative-time.js +74 -0
- package/dist/client/slot-contract.d.ts +8 -0
- package/dist/client/tool-views.js +1 -1
- package/dist/container-env.js +1 -1
- package/dist/env-rows.d.ts +9 -11
- package/dist/env-rows.js +72 -40
- package/dist/generated/version.d.ts +2 -2
- package/dist/generated/version.js +2 -2
- package/dist/guest-terminal.js +1 -1
- package/dist/mount-enums.d.ts +11 -0
- package/dist/mount-enums.js +60 -0
- package/dist/subprocess.js +1 -1
- package/dist/terminal-sessions.js +2 -2
- package/dist/terminal-shells.js +1 -1
- package/dist/tool-handlers.js +1 -1
- package/dist/workspace-binding.js +2 -2
- package/docs/architecture.md +6 -4
- package/docs/architecture.zh.md +3 -1
- package/docs/configuration.md +28 -25
- package/docs/configuration.zh.md +15 -11
- package/docs/development-prompt.md +9 -7
- package/docs/development-prompt.zh.md +9 -7
- package/docs/development.md +25 -18
- package/docs/development.zh.md +22 -18
- package/docs/install-dsh-and-dsh-podman.md +15 -12
- package/docs/install-dsh-and-dsh-podman.zh.md +15 -9
- package/docs/uninstall.md +2 -0
- package/docs/uninstall.zh.md +2 -0
- package/docs/update.md +2 -0
- package/docs/update.zh.md +2 -0
- package/docs/usage.md +191 -39
- package/docs/usage.zh.md +150 -29
- package/package.json +8 -4
- package/dist/client/container-card-default-env.d.ts +0 -10
- package/dist/client/container-card-default-env.js +0 -69
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EnvEditor, MountsEditor } from "./container-card-editors.js";
|
|
3
|
+
import { PathsEditor } from "./container-card-paths.js";
|
|
4
|
+
import { PortsEditor } from "./container-card-ports.js";
|
|
5
|
+
import { SecretEnvEditor } from "./container-card-secrets.js";
|
|
6
|
+
import { DialogGroup, ImageRow, LockGlyph } from "./container-card-shared.js";
|
|
7
|
+
import { FIELD_CLASS } from "./container-card-field-styles.js";
|
|
8
|
+
import { hint } from "./container-card-styles.js";
|
|
9
|
+
import { Input } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
10
|
+
import { useCallback, useEffect, useId, useState } from "react";
|
|
11
|
+
// The body column: one DialogGroup per field group — and the image row, which
|
|
12
|
+
// is a field group of its own and labels itself — the same 20px apart in every
|
|
13
|
+
// dialog, so only the groups themselves decide how tall the body is.
|
|
14
|
+
const dialogBody = {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
gap: "20px",
|
|
18
|
+
};
|
|
19
|
+
export function ContainerForm(props) {
|
|
20
|
+
const { t, image, env, mounts, paths, secretEnv, ports, images, volumes, secrets, busy, enabled, canPublish, gatewayUnavailable, writable, projectsRoot, directoryPicker, mainProject, primaryProject, confirmRemoveMount, onCreateSecret, onChangeImage, onChangeEnv, onChangeMounts, onChangePaths, onChangeSecretEnv, onChangePorts, name, onBlockingError, } = props;
|
|
21
|
+
const nameId = useId();
|
|
22
|
+
// The two variable editors report their own appended row here; the form keeps
|
|
23
|
+
// both so the first one names the reason, and bubbles it to the dialog's
|
|
24
|
+
// footer action.
|
|
25
|
+
const [blocking, setBlocking] = useState({});
|
|
26
|
+
const reportEnv = useCallback((error) => {
|
|
27
|
+
setBlocking((current) => current.env === error ? current : { ...current, env: error });
|
|
28
|
+
}, []);
|
|
29
|
+
const reportSecretEnv = useCallback((error) => {
|
|
30
|
+
setBlocking((current) => current.secretEnv === error ? current : { ...current, secretEnv: error });
|
|
31
|
+
}, []);
|
|
32
|
+
const blockingKey = blocking.env ?? blocking.secretEnv;
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
onBlockingError?.(blockingKey);
|
|
35
|
+
return () => onBlockingError?.(undefined);
|
|
36
|
+
}, [blockingKey, onBlockingError]);
|
|
37
|
+
// The variable names each editor holds — every named row and the unnamed row
|
|
38
|
+
// it is still filling in. The form keeps both lists so each group sees the
|
|
39
|
+
// other's rows as they are typed: a name used in both groups is a duplicate
|
|
40
|
+
// before either row is applied.
|
|
41
|
+
const [rowNames, setRowNames] = useState(() => ({ env: Object.keys(env), secretEnv: Object.keys(secretEnv) }));
|
|
42
|
+
const reportEnvNames = useCallback((names) => {
|
|
43
|
+
setRowNames((current) => current.env === names ? current : { ...current, env: names });
|
|
44
|
+
}, []);
|
|
45
|
+
const reportSecretEnvNames = useCallback((names) => {
|
|
46
|
+
setRowNames((current) => current.secretEnv === names ? current : { ...current, secretEnv: names });
|
|
47
|
+
}, []);
|
|
48
|
+
// The candidate images in the order the Images tab lists them: base images
|
|
49
|
+
// first, custom ones after. An image the snapshot no longer lists stays
|
|
50
|
+
// selectable rather than silently replaced by the first candidate.
|
|
51
|
+
const candidates = [
|
|
52
|
+
...images.filter((candidate) => candidate.isBase),
|
|
53
|
+
...images.filter((candidate) => !candidate.isBase),
|
|
54
|
+
].map((candidate) => candidate.imageId);
|
|
55
|
+
return (_jsxs("div", { style: dialogBody, children: [_jsxs(DialogGroup, { title: t("containerName"), children: [_jsx(Input, { id: nameId,
|
|
56
|
+
// A container's fixed identity sits on the read-only field's own
|
|
57
|
+
// surface, so the dialog shows it is not a value being chosen.
|
|
58
|
+
className: name.readOnly ? FIELD_CLASS : undefined, icon: name.readOnly ? _jsx(LockGlyph, {}) : undefined, value: name.value, readOnly: name.readOnly, disabled: name.disabled, "aria-label": t("containerName"), onChange: (event) => name.onChange?.(event.target.value) }), name.error === ""
|
|
59
|
+
? null
|
|
60
|
+
: (_jsx("p", { style: { ...hint, margin: 0 }, role: "alert", children: name.error }))] }), _jsx(ImageRow, { t: t, mode: "edit", image: image, candidates: candidates, disabled: !enabled, onChange: onChangeImage }), _jsx(DialogGroup, { title: t("envTitle"), children: _jsx(EnvEditor, { t: t, env: env, busy: busy, onChange: onChangeEnv, onBlockingError: reportEnv, otherNames: rowNames.secretEnv, onNames: reportEnvNames }) }), _jsx(DialogGroup, { title: t("mountsTitle"), children: _jsx(MountsEditor, { t: t, mounts: mounts, volumes: volumes, secrets: secrets, busy: busy, enabled: enabled, projectsRoot: projectsRoot, directoryPicker: directoryPicker, confirmRemove: confirmRemoveMount, primaryProject: primaryProject, mainProject: mainProject, onAdd: (mount) => onChangeMounts([...mounts, mount]), onRemove: (mount) => onChangeMounts(mounts.filter((item) => item !== mount)), onUpdate: (mount, index) => onChangeMounts(mounts.map((item, at) => (at === index ? mount : item))) }) }), _jsx(DialogGroup, { title: t("pathsTitle"), children: _jsx(PathsEditor, { t: t, paths: paths, busy: busy, enabled: enabled, onApply: onChangePaths }) }), _jsx(DialogGroup, { title: t("containerSecretsTitle"), children: _jsx(SecretEnvEditor, { t: t, secretEnv: secretEnv, secrets: secrets, busy: busy, enabled: enabled, writable: writable, onCreateSecret: onCreateSecret, onChange: onChangeSecretEnv, onBlockingError: reportSecretEnv, otherNames: rowNames.env, onNames: reportSecretEnvNames }) }), _jsx(DialogGroup, { title: t("portsTitle"), children: _jsx(PortsEditor, { t: t, ports: ports, busy: busy, enabled: enabled, canPublish: canPublish, gatewayUnavailable: gatewayUnavailable, onChange: onChangePorts }) })] }));
|
|
61
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
3
|
+
//
|
|
4
|
+
// SPDX-License-Identifier: MIT
|
|
5
|
+
// One card of a tab: a filled surface with a real title, its count (or other
|
|
6
|
+
// one-line summary) and — when it owns one — its primary action on the heading
|
|
7
|
+
// row. A card with content rules off that row; hairlines otherwise live between
|
|
8
|
+
// the rows inside a card, so a card never carries a rule above its title.
|
|
9
|
+
import { actionRow, card, cardContent, cardTitle, headerCount, headerRule, rowActions, rowMain, } from "./container-card-styles.js";
|
|
10
|
+
import { TABLE_CARD_CLASS, TABLE_CARD_CONTENT_CLASS, } from "./container-card-table-styles.js";
|
|
11
|
+
import { useId } from "react";
|
|
12
|
+
export function CardGroup(props) {
|
|
13
|
+
const { title, summary, action, hasContent, className, children } = props;
|
|
14
|
+
const headingId = useId();
|
|
15
|
+
// A responsive card wraps its body so the containment applies to the content
|
|
16
|
+
// alone, never to the card's own box.
|
|
17
|
+
const isTableCard = className !== undefined &&
|
|
18
|
+
className.split(/\s+/).includes(TABLE_CARD_CLASS);
|
|
19
|
+
return (_jsxs("section", { style: card, className: className, "aria-labelledby": headingId, children: [_jsxs("div", { style: hasContent ? { ...actionRow, ...headerRule } : actionRow, children: [_jsxs("div", { style: rowMain, children: [_jsx("h3", { id: headingId, style: cardTitle, children: title }), summary === "" ? null : _jsx("span", { style: headerCount, children: summary })] }), action === undefined ? null : _jsx("div", { style: rowActions, children: action })] }), isTableCard
|
|
20
|
+
? (_jsx("div", { className: TABLE_CARD_CONTENT_CLASS, style: cardContent, children: children }))
|
|
21
|
+
: children] }));
|
|
22
|
+
}
|
|
@@ -4,8 +4,10 @@ import { type ReactNode } from "react";
|
|
|
4
4
|
export declare function ImageItem(props: {
|
|
5
5
|
t: Translate;
|
|
6
6
|
image: ImageView;
|
|
7
|
-
busy: boolean;
|
|
8
7
|
defaultImage: string;
|
|
8
|
+
locale: string;
|
|
9
|
+
last: boolean;
|
|
10
|
+
pendingActions: readonly string[];
|
|
9
11
|
onRemove: (imageId: string) => void;
|
|
10
12
|
onRebuild: (imageId: string) => void;
|
|
11
13
|
onSetDefault: (imageId: string) => void;
|
|
@@ -13,8 +15,10 @@ export declare function ImageItem(props: {
|
|
|
13
15
|
export declare function BaseImageRow(props: {
|
|
14
16
|
t: Translate;
|
|
15
17
|
image: ImageView;
|
|
16
|
-
busy: boolean;
|
|
17
18
|
defaultImage: string;
|
|
19
|
+
locale: string;
|
|
20
|
+
last: boolean;
|
|
21
|
+
pendingActions: readonly string[];
|
|
18
22
|
onRebuild: (name: string) => void;
|
|
19
23
|
onPull: (name: string) => void;
|
|
20
24
|
onSetDefault: (imageId: string) => void;
|
|
@@ -2,33 +2,73 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
3
3
|
//
|
|
4
4
|
// SPDX-License-Identifier: MIT
|
|
5
|
-
import { Chip, ConfirmButton, Field, imageIdPattern,
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { Chip, ConfirmButton, Field, imageIdPattern, imageStatusLabel, imageStatusTone, StatusChip, TagInput, } from "./container-card-shared.js";
|
|
6
|
+
import { scopedActionKey } from "./card-protocol.js";
|
|
7
|
+
import { FIELD_ROW_CLASS } from "./container-card-table-styles.js";
|
|
8
|
+
import { actionRow, cardBlockRow, containerNameHeading, hint, imageFieldLabel, imageFieldOwnLine, imageFields, imageFieldValue, imageSelect, rowActions, rowDivider, rowMain, } from "./container-card-styles.js";
|
|
9
|
+
import { relativeTimeLabel } from "./relative-time.js";
|
|
10
|
+
import { Button, Input, Modal, Pill, } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
11
|
+
import { useId } from "react";
|
|
12
|
+
// The packages an image was built with, or the fact that none were recorded:
|
|
13
|
+
// chips on their own line under the Packages label.
|
|
14
|
+
function Packages(props) {
|
|
15
|
+
const { t, image } = props;
|
|
16
|
+
if (image.packages.length === 0)
|
|
17
|
+
return t("noPackages");
|
|
18
|
+
return (_jsx(_Fragment, { children: image.packages.map((pkg) => _jsx(Chip, { t: t, label: pkg }, pkg)) }));
|
|
19
|
+
}
|
|
20
|
+
// One labelled line of an image's block: the field's label, then its value. The
|
|
21
|
+
// class keeps the label beside the value while the card has room and stacks it
|
|
22
|
+
// above once the card is narrow.
|
|
23
|
+
function ImageField(props) {
|
|
24
|
+
const { label, ownLine, children } = props;
|
|
25
|
+
return (_jsxs("div", { className: FIELD_ROW_CLASS, children: [_jsx("span", { style: imageFieldLabel, children: label }), ownLine === true
|
|
26
|
+
? _jsx("div", { style: imageFieldOwnLine, children: children })
|
|
27
|
+
: _jsx("span", { style: imageFieldValue, children: children })] }));
|
|
28
|
+
}
|
|
29
|
+
// The image's own block: line one is the name (14/600) with its status chip and
|
|
30
|
+
// the image's own actions at the line's right end, then one labelled line per
|
|
31
|
+
// field. The block's action group drops below the name when it no longer fits
|
|
32
|
+
// beside it; the destructive Remove is part of that same group, so a custom
|
|
33
|
+
// image's three actions read together.
|
|
34
|
+
function ImageBlock(props) {
|
|
35
|
+
const { t, image, defaultImage, locale, actions } = props;
|
|
36
|
+
// The upstream image a base image is built from lives in `primitive`, while a
|
|
37
|
+
// custom image names its parent; both are the image this one descends from.
|
|
38
|
+
const source = image.parent !== "" ? image.parent : image.primitive;
|
|
39
|
+
return (_jsxs("div", { children: [_jsxs("div", { style: actionRow, children: [_jsxs("div", { style: rowMain, children: [_jsx("span", { style: containerNameHeading, children: image.imageId }), image.imageId === defaultImage
|
|
40
|
+
? _jsx(Pill, { children: t("defaultImage") })
|
|
41
|
+
: null, _jsx(StatusChip, { tone: imageStatusTone(image.status), label: imageStatusLabel(t, image.status) })] }), _jsx("div", { style: rowActions, children: actions })] }), _jsxs("div", { style: imageFields, children: [image.builtAt === "" ? null : (_jsx(ImageField, { label: t("built"), children: _jsx("span", { title: image.builtAt, children: relativeTimeLabel(image.builtAt, locale) }) })), source === ""
|
|
42
|
+
? null
|
|
43
|
+
: _jsx(ImageField, { label: t("parentImage"), children: source }), _jsx(ImageField, { label: t("packages"), ownLine: true, children: _jsx(Packages, { t: t, image: image }) })] })] }));
|
|
44
|
+
}
|
|
45
|
+
// One custom image row: the image block with its Rebuild, Set default and
|
|
46
|
+
// destructive Remove together on the name line. The card's rows are hairline
|
|
47
|
+
// separated; the last row carries no divider.
|
|
9
48
|
export function ImageItem(props) {
|
|
10
|
-
const { t, image,
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
: (_jsx("div", { style: { display: "flex", flexWrap: "wrap", gap: "6px" }, children: image.packages.map((pkg) => (_jsx(Chip, { t: t, label: pkg }, pkg))) })) })] })] }) }), _jsxs("div", { style: actions, children: [_jsx(ConfirmButton, { t: t, label: t("rebuildImage"), title: t("confirmTitle"), description: t("confirmRebuildImage", { image: image.imageId }), disabled: busy, onConfirm: () => onRebuild(image.imageId) }), _jsx(ConfirmButton, { t: t, label: t("removeImage"), title: t("confirmTitle"), description: t("confirmRemoveImage", { image: image.imageId }), disabled: busy, onConfirm: () => onRemove(image.imageId) }), _jsx(Button, { variant: "outline", size: "sm", disabled: busy || image.imageId === defaultImage, onClick: () => onSetDefault(image.imageId), children: t("setDefaultImage") })] })] }) }));
|
|
49
|
+
const { t, image, defaultImage, locale, last, pendingActions, onRemove, onRebuild, onSetDefault, } = props;
|
|
50
|
+
const rebuildPending = pendingActions.includes(scopedActionKey("image_rebuild", image.imageId));
|
|
51
|
+
const removePending = pendingActions.includes(scopedActionKey("image_remove", image.imageId));
|
|
52
|
+
return (_jsx("div", { style: last ? cardBlockRow : { ...cardBlockRow, ...rowDivider }, children: _jsx(ImageBlock, { t: t, image: image, defaultImage: defaultImage, locale: locale, actions: _jsxs(_Fragment, { children: [_jsx(ConfirmButton, { t: t, label: t("rebuildImage"), title: t("rebuildImageTitle"), description: t("confirmRebuildImage", { image: image.imageId }), confirmLabel: t("rebuildImageTitle"), pending: rebuildPending, onConfirm: () => onRebuild(image.imageId) }), _jsx(Button, { variant: "outline", size: "sm", disabled: image.imageId === defaultImage, onClick: () => onSetDefault(image.imageId), children: t("setDefaultImage") }), _jsx(ConfirmButton, { t: t, destructive: true, label: t("removeImage"), title: t("removeImageTitle"), description: t("confirmRemoveImage", { image: image.imageId }), confirmLabel: t("removeImageTitle"), pending: removePending, onConfirm: () => onRemove(image.imageId) })] }) }) }));
|
|
15
53
|
}
|
|
54
|
+
// One base image row: the same block and name-line actions, with the base
|
|
55
|
+
// image's own control (Pull, Build or Rebuild, depending on what the snapshot
|
|
56
|
+
// reports) beside Set default.
|
|
16
57
|
export function BaseImageRow(props) {
|
|
17
|
-
const { t, image,
|
|
18
|
-
const
|
|
58
|
+
const { t, image, defaultImage, locale, last, pendingActions, onRebuild, onPull, onSetDefault, } = props;
|
|
59
|
+
const pullPending = pendingActions.includes(scopedActionKey("image_base_pull", image.imageId));
|
|
60
|
+
const rebuildPending = pendingActions.includes(scopedActionKey("image_base_rebuild", image.imageId));
|
|
19
61
|
const pull = image.basePublic &&
|
|
20
62
|
(image.status === "missing" || image.status === "pulled");
|
|
21
63
|
const build = !image.basePublic && image.status === "missing";
|
|
22
64
|
const rebuild = !image.basePublic && image.status === "built";
|
|
23
|
-
return (_jsx(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
? (_jsx(Button, { variant: "outline", size: "sm", disabled: busy, onClick: () => onRebuild(image.imageId), children: t("rebuildImage") }))
|
|
31
|
-
: null, _jsx(Button, { variant: "outline", size: "sm", disabled: busy || image.imageId === defaultImage, onClick: () => onSetDefault(image.imageId), children: t("setDefaultImage") })] })] }) }));
|
|
65
|
+
return (_jsx("div", { style: last ? cardBlockRow : { ...cardBlockRow, ...rowDivider }, children: _jsx(ImageBlock, { t: t, image: image, defaultImage: defaultImage, locale: locale, actions: _jsxs(_Fragment, { children: [pull
|
|
66
|
+
? (_jsx(Button, { variant: "outline", size: "sm", disabled: pullPending, onClick: () => onPull(image.imageId), children: pullPending ? t("busy") : t("pullImage") }))
|
|
67
|
+
: null, build
|
|
68
|
+
? (_jsx(Button, { variant: "outline", size: "sm", disabled: rebuildPending, onClick: () => onRebuild(image.imageId), children: rebuildPending ? t("busy") : t("build") }))
|
|
69
|
+
: null, rebuild
|
|
70
|
+
? (_jsx(Button, { variant: "outline", size: "sm", disabled: rebuildPending, onClick: () => onRebuild(image.imageId), children: rebuildPending ? t("busy") : t("rebuildImage") }))
|
|
71
|
+
: null, _jsx(Button, { variant: "outline", size: "sm", disabled: image.imageId === defaultImage, onClick: () => onSetDefault(image.imageId), children: t("setDefaultImage") })] }) }) }));
|
|
32
72
|
}
|
|
33
73
|
export function ImageBuildModal(props) {
|
|
34
74
|
const { t, images, open, imageId, parent, packages, onImageId, onParent, onPackages, onClose, onBuild, } = props;
|
|
@@ -42,7 +82,7 @@ export function ImageBuildModal(props) {
|
|
|
42
82
|
display: "flex",
|
|
43
83
|
flexDirection: "column",
|
|
44
84
|
gap: "12px",
|
|
45
|
-
}, children: [_jsxs(Field, { label: t("
|
|
46
|
-
? _jsx("p", { style: { ...hint, margin: 0 }, children: t("invalidImageId") })
|
|
47
|
-
: null] }), _jsx(Field, { label: t("
|
|
85
|
+
}, children: [_jsxs(Field, { label: t("imageName"), htmlFor: imageIdLabel, children: [_jsx(Input, { id: imageIdLabel, value: imageId, onChange: (event) => onImageId(event.target.value) }), imageId !== "" && !imageIdPattern.test(imageId)
|
|
86
|
+
? (_jsx("p", { style: { ...hint, margin: 0 }, role: "alert", children: t("invalidImageId") }))
|
|
87
|
+
: null] }), _jsx(Field, { label: t("parentImage"), htmlFor: parentLabel, children: _jsxs("select", { id: parentLabel, style: imageSelect, value: parent, onChange: (event) => onParent(event.target.value), children: [baseImages.map((image) => (_jsx("option", { value: image.imageId, children: image.imageId }, image.imageId))), customImages.map((image) => (_jsx("option", { value: image.imageId, children: image.imageId }, image.imageId)))] }) }), _jsx(Field, { label: t("packages"), htmlFor: packagesLabel, children: _jsx(TagInput, { id: packagesLabel, t: t, value: packages, onChange: onPackages, chipsBelow: true }) })] }) }));
|
|
48
88
|
}
|
|
@@ -2,46 +2,26 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// SPDX-FileCopyrightText: 2026 Elouan Martinet <exa@elou.world>
|
|
3
3
|
//
|
|
4
4
|
// SPDX-License-Identifier: MIT
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { DiscardChangesModal, PathRow } from "./container-card-shared.js";
|
|
6
|
+
import { pathsEqual } from "./container-card-config.js";
|
|
7
|
+
import { hint } from "./container-card-styles.js";
|
|
8
|
+
import { ROW_LIST_CLASS } from "./container-card-table-styles.js";
|
|
9
|
+
import { Button, Modal } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
10
|
+
import { useMemo, useState } from "react";
|
|
9
11
|
let nextPathId = 0;
|
|
10
12
|
// pathEntries wraps a stored PATH list for editing.
|
|
11
13
|
export function pathEntries(paths) {
|
|
12
14
|
return paths.map((path) => ({ id: nextPathId++, path }));
|
|
13
15
|
}
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
gap: "6px",
|
|
21
|
-
};
|
|
22
|
-
const pathInput = {
|
|
23
|
-
flex: 1,
|
|
24
|
-
minWidth: "120px",
|
|
25
|
-
};
|
|
26
|
-
const rowButton = {
|
|
27
|
-
padding: 0,
|
|
28
|
-
minWidth: "28px",
|
|
29
|
-
};
|
|
30
|
-
const dragHandle = {
|
|
31
|
-
cursor: "grab",
|
|
32
|
-
background: "none",
|
|
33
|
-
border: "none",
|
|
34
|
-
padding: 0,
|
|
35
|
-
color: "var(--dsw-alias-label-tertiary)",
|
|
36
|
-
};
|
|
37
|
-
// PathsList edits one ordered PATH-addition list: add (prepends), reorder by
|
|
38
|
-
// dragging the handle or with the move buttons, edit in place, and remove. It
|
|
39
|
-
// is controlled: every change reports the whole list through onChange.
|
|
16
|
+
// PathsList edits one ordered PATH-addition list: add, reorder by dragging the
|
|
17
|
+
// handle or with the move buttons, edit in place, and remove. It is controlled:
|
|
18
|
+
// every change reports the whole list through onChange. Every entry renders as
|
|
19
|
+
// the shared PATH row — the same label above the same value slot as a container
|
|
20
|
+
// block's read-only PATH field, with an editable input in the value position —
|
|
21
|
+
// so the dialog and the block read alike.
|
|
40
22
|
export function PathsList(props) {
|
|
41
23
|
const { t, entries, busy, onChange } = props;
|
|
42
|
-
const [draft, setDraft] = useState("");
|
|
43
24
|
const [dragIndex, setDragIndex] = useState(null);
|
|
44
|
-
const addId = useId();
|
|
45
25
|
const move = (from, to) => {
|
|
46
26
|
if (from === to || to < 0 || to >= entries.length)
|
|
47
27
|
return;
|
|
@@ -50,46 +30,57 @@ export function PathsList(props) {
|
|
|
50
30
|
next.splice(to, 0, item);
|
|
51
31
|
onChange(next);
|
|
52
32
|
};
|
|
33
|
+
// A new entry is prepended: the first entry has the highest priority.
|
|
53
34
|
const add = () => {
|
|
54
|
-
|
|
55
|
-
if (path === "")
|
|
56
|
-
return;
|
|
57
|
-
onChange([{ id: nextPathId++, path }, ...entries]);
|
|
58
|
-
setDraft("");
|
|
35
|
+
onChange([{ id: nextPathId++, path: "" }, ...entries]);
|
|
59
36
|
};
|
|
60
37
|
const update = (index, path) => {
|
|
61
38
|
onChange(entries.map((entry, at) => (at === index ? { ...entry, path } : entry)));
|
|
62
39
|
};
|
|
63
|
-
return (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
40
|
+
return (_jsxs("div", { className: ROW_LIST_CLASS, style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [entries.length === 0
|
|
64
41
|
? _jsx("p", { style: { ...hint, margin: 0 }, children: t("noPaths") })
|
|
65
|
-
: (entries.map((entry, index) => (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
42
|
+
: (entries.map((entry, index) => (_jsx(PathRow, { t: t, mode: "edit", path: entry.path, disabled: busy, autoFocus: entry.path === "" && index === 0, first: index === 0, last: index === entries.length - 1, onChange: (path) => update(index, path), onMove: (delta) => move(index, index + delta), onRemove: () => onChange(entries.filter((_, at) => at !== index)), onDragStart: () => setDragIndex(index), onDrop: () => {
|
|
43
|
+
if (dragIndex !== null)
|
|
44
|
+
move(dragIndex, index);
|
|
45
|
+
setDragIndex(null);
|
|
46
|
+
} }, entry.id)))), _jsx("div", { children: _jsx(Button, { variant: "outline", size: "sm", disabled: busy, onClick: add, children: t("addPathEntry") }) })] }));
|
|
70
47
|
}
|
|
71
|
-
// PathsEditor shows the container's ordered PATH additions
|
|
72
|
-
//
|
|
48
|
+
// PathsEditor shows the container's ordered PATH variable additions as the
|
|
49
|
+
// shared field rows the container block shows, and edits them in a modal around
|
|
50
|
+
// PathsList. Apply sends the whole list at once.
|
|
73
51
|
export function PathsEditor(props) {
|
|
74
52
|
const { t, paths, busy, enabled, onApply } = props;
|
|
75
53
|
const [open, setOpen] = useState(false);
|
|
54
|
+
const [confirmClose, setConfirmClose] = useState(false);
|
|
76
55
|
const [draft, setDraft] = useState([]);
|
|
77
56
|
// The read-only rows reuse the same ids as the editor, so two identical PATH
|
|
78
57
|
// entries never collide on a React key.
|
|
79
58
|
const shown = useMemo(() => pathEntries(paths), [paths]);
|
|
59
|
+
// The list is unordered only by identity; a reorder or an edited path is an
|
|
60
|
+
// edit that closing the dialog would lose.
|
|
61
|
+
const dirty = !pathsEqual(draft.map((entry) => entry.path), paths);
|
|
62
|
+
const requestClose = () => {
|
|
63
|
+
if (dirty)
|
|
64
|
+
setConfirmClose(true);
|
|
65
|
+
else
|
|
66
|
+
setOpen(false);
|
|
67
|
+
};
|
|
68
|
+
const discardAndClose = () => {
|
|
69
|
+
setConfirmClose(false);
|
|
70
|
+
setOpen(false);
|
|
71
|
+
};
|
|
80
72
|
const openEditor = () => {
|
|
81
73
|
setDraft(pathEntries(paths));
|
|
74
|
+
setConfirmClose(false);
|
|
82
75
|
setOpen(true);
|
|
83
76
|
};
|
|
84
77
|
const apply = () => {
|
|
85
|
-
|
|
78
|
+
// An entry left blank is not a PATH addition: it is dropped rather than
|
|
79
|
+
// sent as an empty path.
|
|
80
|
+
onApply(draft.map((entry) => entry.path.trim()).filter((path) => path !== ""));
|
|
86
81
|
setOpen(false);
|
|
87
82
|
};
|
|
88
|
-
return (_jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [paths.length === 0
|
|
83
|
+
return (_jsxs("div", { className: ROW_LIST_CLASS, style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [paths.length === 0
|
|
89
84
|
? _jsx("p", { style: { ...hint, margin: 0 }, children: t("noPaths") })
|
|
90
|
-
: (shown.map((entry) => (_jsx("
|
|
91
|
-
...greyId,
|
|
92
|
-
fontSize: "13px",
|
|
93
|
-
color: "var(--dsw-alias-label-primary)",
|
|
94
|
-
}, children: entry.path }, entry.id)))), _jsx("div", { children: _jsx(Button, { variant: "outline", size: "sm", disabled: !enabled, onClick: openEditor, children: t("editPaths") }) }), _jsx(Modal, { open: open, onClose: () => setOpen(false), title: t("pathsTitle"), closeLabel: t("cancel"), footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setOpen(false), children: t("cancel") }), _jsx(Button, { variant: "primary", size: "sm", disabled: busy, onClick: apply, children: t("apply") })] }), children: _jsx(PathsList, { t: t, entries: draft, busy: busy, onChange: setDraft }) })] }));
|
|
85
|
+
: (shown.map((entry) => (_jsx(PathRow, { t: t, mode: "view", path: entry.path }, entry.id)))), _jsx("div", { children: _jsx(Button, { variant: "outline", size: "sm", disabled: !enabled, onClick: openEditor, children: t("editPaths") }) }), _jsx(Modal, { open: open, onClose: requestClose, title: t("pathsTitle"), closeLabel: t("cancel"), footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", size: "sm", onClick: requestClose, children: t("cancel") }), _jsx(Button, { variant: "primary", size: "sm", disabled: busy, onClick: apply, children: t("apply") })] }), children: _jsx(PathsList, { t: t, entries: draft, busy: busy, onChange: setDraft }) }), _jsx(DiscardChangesModal, { t: t, open: confirmClose, onCancel: () => setConfirmClose(false), onDiscard: discardAndClose })] }));
|
|
95
86
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PortConfig } from "./container-card-config.js";
|
|
2
2
|
import type { Translate } from "./locales.js";
|
|
3
3
|
import { type ReactNode } from "react";
|
|
4
4
|
export declare function PortsEditor(props: {
|
|
5
5
|
t: Translate;
|
|
6
|
-
ports: readonly
|
|
6
|
+
ports: readonly PortConfig[];
|
|
7
7
|
busy: boolean;
|
|
8
8
|
enabled: boolean;
|
|
9
9
|
canPublish: boolean;
|
|
10
10
|
gatewayUnavailable: boolean;
|
|
11
|
-
|
|
12
|
-
onUnpublish: (port: number, protocol: string) => void;
|
|
11
|
+
onChange: (ports: PortConfig[]) => void;
|
|
13
12
|
}): ReactNode;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { COMPACT_DIALOG_CLASS } from "./container-card-dialog-styles.js";
|
|
3
|
+
import { Field, PortRow } from "./container-card-shared.js";
|
|
4
|
+
import { hint, imageSelect } from "./container-card-styles.js";
|
|
5
|
+
import { ROW_LIST_CLASS } from "./container-card-table-styles.js";
|
|
6
|
+
import { Button, Input, Modal } from "@deepseek-ai/dsh-client-ui-primitives";
|
|
7
|
+
import { useId, useState } from "react";
|
|
8
|
+
// The container-port range a published port may name, and the host-port range
|
|
9
|
+
// the gateway binds from (it never binds a privileged port).
|
|
8
10
|
const MIN_PORT = 1;
|
|
9
11
|
const MAX_PORT = 65535;
|
|
10
12
|
const MIN_HOST_PORT = 1024;
|
|
11
13
|
const MAX_HOST_PORT = 65535;
|
|
14
|
+
// The one transport the gateway implements today; the wire carries a protocol,
|
|
15
|
+
// so the dialog names the field even while tcp is the only choice.
|
|
16
|
+
const PROTOCOLS = ["tcp"];
|
|
12
17
|
function parsePort(value) {
|
|
13
18
|
if (!/^[0-9]+$/.test(value))
|
|
14
19
|
return undefined;
|
|
@@ -21,26 +26,57 @@ function parseHostPort(value) {
|
|
|
21
26
|
const port = Number(value);
|
|
22
27
|
return port >= MIN_HOST_PORT && port <= MAX_HOST_PORT ? port : undefined;
|
|
23
28
|
}
|
|
24
|
-
// PortsEditor
|
|
25
|
-
//
|
|
26
|
-
// the
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
+
// PortsEditor edits the draft list of ports a container should publish. Each
|
|
30
|
+
// listed port renders as the shared port row — Container port, Host port,
|
|
31
|
+
// Protocol, the same labels and slots as the container block — and the one
|
|
32
|
+
// Publish port button opens a small dialog for the port and its protocol: a
|
|
33
|
+
// staged addition only reaches the gateway when the footer action applies the
|
|
34
|
+
// draft, so the editor never dials the host itself. The orchestrator stays
|
|
35
|
+
// the only boundary: an out-of-range value is refused here so the common mistake
|
|
36
|
+
// never leaves the browser, and everything else (a taken host port, a stopped
|
|
37
|
+
// container, a missing gateway) comes back as the card's notice.
|
|
29
38
|
export function PortsEditor(props) {
|
|
30
|
-
const { t, ports, enabled, canPublish, gatewayUnavailable,
|
|
39
|
+
const { t, ports, busy, enabled, canPublish, gatewayUnavailable, onChange, } = props;
|
|
40
|
+
const [open, setOpen] = useState(false);
|
|
31
41
|
const [port, setPort] = useState("");
|
|
32
42
|
const [hostPort, setHostPort] = useState("");
|
|
33
|
-
const
|
|
43
|
+
const [protocol, setProtocol] = useState(PROTOCOLS[0]);
|
|
44
|
+
const portId = useId();
|
|
45
|
+
const hostPortId = useId();
|
|
46
|
+
const protocolId = useId();
|
|
47
|
+
const containerPort = parsePort(port);
|
|
34
48
|
// An empty suggestion asks the gateway for a free host port; a filled one must
|
|
35
|
-
// be in range before the
|
|
49
|
+
// be in range before the addition is staged.
|
|
36
50
|
const suggested = hostPort === "" ? undefined : parseHostPort(hostPort);
|
|
37
51
|
const hostPortInvalid = hostPort !== "" && suggested === undefined;
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
const duplicate = containerPort !== undefined &&
|
|
53
|
+
ports.some((published) => published.port === containerPort && published.protocol === protocol);
|
|
54
|
+
const canAdd = canPublish && !busy && containerPort !== undefined &&
|
|
55
|
+
!hostPortInvalid && !duplicate;
|
|
56
|
+
const openDialog = () => {
|
|
42
57
|
setPort("");
|
|
43
58
|
setHostPort("");
|
|
59
|
+
setProtocol(PROTOCOLS[0]);
|
|
60
|
+
setOpen(true);
|
|
61
|
+
};
|
|
62
|
+
const add = () => {
|
|
63
|
+
if (!canAdd || containerPort === undefined)
|
|
64
|
+
return;
|
|
65
|
+
onChange([
|
|
66
|
+
...ports,
|
|
67
|
+
{
|
|
68
|
+
port: containerPort,
|
|
69
|
+
protocol,
|
|
70
|
+
endpoint: "",
|
|
71
|
+
suggestedHostPort: suggested ?? 0,
|
|
72
|
+
hostPort: 0,
|
|
73
|
+
},
|
|
74
|
+
]);
|
|
75
|
+
setOpen(false);
|
|
76
|
+
};
|
|
77
|
+
const remove = (target) => {
|
|
78
|
+
onChange(ports.filter((published) => published.port !== target.port ||
|
|
79
|
+
published.protocol !== target.protocol));
|
|
44
80
|
};
|
|
45
81
|
const rowStyle = {
|
|
46
82
|
display: "flex",
|
|
@@ -48,27 +84,27 @@ export function PortsEditor(props) {
|
|
|
48
84
|
alignItems: "center",
|
|
49
85
|
gap: "8px",
|
|
50
86
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
protocol: published.protocol,
|
|
59
|
-
}), disabled: !enabled, onConfirm: () => onUnpublish(published.port, published.protocol) })] }, `${published.protocol}/${published.port}`)))), canPublish || !enabled
|
|
87
|
+
// The editor's own column carries the shared list marker, so its rows are
|
|
88
|
+
// separated once they stack exactly like the block's; the wrapper holds the
|
|
89
|
+
// whole editor, so the group's own gap between the rows and the controls
|
|
90
|
+
// below them stays unchanged.
|
|
91
|
+
return (_jsxs("div", { className: ROW_LIST_CLASS, style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [ports.map((published) => (_jsx(PortRow, { t: t, mode: "edit", port: published.port, protocol: published.protocol, hostPort: published.hostPort, suggestedHostPort: published.suggestedHostPort, pending: published.endpoint === "", disabled: busy, onRemove: () => remove(published), removeLabel: published.endpoint === ""
|
|
92
|
+
? t("remove")
|
|
93
|
+
: t("unpublishPort") }, `${published.protocol}/${published.port}`))), canPublish || !enabled
|
|
60
94
|
? null
|
|
61
95
|
: (_jsx("p", { style: { ...hint, paddingTop: "8px" }, children: gatewayUnavailable
|
|
62
96
|
? t("publishNeedsGateway")
|
|
63
|
-
: t("containerNotRunning") })), _jsxs("div", { style: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
: t("containerNotRunning") })), _jsx("div", { style: rowStyle, children: _jsx(Button, { variant: "outline", size: "sm", disabled: !canPublish || busy, onClick: openDialog, children: t("publishPort") }) }), _jsx(Modal, { open: open, onClose: () => setOpen(false), title: t("publishPort"), closeLabel: t("cancel"), className: COMPACT_DIALOG_CLASS, footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setOpen(false), children: t("cancel") }), _jsx(Button, { variant: "primary", size: "sm", disabled: !canAdd, onClick: add, children: t("publishPort") })] }), children: _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "12px" }, children: [_jsxs(Field, { label: t("containerPort"), htmlFor: portId, children: [_jsx(Input, { id: portId, type: "number", min: MIN_PORT, max: MAX_PORT, value: port, disabled: !canPublish || busy, autoFocus: true, onChange: (event) => setPort(event.target.value), onKeyDown: (event) => {
|
|
98
|
+
if (event.key === "Enter")
|
|
99
|
+
add();
|
|
100
|
+
} }), port !== "" && containerPort === undefined
|
|
101
|
+
? (_jsx("p", { style: { ...hint, margin: 0 }, role: "alert", children: t("invalidPort") }))
|
|
102
|
+
: null, duplicate
|
|
103
|
+
? (_jsx("p", { style: { ...hint, margin: 0 }, role: "alert", children: t("portDuplicate") }))
|
|
104
|
+
: null] }), _jsxs(Field, { label: t("hostPortOptional"), htmlFor: hostPortId, children: [_jsx(Input, { id: hostPortId, type: "number", min: MIN_HOST_PORT, max: MAX_HOST_PORT, value: hostPort, disabled: !canPublish || busy, onChange: (event) => setHostPort(event.target.value), onKeyDown: (event) => {
|
|
105
|
+
if (event.key === "Enter")
|
|
106
|
+
add();
|
|
107
|
+
} }), hostPortInvalid
|
|
108
|
+
? (_jsx("p", { style: { ...hint, margin: 0 }, role: "alert", children: t("invalidHostPort") }))
|
|
109
|
+
: null] }), _jsx(Field, { label: t("protocol"), htmlFor: protocolId, children: _jsx("select", { id: protocolId, style: imageSelect, value: protocol, disabled: !canPublish || busy, onChange: (event) => setProtocol(event.target.value), children: PROTOCOLS.map((candidate) => (_jsx("option", { value: candidate, children: candidate }, candidate))) }) })] }) })] }));
|
|
74
110
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type CacheView, type ImageView } from "./container-card-controller.js";
|
|
2
|
+
import { NS } from "./locales.js";
|
|
3
|
+
import { type TranslateNS } from "@deepseek-ai/dsh-client-ui-slots";
|
|
4
|
+
import { type ReactNode } from "react";
|
|
5
|
+
export declare function ImagesSection(props: {
|
|
6
|
+
t: TranslateNS<typeof NS>;
|
|
7
|
+
images: readonly ImageView[];
|
|
8
|
+
busy: boolean;
|
|
9
|
+
pendingActions: readonly string[];
|
|
10
|
+
defaultImage: string;
|
|
11
|
+
locale: string;
|
|
12
|
+
onBuildImage: (imageId: string, parent: string, packages: string[]) => void;
|
|
13
|
+
onRebuildAllImages: () => void;
|
|
14
|
+
onRebuildBaseImage: (name: string) => void;
|
|
15
|
+
onPullBaseImage: (name: string) => void;
|
|
16
|
+
onRemoveImage: (imageId: string) => void;
|
|
17
|
+
onRebuildImage: (imageId: string) => void;
|
|
18
|
+
onSetDefaultImage: (name: string) => void;
|
|
19
|
+
}): ReactNode;
|
|
20
|
+
export declare function StorageSection(props: {
|
|
21
|
+
t: TranslateNS<typeof NS>;
|
|
22
|
+
volumes: readonly {
|
|
23
|
+
name: string;
|
|
24
|
+
}[];
|
|
25
|
+
secrets: readonly {
|
|
26
|
+
name: string;
|
|
27
|
+
}[];
|
|
28
|
+
caches: readonly CacheView[];
|
|
29
|
+
busy: boolean;
|
|
30
|
+
writable: boolean;
|
|
31
|
+
pendingActions: readonly string[];
|
|
32
|
+
onCleanCaches: (mode: string) => void;
|
|
33
|
+
onCreateVolume: (name: string) => void;
|
|
34
|
+
onRemoveVolume: (name: string) => void;
|
|
35
|
+
onCreateSecret: (name: string, length?: number, charset?: string) => void;
|
|
36
|
+
onRemoveSecret: (name: string) => void;
|
|
37
|
+
onSetSecret: (name: string, value: string) => void;
|
|
38
|
+
}): ReactNode;
|