-
+
The Demo version of Data Controller is free for EVALUATION purposes
only. Before proceeding with configuration, please confirm that you
have read, understood, and agreed to the
diff --git a/client/src/app/deploy/sections/automatic/automatic.component.html b/client/src/app/deploy/sections/automatic/automatic.component.html
index 28e6555..7b9a96b 100644
--- a/client/src/app/deploy/sections/automatic/automatic.component.html
+++ b/client/src/app/deploy/sections/automatic/automatic.component.html
@@ -55,7 +55,7 @@
class="deploy-error"
shape="times-circle"
>
- LAUNCH / CONFIGURE
+ LAUNCH
SAS Admin group
diff --git a/client/src/app/deploy/sections/automatic/automatic.component.ts b/client/src/app/deploy/sections/automatic/automatic.component.ts
index 497c7d0..7e1329f 100644
--- a/client/src/app/deploy/sections/automatic/automatic.component.ts
+++ b/client/src/app/deploy/sections/automatic/automatic.component.ts
@@ -11,7 +11,9 @@ import { DcAdapterSettings } from 'src/app/models/DcAdapterSettings'
import { DeployService } from 'src/app/services/deploy.service'
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'
@Component({
selector: 'app-automatic-deploy',
@@ -42,6 +44,8 @@ export class AutomaticComponent implements OnInit {
*/
public recreateDatabase: boolean = true
public createDatabaseLoading: boolean = false
+ public adminGroupsLoading: boolean = false
+ public adminGroups: {id: string, name: string}[] = []
/** autoDeployStatus
* This object presents the status for two steps that we have for deploy.
@@ -62,10 +66,37 @@ export class AutomaticComponent implements OnInit {
private eventService: EventService,
private deployService: DeployService,
private sasService: SasService,
+ private sasViyaService: SasViyaService,
private loggerService: LoggerService
) {}
- ngOnInit(): void {}
+ ngOnInit(): void {
+ this.getAdminGroups()
+ }
+
+ 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.adminGroupsLoading = false
+ this.loggerService.error('Error while getting admin groups', err)
+ this.eventService.showAbortModal(
+ 'admin groups',
+ err
+ )
+ })
+ }
/**
* Executes sas.json file to deploy the backend
@@ -169,6 +200,7 @@ export class AutomaticComponent implements OnInit {
}
})
.catch((err: any) => {
+ this.eventService.showAbortModal('makedata', err)
this.autoDeployStatus.runMakeData = false
this.autodeployDone = true
diff --git a/client/src/app/services/sas-viya.service.ts b/client/src/app/services/sas-viya.service.ts
index ae81dd0..c81e1e4 100644
--- a/client/src/app/services/sas-viya.service.ts
+++ b/client/src/app/services/sas-viya.service.ts
@@ -6,6 +6,7 @@ import { AppStoreService } from './app-store.service'
import { ViyaApis } from '../viya-api-explorer/models/viya-apis.models'
import { ViyaApiFolderMembers } from '../viya-api-explorer/models/viya-api-folder-content.model'
import { ViyaApiFolder } from '../viya-api-explorer/models/viya-api-folder.model'
+import { ViyaApiIdentities } from '../viya-api-explorer/models/viya-api-identities.model'
@Injectable({
providedIn: 'root'
@@ -128,4 +129,13 @@ export class SasViyaService {
}
)
}
+
+ getAdminGroups(limit: number = 5000): Observable {
+ return this.http.get(
+ `${this.serverUrl}/identities/groups?sortBy=name&limit=${limit}`,
+ {
+ withCredentials: true
+ }
+ )
+ }
}
diff --git a/client/src/app/viya-api-explorer/models/viya-api-identities.model.ts b/client/src/app/viya-api-explorer/models/viya-api-identities.model.ts
new file mode 100644
index 0000000..943d2c3
--- /dev/null
+++ b/client/src/app/viya-api-explorer/models/viya-api-identities.model.ts
@@ -0,0 +1,41 @@
+export interface ViyaApiIdentities {
+ 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;
+}
+
+export interface Link2 {
+ 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;
+}
\ No newline at end of file