diff --git a/src/app/service/service.component.html b/src/app/service/service.component.html index 7c3fd7930803450f9d85ca88d73850ee7ba431a4..448c9e2295d11e6223fced62d87278acfe55b9cd 100644 --- a/src/app/service/service.component.html +++ b/src/app/service/service.component.html @@ -3,17 +3,12 @@ {{ service.name }} {{ service.description }} - +
- - - - - - + + + @@ -24,72 +19,51 @@ {{ site.name }} - - - -
SitesSSH Key Deployments
- {{key.name}} - SiteState
- - - - - - - - - - - - - - - - - call_received - - + + + call_made + warning + + + call_received + error + error + call_received +
- - - +
- - lock outline - {{ group.name }} - + + + + + + +
-
- - - SSH keys to deploy: - - - {{ key.name }} - - - - - Please upload an SSH Key to use this service: - - - +
+ + You did not request access to this service. + + + You requested access to this service. + + + You never requested access to this service. + +
+
+ + + +
diff --git a/src/app/service/service.component.ts b/src/app/service/service.component.ts index 9c3d4431e18da47cc3ae56438b49affa0289a1f9..23abdcf68ea3728f1934cf726113e4f01087a789 100644 --- a/src/app/service/service.component.ts +++ b/src/app/service/service.component.ts @@ -27,49 +27,20 @@ export class ServiceComponent implements OnInit { ngOnInit() { } - public isDeployed(key: t.SSHKeyRef): boolean { - /* TODO + public stateItem(site: t.Site): t.DeploymentStateItem | undefined { if (this.deployment) { - return this.deployment.ssh_keys.some(k => { - return k.id === key.id; - }); - } - */ - return false; - } - - public taskItem(site: t.Site, key: t.SSHKeyRef): t.DeploymentStateItem { - if (this.deployment) { - const deploymentState = null; - /* - const deploymentState = this.deployment.states.find( - state => { - return state.key.id === key.id + return this.deployment.state_items.find( + item => { + return item.site.id === site.id } ); - */ - if (deploymentState) { - return deploymentState.state_items.find( - item => { - return item.site.id === site.id - } - ); - } - } - } - - public taskState(site: t.Site, key: t.SSHKeyRef): string { - let item = this.taskItem(site, key); - if (item) { - return item.state; } - return ""; + return undefined; } - public changeDeployment(key: t.SSHKeyRef, action: string) { + public changeDeployment(action: string) { const body = { 'type': action, - 'key': key.id, 'service': this.service.id, }; return this.http.post('/backend/api/deployments', body).subscribe( @@ -83,13 +54,4 @@ export class ServiceComponent implements OnInit { } ); } - - - public deploymentChange(key: t.SSHKeyRef) { - if (!this.isDeployed(key)) { - this.changeDeployment(key, 'add'); - } else { - this.changeDeployment(key, 'remove'); - } - } } diff --git a/src/app/vo/vo.component.html b/src/app/vo/vo.component.html index 1eaf79d02d22f5596c55b129c6f908841fca9023..26e55cf80b6be585d38eeda7b1df1fc7865cbe12 100644 --- a/src/app/vo/vo.component.html +++ b/src/app/vo/vo.component.html @@ -8,65 +8,60 @@

- These services are provided for members of this VO. You can inspect credentials by clicking on the arrows. + These services are provided for members of this VO.

- - + + - - - - - - + + + + + + + +
Site ServiceStateState
- - account_balance - {{ item.site.name }} - - - - web - {{ item.service.name }} - - - - call_made - warning - - - call_received - error - error - call_received - - - - - - -
+ + account_balance + {{ site.name }} + + + + web + {{ service.name }} + + + + call_made + warning + + + call_received + error + error + call_received + + + + + + + + +

- Currently, no services need membership of this VO. You can select keys for this VO anyway. We will deploy them to new services, that need - membership of this VO. + Currently, no services need membership of this VO. You can request a deployment anyway. We will deploy them to new services of this VO.

@@ -80,13 +75,13 @@
diff --git a/src/app/vo/vo.component.ts b/src/app/vo/vo.component.ts index 8b348698c06d9177149184e63509d9da36a765d7..a6fc920e52156c01782596c0ee7d14a85d1ba303 100644 --- a/src/app/vo/vo.component.ts +++ b/src/app/vo/vo.component.ts @@ -30,16 +30,25 @@ export class VoComponent implements OnInit { } public sites(): t.Site[] { - return this.userService.getServices(this.group).map( + let sites: Map = new Map(); + let ss:t.Site[] = []; + + this.userService.getServices(this.group).map( (s: t.Service) => { - if (s.site.length == 1) { - return s.site[0]; - } else { - console.log("Group service is provided by more than one site!") - return undefined - } + s.site.forEach( + site => { + sites.set(site.id, site); + } + ); + } + ); + + sites.forEach( + site => { + ss.push(site); } ); + return ss; } public servicesBySite(site: t.Site): t.Service[] { @@ -64,7 +73,7 @@ export class VoComponent implements OnInit { return this.userService.getServices(this.group); } - public stateItem(service: t.Service, site: t.Site): t.DeploymentStateItem | undefined { + public stateItem(site: t.Site, service: t.Service): t.DeploymentStateItem | undefined { if (!this.deploymentMapped()) { return undefined; }