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
Michael Black
OpenXG-RAN
Commits
dac3bc1a
Commit
dac3bc1a
authored
Apr 15, 2022
by
El Mghazli Yacine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ilogs
parent
32e49924
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
18 deletions
+36
-18
common/utils/websrv/frontend/src/app/api/commands.api.ts
common/utils/websrv/frontend/src/app/api/commands.api.ts
+32
-15
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
...rontend/src/app/components/commands/commands.component.ts
+2
-1
common/utils/websrv/frontend/src/app/components/error-dialog/error-dialog.component.html
...c/app/components/error-dialog/error-dialog.component.html
+1
-1
common/utils/websrv/frontend/src/app/services/dialog.service.ts
.../utils/websrv/frontend/src/app/services/dialog.service.ts
+1
-1
No files found.
common/utils/websrv/frontend/src/app/api/commands.api.ts
View file @
dac3bc1a
...
...
@@ -10,20 +10,37 @@ export interface IVariable {
modifiable
:
boolean
;
//set command ?
}
// export enum ILogLvl {
// error="error",
// warn="warn",
// analysis="analysis",
// info="info",
// debug="debug",
// trace="trace"
// }
// export interface ICmdResp {
// component: string;
// level: ILogLvl;
// enabled: boolean;
// output: string;
// }
export
enum
ILogLvl
{
error
=
"
error
"
,
warn
=
"
warn
"
,
analysis
=
"
analysis
"
,
info
=
"
info
"
,
debug
=
"
debug
"
,
trace
=
"
trace
"
}
export
enum
ILogOutput
{
stdout
=
"
stdout
"
,
telnet
=
"
telnet
"
,
web
=
"
web
"
,
file
=
"
/tmp/<component>.log
"
,
}
export
interface
ILog
{
component
:
string
;
level
:
ILogLvl
;
output
:
ILogOutput
;
enabled
:
boolean
;
}
export
interface
ILog2
{
enabled
:
boolean
;
}
export
interface
IResp
{
display
:
string
[],
logs
?:
ILog
[]
}
export
enum
IArgType
{
boolean
=
"
boolean
"
,
...
...
@@ -50,7 +67,7 @@ export class CommandsApi {
public
readCommands$
=
(
moduleName
?:
string
)
=>
this
.
httpClient
.
get
<
ICommand
[]
>
(
environment
.
backend
+
route
+
'
/
'
+
(
moduleName
?
(
'
/
'
+
moduleName
)
:
""
)
+
'
/commands/
'
);
public
runCommand$
=
(
command
:
ICommand
,
moduleName
:
string
)
=>
this
.
httpClient
.
post
<
string
[]
>
(
environment
.
backend
+
route
+
'
/
'
+
moduleName
+
'
/commands/
'
,
command
);
public
runCommand$
=
(
command
:
ICommand
,
moduleName
:
string
)
=>
this
.
httpClient
.
post
<
IResp
>
(
environment
.
backend
+
route
+
'
/
'
+
moduleName
+
'
/commands/
'
,
command
);
public
setVariable$
=
(
variable
:
IVariable
,
moduleName
?:
string
)
=>
this
.
httpClient
.
post
<
string
[]
>
(
environment
.
backend
+
route
+
(
moduleName
?
(
'
/
'
+
moduleName
)
:
""
)
+
'
/variables/
'
,
variable
);
...
...
common/utils/websrv/frontend/src/app/components/commands/commands.component.ts
View file @
dac3bc1a
...
...
@@ -81,7 +81,8 @@ export class CommandsComponent {
onCmdSubmit
(
control
:
CmdCtrl
)
{
this
.
commandsApi
.
runCommand$
(
control
.
api
(),
`
${
this
.
selectedModule
!
.
nameFC
.
value
}
`
).
pipe
(
map
(
array
=>
this
.
success
(
'
runCommand
'
+
control
.
nameFC
.
value
+
'
OK
'
,
array
[
0
]))
// map(array => this.success('runCommand ' + control.nameFC.value + ' OK', " " + array.join(" </p><p> ") + " "))
map
(
resp
=>
this
.
success
(
'
runCommand
'
+
control
.
nameFC
.
value
+
'
OK
'
,
resp
.
display
!
.
join
(
"
</p><p>
"
)))
).
subscribe
();
}
...
...
common/utils/websrv/frontend/src/app/components/error-dialog/error-dialog.component.html
View file @
dac3bc1a
<div
fxLayout=
"column"
fxLayoutAlign=
"center center"
>
<h3>
{{ data.title }}
</h3>
<p
>
{{ data.body }}
</p
>
<p
re
[innerHTML]=
"data.body"
></pre
>
</div>
\ No newline at end of file
common/utils/websrv/frontend/src/app/services/dialog.service.ts
View file @
dac3bc1a
...
...
@@ -22,7 +22,7 @@ export class DialogService {
this
.
isDialogOpen
=
true
;
const
dialogRef
=
this
.
_dialog
.
open
(
ErrorDialogComponent
,
{
width
:
'
3
00px
'
,
width
:
'
9
00px
'
,
data
,
});
...
...
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