Skip to content

Commit

Permalink
Update operator menu order (#4461)
Browse files Browse the repository at this point in the history
  • Loading branch information
YohannParis authored Aug 14, 2024
1 parent 2873e54 commit f4ee0bb
Showing 1 changed file with 24 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,60 +471,58 @@ function onMenuSelection(operatorType: string, menuNode: WorkflowNode<any>) {
// Menu categories and list items are in order of appearance for separators to work
const contextMenuItems: MenuItem[] = [
{
label: 'Add resource',
label: 'Modeling',
items: [
{
label: ModelOp.operation.displayName,
command: addOperatorToWorkflow(ModelOp)
},
{
label: ModelFromDocumentOp.operation.displayName,
command: addOperatorToWorkflow(ModelFromDocumentOp)
},
{ separator: true },
{ label: DatasetOp.operation.displayName, command: addOperatorToWorkflow(DatasetOp) },
{ separator: true },
{ label: DocumentOp.operation.displayName, command: addOperatorToWorkflow(DocumentOp) },
{ separator: true },
{
label: CodeAssetOp.operation.displayName,
command: addOperatorToWorkflow(CodeAssetOp)
label: ModelEditOp.operation.displayName,
command: addOperatorToWorkflow(ModelEditOp)
},
{
label: StratifyMiraOp.operation.displayName,
command: addOperatorToWorkflow(StratifyMiraOp)
},
{
label: ModelComparisonOp.operation.displayName,
command: addOperatorToWorkflow(ModelComparisonOp)
}
]
},
{
label: 'Work with model',
label: 'Config & Intervention',
items: [
{
label: ModelConfigOp.operation.displayName,
command: addOperatorToWorkflow(ModelConfigOp)
},
{
label: ModelEditOp.operation.displayName,
command: addOperatorToWorkflow(ModelEditOp)
},
{
label: FunmanOp.operation.displayName,
command: addOperatorToWorkflow(FunmanOp)
},
{
label: StratifyMiraOp.operation.displayName,
command: addOperatorToWorkflow(StratifyMiraOp)
},
{
label: InterventionPolicyOp.operation.displayName,
command: addOperatorToWorkflow(InterventionPolicyOp)
}
]
},
{
label: 'Work with multiple models',
label: 'Simulation',
items: [
{
label: ModelComparisonOp.operation.displayName,
command: addOperatorToWorkflow(ModelComparisonOp)
label: SimulateCiemssOp.operation.displayName,
command: addOperatorToWorkflow(SimulateCiemssOp)
},
{
label: CalibrateCiemssOp.operation.displayName,
command: addOperatorToWorkflow(CalibrateCiemssOp)
},
{
label: OptimizeCiemssOp.operation.displayName,
command: addOperatorToWorkflow(OptimizeCiemssOp)
},
{ separator: true },
{
label: SimulateEnsembleCiemssOp.operation.displayName,
command: addOperatorToWorkflow(SimulateEnsembleCiemssOp)
Expand All @@ -536,7 +534,7 @@ const contextMenuItems: MenuItem[] = [
]
},
{
label: 'Work with dataset',
label: 'Data',
items: [
{
label: DatasetTransformerOp.operation.displayName,
Expand All @@ -551,23 +549,6 @@ const contextMenuItems: MenuItem[] = [
command: addOperatorToWorkflow(RegriddingOp)
}
]
},
{
label: 'Run model',
items: [
{
label: SimulateCiemssOp.operation.displayName,
command: addOperatorToWorkflow(SimulateCiemssOp)
},
{
label: CalibrateCiemssOp.operation.displayName,
command: addOperatorToWorkflow(CalibrateCiemssOp)
},
{
label: OptimizeCiemssOp.operation.displayName,
command: addOperatorToWorkflow(OptimizeCiemssOp)
}
]
}
];
const addComponentMenu = ref();
Expand Down

0 comments on commit f4ee0bb

Please sign in to comment.