@@ -18,28 +18,14 @@ import { Choices, Profiles } from "madwizard"
18
18
import { MenuItemConstructorOptions } from "electron"
19
19
import { CreateWindowFunction } from "@kui-shell/core"
20
20
21
- import UpdateFunction from "../update"
22
- import windowOptions from "../window"
23
- import { profileIcon , bootIcon , shutDownIcon } from "../icons"
21
+ import boot from "./boot"
22
+ import shutdown from "./shutdown"
24
23
import submenuForRuns from "./runs"
25
24
26
- import ProfileStatusWatcher from "../watchers/profile/status"
25
+ import UpdateFunction from "../../update"
26
+ import { profileIcon } from "../../icons"
27
27
28
- /** Handler for booting up a profile */
29
- async function boot ( profile : string , createWindow : CreateWindowFunction ) {
30
- createWindow (
31
- [ "codeflare" , "gui" , "guide" , "ml/ray/start/kubernetes" , "--profile" , profile ] ,
32
- windowOptions ( { title : "Booting " + profile } )
33
- )
34
- }
35
-
36
- /** Handler for shutting down a profile */
37
- async function shutdown ( profile : string , createWindow : CreateWindowFunction ) {
38
- createWindow (
39
- [ "codeflare" , "gui" , "guide" , "ml/ray/stop/kubernetes" , "--profile" , profile ] ,
40
- windowOptions ( { title : "Shutting down " + profile } )
41
- )
42
- }
28
+ import ProfileStatusWatcher from "../../watchers/profile/status"
43
29
44
30
const watchers : Record < string , ProfileStatusWatcher > = { }
45
31
@@ -58,12 +44,13 @@ async function submenuForOneProfile(
58
44
label : state . profile . name ,
59
45
icon : profileIcon ,
60
46
submenu : [
47
+ boot ( state . profile . name , createWindow ) ,
48
+ shutdown ( state . profile . name , createWindow ) ,
49
+ { type : "separator" } ,
50
+ { label : "Status" , enabled : false } ,
61
51
watcher . head ,
62
52
watcher . workers ,
63
53
{ type : "separator" } ,
64
- { label : "Boot" , icon : bootIcon , click : ( ) => boot ( state . profile . name , createWindow ) } ,
65
- { label : "Shutdown" , icon : shutDownIcon , click : ( ) => shutdown ( state . profile . name , createWindow ) } ,
66
- { type : "separator" } ,
67
54
...( await submenuForRuns ( createWindow ) ) ,
68
55
] ,
69
56
}
0 commit comments