Skip to content
Snippets Groups Projects
Commit 7afa50ba authored by Chris Hines's avatar Chris Hines
Browse files

make v1 desktops work. Add custom juyputer doco

parent ca3826a1
No related branches found
No related tags found
3 merge requests!106if stat fails, display the error instead of immediately refreshing...,!99Dev,!44Dev
Pipeline #9282 passed
......@@ -55,7 +55,7 @@
</mat-list-item>
<mat-divider style="background-color: var(--panel-border-color)"></mat-divider>
<div *ngFor="let job of joblist ; let lastItem = last">
<div *ngIf="job.app !== null && app.name == job.app.name && job.state == 'Finished'">
<div *ngIf="job.app !== null && app.name == job.appname && job.state == 'Finished'">
<app-job [jobdata]=job></app-job>
<mat-divider></mat-divider>
</div>
......
......@@ -112,16 +112,24 @@ export class JoblistComponent implements OnInit {
app = applist[0];
for ( let item of applist) {
sapp = <Strudelapp>item;
let sname = sapp.name.toLowerCase().replace(/\s/g, '');
let jname = name.toLowerCase().replace(/\s/g, '');
idx = sname.indexOf(jname)
//let sname = sapp.name.toLowerCase().replace(/\s/g, '');
//let jname = name.toLowerCase().replace(/\s/g, '');
let sname = sapp.name;
let jname = name;
idx = sname.indexOf(jname);
console.log('sname',sname);
console.log('jname',jname);
if (idx == 0) {
app = item;
console.log('found an app1',jname,sname);
console.log(app.startscript);
return app;
}
if (sapp.applist != null) {
app = this.getApp(name,sapp.applist);
if (app != null) {
console.log('found an app1',jname,sname);
console.log(app.startscript);
return app;
}
}
......
......@@ -70,7 +70,7 @@ export class LaunchDialogComponent implements OnInit {
this.setFocus = false;
this.updateURLs();
this.clearInfo();
this.subscriptions.push(this.appSubject.subscribe(() => { this.app = this.appSubject.value; this.updateURLs() ; this.clearInfo()}));
this.subscriptions.push(this.appSubject.subscribe(() => { this.app = this.appSubject.value; console.log('updated app',this.app); this.updateURLs() ; this.clearInfo()}));
}
configdialog(){
......@@ -201,13 +201,16 @@ export class LaunchDialogComponent implements OnInit {
}
canILaunch() {
console.log('called canIlaunch');
if (this.app == null) {
console.log('setready false');
this.setReady(false);
return
}
if (this.submitcmd.value != null) {
console.log(this.app.url);
if (this.app.url === null || this.appData.value != null ) {
console.log('setready true');
this.setReady(true);
return;
}
......
......@@ -7,9 +7,41 @@ import { Strudelapp } from './strudelapp';
export class StrudelappsService {
constructor() { }
getApp(name: string,applist: any): any {
var idx: number;
var app: any;
var sapp: Strudelapp;
app = applist[0];
for ( let item of applist) {
sapp = <Strudelapp>item;
//let sname = sapp.name.toLowerCase().replace(/\s/g, '');
//let jname = name.toLowerCase().replace(/\s/g, '');
let sname = sapp.name;
let jname = name;
idx = sname.indexOf(jname);
console.log('sname',sname);
console.log('jname',jname);
if (idx == 0) {
app = item;
console.log('found an app1',jname,sname);
console.log(app.startscript);
return app;
}
if (sapp.applist != null) {
app = this.getApp(name,sapp.applist);
if (app != null) {
console.log('found an app1',jname,sname);
console.log(app.startscript);
return app;
}
}
}
return null;
}
// getApp(name: string,applist: Strudelapp[]): Strudelapp {
getApp(name: string,applist: any): any {
/*getApp(name: string,applist: any): any {
var idx: number;
var app: any;
......@@ -32,6 +64,6 @@ export class StrudelappsService {
}
}
return null;
}
}*/
}
......@@ -207,6 +207,7 @@ private addUserHealth(identity,resp) {
}
}
let body = {'app': app, 'appparams': appparams, 'keys': keys, 'ids': JSON.stringify(JSON.stringify(ids))}
console.log('submit body',body);
this.http.post<any>(this.Base+'/submit'+'?'+paramstr, body, options)
.subscribe(resp => { this.notifications.notify(null) },
error => this.submissionError(error));
......
......@@ -132,7 +132,7 @@
}
],
"desc": "this is a description of how to run jupyter with a <a href=https://www.cvl.org.au>link</a>",
"desc": "To run your own installation of jupyter you must first <ul> <li> Install Jupyter </li> <li> Create a file called <code>~/.jupytervenv</code> containg the path where you installed. For example if you have the program <code>/home/user/myenv/bin/jupyter</code>, you would put <code>/home/user/myenv</code> in that file.</li></ul>",
"localbind": true,
"applist": null
},
......
......@@ -103,6 +103,7 @@
}
],
"desc": "To run your own installation of jupyter you must first <ul> <li> Install Jupyter </li> <li> Create a file called <code>~/.jupytervenv</code> containg the path where you installed. For example if you have the program <code>/home/user/myenv/bin/jupyter</code>, you would put <code>/home/user/myenv</code> in that file.</li></ul>",
"localbind": true,
"applist": null
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment