Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hpc-team
strudelv2_spa
Commits
aa83589b
Commit
aa83589b
authored
Aug 26, 2019
by
Chris Hines
Browse files
add in job history and view logs for comleted jobs
parent
ad197a6a
Pipeline
#7742
passed with stages
in 3 minutes
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/job/job.component.html
View file @
aa83589b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
*ngIf=
"jobdata.connectionState == 0"
fxLayout=
"row"
fxLayoutAlign=
"space-between"
>
<div
*ngIf=
"jobdata.connectionState == 0"
fxLayout=
"row"
fxLayoutAlign=
"space-between"
>
<div
fxFlex=
"10%"
>
{{ jobdata.state }}
</div>
<div
fxFlex=
"10%"
>
{{ jobdata.state }}
</div>
<div
fxFlex=
"10%"
>
{{ jobdata.jobid }}
</div>
<div
fxFlex=
"10%"
>
{{ jobdata.jobid }}
</div>
<div
fxFlex=
"10%"
>
{{ jobdata.batch_host }}
</div>
<div
*ngIf=
"jobdata.batch_host != 'localhost'"
fxFlex=
"10%"
>
{{ jobdata.batch_host }}
</div>
<div
fxFlex=
"20%"
fxLayout=
"column"
>
<div
fxFlex=
"20%"
fxLayout=
"column"
>
<div>
{{ resources }}
</div>
<div>
{{ resources }}
</div>
<div>
{{ timeremaining }}
</div>
<div>
{{ timeremaining }}
</div>
...
...
src/app/job/job.component.ts
View file @
aa83589b
...
@@ -57,6 +57,9 @@ export class JobComponent implements OnInit, OnDestroy {
...
@@ -57,6 +57,9 @@ export class JobComponent implements OnInit, OnDestroy {
}
else
{
}
else
{
this
.
nocancel
=
false
;
this
.
nocancel
=
false
;
}
}
if
(
this
.
jobdata
.
state
==
"
Finished
"
)
{
this
.
nocancel
=
true
;
}
this
.
resources
=
""
;
this
.
resources
=
""
;
if
(
this
.
jobdata
.
cpus
!=
undefined
)
{
if
(
this
.
jobdata
.
cpus
!=
undefined
)
{
this
.
resources
=
this
.
resources
+
"
CPUs:
"
+
this
.
jobdata
.
cpus
;
this
.
resources
=
this
.
resources
+
"
CPUs:
"
+
this
.
jobdata
.
cpus
;
...
...
src/app/joblist/joblist.component.html
View file @
aa83589b
...
@@ -20,6 +20,13 @@
...
@@ -20,6 +20,13 @@
<mat-divider></mat-divider>
<mat-divider></mat-divider>
</div>
</div>
</div>
</div>
<mat-divider></mat-divider>
<div
*ngFor=
"let job of ((identitySubject | async).joblist | async) ; let lastItem = last"
>
<div
*ngIf=
"(appSubject | async).name == job.name && job.state == 'Finished'"
>
<app-job
[jobdata]=
job
></app-job>
<mat-divider></mat-divider>
</div>
</div>
</mat-list>
</mat-list>
<button
mat-button
(click)=
"refreshJobs()"
style=
"width: 100%; text-align: right"
>
Refresh Job list
</button>
<button
mat-button
(click)=
"refreshJobs()"
style=
"width: 100%; text-align: right"
>
Refresh Job list
</button>
...
...
src/app/tes.service.ts
View file @
aa83589b
...
@@ -396,7 +396,7 @@ addUserHealth(identity,resp) {
...
@@ -396,7 +396,7 @@ addUserHealth(identity,resp) {
console
.
log
(
'
in getAppInstance
'
);
console
.
log
(
'
in getAppInstance
'
);
this
.
http
.
get
<
string
>
(
this
.
Base
+
'
/appinstance/
'
+
username
+
'
/
'
+
loginhost
+
'
/
'
+
batchhost
+
'
/
'
+
jobid
+
'
?
'
+
paramstr
,
options
)
this
.
http
.
get
<
string
>
(
this
.
Base
+
'
/appinstance/
'
+
username
+
'
/
'
+
loginhost
+
'
/
'
+
batchhost
+
'
/
'
+
jobid
+
'
?
'
+
paramstr
,
options
)
// .pipe(catchError(this.handleError))
// .pipe(catchError(this.handleError))
.
subscribe
(
resp
=>
{
job
.
appinst
=
resp
;
this
.
createTunnel
(
job
,
action
)
},
.
subscribe
(
resp
=>
{
job
.
appinst
=
resp
;
if
(
action
.
client
!=
null
)
{
this
.
createTunnel
(
job
,
action
)
}
else
{
job
.
connectionState
=
0
}
},
error
=>
{
this
.
handleAppInstanceError
(
job
,
error
)
})
error
=>
{
this
.
handleAppInstanceError
(
job
,
error
)
})
// let paramstr = this.buildParams(job.app,job.identity,this.batchinterface[job.identity.repr()]);
// let paramstr = this.buildParams(job.app,job.identity,this.batchinterface[job.identity.repr()]);
// let headers = new HttpHeaders();
// let headers = new HttpHeaders();
...
...
src/assets/config/m3apps.dev.json
View file @
aa83589b
...
@@ -13,7 +13,13 @@
...
@@ -13,7 +13,13 @@
"name"
:
"View log"
,
"name"
:
"View log"
,
"paramscmd"
:
"/usr/local/sv2/dev/desktop/logparams.py {jobid}"
,
"paramscmd"
:
"/usr/local/sv2/dev/desktop/logparams.py {jobid}"
,
"client"
:
{
"cmd"
:
null
,
"redir"
:
"index.html?token={token}"
},
"client"
:
{
"cmd"
:
null
,
"redir"
:
"index.html?token={token}"
},
"states"
:
[
"RUNNING"
,
"COMPLETED"
]
"states"
:
[
"RUNNING"
,
"Finished"
]
},
{
"name"
:
"Remove log"
,
"paramscmd"
:
"/usr/local/sv2/dev/rmlog.py {jobid}"
,
"client"
:
null
,
"states"
:
[
"Finished"
]
}
}
],
],
"localbind"
:
true
,
"localbind"
:
true
,
...
@@ -29,7 +35,20 @@
...
@@ -29,7 +35,20 @@
"paramscmd"
:
"/usr/local/sv2/dev/jupyter/jupyter_params.py {jobid}"
,
"paramscmd"
:
"/usr/local/sv2/dev/jupyter/jupyter_params.py {jobid}"
,
"client"
:
{
"cmd"
:
null
,
"redir"
:
"?token={token}"
},
"client"
:
{
"cmd"
:
null
,
"redir"
:
"?token={token}"
},
"states"
:
[
"RUNNING"
]
"states"
:
[
"RUNNING"
]
},
{
"name"
:
"View log"
,
"paramscmd"
:
"/usr/local/sv2/dev/desktop/logparams.py {jobid}"
,
"client"
:
{
"cmd"
:
null
,
"redir"
:
"index.html?token={token}"
},
"states"
:
[
"RUNNING"
,
"Finished"
]
},
{
"name"
:
"Remove log"
,
"paramscmd"
:
"/usr/local/sv2/dev/rmlog.py {jobid}"
,
"client"
:
null
,
"states"
:
[
"Finished"
]
}
}
],
],
"localbind"
:
true
,
"localbind"
:
true
,
"applist"
:
null
"applist"
:
null
...
...
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