refactor: isStarted variable on the plugin detail page

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/591/head
Ryan Wang 2022-07-27 17:45:26 +08:00
parent 7bdbf2500f
commit c9a21957cd
1 changed files with 1 additions and 5 deletions

View File

@ -9,11 +9,7 @@ import { rbacAnnotations } from "@/constants/annotations";
import { usePluginLifeCycle } from "./composables/use-plugin";
const plugin = inject<Ref<Plugin>>("plugin", ref({} as Plugin));
const { changeStatus } = usePluginLifeCycle(plugin);
const isStarted = computed(() => {
return plugin.value.status?.phase === "STARTED" && plugin.value.spec.enabled;
});
const { changeStatus, isStarted } = usePluginLifeCycle(plugin);
// TODO
interface RoleTemplateGroup {