Commit fc3319c9 authored by El Mghazli Yacine's avatar El Mghazli Yacine

display ok

parent f1e87cab
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
], ],
"parserOptions": { "parserOptions": {
"project": [ "project": [
"openairinterface5g/common/utils/websrv/frontend/tsconfig.json" "./tsconfig.json"
], ],
"createDefaultProgram": true "createDefaultProgram": true
}, },
......
<h1 mat-dialog-title>Status</h1> <!-- <div *ngIf="infos$ | async as infos"> -->
<div *ngIf="infos$ | async as infos"> <h1 mat-dialog-title>Status</h1>
<p> config_file: {{ infos.display_status.config_file }}</p> <p> config_file: {{ infos.display_status.config_file }}</p>
<p> executable_function: {{ infos.display_status.executable_function }}</p> <p> executable_function: {{ infos.display_status.executable_function }}</p>
<mat-form-field> <h1 mat-dialog-title>Commands</h1>
<mat-label>Command</mat-label> <mat-form-field>
<mat-select [formControl]="selectedCmd!.value" [value]="selectedCmd!.value"> <mat-label>Command</mat-label>
<mat-option *ngFor="let control of infos.cmdsFA.controls" [value]="control.value">{{ control.value }}</mat-option> <mat-select [formControl]="selectedCmd?.value" [value]="selectedCmd?.value">
</mat-select> <mat-option *ngFor="let control of infos.cmdsFA.controls" [value]="control.value">{{ control.value }}
</mat-form-field> </mat-option>
</div> </mat-select>
\ No newline at end of file </mat-form-field>
\ No newline at end of file
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
/* eslint-disable no-shadow */ /* eslint-disable no-shadow */
/* eslint-disable eqeqeq */ /* eslint-disable eqeqeq */
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/naming-convention */
import { Component } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import { FormControl } from '@angular/forms'; import { FormControl } from '@angular/forms';
import { Observable } from 'rxjs';
import { map, tap } from 'rxjs/operators';
import { CommandsApi } from 'src/app/api/commands.api'; import { CommandsApi } from 'src/app/api/commands.api';
import { InfosCtrl } from 'src/app/controls/infos.control'; import { InfosCtrl } from 'src/app/controls/infos.control';
import { LoadingService } from 'src/app/services/loading.service'; import { LoadingService } from 'src/app/services/loading.service';
...@@ -18,16 +16,33 @@ import { LoadingService } from 'src/app/services/loading.service'; ...@@ -18,16 +16,33 @@ import { LoadingService } from 'src/app/services/loading.service';
}) })
export class CommandsComponent { export class CommandsComponent {
infos$: Observable<InfosCtrl> // infos$: Observable<InfosCtrl>
infos: InfosCtrl
selectedCmd?: FormControl selectedCmd?: FormControl
constructor( constructor(
public commandsApi: CommandsApi, public commandsApi: CommandsApi,
public loadingService: LoadingService, public loadingService: LoadingService,
) { ) {
this.infos$ = this.commandsApi.readInfos$().pipe( // this.infos$ = this.commandsApi.readInfos$().pipe(
map((doc) => new InfosCtrl(doc)), // map((doc) => new InfosCtrl(doc)),
); // );
}
this.infos = new InfosCtrl({
display_status: {
config_file: '../../../ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.usrpn310.conf',
executable_function: "gnb"
},
menu_cmds: [
"telnet",
"softmodem",
"loader",
"measur",
"rfsimu"
]
})
// console.log(JSON.stringify(this.infos, null, 2))
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment