4 Commits

Author SHA1 Message Date
5c114e562b chore(release): 6.14.9 [skip ci]
## [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](f3125ff464))
2025-06-02 10:36:05 +00:00
ae696a0be0 Merge pull request 'Viya default DC Path by user name' (#162) from viya-smooth-deploy into main
All checks were successful
Release / Build-production-and-ng-test (push) Successful in 3m56s
Release / Build-and-test-development (push) Successful in 8m33s
Release / release (push) Successful in 8m22s
Reviewed-on: #162
2025-06-02 10:19:51 +00:00
22d46a5dcc style: lint
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 4m8s
Build / Build-and-test-development (pull_request) Successful in 8m34s
2025-06-02 11:24:30 +02:00
f3125ff464 fix: default DC path for viya 2025-06-02 11:24:18 +02:00
5 changed files with 56 additions and 4 deletions

View File

@ -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)

View File

@ -13,6 +13,7 @@ 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 { ViyaApiCurrentUser } from 'src/app/viya-api-explorer/models/viya-api-current-user.model'
import {
Item,
ViyaApiIdentities
@ -48,7 +49,9 @@ export class AutomaticComponent implements OnInit {
public recreateDatabase: boolean = true
public createDatabaseLoading: boolean = false
public adminGroupsLoading: boolean = false
public currentUserInfoLoading: boolean = false
public adminGroups: { id: string; name: string }[] = []
public currentUserInfo: ViyaApiCurrentUser | null = null
/** autoDeployStatus
* This object presents the status for two steps that we have for deploy.
@ -75,6 +78,21 @@ export class AutomaticComponent implements OnInit {
ngOnInit(): void {
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() {

View File

@ -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 { ViyaApiFolder } from '../viya-api-explorer/models/viya-api-folder.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({
providedIn: 'root'
@ -121,7 +122,7 @@ export class SasViyaService {
* @returns The folder info object
*/
getFolderByPath(path: string): Observable<ViyaApiFolder> {
return this.http.get<any>(
return this.http.get<ViyaApiFolder>(
`${this.serverUrl}/folders/folders/@item?path=${path}`,
{
withCredentials: true
@ -130,7 +131,7 @@ export class SasViyaService {
}
getFolderMembers(folderId: string): Observable<ViyaApiFolderMembers> {
return this.http.get<any>(
return this.http.get<ViyaApiFolderMembers>(
`${this.serverUrl}/folders/folders/${folderId}/members`,
{
withCredentials: true
@ -139,11 +140,20 @@ export class SasViyaService {
}
getAdminGroups(limit: number = 5000): Observable<ViyaApiIdentities> {
return this.http.get<any>(
return this.http.get<ViyaApiIdentities>(
`${this.serverUrl}/identities/groups?sortBy=name&limit=${limit}`,
{
withCredentials: true
}
)
}
getCurrentUser(): Observable<ViyaApiCurrentUser> {
return this.http.get<ViyaApiCurrentUser>(
`${this.serverUrl}/identities/users/@currentUser`,
{
withCredentials: true
}
)
}
}

View File

@ -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
}

View File

@ -1,6 +1,6 @@
{
"name": "dcfrontend",
"version": "6.14.8",
"version": "6.14.9",
"description": "Data Controller",
"devDependencies": {
"@saithodev/semantic-release-gitea": "^2.1.0",