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