Compare commits
21 Commits
css-refact
...
v6.15.0
Author | SHA1 | Date | |
---|---|---|---|
d9cff42f5c | |||
2a3d2b8d0d | |||
d0f453d291 | |||
8e65dd0eae | |||
da4d0b28c7 | |||
6c96ef7fb0 | |||
997f09adde | |||
0e8503ed2b | |||
97dfcd79b1 | |||
9a12a2e41f | |||
5c114e562b | |||
ae696a0be0 | |||
22d46a5dcc | |||
f3125ff464 | |||
9682b548e6 | |||
ec11a74265 | |||
4be0614604 | |||
27cbff2bc5 | |||
c41c8963f2 | |||
7249d4fa29 | |||
7c5e47f5e4 |
40
CHANGELOG.md
40
CHANGELOG.md
@ -1,3 +1,43 @@
|
|||||||
|
# [6.15.0](https://git.datacontroller.io/dc/dc/compare/v6.14.10...v6.15.0) (2025-06-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* makedata with context name ([da4d0b2](https://git.datacontroller.io/dc/dc/commit/da4d0b28c7109afd6f96455e1e0e80a40d25a942))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* viya deploy context ([6c96ef7](https://git.datacontroller.io/dc/dc/commit/6c96ef7fb0a55754a84ff0a8bbab838b78c1acaf))
|
||||||
|
|
||||||
|
## [6.14.10](https://git.datacontroller.io/dc/dc/compare/v6.14.9...v6.14.10) (2025-06-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* bump core ([0e8503e](https://git.datacontroller.io/dc/dc/commit/0e8503ed2bb22a0fc3924ac929e7f19626772e0a))
|
||||||
|
* default to home directory for SAS Drive in Viya ([9682b54](https://git.datacontroller.io/dc/dc/commit/9682b548e6106d99d97dcc023a35d93addfd5170))
|
||||||
|
|
||||||
|
## [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)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* CSP issues, clarity local library build, fixed some style issues ([841201a](https://git.datacontroller.io/dc/dc/commit/841201adab582149b1cca3a42e75f7cac75167f9))
|
||||||
|
* deploy page, makedata error handling, added local build of clarity, to address clr-stack-view CSP issues (inline styles) ([7b5e7ae](https://git.datacontroller.io/dc/dc/commit/7b5e7ae18414152f9b9d8f2d94fc94de43152003))
|
||||||
|
* improved deploy flow for Viya ([9604661](https://git.datacontroller.io/dc/dc/commit/9604661f3b76111387bc9474cc26348d73ab112e))
|
||||||
|
* requests modal causing VIYA CSP errors ([1dc6934](https://git.datacontroller.io/dc/dc/commit/1dc69341cadb837e1f11624d5cf35788bbb98d96))
|
||||||
|
* sas viya service init timing issue ([9de04e9](https://git.datacontroller.io/dc/dc/commit/9de04e9a0ce016e1a9fb8b19c656077079ddcf2f))
|
||||||
|
* scss of components transferred to the global styles.scss so we do not cause CSP (inline styles) issues when streaming to Viya ([6c171a6](https://git.datacontroller.io/dc/dc/commit/6c171a6394aba8104fe0f50aa8a4e6b9fa8023a2))
|
||||||
|
* viya deploy page improved flow ([4bd2154](https://git.datacontroller.io/dc/dc/commit/4bd215491f8cdc68f78bade68e7cb98e07edc81e))
|
||||||
|
|
||||||
## [6.14.7](https://git.datacontroller.io/dc/dc/compare/v6.14.6...v6.14.7) (2025-05-08)
|
## [6.14.7](https://git.datacontroller.io/dc/dc/compare/v6.14.6...v6.14.7) (2025-05-08)
|
||||||
|
|
||||||
|
|
||||||
|
@ -98,14 +98,14 @@
|
|||||||
|
|
||||||
<label for="dcloc" class="mt-20 clr-control-label">DC Loc</label>
|
<label for="dcloc" class="mt-20 clr-control-label">DC Loc</label>
|
||||||
<div class="mb-10 clr-control-container dc-loc-input-wrapper">
|
<div class="mb-10 clr-control-container dc-loc-input-wrapper">
|
||||||
<div class="clr-input-wrapper">
|
<div class="clr-input-wrapper small-mt">
|
||||||
<input clrInput name="dcloc" [(ngModel)]="dcPath" />
|
<input clrInput name="dcloc" [(ngModel)]="dcPath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label for="dcloc" class="mt-20 clr-control-label">SAS Admin group</label>
|
<label for="dcloc" class="mt-20 clr-control-label">SAS Admin group</label>
|
||||||
<div class="mb-10 clr-control-container">
|
<div class="mb-10 clr-control-container">
|
||||||
<div class="clr-input-wrapper">
|
<div class="clr-input-wrapper small-mt">
|
||||||
<select
|
<select
|
||||||
*ngIf="!adminGroupsLoading"
|
*ngIf="!adminGroupsLoading"
|
||||||
clrSelect
|
clrSelect
|
||||||
@ -124,6 +124,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label for="computeContext" class="mt-20 clr-control-label"
|
||||||
|
>Compute Context</label
|
||||||
|
>
|
||||||
|
<div class="mb-10 clr-control-container">
|
||||||
|
<div class="clr-input-wrapper small-mt">
|
||||||
|
<select
|
||||||
|
*ngIf="!computeContextsLoading"
|
||||||
|
clrSelect
|
||||||
|
name="options"
|
||||||
|
(ngModelChange)="onComputeContextChange($event)"
|
||||||
|
[(ngModel)]="selectedComputeContext"
|
||||||
|
>
|
||||||
|
<option
|
||||||
|
*ngFor="let computeContext of computeContexts"
|
||||||
|
[value]="computeContext.id"
|
||||||
|
>
|
||||||
|
{{ computeContext.name }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
<clr-spinner
|
||||||
|
clrInline
|
||||||
|
class="spinner-sm"
|
||||||
|
*ngIf="computeContextsLoading"
|
||||||
|
></clr-spinner>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ng-container *ngIf="runningAsUser">
|
||||||
|
<label for="dcloc" class="mt-20 clr-control-label">Running as user:</label>
|
||||||
|
<div class="mb-10 clr-control-container">
|
||||||
|
<div class="clr-input-wrapper">
|
||||||
|
<p class="mt-0">{{ runningAsUser }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
|
|
||||||
<!-- Keeping this for a reference in case future VIYA changes and starts allowing separate backend and frontend) -->
|
<!-- Keeping this for a reference in case future VIYA changes and starts allowing separate backend and frontend) -->
|
||||||
|
|
||||||
<!-- <clr-checkbox-wrapper>
|
<!-- <clr-checkbox-wrapper>
|
||||||
|
@ -13,10 +13,16 @@ 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
|
||||||
} from 'src/app/viya-api-explorer/models/viya-api-identities.model'
|
} from 'src/app/viya-api-explorer/models/viya-api-identities.model'
|
||||||
|
import { ComputeContextDetails } from 'src/app/viya-api-explorer/models/viya-compute-context-details.model'
|
||||||
|
import {
|
||||||
|
ViyaComputeContexts,
|
||||||
|
Item as ComputeContextItem
|
||||||
|
} from 'src/app/viya-api-explorer/models/viya-compute-contexts.model'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-automatic-deploy',
|
selector: 'app-automatic-deploy',
|
||||||
@ -34,6 +40,7 @@ export class AutomaticComponent implements OnInit {
|
|||||||
|
|
||||||
@Output() onNavigateToHome: EventEmitter<any> = new EventEmitter<any>()
|
@Output() onNavigateToHome: EventEmitter<any> = new EventEmitter<any>()
|
||||||
|
|
||||||
|
public selectedComputeContext: string = ''
|
||||||
public makeDataResponse: string = ''
|
public makeDataResponse: string = ''
|
||||||
public jsonFile: any = null
|
public jsonFile: any = null
|
||||||
public autodeploying: boolean = false
|
public autodeploying: boolean = false
|
||||||
@ -48,7 +55,12 @@ 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 computeContextsLoading: boolean = false
|
||||||
public adminGroups: { id: string; name: string }[] = []
|
public adminGroups: { id: string; name: string }[] = []
|
||||||
|
public runningAsUser: string | undefined
|
||||||
|
public currentUserInfo: ViyaApiCurrentUser | null = null
|
||||||
|
public computeContexts: ComputeContextItem[] = []
|
||||||
|
|
||||||
/** 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.
|
||||||
@ -74,13 +86,77 @@ export class AutomaticComponent implements OnInit {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.getAdminGroups()
|
const promiseGetAadminGroups = this.getAdminGroups()
|
||||||
|
const getCurrentUser = this.getCurrentUser()
|
||||||
|
const getComputeContexts = this.getComputeContexts()
|
||||||
|
|
||||||
|
Promise.all([
|
||||||
|
promiseGetAadminGroups,
|
||||||
|
getCurrentUser,
|
||||||
|
getComputeContexts
|
||||||
|
]).then(() => {
|
||||||
|
if (this.selectedComputeContext) {
|
||||||
|
this.onComputeContextChange(this.selectedComputeContext)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getComputeContexts() {
|
||||||
|
return new Promise<void>((resolve, reject) => {
|
||||||
|
this.computeContextsLoading = true
|
||||||
|
|
||||||
|
this.sasViyaService.getComputeContexts().subscribe(
|
||||||
|
(res: ViyaComputeContexts) => {
|
||||||
|
this.computeContextsLoading = false
|
||||||
|
|
||||||
|
const defaultContext = res.items.find(
|
||||||
|
(item: ComputeContextItem) =>
|
||||||
|
item.name === 'SAS Job Execution compute context'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (defaultContext) {
|
||||||
|
this.selectedComputeContext = defaultContext.id
|
||||||
|
}
|
||||||
|
|
||||||
|
this.computeContexts = res.items
|
||||||
|
|
||||||
|
resolve()
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public async getCurrentUser() {
|
||||||
|
return new Promise<void>((resolve, reject) => {
|
||||||
|
this.currentUserInfoLoading = true
|
||||||
|
|
||||||
|
this.sasViyaService.getCurrentUser().subscribe(
|
||||||
|
(res: ViyaApiCurrentUser) => {
|
||||||
|
this.currentUserInfoLoading = false
|
||||||
|
|
||||||
|
this.currentUserInfo = res
|
||||||
|
|
||||||
|
this.dcPath = `/export/viya/homes/${res.id}`
|
||||||
|
|
||||||
|
resolve()
|
||||||
|
},
|
||||||
|
(err) => {
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAdminGroups() {
|
public async getAdminGroups() {
|
||||||
|
return new Promise<void>((resolve, reject) => {
|
||||||
this.adminGroupsLoading = true
|
this.adminGroupsLoading = true
|
||||||
|
|
||||||
this.sasViyaService.getAdminGroups().subscribe((res: ViyaApiIdentities) => {
|
this.sasViyaService
|
||||||
|
.getAdminGroups()
|
||||||
|
.subscribe((res: ViyaApiIdentities) => {
|
||||||
this.adminGroupsLoading = false
|
this.adminGroupsLoading = false
|
||||||
// Map admin groups with only needed fields
|
// Map admin groups with only needed fields
|
||||||
this.adminGroups = res.items.map((item: Item) => {
|
this.adminGroups = res.items.map((item: Item) => {
|
||||||
@ -89,12 +165,29 @@ export class AutomaticComponent implements OnInit {
|
|||||||
name: item.name
|
name: item.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
resolve()
|
||||||
}),
|
}),
|
||||||
(err: any) => {
|
(err: any) => {
|
||||||
this.adminGroupsLoading = false
|
this.adminGroupsLoading = false
|
||||||
this.loggerService.error('Error while getting admin groups', err)
|
this.loggerService.error('Error while getting admin groups', err)
|
||||||
this.eventService.showAbortModal('admin groups', err)
|
this.eventService.showAbortModal('admin groups', err)
|
||||||
|
|
||||||
|
reject(err)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
public async onComputeContextChange(computeContextId: string) {
|
||||||
|
this.sasViyaService
|
||||||
|
.getComputeContextById(computeContextId)
|
||||||
|
.subscribe((res: ComputeContextDetails) => {
|
||||||
|
if (res.attributes && res.attributes.runServerAs) {
|
||||||
|
this.runningAsUser = res.attributes.runServerAs
|
||||||
|
} else {
|
||||||
|
this.runningAsUser = this.currentUserInfo?.id || 'unknown'
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -168,6 +261,20 @@ export class AutomaticComponent implements OnInit {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get and run service using the selected context name
|
||||||
|
let selectedComputeContextName = this.sasJsConfig.contextName
|
||||||
|
|
||||||
|
if (this.selectedComputeContext.length && this.computeContexts.length) {
|
||||||
|
const computeContext = this.computeContexts.find(
|
||||||
|
(context: ComputeContextItem) =>
|
||||||
|
context.id === this.selectedComputeContext
|
||||||
|
)
|
||||||
|
|
||||||
|
if (computeContext) {
|
||||||
|
selectedComputeContextName = computeContext.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We are overriding default `sasjsConfig` object fields with this object fields.
|
* We are overriding default `sasjsConfig` object fields with this object fields.
|
||||||
* Here we want to run this request using original WEB method.
|
* Here we want to run this request using original WEB method.
|
||||||
@ -175,14 +282,19 @@ export class AutomaticComponent implements OnInit {
|
|||||||
*/
|
*/
|
||||||
let overrideConfig = {
|
let overrideConfig = {
|
||||||
useComputeApi: null,
|
useComputeApi: null,
|
||||||
contextName: this.sasJsConfig.contextName,
|
contextName: selectedComputeContextName,
|
||||||
debug: true
|
debug: true
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sasJs
|
this.sasJs
|
||||||
.request(`services/admin/makedata`, data, overrideConfig, () => {
|
.request(
|
||||||
|
`services/admin/makedata&_contextname=${selectedComputeContextName}`,
|
||||||
|
data,
|
||||||
|
overrideConfig,
|
||||||
|
() => {
|
||||||
this.sasService.shouldLogin.next(true)
|
this.sasService.shouldLogin.next(true)
|
||||||
})
|
}
|
||||||
|
)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
this.autodeployDone = true
|
this.autodeployDone = true
|
||||||
|
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
import { HttpClient } from '@angular/common/http'
|
import {
|
||||||
|
HttpClient,
|
||||||
|
HttpContext,
|
||||||
|
HttpErrorResponse,
|
||||||
|
HttpHeaders,
|
||||||
|
HttpParams
|
||||||
|
} from '@angular/common/http'
|
||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { Observable } from 'rxjs'
|
import { catchError, Observable, throwError } from 'rxjs'
|
||||||
import { Collection } from '../viya-api-explorer/models/collection.model'
|
import { Collection } from '../viya-api-explorer/models/collection.model'
|
||||||
import { AppStoreService } from './app-store.service'
|
import { AppStoreService } from './app-store.service'
|
||||||
import { ViyaApis } from '../viya-api-explorer/models/viya-apis.models'
|
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'
|
||||||
|
import { ViyaComputeContexts } from '../viya-api-explorer/models/viya-compute-contexts.model'
|
||||||
|
import { ComputeContextDetails } from '../viya-api-explorer/models/viya-compute-context-details.model'
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@ -74,7 +83,7 @@ export class SasViyaService {
|
|||||||
|
|
||||||
this.serverUrl = adapterConfig?.serverUrl || ''
|
this.serverUrl = adapterConfig?.serverUrl || ''
|
||||||
|
|
||||||
//example collection request
|
// example collection request
|
||||||
// this.getByCollection('jobs').subscribe((res) => {
|
// this.getByCollection('jobs').subscribe((res) => {
|
||||||
// console.log('res', res)
|
// console.log('res', res)
|
||||||
// })
|
// })
|
||||||
@ -94,7 +103,7 @@ export class SasViyaService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getByUrl(url: string): Observable<Collection> {
|
getByUrl(url: string): Observable<Collection> {
|
||||||
return this.http.get<Collection>(`${this.serverUrl}${url}`, {
|
return this.get<Collection>(`${this.serverUrl}${url}`, {
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -105,23 +114,32 @@ export class SasViyaService {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getByCollection(apiCollection: string): Observable<Collection> {
|
getByCollection(apiCollection: string): Observable<Collection> {
|
||||||
return this.http.get<Collection>(`${this.serverUrl}${apiCollection}`, {
|
return this.get<Collection>(`${this.serverUrl}${apiCollection}`, {
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
getComputeContexts(): Observable<any> {
|
getComputeContexts(): Observable<ViyaComputeContexts> {
|
||||||
return this.http.get<any>(`${this.serverUrl}/compute/contexts`, {
|
return this.get<ViyaComputeContexts>(`${this.serverUrl}/compute/contexts`, {
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getComputeContextById(id: string): Observable<ComputeContextDetails> {
|
||||||
|
return this.get<ComputeContextDetails>(
|
||||||
|
`${this.serverUrl}/compute/contexts/${id}`,
|
||||||
|
{
|
||||||
|
withCredentials: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param path Path to the folder
|
* @param path Path to the folder
|
||||||
* @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.get<ViyaApiFolder>(
|
||||||
`${this.serverUrl}/folders/folders/@item?path=${path}`,
|
`${this.serverUrl}/folders/folders/@item?path=${path}`,
|
||||||
{
|
{
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
@ -130,7 +148,7 @@ export class SasViyaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getFolderMembers(folderId: string): Observable<ViyaApiFolderMembers> {
|
getFolderMembers(folderId: string): Observable<ViyaApiFolderMembers> {
|
||||||
return this.http.get<any>(
|
return this.get<ViyaApiFolderMembers>(
|
||||||
`${this.serverUrl}/folders/folders/${folderId}/members`,
|
`${this.serverUrl}/folders/folders/${folderId}/members`,
|
||||||
{
|
{
|
||||||
withCredentials: true
|
withCredentials: true
|
||||||
@ -139,11 +157,63 @@ export class SasViyaService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAdminGroups(limit: number = 5000): Observable<ViyaApiIdentities> {
|
getAdminGroups(limit: number = 5000): Observable<ViyaApiIdentities> {
|
||||||
return this.http.get<any>(
|
return this.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.get<ViyaApiCurrentUser>(
|
||||||
|
`${this.serverUrl}/identities/users/@currentUser`,
|
||||||
|
{
|
||||||
|
withCredentials: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
get<T>(
|
||||||
|
url: string,
|
||||||
|
options?: {
|
||||||
|
headers?:
|
||||||
|
| HttpHeaders
|
||||||
|
| {
|
||||||
|
[header: string]: string | string[]
|
||||||
|
}
|
||||||
|
context?: HttpContext
|
||||||
|
observe?: 'body'
|
||||||
|
params?:
|
||||||
|
| HttpParams
|
||||||
|
| {
|
||||||
|
[param: string]:
|
||||||
|
| string
|
||||||
|
| number
|
||||||
|
| boolean
|
||||||
|
| ReadonlyArray<string | number | boolean>
|
||||||
|
}
|
||||||
|
reportProgress?: boolean
|
||||||
|
responseType?: 'json'
|
||||||
|
withCredentials?: boolean
|
||||||
|
transferCache?:
|
||||||
|
| {
|
||||||
|
includeHeaders?: string[]
|
||||||
|
}
|
||||||
|
| boolean
|
||||||
|
}
|
||||||
|
): Observable<T> {
|
||||||
|
return this.http.get<T>(url, options).pipe(
|
||||||
|
catchError((err: HttpErrorResponse) => {
|
||||||
|
console.log('url', url)
|
||||||
|
console.log('err.status', err.status)
|
||||||
|
if (err.status === 449 || err.status === 401) {
|
||||||
|
// Retry once if we got a 449
|
||||||
|
return this.http.get<T>(url, options)
|
||||||
|
}
|
||||||
|
// Otherwise propagate the error
|
||||||
|
return throwError(() => err)
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
export interface ComputeContextDetails {
|
||||||
|
attributes?: Attributes
|
||||||
|
createdBy: string
|
||||||
|
creationTimeStamp: string
|
||||||
|
description: string
|
||||||
|
id: string
|
||||||
|
launchContext: LaunchContext
|
||||||
|
launchType: string
|
||||||
|
links: Link[]
|
||||||
|
modifiedBy: string
|
||||||
|
modifiedTimeStamp: string
|
||||||
|
name: string
|
||||||
|
version: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Link {
|
||||||
|
method: string
|
||||||
|
rel: string
|
||||||
|
href: string
|
||||||
|
uri: string
|
||||||
|
type?: string
|
||||||
|
responseType?: string
|
||||||
|
itemType?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LaunchContext {
|
||||||
|
contextId: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Attributes {
|
||||||
|
reuseServerProcesses: string
|
||||||
|
runServerAs: string
|
||||||
|
serverMinAvailable: string
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
export interface ViyaComputeContexts {
|
||||||
|
accept: string
|
||||||
|
count: number
|
||||||
|
items: Item[]
|
||||||
|
limit: number
|
||||||
|
links: Link2[]
|
||||||
|
name: string
|
||||||
|
start: number
|
||||||
|
version: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Link2 {
|
||||||
|
method: string
|
||||||
|
rel: string
|
||||||
|
href: string
|
||||||
|
uri: string
|
||||||
|
type: string
|
||||||
|
itemType: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Item {
|
||||||
|
createdBy: string
|
||||||
|
id: string
|
||||||
|
links: Link[]
|
||||||
|
name: string
|
||||||
|
version: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Link {
|
||||||
|
method: string
|
||||||
|
rel: string
|
||||||
|
href: string
|
||||||
|
uri: string
|
||||||
|
type?: string
|
||||||
|
responseType?: string
|
||||||
|
}
|
@ -3884,6 +3884,12 @@ app-header-actions {
|
|||||||
|
|
||||||
// END OF CSP WORKAROUND
|
// END OF CSP WORKAROUND
|
||||||
|
|
||||||
|
.clr-input-wrapper.small-mt {
|
||||||
|
.clr-form-control {
|
||||||
|
margin-top: 5px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body[cds-theme="dark"] {
|
body[cds-theme="dark"] {
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
scrollbar-color: $trackColor $thumbColor;
|
scrollbar-color: $trackColor $thumbColor;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dcfrontend",
|
"name": "dcfrontend",
|
||||||
"version": "6.14.7",
|
"version": "6.15.0",
|
||||||
"description": "Data Controller",
|
"description": "Data Controller",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||||
|
10
sas/package-lock.json
generated
10
sas/package-lock.json
generated
@ -7,7 +7,7 @@
|
|||||||
"name": "dc-sas",
|
"name": "dc-sas",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/cli": "^4.12.5",
|
"@sasjs/cli": "^4.12.5",
|
||||||
"@sasjs/core": "^4.57.0"
|
"@sasjs/core": "^4.58.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@coolaj86/urequest": {
|
"node_modules/@coolaj86/urequest": {
|
||||||
@ -76,12 +76,18 @@
|
|||||||
"sasjs": "build/index.js"
|
"sasjs": "build/index.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sasjs/core": {
|
"node_modules/@sasjs/cli/node_modules/@sasjs/core": {
|
||||||
"version": "4.57.0",
|
"version": "4.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.57.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.57.0.tgz",
|
||||||
"integrity": "sha512-iJiLnW4oY15InGerXXWtrjc1YpJ9UDz72+r7Odfr/yYR7RxIhtXGjYQIqyQu6US+cS/0b2pi12LZB6VnfMS/pA==",
|
"integrity": "sha512-iJiLnW4oY15InGerXXWtrjc1YpJ9UDz72+r7Odfr/yYR7RxIhtXGjYQIqyQu6US+cS/0b2pi12LZB6VnfMS/pA==",
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@sasjs/core": {
|
||||||
|
"version": "4.58.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.58.1.tgz",
|
||||||
|
"integrity": "sha512-Qp6KAtp1VZcmN5HLGSIUE9H41qpFuihWLbjNygOYp+NRs/Y8VagpHrYeyIQbh3cSgchiJEMXudLql8hoU06wpg==",
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@sasjs/lint": {
|
"node_modules/@sasjs/lint": {
|
||||||
"version": "2.4.3",
|
"version": "2.4.3",
|
||||||
"resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-2.4.3.tgz",
|
"resolved": "https://registry.npmjs.org/@sasjs/lint/-/lint-2.4.3.tgz",
|
||||||
|
@ -29,6 +29,6 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sasjs/cli": "^4.12.5",
|
"@sasjs/cli": "^4.12.5",
|
||||||
"@sasjs/core": "^4.57.0"
|
"@sasjs/core": "^4.58.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
"httpsAgentOptions": {
|
"httpsAgentOptions": {
|
||||||
"allowInsecureRequests": false
|
"allowInsecureRequests": false
|
||||||
},
|
},
|
||||||
"appLoc": "/Public/app/dc",
|
"appLoc": "/Public/app/dcplaceholder",
|
||||||
"macroFolders": [
|
"macroFolders": [
|
||||||
"sasjs/targets/viya/macros_viya"
|
"sasjs/targets/viya/macros_viya"
|
||||||
],
|
],
|
||||||
@ -109,7 +109,6 @@
|
|||||||
"binaryFolders": [],
|
"binaryFolders": [],
|
||||||
"buildConfig": {
|
"buildConfig": {
|
||||||
"initProgram": "sasjs/utils/buildinitviya.sas",
|
"initProgram": "sasjs/utils/buildinitviya.sas",
|
||||||
"termProgram": "sasjs/utils/buildtermviya.sas",
|
|
||||||
"buildResultsFolder": "sasjsresults",
|
"buildResultsFolder": "sasjsresults",
|
||||||
"buildOutputFolder": "sasjsbuild",
|
"buildOutputFolder": "sasjsbuild",
|
||||||
"buildOutputFileName": "viya.sas"
|
"buildOutputFileName": "viya.sas"
|
||||||
@ -128,7 +127,7 @@
|
|||||||
"sasjs/utils/viyadeploy.sh"
|
"sasjs/utils/viyadeploy.sh"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"contextName": "Datacontroller compute context"
|
"contextName": "SAS Job Execution compute context"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "viyacloud",
|
"name": "viyacloud",
|
||||||
@ -312,38 +311,6 @@
|
|||||||
"assetPaths": []
|
"assetPaths": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "server-vlad",
|
|
||||||
"serverUrl": "https://sas.4gl.io:5000",
|
|
||||||
"serverType": "SASJS",
|
|
||||||
"httpsAgentOptions": {
|
|
||||||
"allowInsecureRequests": false
|
|
||||||
},
|
|
||||||
"appLoc": "/30.SASApps/app/dc",
|
|
||||||
"macroFolders": [
|
|
||||||
"sasjs/targets/server/macros_server"
|
|
||||||
],
|
|
||||||
"programFolders": [
|
|
||||||
"sasjs/db/datactrl"
|
|
||||||
],
|
|
||||||
"serviceConfig": {
|
|
||||||
"serviceFolders": [
|
|
||||||
"sasjs/targets/server/services_server/admin",
|
|
||||||
"sasjs/targets/server/services_server/usernav"
|
|
||||||
],
|
|
||||||
"initProgram": "sasjs/utils/serviceinitserver.sas",
|
|
||||||
"termProgram": "",
|
|
||||||
"macroVars": {}
|
|
||||||
},
|
|
||||||
"streamConfig": {
|
|
||||||
"streamWeb": true,
|
|
||||||
"streamWebFolder": "webv",
|
|
||||||
"streamServiceName": "DataController",
|
|
||||||
"webSourcePath": "../client/dist",
|
|
||||||
"streamLogo": "favicon.ico",
|
|
||||||
"assetPaths": []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "mihajlo",
|
"name": "mihajlo",
|
||||||
"serverUrl": "https://sas.4gl.io",
|
"serverUrl": "https://sas.4gl.io",
|
||||||
|
27
sas/sasjs/services/admin/dirlist.sas
Normal file
27
sas/sasjs/services/admin/dirlist.sas
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/**
|
||||||
|
@file
|
||||||
|
@brief Fetches directories to facilitate configuration
|
||||||
|
@details The service can also be invoked using the following URL param:
|
||||||
|
|
||||||
|
@li &parent= (parent path)
|
||||||
|
|
||||||
|
<h4> SAS Macros </h4>
|
||||||
|
@li mp_dirlist.sas
|
||||||
|
|
||||||
|
@version 9.2
|
||||||
|
@author 4GL Apps Ltd
|
||||||
|
@copyright 4GL Apps Ltd. This code may only be used within Data Controller
|
||||||
|
and may not be re-distributed or re-sold without the express permission of
|
||||||
|
4GL Apps Ltd.
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
%global parent;
|
||||||
|
/* if no flavour is specified, default to root */
|
||||||
|
%let parent=%sysfunc(coalescec(&parent,/));
|
||||||
|
|
||||||
|
%mp_dirlist(path=&parent,outds=dirlist, maxdepth=2)
|
||||||
|
|
||||||
|
%webout(OPEN)
|
||||||
|
%webout(OBJ,dirlist)
|
||||||
|
%webout(CLOSE)
|
@ -5,3 +5,8 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
options nonotes nomprint;
|
options nonotes nomprint;
|
||||||
|
|
||||||
|
/* update apploc to default to user home area if not set */
|
||||||
|
%let apploc=%sysfunc(ifc("&apploc"="/Public/app/dcplaceholder"
|
||||||
|
,/Users/&sysuserid/My Folder/Data Controller
|
||||||
|
,&apploc));
|
Reference in New Issue
Block a user