style: lint
This commit is contained in:
@@ -106,8 +106,15 @@
|
||||
<label for="dcloc" class="mt-20 clr-control-label">SAS Admin group</label>
|
||||
<div class="mb-10 clr-control-container">
|
||||
<div class="clr-input-wrapper">
|
||||
<select *ngIf="!adminGroupsLoading" clrSelect name="options" [(ngModel)]="selectedAdminGroup">
|
||||
<option *ngFor="let adminGroup of adminGroups" [value]="adminGroup.id">{{adminGroup.name}}</option>
|
||||
<select
|
||||
*ngIf="!adminGroupsLoading"
|
||||
clrSelect
|
||||
name="options"
|
||||
[(ngModel)]="selectedAdminGroup"
|
||||
>
|
||||
<option *ngFor="let adminGroup of adminGroups" [value]="adminGroup.id">
|
||||
{{ adminGroup.name }}
|
||||
</option>
|
||||
</select>
|
||||
<clr-spinner
|
||||
clrInline
|
||||
|
||||
@@ -13,7 +13,10 @@ import { EventService } from 'src/app/services/event.service'
|
||||
import { LoggerService } from 'src/app/services/logger.service'
|
||||
import { SasViyaService } from 'src/app/services/sas-viya.service'
|
||||
import { SasService } from 'src/app/services/sas.service'
|
||||
import { Item, ViyaApiIdentities } from 'src/app/viya-api-explorer/models/viya-api-identities.model'
|
||||
import {
|
||||
Item,
|
||||
ViyaApiIdentities
|
||||
} from 'src/app/viya-api-explorer/models/viya-api-identities.model'
|
||||
|
||||
@Component({
|
||||
selector: 'app-automatic-deploy',
|
||||
@@ -45,7 +48,7 @@ export class AutomaticComponent implements OnInit {
|
||||
public recreateDatabase: boolean = true
|
||||
public createDatabaseLoading: boolean = false
|
||||
public adminGroupsLoading: boolean = false
|
||||
public adminGroups: {id: string, name: string}[] = []
|
||||
public adminGroups: { id: string; name: string }[] = []
|
||||
|
||||
/** autoDeployStatus
|
||||
* This object presents the status for two steps that we have for deploy.
|
||||
@@ -77,25 +80,21 @@ export class AutomaticComponent implements OnInit {
|
||||
public async getAdminGroups() {
|
||||
this.adminGroupsLoading = true
|
||||
|
||||
this.sasViyaService.getAdminGroups().subscribe(
|
||||
(res: ViyaApiIdentities) => {
|
||||
this.adminGroupsLoading = false
|
||||
// Map admin groups with only needed fields
|
||||
this.adminGroups = res.items.map((item: Item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
}
|
||||
), ((err: any) => {
|
||||
this.sasViyaService.getAdminGroups().subscribe((res: ViyaApiIdentities) => {
|
||||
this.adminGroupsLoading = false
|
||||
this.loggerService.error('Error while getting admin groups', err)
|
||||
this.eventService.showAbortModal(
|
||||
'admin groups',
|
||||
err
|
||||
)
|
||||
})
|
||||
// Map admin groups with only needed fields
|
||||
this.adminGroups = res.items.map((item: Item) => {
|
||||
return {
|
||||
id: item.id,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
}),
|
||||
(err: any) => {
|
||||
this.adminGroupsLoading = false
|
||||
this.loggerService.error('Error while getting admin groups', err)
|
||||
this.eventService.showAbortModal('admin groups', err)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
export interface ViyaApiIdentities {
|
||||
links: Link[];
|
||||
name: string;
|
||||
accept: string;
|
||||
start: number;
|
||||
count: number;
|
||||
items: Item[];
|
||||
limit: number;
|
||||
version: number;
|
||||
links: Link[]
|
||||
name: string
|
||||
accept: string
|
||||
start: number
|
||||
count: number
|
||||
items: Item[]
|
||||
limit: number
|
||||
version: number
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
creationTimeStamp: string;
|
||||
modifiedTimeStamp: string;
|
||||
links: Link2[];
|
||||
version: number;
|
||||
id: string;
|
||||
name: string;
|
||||
providerId: string;
|
||||
type: string;
|
||||
scimId: string;
|
||||
description?: string;
|
||||
state: string;
|
||||
creationTimeStamp: string
|
||||
modifiedTimeStamp: string
|
||||
links: Link2[]
|
||||
version: number
|
||||
id: string
|
||||
name: string
|
||||
providerId: string
|
||||
type: string
|
||||
scimId: string
|
||||
description?: string
|
||||
state: string
|
||||
}
|
||||
|
||||
export interface Link2 {
|
||||
method: string;
|
||||
rel: string;
|
||||
href: string;
|
||||
uri: string;
|
||||
type?: string;
|
||||
method: string
|
||||
rel: string
|
||||
href: string
|
||||
uri: string
|
||||
type?: string
|
||||
}
|
||||
|
||||
export interface Link {
|
||||
method: string;
|
||||
rel: string;
|
||||
href: string;
|
||||
uri: string;
|
||||
type: string;
|
||||
itemType: string;
|
||||
}
|
||||
method: string
|
||||
rel: string
|
||||
href: string
|
||||
uri: string
|
||||
type: string
|
||||
itemType: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user