Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
5c114e562b | |||
ae696a0be0 | |||
22d46a5dcc | |||
f3125ff464 |
@ -1,3 +1,10 @@
|
|||||||
|
## [6.14.9](https://git.datacontroller.io/dc/dc/compare/v6.14.8...v6.14.9) (2025-06-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* default DC path for viya ([f3125ff](https://git.datacontroller.io/dc/dc/commit/f3125ff4641e47e33cb203228f5b1014ea3343bc))
|
||||||
|
|
||||||
## [6.14.8](https://git.datacontroller.io/dc/dc/compare/v6.14.7...v6.14.8) (2025-05-28)
|
## [6.14.8](https://git.datacontroller.io/dc/dc/compare/v6.14.7...v6.14.8) (2025-05-28)
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@ import { EventService } from 'src/app/services/event.service'
|
|||||||
import { LoggerService } from 'src/app/services/logger.service'
|
import { LoggerService } from 'src/app/services/logger.service'
|
||||||
import { SasViyaService } from 'src/app/services/sas-viya.service'
|
import { SasViyaService } from 'src/app/services/sas-viya.service'
|
||||||
import { SasService } from 'src/app/services/sas.service'
|
import { SasService } from 'src/app/services/sas.service'
|
||||||
|
import { ViyaApiCurrentUser } from 'src/app/viya-api-explorer/models/viya-api-current-user.model'
|
||||||
import {
|
import {
|
||||||
Item,
|
Item,
|
||||||
ViyaApiIdentities
|
ViyaApiIdentities
|
||||||
@ -48,7 +49,9 @@ export class AutomaticComponent implements OnInit {
|
|||||||
public recreateDatabase: boolean = true
|
public recreateDatabase: boolean = true
|
||||||
public createDatabaseLoading: boolean = false
|
public createDatabaseLoading: boolean = false
|
||||||
public adminGroupsLoading: boolean = false
|
public adminGroupsLoading: boolean = false
|
||||||
|
public currentUserInfoLoading: boolean = false
|
||||||
public adminGroups: { id: string; name: string }[] = []
|
public adminGroups: { id: string; name: string }[] = []
|
||||||
|
public currentUserInfo: ViyaApiCurrentUser | null = null
|
||||||
|
|
||||||
/** autoDeployStatus
|
/** autoDeployStatus
|
||||||
* This object presents the status for two steps that we have for deploy.
|
* This object presents the status for two steps that we have for deploy.
|
||||||
@ -75,6 +78,21 @@ export class AutomaticComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.getAdminGroups()
|
this.getAdminGroups()
|
||||||
|
this.getCurrentUser()
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getCurrentUser() {
|
||||||
|
this.currentUserInfoLoading = true
|
||||||
|
|
||||||
|
this.sasViyaService
|
||||||
|
.getCurrentUser()
|
||||||
|
.subscribe((res: ViyaApiCurrentUser) => {
|
||||||
|
this.currentUserInfoLoading = false
|
||||||
|
|
||||||
|
this.currentUserInfo = res
|
||||||
|
|
||||||
|
this.dcPath = `/export/viya/homes/${res.id}`
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAdminGroups() {
|
public async getAdminGroups() {
|
||||||
|
@ -7,6 +7,7 @@ import { ViyaApis } from '../viya-api-explorer/models/viya-apis.models'
|
|||||||
import { ViyaApiFolderMembers } from '../viya-api-explorer/models/viya-api-folder-content.model'
|
import { ViyaApiFolderMembers } from '../viya-api-explorer/models/viya-api-folder-content.model'
|
||||||
import { ViyaApiFolder } from '../viya-api-explorer/models/viya-api-folder.model'
|
import { ViyaApiFolder } from '../viya-api-explorer/models/viya-api-folder.model'
|
||||||
import { ViyaApiIdentities } from '../viya-api-explorer/models/viya-api-identities.model'
|
import { ViyaApiIdentities } from '../viya-api-explorer/models/viya-api-identities.model'
|
||||||
|
import { ViyaApiCurrentUser } from '../viya-api-explorer/models/viya-api-current-user.model'
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -121,7 +122,7 @@ export class SasViyaService {
|
|||||||
* @returns The folder info object
|
* @returns The folder info object
|
||||||
*/
|
*/
|
||||||
getFolderByPath(path: string): Observable<ViyaApiFolder> {
|
getFolderByPath(path: string): Observable<ViyaApiFolder> {
|
||||||
return this.http.get<any>(
|
return this.http.get<ViyaApiFolder>(
|
||||||
`${this.serverUrl}/folders/folders/@item?path=${path}`,
|
`${this.serverUrl}/folders/folders/@item?path=${path}`,
|
||||||
{
|
{
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
@ -130,7 +131,7 @@ export class SasViyaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFolderMembers(folderId: string): Observable<ViyaApiFolderMembers> {
|
getFolderMembers(folderId: string): Observable<ViyaApiFolderMembers> {
|
||||||
return this.http.get<any>(
|
return this.http.get<ViyaApiFolderMembers>(
|
||||||
`${this.serverUrl}/folders/folders/${folderId}/members`,
|
`${this.serverUrl}/folders/folders/${folderId}/members`,
|
||||||
{
|
{
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
@ -139,11 +140,20 @@ export class SasViyaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAdminGroups(limit: number = 5000): Observable<ViyaApiIdentities> {
|
getAdminGroups(limit: number = 5000): Observable<ViyaApiIdentities> {
|
||||||
return this.http.get<any>(
|
return this.http.get<ViyaApiIdentities>(
|
||||||
`${this.serverUrl}/identities/groups?sortBy=name&limit=${limit}`,
|
`${this.serverUrl}/identities/groups?sortBy=name&limit=${limit}`,
|
||||||
{
|
{
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCurrentUser(): Observable<ViyaApiCurrentUser> {
|
||||||
|
return this.http.get<ViyaApiCurrentUser>(
|
||||||
|
`${this.serverUrl}/identities/users/@currentUser`,
|
||||||
|
{
|
||||||
|
withCredentials: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
export interface ViyaApiCurrentUser {
|
||||||
|
creationTimeStamp: string
|
||||||
|
modifiedTimeStamp: string
|
||||||
|
id: string
|
||||||
|
type: string
|
||||||
|
name: string
|
||||||
|
links: Link[]
|
||||||
|
version: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Link {
|
||||||
|
method: string
|
||||||
|
rel: string
|
||||||
|
href: string
|
||||||
|
uri: string
|
||||||
|
type: string
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dcfrontend",
|
"name": "dcfrontend",
|
||||||
"version": "6.14.8",
|
"version": "6.14.9",
|
||||||
"description": "Data Controller",
|
"description": "Data Controller",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||||
|
Reference in New Issue
Block a user