Skip to content

Commit 3dbbd65

Browse files
Michal Tichákjustonedev1
authored andcommitted
[core] add Rows field to the VarStack variables
1 parent c71657a commit 3dbbd65

File tree

9 files changed

+546
-521
lines changed

9 files changed

+546
-521
lines changed

coconut/protos/o2control.pb.go

Lines changed: 265 additions & 256 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coconut/protos/o2control_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/gera/map_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pdp_workflow_parameters: !public
6363
widget: editBox
6464
panel: "EPNs_Workflows"
6565
index: 603
66+
rows: 10
6667
user: flp
6768
extra_env_vars: ""
6869
`
@@ -274,7 +275,6 @@ pdp_workflow_parameters: ""
274275
})
275276
})
276277
When("wrapping and unwrapping maps", func() {
277-
278278
defaults1 := MakeMap[string, string]()
279279
Expect(defaults1).NotTo(BeNil())
280280

core/protos/o2control.pb.go

Lines changed: 265 additions & 256 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/protos/o2control.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ message VarSpecMessage {
386386
int32 index = 8;
387387
string visibleIf = 9; // JS expression that evaluates to bool
388388
string enabledIf = 10; // JS expression that evaluates to bool
389+
uint32 rows = 11; // this field is used only if widget == editBox
389390
}
390391

391392
message WorkflowTemplateInfo {

core/protos/o2control_grpc.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/repos/repoutils.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ type VarSpec struct {
7676
Panel string `yaml:"panel" `
7777
AllowedValues []string `yaml:"values"`
7878
Index int32 `yaml:"index"`
79+
Rows uint32 `yaml:"rows"`
7980
VisibleIf string `yaml:"visibleif"`
8081
EnabledIf string `yaml:"enabledif"`
8182
}

core/serverutil.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/AliceO2Group/Control/core/repos"
3131

3232
"github.com/AliceO2Group/Control/common"
33-
"github.com/AliceO2Group/Control/core/protos"
33+
pb "github.com/AliceO2Group/Control/core/protos"
3434
"github.com/AliceO2Group/Control/core/task/channel"
3535

3636
"github.com/AliceO2Group/Control/core/task"
@@ -204,6 +204,7 @@ func VarSpecMapToPbVarSpecMap(varSpecMap map[string]repos.VarSpec) map[string]*p
204204
Index: v.Index,
205205
VisibleIf: v.VisibleIf,
206206
EnabledIf: v.EnabledIf,
207+
Rows: v.Rows,
207208
}
208209
ret[k] = vsm
209210
}

core/workflow/role_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ func complexRoleTree() (root Role, leaves map[string]Role) {
1212
defaultState := sm.RUNNING
1313
call1 := &callRole{
1414
roleBase: roleBase{Name: "call1", state: SafeState{state: defaultState}},
15-
Traits: task.Traits{Critical: true}}
15+
Traits: task.Traits{Critical: true},
16+
}
1617
task1 := &taskRole{
1718
roleBase: roleBase{Name: "task1", state: SafeState{state: defaultState}},
1819
Traits: task.Traits{Critical: true},
@@ -21,15 +22,18 @@ func complexRoleTree() (root Role, leaves map[string]Role) {
2122
agg1task_noncritical := &taskRole{
2223
roleBase: roleBase{Name: "agg1task_noncritical", state: SafeState{state: defaultState}},
2324
Traits: task.Traits{Critical: false},
24-
Task: nil}
25+
Task: nil,
26+
}
2527
agg1task_critical := &taskRole{
2628
roleBase: roleBase{Name: "agg1task_critical", state: SafeState{state: defaultState}},
2729
Traits: task.Traits{Critical: true},
28-
Task: &task.Task{}}
30+
Task: &task.Task{},
31+
}
2932
agg2task_noncritical := &taskRole{
3033
roleBase: roleBase{Name: "agg2task_noncritical", state: SafeState{state: defaultState}},
3134
Traits: task.Traits{Critical: false},
32-
Task: &task.Task{}}
35+
Task: &task.Task{},
36+
}
3337

3438
root = &aggregatorRole{
3539
roleBase{Name: "root", state: SafeState{state: defaultState}},
@@ -238,7 +242,6 @@ var _ = Describe("role", func() {
238242
})
239243

240244
Describe("GetTasks", func() {
241-
242245
When("getting the slice with roles for a complex tree", func() {
243246
var root Role
244247
BeforeEach(func() {
@@ -445,6 +448,7 @@ roles:
445448
panel: DCS
446449
index: 2
447450
visibleif: $$dcs_enabled === "true"
451+
rows: 5
448452
dcs_eor_parameters: !public
449453
value: "{}"
450454
type: string

0 commit comments

Comments
 (0)