@@ -47,11 +47,13 @@ const InfoView = defineAsyncComponent(() => import('@/views/Info.vue'))
47
47
export const TREE = 'Tree'
48
48
49
49
/**
50
- * A map of the views that can be opened in a workspace directly .
50
+ * A map of the views that can be opened for a workflow .
51
51
*
52
52
* Note, some views may require additional context to open.
53
+ *
54
+ * @type {Map<string, CylcView> }
53
55
*/
54
- export const workspaceViews = new Map ( [
56
+ export const workflowViews = new Map ( [
55
57
[ TREE , { component : TreeView , icon : mdiFileTree } ] ,
56
58
[ 'Table' , { component : TableView , icon : mdiTable } ] ,
57
59
[ 'Graph' , { component : GraphView , icon : mdiGraph } ] ,
@@ -60,6 +62,11 @@ export const workspaceViews = new Map([
60
62
[ 'Gantt' , { component : GanttView , icon : mdiChartGantt } ] ,
61
63
] )
62
64
65
+ // Development views that we don't want in production:
66
+ if ( import . meta. env . MODE !== 'production' ) {
67
+ workflowViews . set ( 'SimpleTree' , { component : SimpleTreeView , icon : mdiTree } )
68
+ }
69
+
63
70
/**
64
71
* A map of Vue views or components.
65
72
*
@@ -72,16 +79,12 @@ export const workspaceViews = new Map([
72
79
* @type {Map<string, CylcView> }
73
80
*/
74
81
export const allViews = new Map ( [
75
- ...workspaceViews ,
82
+ ...workflowViews ,
83
+ // For now, Info view cannot be opened for a workflow, but this will be resolved by
84
+ // https://github.com/cylc/cylc-ui/issues/1898
76
85
[ 'Info' , { component : InfoView , icon : mdiInformationOutline } ] ,
77
86
] )
78
87
79
- // Development views that we don't want in production:
80
- if ( import . meta. env . MODE !== 'production' ) {
81
- allViews . set ( 'SimpleTree' , { component : SimpleTreeView , icon : mdiTree } )
82
- workspaceViews . set ( 'SimpleTree' , { component : SimpleTreeView , icon : mdiTree } )
83
- }
84
-
85
88
export const useDefaultView = ( ) => {
86
89
const defaultView = useLocalStorage ( 'defaultView' , TREE )
87
90
// Check if the view is implemented (in case we remove/rename a view in future)
0 commit comments