Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hpc-team
strudelv2_spa
Commits
77fcb25e
Commit
77fcb25e
authored
May 20, 2021
by
Chris Hines
Browse files
Merge branch 'dev' into 'test'
Dev See merge request
!97
parents
fdd469a6
86c0d2f5
Pipeline
#18878
passed with stages
in 8 minutes and 30 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
main.ts
View file @
77fcb25e
...
...
@@ -19,6 +19,8 @@ try {
console
.
log
(
`please create a config file at
${
configPath
}
`
)
}
let
testconfig
=
YAML
.
parse
(
fs
.
readFileSync
(
path
.
join
(
__dirname
,
'
resources
'
,
'
testConfig.yml
'
)).
toString
());
console
.
log
(
testconfig
);
//let config = YAML.parse(fs.readFileSync(path.join(__dirname,'localConfig.yml')).toString())
//var aafds: string = "https://ds.aaf.edu.au/discovery/aaf/9DrjGhkyXjXsPm45rqpCXA?entityID=https%3A%2F%2Fcentral.aaf.edu.au%2Fshibboleth&return=https%3A%2F%2Fcentral.aaf.edu.au%2FShibboleth.sso%2FLogin%3FSAMLDS%3D1%26identity%3D1%26target%3Dhttps%253A%252F%252Fcentral.aaf.edu.au%252Fresolvers%252Fsaml_federation%252Freceive%253Fibr%253D19a58192-de47-4580-a272-cc61c60e4f47%2526pib%253D0a206a4e-e6eb-4d18-b46d-e475ec8d09b5"
function
createWindow
():
BrowserWindow
{
...
...
package.json
View file @
77fcb25e
...
...
@@ -29,7 +29,7 @@
"build"
:
"npm run electron:serve-tsc && ng build --base-href ./"
,
"build:dev"
:
"npm run build -- -c dev"
,
"build:prod"
:
"npm run build -- -c production"
,
"ng:serve"
:
"ng serve
-c web -o
"
,
"ng:serve"
:
"ng serve "
,
"electron:serve-tsc"
:
"tsc -p tsconfig.serve.json"
,
"electron:serve"
:
"wait-on tcp:4200 && npm run electron:serve-tsc && npx electron . --serve"
,
"electron:local"
:
"npm run build:prod && npx electron ."
,
...
...
@@ -118,19 +118,12 @@
"chrome 83"
],
"build"
:
{
"extraResources"
:
[
{
"from"
:
"./resources/"
,
"to"
:
""
,
"filter"
:
[
"**/*"
]
}
],
"files"
:
[
"main.js"
,
"./dist/**/*"
,
"./public/electron.js"
"./public/electron.js"
,
"./resources/testConfig.yml"
]
}
}
src/app/authorisation.service.ts
View file @
77fcb25e
...
...
@@ -230,7 +230,7 @@ public getKeys(id?: Identity) {
this
.
notifications
.
notify
(
""
);
this
.
agentContents
.
next
(
resp
)
}),
catchError
((
e
)
=>
{
console
.
error
(
'
updateA
G
entContents error
'
,
e
)
;
return
of
([])})
catchError
((
e
)
=>
{
console
.
error
(
'
updateA
g
entContents error
'
,
e
)
;
return
of
([])})
//tap((_) => this.notifications.notify(""))
)
return
agentpipe$
...
...
src/app/computesites.service.ts
View file @
77fcb25e
...
...
@@ -57,7 +57,12 @@ export class ComputesitesService {
getStrudelAppsIdentity
(
identity
:
Identity
):
Observable
<
Strudelapp
[]
>
{
let
uri$
=
this
.
getStrudelAppsUri
(
identity
.
site
.
appCatalogUri
);
let
cmd$
=
this
.
getStrudelAppsCmd
(
identity
);
return
combineLatest
([
uri$
,
cmd$
]).
pipe
(
map
(([
uri
,
cmd
])
=>
(
uri
.
concat
(
cmd
))))
return
combineLatest
([
uri$
,
cmd$
]).
pipe
(
tap
(
([
uri
,
cmd
])
=>
console
.
log
(
'
getStrudelAppsIdentity
'
,
uri
,
cmd
)),
map
(([
uri
,
cmd
])
=>
(
uri
.
concat
(
cmd
))),
tap
((
v
)
=>
console
.
log
(
'
getStrudelAppsIdentity concat
'
,
v
))
)
}
...
...
@@ -82,7 +87,7 @@ export class ComputesitesService {
}
private
getStrudelAppsCmd
(
identity
:
Identity
):
Observable
<
Strudelapp
[]
>
{
console
.
log
(
'
running getStrud
l
eAppsCmd
'
,
identity
)
console
.
log
(
'
running getStrude
l
AppsCmd
'
,
identity
)
if
(
identity
.
site
.
appCatalogCmd
!=
null
)
{
return
(
this
.
tesService
.
runCommand
(
identity
,
identity
.
site
.
appCatalogCmd
)
as
Observable
<
Strudelapp
[]
>
)
.
pipe
(
...
...
@@ -93,36 +98,16 @@ export class ComputesitesService {
}
storeLocalStrudelApps
(
name
:
string
,
apps
:
any
)
{
localStorage
.
setItem
(
name
+
'
-apps
'
,
JSON
.
stringify
(
apps
))
}
removeLocalStrudelApps
()
{
var
keys
=
[];
for
(
var
key
in
localStorage
)
{
var
idx
=
key
.
indexOf
(
'
-apps
'
);
if
(
idx
!==
-
1
)
{
keys
.
push
(
key
)
}
}
for
(
var
key
in
keys
)
{
localStorage
.
removeItem
(
key
);
}
}
updateStrudelApps
(
id
:
Identity
,
apps
)
{
var
sapps
:
Strudelapp
[];
var
localapps
:
Strudelapp
[];
var
currentApps
:
Strudelapp
[];
sapps
=
<
Strudelapp
[]
>
apps
;
currentApps
=
id
.
appCatalog
.
value
;
console
.
log
(
'
updateStrudelApps
'
,
currentApps
);
localapps
=
JSON
.
parse
(
localStorage
.
getItem
(
id
.
site
.
name
+
'
-apps
'
))
if
(
localapps
!==
null
)
{
for
(
let
a
of
localapps
)
{
sapps
.
push
(
a
);
}
}
id
.
appCatalog
.
next
(
sapps
);
id
.
appCatalog
.
next
(
currentApps
.
concat
(
sapps
));
}
private
handleError
<
T
>
(
operation
=
'
operation
'
,
result
?:
T
)
{
...
...
@@ -208,7 +193,7 @@ export class ComputesitesService {
if
(
principal
!=
null
)
{
let
id
=
new
Identity
(
principal
,
cs
,
certs
[
i
].
expiry
);
identities
.
push
(
id
);
if
(
cs
.
appCatalogUri
!=
null
||
cs
.
appCatalogCmd
!=
null
)
{
if
(
cs
.
appCatalogUri
!=
=
null
||
cs
.
appCatalogCmd
!=
=
null
||
cs
.
appCatalog
!==
null
)
{
appidentities
.
push
(
id
);
}
if
(
cs
.
dtn
!=
null
)
{
...
...
src/app/identity.ts
View file @
77fcb25e
...
...
@@ -22,7 +22,12 @@ export class Identity {
this
.
systemalerts
=
new
BehaviorSubject
<
Health
[]
>
(
null
);
this
.
accountalerts
=
new
BehaviorSubject
<
Health
[]
>
(
null
);
this
.
joblist
=
new
BehaviorSubject
<
Job
[]
>
([]);
this
.
appCatalog
=
new
BehaviorSubject
<
Strudelapp
[]
>
([]);
if
(
site
!==
null
)
{
console
.
log
(
'
creating a site with appCatalog
'
,
site
.
appCatalog
);
this
.
appCatalog
=
new
BehaviorSubject
<
Strudelapp
[]
>
(
site
.
appCatalog
);
}
else
{
this
.
appCatalog
=
new
BehaviorSubject
<
Strudelapp
[]
>
([]);
}
this
.
quotas
=
[];
this
.
expiry
=
expiry
;
...
...
src/app/settings/settings.component.ts
View file @
77fcb25e
...
...
@@ -54,10 +54,8 @@ export class SettingsComponent implements OnInit {
this
.
config
=
JSON
.
parse
(
e
.
target
.
result
);
if
(
'
computesites
'
in
this
.
config
)
{
this
.
computeSitesService
.
storeLocalComputeSites
(
this
.
config
[
'
computesites
'
])
}
if
(
'
apps
'
in
this
.
config
)
{
this
.
computeSitesService
.
storeLocalStrudelApps
(
this
.
config
[
'
sitename
'
],
this
.
config
[
'
apps
'
]);
this
.
computeSitesService
.
storeLocalComputeSites
(
this
.
config
[
'
computesites
'
]);
console
.
log
(
'
saving compute site
'
,
this
.
config
[
'
computesites
'
]);
}
if
(
'
authz
'
in
this
.
config
)
{
this
.
authService
.
storeLocalAuthZ
(
this
.
config
[
'
authz
'
])
...
...
@@ -71,7 +69,6 @@ export class SettingsComponent implements OnInit {
resetConfig
()
{
this
.
computeSitesService
.
removeLocalStrudelApps
();
this
.
computeSitesService
.
removeLocalComputeSites
();
this
.
authService
.
removeLocalAuthZ
()
}
...
...
src/assets/config/computesites.training_cloud_cvl_org_au.json
View file @
77fcb25e
[
{
"url"
:
"https://beta-api.cloud.cvl.org.au/training/"
,
"name"
:
"Training@
CVL@UWA
"
,
"host"
:
"
146.118.65.246
"
,
"dtn"
:
"
146.118.65.242
"
,
"name"
:
"Training@
M3
"
,
"host"
:
"
m3.massive.org.au
"
,
"dtn"
:
"
m3-dtn1.massive.org.au
"
,
"cafingerprint"
:
"ECDSA SHA256:6wVXdokvvlTNcXPMc9KyvIXA8a8XNfLuhBfNOYeeMdg"
,
"appCatalog"
:
[],
"appCatalogCmd"
:
"/home/strudel2/bin/getapps-training"
,
"cancelcmd"
:
"/home/strudel2/bin/s2cancel {jobid}"
,
"statcmd"
:
"/home/strudel2/bin/s2stat"
,
"userhealth"
:
"/home/strudel2/bin/uitraining"
,
"cacheturis"
:
[],
"contact"
:
"<CVL@UWA Support> help@massive.org.au"
"appCatalogCmd"
:
"/usr/local/strudel2_cluster/latest/bin/getapps"
,
"cancelcmd"
:
"/usr/local/strudel2_cluster/latest/bin/s2cancel {jobid}"
,
"statcmd"
:
"/usr/local/strudel2_cluster/latest/bin/s2stat"
,
"cacheturis"
:
[
"/assets/config/incidents.json"
],
"userhealth"
:
"/usr/local/clusterinfo/0.0.6/bin/uijson"
}
]
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