Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
2afae815
Commit
2afae815
authored
Apr 05, 2022
by
El Mghazli Yacine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed API variables calls
parent
fa03569f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
21 deletions
+23
-21
common/utils/websrv/frontend/src/app/components/commands/commands.component.html
...ntend/src/app/components/commands/commands.component.html
+15
-15
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
...rontend/src/app/components/commands/commands.component.ts
+8
-6
No files found.
common/utils/websrv/frontend/src/app/components/commands/commands.component.html
View file @
2afae815
...
...
@@ -30,7 +30,7 @@
<input
input
matInput
[formControl]=
"variable.valueFC"
/>
</mat-form-field>
<button
mat-raised-button
color=
"primary"
[disabled]=
"!variable.modifiableFC.value"
(click)=
"onVarSubmit(variable)"
>
(click)=
"on
Sub
VarSubmit(variable)"
>
set
</button>
</div>
...
...
@@ -44,15 +44,14 @@
<mat-label>
Command
</mat-label>
<mat-select
[formControl]=
"selectedSubCmd!.nameFC"
[value]=
"selectedSubCmd!.nameFC.value"
(selectionChange)=
"onSubCmdSelect()"
>
<mat-option
*ngFor=
"let
cmd of subcmds"
[value]=
"cmd.nameFC.value"
>
{{
cmd.nameFC.value }}
<mat-option
*ngFor=
"let
subcmd of subcmds"
[value]=
"subcmd.nameFC.value"
>
{{ sub
cmd.nameFC.value }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div
*ngIf=
"args$ | async as args"
fxLaypout=
"column"
>
<div
*ngIf=
"args.length"
>
<h1
mat-dialog-title
>
Sub-Variables
</h1>
<h1
mat-dialog-title
>
{{ selectedSubCmd!.nameFC.value }}
Sub-Variables
</h1>
<div
*ngFor=
"let variable of args"
>
<mat-form-field>
<mat-label>
{{ variable.nameFC.value }}
</mat-label>
...
...
@@ -65,6 +64,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
View file @
2afae815
...
...
@@ -39,7 +39,7 @@ export class CommandsComponent {
);
this
.
cmds$
=
this
.
commandsApi
.
readCommands$
().
pipe
(
map
((
cmds
)
=>
cmds
.
map
(
i
var
=>
new
CmdCtrl
(
ivar
))),
map
((
cmds
)
=>
cmds
.
map
(
i
cmd
=>
new
CmdCtrl
(
icmd
))),
tap
(
controls
=>
[
this
.
selectedCmd
]
=
controls
)
);
}
...
...
@@ -47,19 +47,20 @@ export class CommandsComponent {
onCmdSelect
()
{
this
.
subcmds$
=
this
.
commandsApi
.
readCommands$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
`
).
pipe
(
map
(
cmds
=>
cmds
.
map
(
cmd
=>
new
CmdCtrl
(
cmd
))),
map
(
icmds
=>
icmds
.
map
(
icmd
=>
new
CmdCtrl
(
i
cmd
))),
tap
(
controls
=>
[
this
.
selectedSubCmd
]
=
controls
)
)
this
.
subvars$
=
this
.
commandsApi
.
readVariables$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
`
).
pipe
(
map
(
vars
=>
vars
.
map
(
v
=>
new
VarCtrl
(
v
))),
this
.
subvars$
=
this
.
commandsApi
.
readVariables$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
`
).
pipe
(
map
(
ivars
=>
ivars
.
map
(
ivar
=>
new
VarCtrl
(
ivar
))),
tap
(
controls
=>
[
this
.
selectedSubVar
]
=
controls
)
)
}
onSubCmdSelect
()
{
this
.
args$
=
this
.
commandsApi
.
readVariables$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
/
${
this
.
selectedSubCmd
!
.
nameFC
.
value
}
`
).
pipe
(
map
(
vars
=>
vars
.
map
(
v
=>
new
VarCtrl
(
v
))),
tap
(
vars
=>
[
this
.
selectedArg
]
=
var
s
)
map
(
ivars
=>
ivars
.
map
(
ivar
=>
new
VarCtrl
(
ivar
))),
tap
(
controls
=>
[
this
.
selectedArg
]
=
control
s
)
)
}
...
...
@@ -68,6 +69,7 @@ export class CommandsComponent {
}
onSubVarSubmit
(
control
:
VarCtrl
)
{
this
.
commandsApi
.
setVariable$
(
control
.
api
(),
`
${
this
.
selectedCmd
?.
nameFC
.
value
}
/
${
this
.
selectedSubCmd
?.
nameFC
.
value
}
/
${
control
.
nameFC
.
value
}
`
).
subscribe
();
this
.
commandsApi
.
setVariable$
(
control
.
api
(),
`
${
this
.
selectedCmd
?.
nameFC
.
value
}
`
).
subscribe
();
// this.commandsApi.setVariable$(control.api(), `${this.selectedCmd?.nameFC.value} / ${this.selectedSubCmd?.nameFC.value} / ${control.nameFC.value}`).subscribe();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment