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
Hide 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 @@
...
@@ -30,7 +30,7 @@
<input
input
matInput
[formControl]=
"variable.valueFC"
/>
<input
input
matInput
[formControl]=
"variable.valueFC"
/>
</mat-form-field>
</mat-form-field>
<button
mat-raised-button
color=
"primary"
[disabled]=
"!variable.modifiableFC.value"
<button
mat-raised-button
color=
"primary"
[disabled]=
"!variable.modifiableFC.value"
(click)=
"onVarSubmit(variable)"
>
(click)=
"on
Sub
VarSubmit(variable)"
>
set
set
</button>
</button>
</div>
</div>
...
@@ -44,24 +44,24 @@
...
@@ -44,24 +44,24 @@
<mat-label>
Command
</mat-label>
<mat-label>
Command
</mat-label>
<mat-select
[formControl]=
"selectedSubCmd!.nameFC"
[value]=
"selectedSubCmd!.nameFC.value"
<mat-select
[formControl]=
"selectedSubCmd!.nameFC"
[value]=
"selectedSubCmd!.nameFC.value"
(selectionChange)=
"onSubCmdSelect()"
>
(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-option>
</mat-select>
</mat-select>
</mat-form-field>
</mat-form-field>
</div>
<div
*ngIf=
"args$ | async as args"
fxLaypout=
"column"
>
<div
*ngIf=
"args$ | async as args"
fxLaypout=
"column"
>
<div
*ngIf=
"args.length"
>
<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"
>
<div
*ngFor=
"let variable of args"
>
<mat-form-field>
<mat-form-field>
<mat-label>
{{ variable.nameFC.value }}
</mat-label>
<mat-label>
{{ variable.nameFC.value }}
</mat-label>
<input
input
matInput
[formControl]=
"variable.valueFC"
/>
<input
input
matInput
[formControl]=
"variable.valueFC"
/>
</mat-form-field>
</mat-form-field>
<button
mat-raised-button
color=
"primary"
[disabled]=
"!variable.modifiableFC.value"
<button
mat-raised-button
color=
"primary"
[disabled]=
"!variable.modifiableFC.value"
(click)=
"onSubVarSubmit(variable)"
>
(click)=
"onSubVarSubmit(variable)"
>
submit
submit
</button>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
View file @
2afae815
...
@@ -39,7 +39,7 @@ export class CommandsComponent {
...
@@ -39,7 +39,7 @@ export class CommandsComponent {
);
);
this
.
cmds$
=
this
.
commandsApi
.
readCommands$
().
pipe
(
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
)
tap
(
controls
=>
[
this
.
selectedCmd
]
=
controls
)
);
);
}
}
...
@@ -47,19 +47,20 @@ export class CommandsComponent {
...
@@ -47,19 +47,20 @@ export class CommandsComponent {
onCmdSelect
()
{
onCmdSelect
()
{
this
.
subcmds$
=
this
.
commandsApi
.
readCommands$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
`
).
pipe
(
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
)
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
)
tap
(
controls
=>
[
this
.
selectedSubVar
]
=
controls
)
)
)
}
}
onSubCmdSelect
()
{
onSubCmdSelect
()
{
this
.
args$
=
this
.
commandsApi
.
readVariables$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
/
${
this
.
selectedSubCmd
!
.
nameFC
.
value
}
`
).
pipe
(
this
.
args$
=
this
.
commandsApi
.
readVariables$
(
`
${
this
.
selectedCmd
!
.
nameFC
.
value
}
/
${
this
.
selectedSubCmd
!
.
nameFC
.
value
}
`
).
pipe
(
map
(
vars
=>
vars
.
map
(
v
=>
new
VarCtrl
(
v
))),
map
(
ivars
=>
ivars
.
map
(
ivar
=>
new
VarCtrl
(
ivar
))),
tap
(
vars
=>
[
this
.
selectedArg
]
=
var
s
)
tap
(
controls
=>
[
this
.
selectedArg
]
=
control
s
)
)
)
}
}
...
@@ -68,6 +69,7 @@ export class CommandsComponent {
...
@@ -68,6 +69,7 @@ export class CommandsComponent {
}
}
onSubVarSubmit
(
control
:
VarCtrl
)
{
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