Updates
This commit is contained in:
parent
f3b42bc206
commit
29a8b17c61
@ -13,6 +13,8 @@ import {
|
|||||||
ParsedDeploymentServiceConfig,
|
ParsedDeploymentServiceConfig,
|
||||||
} from "@/src/types";
|
} from "@/src/types";
|
||||||
import Select, { TWUISelectOptionObject } from "@/twui/components/form/Select";
|
import Select, { TWUISelectOptionObject } from "@/twui/components/form/Select";
|
||||||
|
import Input from "@/twui/components/form/Input";
|
||||||
|
import AceEditor from "@/twui/components/editors/AceEditor";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
service: ParsedDeploymentServiceConfig;
|
service: ParsedDeploymentServiceConfig;
|
||||||
@ -34,12 +36,14 @@ export default function ServiceClusterServerLogSelector({
|
|||||||
const [log, setLog] = useState(log_strings?.[0]);
|
const [log, setLog] = useState(log_strings?.[0]);
|
||||||
const [isCustomLog, setIsCustomLog] = useState(false);
|
const [isCustomLog, setIsCustomLog] = useState(false);
|
||||||
|
|
||||||
|
const customLogRef = useRef("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
externalSetLog(log);
|
externalSetLog(log);
|
||||||
}, [log]);
|
}, [log]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack className="w-full gap-0">
|
<Stack className="w-full gap-2">
|
||||||
<Select
|
<Select
|
||||||
options={[
|
options={[
|
||||||
...(log_strings?.map(
|
...(log_strings?.map(
|
||||||
@ -60,7 +64,14 @@ export default function ServiceClusterServerLogSelector({
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{isCustomLog}
|
{isCustomLog ? (
|
||||||
|
<AceEditor
|
||||||
|
placeholder="Enter custom command"
|
||||||
|
onChange={(v) => {
|
||||||
|
customLogRef.current = v;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
</Stack>
|
</Stack>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,16 +2,22 @@ import LinkList from "@/twui/components/elements/LinkList";
|
|||||||
import Main from "@/twui/components/layout/Main";
|
import Main from "@/twui/components/layout/Main";
|
||||||
import Row from "@/twui/components/layout/Row";
|
import Row from "@/twui/components/layout/Row";
|
||||||
import Stack from "@/twui/components/layout/Stack";
|
import Stack from "@/twui/components/layout/Stack";
|
||||||
import { PropsWithChildren } from "react";
|
import { Fragment, PropsWithChildren } from "react";
|
||||||
import { AdminAsideLinks } from "./(data)/links";
|
import { AdminAsideLinks } from "./(data)/links";
|
||||||
import Header from "./header";
|
import Header from "./header";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
import Spacer from "@/twui/components/layout/Spacer";
|
import Spacer from "@/twui/components/layout/Spacer";
|
||||||
|
import Head from "next/head";
|
||||||
|
|
||||||
type Props = PropsWithChildren & {};
|
type Props = PropsWithChildren & {};
|
||||||
|
|
||||||
export default function Layout({ children }: Props) {
|
export default function Layout({ children }: Props) {
|
||||||
return (
|
return (
|
||||||
|
<Fragment>
|
||||||
|
<Head>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ace.min.js" />
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0/ext-language_tools.min.js" />
|
||||||
|
</Head>
|
||||||
<Main
|
<Main
|
||||||
className="w-screen h-screen overflow-hidden p-4 lg:p-10"
|
className="w-screen h-screen overflow-hidden p-4 lg:p-10"
|
||||||
id="admin-main"
|
id="admin-main"
|
||||||
@ -41,5 +47,6 @@ export default function Layout({ children }: Props) {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
</Main>
|
</Main>
|
||||||
|
</Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user