From c852ef14ddb15472f1e30d5b7ea2893445d721e0 Mon Sep 17 00:00:00 2001 From: Rinsvent Date: Fri, 14 Apr 2023 23:31:13 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=87=D0=B8=D0=BD=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=B2=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=81=D0=BE=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/elements/commands/index.tsx | 1 + components/elements/processes/index.tsx | 10 ++++++---- components/elements/tokens/index.tsx | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/components/elements/commands/index.tsx b/components/elements/commands/index.tsx index b3fa494..668f922 100644 --- a/components/elements/commands/index.tsx +++ b/components/elements/commands/index.tsx @@ -34,6 +34,7 @@ export default function Commands() { }, [value]) let variants = commands.map((command: CommandInterface, index: number) => command.name); + variants.push('') let callback = (name: string, optionList: Record, argumentList: Record) => { setOptionList(optionList) diff --git a/components/elements/processes/index.tsx b/components/elements/processes/index.tsx index 45ff3d8..83be1b8 100644 --- a/components/elements/processes/index.tsx +++ b/components/elements/processes/index.tsx @@ -53,8 +53,8 @@ export default function Processes() { const [commands, setCommands] = useState([]); const [page, setPage] = useState(0); const [count, setCount] = useState(0); - const [type, setType] = useState(''); - const [name, setName] = useState(''); + const [type, setType] = useState(''); + const [name, setName] = useState(''); const [loading, setLoading] = useState(true); const [modalLoading, setModalLoading] = useState(true); const [action, setAction] = useState(null); @@ -65,6 +65,7 @@ export default function Processes() { const api = useApi() let variants = commands.map((command: CommandInterface, index: number) => command.name); + variants.push('') let refreshCommands = async () => { const { data: commands } = await api.useMemory().getCommands() @@ -199,10 +200,10 @@ export default function Processes() { { - setType(newValue); + setType(newValue || ''); }} disablePortal - options={['None', "Running", "History"]} + options={['None', "Running", "History", '']} renderInput={(params) => } /> @@ -302,6 +303,7 @@ export default function Processes() { component="div" count={count} rowsPerPage={20} + rowsPerPageOptions={[10, 20, 50, 100]} page={page} onPageChange={handleChangePage} /> diff --git a/components/elements/tokens/index.tsx b/components/elements/tokens/index.tsx index 124ae30..b6d9d04 100644 --- a/components/elements/tokens/index.tsx +++ b/components/elements/tokens/index.tsx @@ -30,7 +30,7 @@ export default function Tokens() { let variants = tokens.map((token, index) => ({ ...token, - label: token.host + label: `${token.host} [${token.id}]` })); useEffect(() => { @@ -42,9 +42,10 @@ export default function Tokens() { { console.log('newValue', newValue);