updated as in the terminal and gate api's
This commit is contained in:
parent
76744c1b6f
commit
74c8ed661c
13 changed files with 109 additions and 75 deletions
|
|
@ -181,14 +181,14 @@ export default function Terminals(props: Props) {
|
|||
const load = useCallback(() => {
|
||||
if(loading) return
|
||||
setLoading(true)
|
||||
terminalAPI.listTerminals(200, 0, "asc", "name").then(resp => {
|
||||
terminalAPI.listTerminals(200, 0, "asc", "name", as).then(resp => {
|
||||
setTerminals(resp.data.terminals.map(a => Terminal.any(a)));
|
||||
}).catch(err => {
|
||||
console.log("There was a problem loading Terminals")
|
||||
}).finally(() => {
|
||||
setLoading(false)
|
||||
})
|
||||
}, [terminalAPI, openSnack]); //eslint-disable-line react-hooks/exhaustive-deps
|
||||
}, [terminalAPI, openSnack, as]); //eslint-disable-line react-hooks/exhaustive-deps
|
||||
|
||||
useEffect(() => {
|
||||
load();
|
||||
|
|
@ -197,7 +197,7 @@ export default function Terminals(props: Props) {
|
|||
const remove = () => {
|
||||
if (currentTerminal) {
|
||||
terminalAPI
|
||||
.removeTerminal(currentTerminal.key)
|
||||
.removeTerminal(currentTerminal.key, as)
|
||||
.then(resp => {
|
||||
openSnack("Terminal Deleted");
|
||||
let a = terminals;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue