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
lizhongxiao
OpenXG-RAN
Commits
51ce2fb1
Commit
51ce2fb1
authored
Apr 27, 2022
by
El Mghazli Yacine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setParam$
parent
4ca7dafb
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
175 additions
and
210 deletions
+175
-210
common/utils/websrv/frontend/src/app/api/commands.api.ts
common/utils/websrv/frontend/src/app/api/commands.api.ts
+6
-5
common/utils/websrv/frontend/src/app/app.component.html
common/utils/websrv/frontend/src/app/app.component.html
+1
-1
common/utils/websrv/frontend/src/app/app.module.ts
common/utils/websrv/frontend/src/app/app.module.ts
+3
-11
common/utils/websrv/frontend/src/app/components/commands/commands.component.css
...ontend/src/app/components/commands/commands.component.css
+2
-2
common/utils/websrv/frontend/src/app/components/commands/commands.component.html
...ntend/src/app/components/commands/commands.component.html
+109
-77
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
...rontend/src/app/components/commands/commands.component.ts
+27
-30
common/utils/websrv/frontend/src/app/components/nav/nav.component.css
.../websrv/frontend/src/app/components/nav/nav.component.css
+0
-17
common/utils/websrv/frontend/src/app/components/nav/nav.component.html
...websrv/frontend/src/app/components/nav/nav.component.html
+0
-32
common/utils/websrv/frontend/src/app/components/nav/nav.component.ts
...s/websrv/frontend/src/app/components/nav/nav.component.ts
+0
-20
common/utils/websrv/frontend/src/app/controls/entry.control.ts
...n/utils/websrv/frontend/src/app/controls/entry.control.ts
+0
-14
common/utils/websrv/frontend/src/app/controls/param.control.ts
...n/utils/websrv/frontend/src/app/controls/param.control.ts
+25
-0
common/utils/websrv/frontend/src/environments/environment.ts
common/utils/websrv/frontend/src/environments/environment.ts
+2
-1
No files found.
common/utils/websrv/frontend/src/app/api/commands.api.ts
View file @
51ce2fb1
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
HttpClient
}
from
'
@angular/common/http
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
Injectable
}
from
'
@angular/core
'
;
import
{
environment
}
from
'
src/environments/environment
'
;
import
{
environment
}
from
'
src/environments/environment
'
;
import
{
Param
,
ParamFC
}
from
'
../controls/param.control
'
;
export
interface
IVariable
{
export
interface
IVariable
{
...
@@ -72,12 +73,12 @@ export class CommandsApi {
...
@@ -72,12 +73,12 @@ export class CommandsApi {
public
setVariable$
=
(
variable
:
IVariable
,
moduleName
?:
string
)
=>
this
.
httpClient
.
post
<
IResp
>
(
environment
.
backend
+
route
+
(
moduleName
?
(
'
/
'
+
moduleName
)
:
""
)
+
'
/variables/
'
,
variable
);
public
setVariable$
=
(
variable
:
IVariable
,
moduleName
?:
string
)
=>
this
.
httpClient
.
post
<
IResp
>
(
environment
.
backend
+
route
+
(
moduleName
?
(
'
/
'
+
moduleName
)
:
""
)
+
'
/variables/
'
,
variable
);
public
setParam$
=
(
moduleName
:
string
,
cmdName
:
string
,
colName
:
string
,
rawIndex
:
number
,
value
:
string
)
=>
this
.
httpClient
.
post
<
IResp
>
(
environment
.
backend
+
route
+
'
/
'
+
moduleName
+
'
/set
'
,
public
setParam$
=
(
param
:
Param
)
=>
this
.
httpClient
.
post
<
IResp
>
(
environment
.
backend
+
route
+
'
/
'
+
param
.
moduleName
+
'
/set
'
,
{
{
cmdName
:
cmdName
,
cmdName
:
param
.
cmdName
,
colName
:
colN
ame
,
colName
:
param
.
col
.
n
ame
,
rawIndex
:
rawIndex
,
rawIndex
:
param
.
rawIndex
,
value
:
value
value
:
param
.
value
}
}
);
);
...
...
common/utils/websrv/frontend/src/app/app.component.html
View file @
51ce2fb1
<app-
nav></app-nav
>
<app-
commands></app-commands
>
\ No newline at end of file
common/utils/websrv/frontend/src/app/app.module.ts
View file @
51ce2fb1
...
@@ -31,14 +31,12 @@ import { AppComponent } from './app.component';
...
@@ -31,14 +31,12 @@ import { AppComponent } from './app.component';
import
{
CommandsComponent
}
from
'
./components/commands/commands.component
'
;
import
{
CommandsComponent
}
from
'
./components/commands/commands.component
'
;
import
{
ConfirmDialogComponent
}
from
'
./components/confirm/confirm.component
'
;
import
{
ConfirmDialogComponent
}
from
'
./components/confirm/confirm.component
'
;
import
{
ErrorDialogComponent
}
from
'
./components/error-dialog/error-dialog.component
'
;
import
{
ErrorDialogComponent
}
from
'
./components/error-dialog/error-dialog.component
'
;
import
{
NavComponent
}
from
'
./components/nav/nav.component
'
;
import
{
InterceptorProviders
}
from
'
./interceptors/interceptors
'
;
import
{
InterceptorProviders
}
from
'
./interceptors/interceptors
'
;
import
{
LoadingService
}
from
'
./services/loading.service
'
;
import
{
LoadingService
}
from
'
./services/loading.service
'
;
@
NgModule
({
@
NgModule
({
declarations
:
[
declarations
:
[
AppComponent
,
AppComponent
,
NavComponent
,
ErrorDialogComponent
,
ErrorDialogComponent
,
CommandsComponent
,
CommandsComponent
,
ConfirmDialogComponent
ConfirmDialogComponent
...
@@ -48,29 +46,23 @@ import { LoadingService } from './services/loading.service';
...
@@ -48,29 +46,23 @@ import { LoadingService } from './services/loading.service';
AppRoutingModule
,
AppRoutingModule
,
BrowserAnimationsModule
,
BrowserAnimationsModule
,
HttpClientModule
,
HttpClientModule
,
ClipboardModule
,
MatFormFieldModule
,
MatFormFieldModule
,
MatInputModule
,
MatInputModule
,
ReactiveFormsModule
,
ReactiveFormsModule
,
MatChipsModule
,
//
MatChipsModule,
MatProgressSpinnerModule
,
MatProgressSpinnerModule
,
MatIconModule
,
MatButtonModule
,
MatButtonModule
,
FlexLayoutModule
,
FlexLayoutModule
,
MatDatepickerModule
,
MatNativeDateModule
,
MatToolbarModule
,
MatToolbarModule
,
MatSidenavModule
,
// MatListModule,
MatListModule
,
MatTableModule
,
MatTableModule
,
MatPaginatorModule
,
MatSelectModule
,
MatSelectModule
,
MatDialogModule
,
MatDialogModule
,
MatSnackBarModule
,
MatSnackBarModule
,
MatSlideToggleModule
,
MatSlideToggleModule
,
MatGridListModule
,
MatGridListModule
,
MatCardModule
,
MatCardModule
,
MatMenuModule
,
//
MatMenuModule,
],
],
providers
:
[
providers
:
[
// services
// services
...
...
common/utils/websrv/frontend/src/app/components/commands/commands.component.css
View file @
51ce2fb1
...
@@ -30,5 +30,5 @@ mat-form-field {
...
@@ -30,5 +30,5 @@ mat-form-field {
}
}
.dashboard-card-content
{
.dashboard-card-content
{
text-align
:
center
;
text-align
:
start
;
}
}
\ No newline at end of file
common/utils/websrv/frontend/src/app/components/commands/commands.component.html
View file @
51ce2fb1
<div
*ngIf=
"vars$ | async as vars"
>
<div
class=
"grid-container"
>
<h1
mat-dialog-title
>
Softmodem variables
</h1>
<mat-grid-list
cols=
"2"
rowHeight=
"200px"
>
<mat-grid-tile
[colspan]=
"1"
[rowspan]=
"2"
>
<mat-card
class=
"dashboard-card"
>
<mat-card-header>
<mat-card-title>
Softmodem variables
</mat-card-title>
</mat-card-header>
<mat-card-content
class=
"dashboard-card-content"
>
<div
*ngIf=
"vars$ | async as vars"
>
<div
*ngFor=
"let variable of vars"
>
<div
*ngFor=
"let variable of vars"
>
<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"
(click)=
"onVarSubmit(variable)"
>
<button
mat-raised-button
color=
"primary"
[disabled]=
"!variable.modifiableFC.value"
(click)=
"onVarSubmit(variable)"
>
set
set
</button>
</button>
</div>
</div>
</div>
</div>
</mat-card-content>
<div
*ngIf=
"modules$ | async as modules"
fxLaypout=
"row"
>
</mat-card>
</mat-grid-tile>
<mat-grid-tile
[colspan]=
"1"
[rowspan]=
"2"
>
<mat-card
class=
"dashboard-card"
>
<mat-card-header>
<mat-card-title>
Softmodem commands
</mat-card-title>
</mat-card-header>
<mat-card-content
class=
"dashboard-card-content"
>
<div
*ngIf=
"modules$ | async as modules"
fxLaypout=
"row"
>
<mat-form-field>
<mat-form-field>
<mat-label>
Module
</mat-label>
<mat-label>
Module
</mat-label>
<mat-select
(selectionChange)=
"onModuleSelect($event.value)"
>
<mat-select
(selectionChange)=
"onModuleSelect($event.value)"
>
...
@@ -19,36 +36,44 @@
...
@@ -19,36 +36,44 @@
</mat-option>
</mat-option>
</mat-select>
</mat-select>
</mat-form-field>
</mat-form-field>
</div>
</div>
<div
*ngIf=
"modulecmds$ | async as cmds"
>
<div
*ngIf=
"selectedModule"
>
<div
*ngIf=
"cmds.length"
>
<h1
mat-dialog-title
>
{{ selectedModule!.nameFC.value }} module
</h1>
<div
*ngFor=
"let cmd of cmds"
fxLayoutGap=
"10px"
fxLayoutAlign=
"start start"
>
<button
mat-raised-button
color=
"primary"
(click)=
"onCmdSubmit(cmd)"
>
{{cmd.nameFC.value}}
</button>
<div
*ngIf=
"subvars$ | async as subvars"
fxLaypout=
"column"
>
</div>
<div
*ngIf=
"subvars.length"
>
</div>
<h2
mat-dialog-title
>
Variables
</h2>
</div>
<div
*ngFor=
"let variable of subvars"
>
</mat-card-content>
</mat-card>
</mat-grid-tile>
<mat-grid-tile
*ngIf=
"modulevars$ | async as modulevars"
[colspan]=
"1"
[rowspan]=
"6"
>
<mat-card
*ngIf=
"modulevars.length"
class=
"dashboard-card"
>
<mat-card-header>
<mat-card-title>
{{ selectedModule!.nameFC.value }} variables
</mat-card-title>
</mat-card-header>
<mat-card-content
class=
"dashboard-card-content"
>
<div
*ngFor=
"let variable of modulevars"
>
<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)=
"onSubVarS
ubmit(variable)"
>
(click)=
"onModuleVars
ubmit(variable)"
>
set
set
</button>
</button>
</div>
</div>
</div>
</mat-card-content>
</div>
</mat-card>
</mat-grid-tile>
<div
*ngIf=
"cmds$ | async as cmds"
>
<div
*ngIf=
"cmds.length"
>
<h2
mat-dialog-title
>
Commands
</h2>
<div
*ngFor=
"let cmd of cmds"
fxLayoutGap=
"10px"
>
<button
mat-raised-button
color=
"primary"
(click)=
"onCmdSubmit(cmd)"
>
{{cmd.nameFC.value}}
</button>
</div>
</div>
</div>
<mat-grid-tile
*ngIf=
"selectedCmd"
[colspan]=
"1"
[rowspan]=
"10"
>
<mat-card
class=
"dashboard-card"
>
<mat-card-header>
<mat-card-title>
{{ selectedModule!.nameFC.value }} {{ selectedCmd.name }}
</mat-card-title>
</mat-card-header>
<mat-card-content
class=
"dashboard-card-content"
>
<mat-table
mat-table
[dataSource]=
"rows$"
multiTemplateDataRows
class=
"mat-elevation-z8"
>
<mat-table
mat-table
[dataSource]=
"rows$"
multiTemplateDataRows
class=
"mat-elevation-z8"
>
...
@@ -65,10 +90,12 @@
...
@@ -65,10 +90,12 @@
</mat-header-cell>
</mat-header-cell>
<mat-cell
*matCellDef=
"let row; dataIndex as rowIndex"
>
<mat-cell
*matCellDef=
"let row; dataIndex as rowIndex"
>
<div
*ngIf=
"col.type === IOptionType.boolean; then toggle else default"
></div>
<div
*ngIf=
"col.type === IOptionType.boolean; then toggle else default"
>
</div>
<!-- <button mat-raised-button color="primary" (click)="onParamSubmit(row)"> set </button> -->
<ng-template
#toggle
>
<ng-template
#toggle
>
<mat-slide-toggle
[formControl]=
"row[colIndex]"
[checked]=
"row[colIndex].value"
[disabled]=
"!col.modifiable"
>
<mat-slide-toggle
[formControl]=
"row[colIndex]"
[checked]=
"row[colIndex].value"
[disabled]=
"!col.modifiable"
(change)=
"onParamSubmit(row)"
>
</mat-slide-toggle>
</mat-slide-toggle>
</ng-template>
</ng-template>
...
@@ -82,8 +109,13 @@
...
@@ -82,8 +109,13 @@
</div>
</div>
<mat-header-row
*matHeaderRowDef=
"displayedColumns"
></mat-header-row>
<mat-header-row
*matHeaderRowDef=
"displayedColumns"
></mat-header-row>
<mat-row
*matRowDef=
"let row; columns: displayedColumns
"
></mat-row>
<mat-row
*matRowDef=
"let row; columns: displayedColumns"
(keydown.enter)=
"onParamSubmit(row)
"
></mat-row>
</mat-table>
</mat-table>
</mat-card-content>
</mat-card>
</mat-grid-tile>
</mat-grid-list>
</div>
</div>
\ No newline at end of file
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
View file @
51ce2fb1
...
@@ -4,9 +4,9 @@ import { of } from 'rxjs/internal/observable/of';
...
@@ -4,9 +4,9 @@ import { of } from 'rxjs/internal/observable/of';
import
{
map
}
from
'
rxjs/internal/operators/map
'
;
import
{
map
}
from
'
rxjs/internal/operators/map
'
;
import
{
mergeMap
}
from
'
rxjs/internal/operators/mergeMap
'
;
import
{
mergeMap
}
from
'
rxjs/internal/operators/mergeMap
'
;
import
{
filter
}
from
'
rxjs/operators
'
;
import
{
filter
}
from
'
rxjs/operators
'
;
import
{
CommandsApi
,
IArgType
,
IColumn
}
from
'
src/app/api/commands.api
'
;
import
{
CommandsApi
,
IArgType
,
IColumn
,
ICommand
}
from
'
src/app/api/commands.api
'
;
import
{
CmdCtrl
}
from
'
src/app/controls/cmd.control
'
;
import
{
CmdCtrl
}
from
'
src/app/controls/cmd.control
'
;
import
{
EntryFC
}
from
'
src/app/controls/entry
.control
'
;
import
{
Param
,
ParamFC
}
from
'
src/app/controls/param
.control
'
;
import
{
VarCtrl
}
from
'
src/app/controls/var.control
'
;
import
{
VarCtrl
}
from
'
src/app/controls/var.control
'
;
import
{
DialogService
}
from
'
src/app/services/dialog.service
'
;
import
{
DialogService
}
from
'
src/app/services/dialog.service
'
;
import
{
LoadingService
}
from
'
src/app/services/loading.service
'
;
import
{
LoadingService
}
from
'
src/app/services/loading.service
'
;
...
@@ -24,19 +24,14 @@ export class CommandsComponent {
...
@@ -24,19 +24,14 @@ export class CommandsComponent {
vars$
:
Observable
<
VarCtrl
[]
>
vars$
:
Observable
<
VarCtrl
[]
>
modules$
:
Observable
<
CmdCtrl
[]
>
modules$
:
Observable
<
CmdCtrl
[]
>
selectedModule
?:
CmdCtrl
selectedModule
?:
CmdCtrl
// selectedVar?: VarCtrl
selectedCmd
?:
ICommand
subvars$
?:
Observable
<
VarCtrl
[]
>
modulevars$
?:
Observable
<
VarCtrl
[]
>
cmds$
?:
Observable
<
CmdCtrl
[]
>
modulecmds$
?:
Observable
<
CmdCtrl
[]
>
// selectedSubCmd?: CmdCtrl
// selectedSubVar?: VarCtrl
args$
?:
Observable
<
VarCtrl
[]
>
// selectedArg?: VarCtrl
//table columns
//table columns
displayedColumns
:
string
[]
=
[]
displayedColumns
:
string
[]
=
[]
rows$
:
Observable
<
EntryFC
[][]
>
=
new
Observable
<
Entry
FC
[][]
>
()
rows$
:
Observable
<
ParamFC
[][]
>
=
new
Observable
<
Param
FC
[][]
>
()
columns
:
IColumn
[]
=
[]
columns
:
IColumn
[]
=
[]
constructor
(
constructor
(
...
@@ -49,8 +44,7 @@ export class CommandsComponent {
...
@@ -49,8 +44,7 @@ export class CommandsComponent {
);
);
this
.
modules$
=
this
.
commandsApi
.
readCommands$
().
pipe
(
this
.
modules$
=
this
.
commandsApi
.
readCommands$
().
pipe
(
map
((
cmds
)
=>
cmds
.
map
(
icmd
=>
new
CmdCtrl
(
icmd
))),
map
((
cmds
)
=>
cmds
.
map
(
icmd
=>
new
CmdCtrl
(
icmd
)))
// tap(controls => [this.selectedCmd] = controls)
);
);
}
}
...
@@ -59,22 +53,12 @@ export class CommandsComponent {
...
@@ -59,22 +53,12 @@ export class CommandsComponent {
this
.
selectedModule
=
control
this
.
selectedModule
=
control
this
.
cmds$
=
this
.
commandsApi
.
readCommands$
(
`
${
control
.
nameFC
.
value
}
`
).
pipe
(
this
.
module
cmds$
=
this
.
commandsApi
.
readCommands$
(
`
${
control
.
nameFC
.
value
}
`
).
pipe
(
map
(
icmds
=>
icmds
.
map
(
icmd
=>
new
CmdCtrl
(
icmd
)))
map
(
icmds
=>
icmds
.
map
(
icmd
=>
new
CmdCtrl
(
icmd
)))
)
)
this
.
sub
vars$
=
this
.
commandsApi
.
readVariables$
(
`
${
control
.
nameFC
.
value
}
`
).
pipe
(
this
.
module
vars$
=
this
.
commandsApi
.
readVariables$
(
`
${
control
.
nameFC
.
value
}
`
).
pipe
(
map
(
ivars
=>
ivars
.
map
(
ivar
=>
new
VarCtrl
(
ivar
))),
map
(
ivars
=>
ivars
.
map
(
ivar
=>
new
VarCtrl
(
ivar
))),
// tap(controls => [this.selectedSubVar] = controls)
)
}
onCmdSelect
(
control
:
CmdCtrl
)
{
// this.selectedSubCmd = control
this
.
args$
=
this
.
commandsApi
.
readVariables$
(
`
${
this
.
selectedModule
!
.
nameFC
.
value
}
/
${
control
.
nameFC
.
value
}
`
).
pipe
(
map
(
ivars
=>
ivars
.
map
(
ivar
=>
new
VarCtrl
(
ivar
)))
)
)
}
}
...
@@ -82,7 +66,7 @@ export class CommandsComponent {
...
@@ -82,7 +66,7 @@ export class CommandsComponent {
this
.
commandsApi
.
setVariable$
(
control
.
api
()).
subscribe
();
this
.
commandsApi
.
setVariable$
(
control
.
api
()).
subscribe
();
}
}
on
SubVarS
ubmit
(
control
:
VarCtrl
)
{
on
ModuleVars
ubmit
(
control
:
VarCtrl
)
{
this
.
commandsApi
.
setVariable$
(
control
.
api
(),
`
${
this
.
selectedModule
!
.
nameFC
.
value
}
`
)
this
.
commandsApi
.
setVariable$
(
control
.
api
(),
`
${
this
.
selectedModule
!
.
nameFC
.
value
}
`
)
.
pipe
(
.
pipe
(
map
(
resp
=>
this
.
dialogService
.
openRespDialog
(
resp
))
map
(
resp
=>
this
.
dialogService
.
openRespDialog
(
resp
))
...
@@ -90,9 +74,12 @@ export class CommandsComponent {
...
@@ -90,9 +74,12 @@ export class CommandsComponent {
}
}
onCmdSubmit
(
control
:
CmdCtrl
)
{
onCmdSubmit
(
control
:
CmdCtrl
)
{
this
.
selectedCmd
=
control
.
api
()
const
obs
=
control
.
confirm
const
obs
=
control
.
confirm
?
this
.
dialogService
.
openConfirmDialog
(
control
.
confirm
).
pipe
(
filter
(
confirmed
=>
confirmed
))
?
this
.
dialogService
.
openConfirmDialog
(
control
.
confirm
).
pipe
(
filter
(
confirmed
=>
confirmed
)
)
:
of
(
null
)
:
of
(
null
)
this
.
rows$
=
obs
.
pipe
(
this
.
rows$
=
obs
.
pipe
(
...
@@ -108,17 +95,27 @@ export class CommandsComponent {
...
@@ -108,17 +95,27 @@ export class CommandsComponent {
let
rows
=
[];
let
rows
=
[];
for
(
let
i
=
0
;
i
<
resp
.
table
!
.
rows
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
resp
.
table
!
.
rows
.
length
;
i
++
)
{
let
row
:
EntryFC
[]
=
[]
let
row
:
Param
[]
=
[]
for
(
let
j
=
0
;
j
<
this
.
columns
.
length
;
j
++
)
{
for
(
let
j
=
0
;
j
<
this
.
columns
.
length
;
j
++
)
{
row
[
j
]
=
new
EntryFC
(
resp
.
table
!
.
rows
[
i
][
j
],
this
.
columns
[
j
].
type
)
row
[
j
]
=
new
Param
(
resp
.
table
!
.
rows
[
i
][
j
],
this
.
columns
[
j
],
j
,
this
.
selectedModule
!
.
nameFC
.
value
,
this
.
selectedCmd
!
.
name
)
}
}
rows
[
i
]
=
row
rows
[
i
]
=
row
.
map
(
param
=>
new
ParamFC
(
param
))
}
}
return
rows
return
rows
})
})
);
);
}
}
onParamSubmit
(
row
:
ParamFC
[])
{
row
.
map
(
paramFC
=>
this
.
commandsApi
.
setParam$
(
paramFC
.
api
()).
subscribe
());
}
}
}
\ No newline at end of file
common/utils/websrv/frontend/src/app/components/nav/nav.component.css
deleted
100644 → 0
View file @
4ca7dafb
.sidenav-container
{
height
:
100%
;
}
.sidenav
{
width
:
200px
;
}
.sidenav
.mat-toolbar
{
background
:
inherit
;
}
.mat-toolbar.mat-primary
{
position
:
sticky
;
top
:
0
;
z-index
:
1
;
}
common/utils/websrv/frontend/src/app/components/nav/nav.component.html
deleted
100644 → 0
View file @
4ca7dafb
<mat-sidenav-container
class=
"sidenav-container"
>
<mat-sidenav
#drawer
class=
"sidenav"
fixedInViewport
[attr.role]=
"(isHandset$ | async) ? 'dialog' : 'navigation'"
[mode]=
"(isHandset$ | async) ? 'over' : 'side'"
[opened]=
"(isHandset$ | async) === false"
>
<mat-nav-list>
<a
mat-list-item
routerLink=
"/commands"
routerLinkActive=
"active"
>
Commands
</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content>
<mat-toolbar>
<mat-toolbar-row
fxLayout=
"row"
fxLayoutAlign=
"space-between center"
>
<ng-template
#not_loading
>
<button
mat-icon-button
(click)=
"drawer.toggle()"
>
<mat-icon>
menu
</mat-icon>
</button>
<h1>
OAI SoftModem
</h1>
</ng-template>
<ng-template
#loading
>
<mat-progress-spinner
mode=
"indeterminate"
diameter=
"40"
>
</mat-progress-spinner>
</ng-template>
<div
fxLayout=
"row"
fxLayoutAlign=
"start center"
>
<ng-container
*ngIf=
"loadingService.isLoading$ | async; then loading; else not_loading"
>
</ng-container>
</div>
</mat-toolbar-row>
</mat-toolbar>
<router-outlet></router-outlet>
</mat-sidenav-content>
</mat-sidenav-container>
\ No newline at end of file
common/utils/websrv/frontend/src/app/components/nav/nav.component.ts
deleted
100644 → 0
View file @
4ca7dafb
import
{
Component
}
from
'
@angular/core
'
;
import
{
BreakpointObserver
,
Breakpoints
}
from
'
@angular/cdk/layout
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
map
,
shareReplay
}
from
'
rxjs/operators
'
;
import
{
LoadingService
}
from
'
src/app/services/loading.service
'
;
@
Component
({
selector
:
'
app-nav
'
,
templateUrl
:
'
./nav.component.html
'
,
styleUrls
:
[
'
./nav.component.css
'
],
})
export
class
NavComponent
{
isHandset$
:
Observable
<
boolean
>
=
this
.
breakpointObserver
.
observe
(
Breakpoints
.
Handset
).
pipe
(
map
((
result
)
=>
result
.
matches
),
shareReplay
(),
);
constructor
(
public
loadingService
:
LoadingService
,
private
breakpointObserver
:
BreakpointObserver
)
{
}
}
common/utils/websrv/frontend/src/app/controls/entry.control.ts
deleted
100644 → 0
View file @
4ca7dafb
import
{
FormControl
}
from
'
@angular/forms
'
;
import
{
IArgType
}
from
'
../api/commands.api
'
;
export
class
EntryFC
extends
FormControl
{
type
:
IArgType
constructor
(
entry
:
string
,
type
:
IArgType
)
{
super
(
entry
);
this
.
type
=
type
}
}
common/utils/websrv/frontend/src/app/controls/param.control.ts
0 → 100644
View file @
51ce2fb1
import
{
FormControl
}
from
'
@angular/forms
'
;
import
{
IArgType
,
IColumn
}
from
'
../api/commands.api
'
;
export
class
Param
{
constructor
(
public
value
:
string
,
public
col
:
IColumn
,
public
rawIndex
:
number
,
public
moduleName
:
string
,
public
cmdName
:
string
)
{
}
}
export
class
ParamFC
extends
FormControl
{
constructor
(
public
param
:
Param
)
{
super
(
param
.
value
);
}
api
()
{
this
.
param
.
value
=
this
.
value
return
this
.
param
}
}
common/utils/websrv/frontend/src/environments/environment.ts
View file @
51ce2fb1
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
export
const
environment
=
{
export
const
environment
=
{
production
:
false
,
production
:
false
,
backend
:
'
http://10.133.10.152:8090
'
backend
:
'
http://192.168.1.67:8090
'
// backend: 'http://10.133.10.152:8090'
// backend: 'http://10.130.163.206:8090'
// backend: 'http://10.130.163.206:8090'
};
};
...
...
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