From da941a299cde72bbf5bb1494a851b70e402efe68 Mon Sep 17 00:00:00 2001 From: danielv Date: Sat, 6 Nov 2021 16:35:09 +0100 Subject: [PATCH] Start all and stop all instance buttons --- .../web_ui/src/components/InstancesPage.jsx | 30 +++++++++++++++++-- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/packages/web_ui/src/components/InstancesPage.jsx b/packages/web_ui/src/components/InstancesPage.jsx index fb6dbd71..a6ed0aef 100644 --- a/packages/web_ui/src/components/InstancesPage.jsx +++ b/packages/web_ui/src/components/InstancesPage.jsx @@ -11,7 +11,6 @@ import { useInstanceList } from "../model/instance"; import InstanceList from "./InstanceList"; import { notifyErrorHandler } from "../util/notify"; - function CreateInstanceButton(props) { let control = useContext(ControlContext); let history = useHistory(); @@ -51,7 +50,7 @@ function CreateInstanceButton(props) { >
- +
@@ -59,6 +58,7 @@ function CreateInstanceButton(props) { } export default function InstancesPage() { + let control = useContext(ControlContext); let account = useAccount(); let [instanceList] = useInstanceList(); @@ -66,7 +66,31 @@ export default function InstancesPage() { } + extra={<> + {account.hasPermission("core.instance.create") && } + {account.hasPermission("core.instance.start") + && } + {account.hasPermission("core.instance.stop") + && } + } />