@@ -18,28 +18,13 @@ import { Profiles } from "madwizard"
1818import { MenuItemConstructorOptions } from "electron"
1919import { CreateWindowFunction } from "@kui-shell/core"
2020
21- import runs from "./runs"
22- import boot from "./boot"
23- import shutdown from "./shutdown"
21+ import status from "./status"
22+ import tasks from "./tasks"
2423import dashboards from "./dashboards"
2524
2625import section from "../section"
2726import UpdateFunction from "../../update"
2827import { profileIcon } from "../../icons"
29- import ProfileStatusWatcher from "../../watchers/profile/status"
30-
31- /** Memo of `ProfileStatusWatcher`, keyed by profile name */
32- const watchers : Record < string , ProfileStatusWatcher > = { }
33-
34- /** @return menu items for the status of the given `profile` */
35- function status ( profile : string , updateFunction : UpdateFunction ) {
36- if ( ! watchers [ profile ] ) {
37- watchers [ profile ] = new ProfileStatusWatcher ( profile , updateFunction )
38- }
39- const watcher = watchers [ profile ]
40-
41- return [ watcher . head , watcher . workers ]
42- }
4328
4429/** @return a menu for the given `profile` */
4530async function profileMenu (
@@ -53,11 +38,9 @@ async function profileMenu(
5338 label : profile ,
5439 icon : profileIcon ,
5540 submenu : [
56- boot ( profile , createWindow ) ,
57- shutdown ( profile , createWindow ) ,
58- ...section ( "Status" , status ( profile , updateFunction ) , true ) ,
59- ...section ( "Dashboards" , dashboards ( profile , createWindow ) , true ) ,
60- ...section ( "Recent Runs" , await runs ( profile , createWindow ) , true ) ,
41+ ...section ( "Status" , status ( profile , updateFunction ) ) ,
42+ ...section ( "Dashboards" , await dashboards ( profile , createWindow ) ) ,
43+ ...section ( "Tasks" , tasks ( profile , createWindow ) ) ,
6144 ] ,
6245 }
6346}
@@ -75,5 +58,5 @@ export default async function profilesMenu(
7558 . map ( ( _ ) => profileMenu ( _ . profile , createWindow , updateFn ) )
7659 )
7760
78- return section ( "Profiles" , profiles )
61+ return section ( "Profiles" , profiles , false )
7962}
0 commit comments