|
|
@ -53,8 +53,8 @@ export default function Processes() { |
|
|
|
const [commands, setCommands] = useState<CommandInterface[]>([]); |
|
|
|
const [commands, setCommands] = useState<CommandInterface[]>([]); |
|
|
|
const [page, setPage] = useState<number>(0); |
|
|
|
const [page, setPage] = useState<number>(0); |
|
|
|
const [count, setCount] = useState<number>(0); |
|
|
|
const [count, setCount] = useState<number>(0); |
|
|
|
const [type, setType] = useState<string | null>(''); |
|
|
|
const [type, setType] = useState<string>(''); |
|
|
|
const [name, setName] = useState<string | null>(''); |
|
|
|
const [name, setName] = useState<string>(''); |
|
|
|
const [loading, setLoading] = useState<boolean>(true); |
|
|
|
const [loading, setLoading] = useState<boolean>(true); |
|
|
|
const [modalLoading, setModalLoading] = useState<boolean>(true); |
|
|
|
const [modalLoading, setModalLoading] = useState<boolean>(true); |
|
|
|
const [action, setAction] = useState<Action | null>(null); |
|
|
|
const [action, setAction] = useState<Action | null>(null); |
|
|
@ -65,6 +65,7 @@ export default function Processes() { |
|
|
|
const api = useApi() |
|
|
|
const api = useApi() |
|
|
|
|
|
|
|
|
|
|
|
let variants = commands.map((command: CommandInterface, index: number) => command.name); |
|
|
|
let variants = commands.map((command: CommandInterface, index: number) => command.name); |
|
|
|
|
|
|
|
variants.push('') |
|
|
|
|
|
|
|
|
|
|
|
let refreshCommands = async () => { |
|
|
|
let refreshCommands = async () => { |
|
|
|
const { data: commands } = await api.useMemory().getCommands() |
|
|
|
const { data: commands } = await api.useMemory().getCommands() |
|
|
@ -199,10 +200,10 @@ export default function Processes() { |
|
|
|
<Autocomplete |
|
|
|
<Autocomplete |
|
|
|
value={type} |
|
|
|
value={type} |
|
|
|
onChange={(event: any, newValue: string | null) => { |
|
|
|
onChange={(event: any, newValue: string | null) => { |
|
|
|
setType(newValue); |
|
|
|
setType(newValue || ''); |
|
|
|
}} |
|
|
|
}} |
|
|
|
disablePortal |
|
|
|
disablePortal |
|
|
|
options={['None', "Running", "History"]} |
|
|
|
options={['None', "Running", "History", '']} |
|
|
|
renderInput={(params) => <TextField {...params} label="Type"/>} |
|
|
|
renderInput={(params) => <TextField {...params} label="Type"/>} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</Grid> |
|
|
|
</Grid> |
|
|
@ -302,6 +303,7 @@ export default function Processes() { |
|
|
|
component="div" |
|
|
|
component="div" |
|
|
|
count={count} |
|
|
|
count={count} |
|
|
|
rowsPerPage={20} |
|
|
|
rowsPerPage={20} |
|
|
|
|
|
|
|
rowsPerPageOptions={[10, 20, 50, 100]} |
|
|
|
page={page} |
|
|
|
page={page} |
|
|
|
onPageChange={handleChangePage} |
|
|
|
onPageChange={handleChangePage} |
|
|
|
/> |
|
|
|
/> |
|
|
|