This commit is contained in:
parent
5deba44d2b
commit
6df7d8d2ba
@ -1,34 +1,34 @@
|
|||||||
import { BaseSASResponse } from './common/BaseSASResponse'
|
import { BaseSASResponse } from './common/BaseSASResponse'
|
||||||
|
|
||||||
export interface EditorsStageDataSASResponse extends BaseSASResponse {
|
export interface EditorsStageDataSASResponse extends BaseSASResponse {
|
||||||
SYSDATE: string;
|
SYSDATE: string
|
||||||
SYSTIME: string;
|
SYSTIME: string
|
||||||
sasparams: Sasparam[];
|
sasparams: Sasparam[]
|
||||||
_DEBUG: string;
|
_DEBUG: string
|
||||||
_PROGRAM: string;
|
_PROGRAM: string
|
||||||
AUTOEXEC: string;
|
AUTOEXEC: string
|
||||||
MF_GETUSER: string;
|
MF_GETUSER: string
|
||||||
SYSCC: string;
|
SYSCC: string
|
||||||
SYSENCODING: string;
|
SYSENCODING: string
|
||||||
SYSERRORTEXT: string;
|
SYSERRORTEXT: string
|
||||||
SYSHOSTINFOLONG: string;
|
SYSHOSTINFOLONG: string
|
||||||
SYSHOSTNAME: string;
|
SYSHOSTNAME: string
|
||||||
SYSPROCESSID: string;
|
SYSPROCESSID: string
|
||||||
SYSPROCESSMODE: string;
|
SYSPROCESSMODE: string
|
||||||
SYSPROCESSNAME: string;
|
SYSPROCESSNAME: string
|
||||||
SYSJOBID: string;
|
SYSJOBID: string
|
||||||
SYSSCPL: string;
|
SYSSCPL: string
|
||||||
SYSSITE: string;
|
SYSSITE: string
|
||||||
SYSTCPIPHOSTNAME: string;
|
SYSTCPIPHOSTNAME: string
|
||||||
SYSUSERID: string;
|
SYSUSERID: string
|
||||||
SYSVLONG: string;
|
SYSVLONG: string
|
||||||
SYSWARNINGTEXT: string;
|
SYSWARNINGTEXT: string
|
||||||
END_DTTM: string;
|
END_DTTM: string
|
||||||
MEMSIZE: string;
|
MEMSIZE: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Sasparam {
|
export interface Sasparam {
|
||||||
STATUS: string | 'SUCCESS';
|
STATUS: string | 'SUCCESS'
|
||||||
DSID: string;
|
DSID: string
|
||||||
URL: string;
|
URL: string
|
||||||
}
|
}
|
||||||
|
@ -23,16 +23,10 @@
|
|||||||
|
|
||||||
<ng-container *ngIf="parsedDatasets.length && !submittedDatasets.length">
|
<ng-container *ngIf="parsedDatasets.length && !submittedDatasets.length">
|
||||||
<div class="text-center mb-10">
|
<div class="text-center mb-10">
|
||||||
<button
|
<button (click)="onDiscard()" class="btn btn-danger btn-sm mr-10">
|
||||||
(click)="onDiscard()"
|
|
||||||
class="btn btn-danger btn-sm mr-10"
|
|
||||||
>
|
|
||||||
Discard
|
Discard
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button (click)="onSubmitAll()" class="btn btn-primary btn-sm">
|
||||||
(click)="onSubmitAll()"
|
|
||||||
class="btn btn-primary btn-sm"
|
|
||||||
>
|
|
||||||
Submit All
|
Submit All
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -187,7 +181,12 @@
|
|||||||
class="is-info icon-dc-fill"
|
class="is-info icon-dc-fill"
|
||||||
></clr-icon>
|
></clr-icon>
|
||||||
<p class="text-center color-gray mt-10" cds-text="section">
|
<p class="text-center color-gray mt-10" cds-text="section">
|
||||||
Please select a dataset on the left to {{ !submittedDatasets.length ? 'review data' : 'review submitted results' }}
|
Please select a dataset on the left to
|
||||||
|
{{
|
||||||
|
!submittedDatasets.length
|
||||||
|
? 'review data'
|
||||||
|
: 'review submitted results'
|
||||||
|
}}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -205,7 +204,8 @@
|
|||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<p cds-text="secondary regular">
|
<p cds-text="secondary regular">
|
||||||
Matched with dataset: <strong>{{ activeParsedDataset.libds }}</strong>
|
Matched with dataset:
|
||||||
|
<strong>{{ activeParsedDataset.libds }}</strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -257,12 +257,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<clr-modal [(clrModalOpen)]="showSubmitReasonModal">
|
<clr-modal [(clrModalOpen)]="showSubmitReasonModal">
|
||||||
<h3 class="modal-title">Submit for approval {{parsedDatasets.length}} tables</h3>
|
<h3 class="modal-title">
|
||||||
|
Submit for approval {{ parsedDatasets.length }} tables
|
||||||
|
</h3>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="text-area-full-width">
|
<div class="text-area-full-width">
|
||||||
<label for="formFields_8" class="mb-5 d-block"
|
<label for="formFields_8" class="mb-5 d-block">Message</label>
|
||||||
>Message</label
|
|
||||||
>
|
|
||||||
<textarea
|
<textarea
|
||||||
clrTextarea
|
clrTextarea
|
||||||
[(ngModel)]="submitReasonMessage"
|
[(ngModel)]="submitReasonMessage"
|
||||||
@ -274,11 +274,26 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p cds-text="caption_clean" class="mt-10">
|
<p cds-text="caption_clean" class="mt-10">
|
||||||
Sheets which did not match any dataset will be ignored. Tables will be sent sequentially, logs will be available after all tables are submitted.
|
Sheets which did not match any dataset will be ignored. Tables will be
|
||||||
|
sent sequentially, logs will be available after all tables are submitted.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-outline" [disabled]="submitLoading" (click)="showSubmitReasonModal = false">Cancel</button>
|
<button
|
||||||
<button type="button" class="btn btn-primary" [clrLoading]="submitLoading" (click)="submitTables()">Submit</button>
|
type="button"
|
||||||
|
class="btn btn-outline"
|
||||||
|
[disabled]="submitLoading"
|
||||||
|
(click)="showSubmitReasonModal = false"
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="btn btn-primary"
|
||||||
|
[clrLoading]="submitLoading"
|
||||||
|
(click)="submitTables()"
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</clr-modal>
|
</clr-modal>
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
import { ChangeDetectorRef, Component, HostBinding, OnInit, SimpleChanges } from '@angular/core'
|
import {
|
||||||
|
ChangeDetectorRef,
|
||||||
|
Component,
|
||||||
|
HostBinding,
|
||||||
|
OnInit,
|
||||||
|
SimpleChanges
|
||||||
|
} from '@angular/core'
|
||||||
import {
|
import {
|
||||||
EventService,
|
EventService,
|
||||||
HelperService,
|
HelperService,
|
||||||
@ -211,7 +217,8 @@ export class MultiDatasetComponent implements OnInit {
|
|||||||
|
|
||||||
initHot() {
|
initHot() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!this.hotInstance) this.hotInstance = this.hotRegisterer.getInstance('hotInstance')
|
if (!this.hotInstance)
|
||||||
|
this.hotInstance = this.hotRegisterer.getInstance('hotInstance')
|
||||||
|
|
||||||
if (this.activeParsedDataset) {
|
if (this.activeParsedDataset) {
|
||||||
this.hotInstance.updateSettings({
|
this.hotInstance.updateSettings({
|
||||||
@ -219,7 +226,7 @@ export class MultiDatasetComponent implements OnInit {
|
|||||||
colHeaders: this.activeParsedDataset.datasetInfo.headerColumns,
|
colHeaders: this.activeParsedDataset.datasetInfo.headerColumns,
|
||||||
columns: this.activeParsedDataset.datasetInfo.dcValidator?.getRules(),
|
columns: this.activeParsedDataset.datasetInfo.dcValidator?.getRules(),
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
height: '300px',
|
height: '300px'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -291,9 +298,7 @@ export class MultiDatasetComponent implements OnInit {
|
|||||||
this.initHot()
|
this.initHot()
|
||||||
}
|
}
|
||||||
|
|
||||||
onSubmittedDatasetClick(submittedDataset: SubmittedDatasetResult) {
|
onSubmittedDatasetClick(submittedDataset: SubmittedDatasetResult) {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public get activeParsedDataset(): ParsedDataset | undefined {
|
public get activeParsedDataset(): ParsedDataset | undefined {
|
||||||
return this.parsedDatasets.find((dataset) => dataset.active)
|
return this.parsedDatasets.find((dataset) => dataset.active)
|
||||||
@ -377,21 +382,21 @@ export class MultiDatasetComponent implements OnInit {
|
|||||||
let success
|
let success
|
||||||
|
|
||||||
await this.sasStoreService
|
await this.sasStoreService
|
||||||
.updateTable(
|
.updateTable(
|
||||||
updateParams,
|
updateParams,
|
||||||
table.datasource,
|
table.datasource,
|
||||||
'SASControlTable',
|
'SASControlTable',
|
||||||
'editors/stagedata',
|
'editors/stagedata',
|
||||||
table.datasetInfo.data.$sasdata
|
table.datasetInfo.data.$sasdata
|
||||||
)
|
)
|
||||||
.then((res: EditorsStageDataSASResponse) => {
|
.then((res: EditorsStageDataSASResponse) => {
|
||||||
success = res
|
success = res
|
||||||
})
|
})
|
||||||
.catch((err: any) => {
|
.catch((err: any) => {
|
||||||
console.error('err', err)
|
console.error('err', err)
|
||||||
|
|
||||||
error = err
|
error = err
|
||||||
})
|
})
|
||||||
|
|
||||||
requestsResults.push({
|
requestsResults.push({
|
||||||
success,
|
success,
|
||||||
@ -588,17 +593,17 @@ export interface DatasetsObject extends EditorsGetDataServiceResponse {
|
|||||||
|
|
||||||
export interface ParsedDataset {
|
export interface ParsedDataset {
|
||||||
libds: string
|
libds: string
|
||||||
parseResult: ParseResult,
|
parseResult: ParseResult
|
||||||
datasetInfo: DatasetsObject,
|
datasetInfo: DatasetsObject
|
||||||
datasource: any[],
|
datasource: any[]
|
||||||
includeInSubmission: boolean
|
includeInSubmission: boolean
|
||||||
status?: 'success' | 'error'
|
status?: 'success' | 'error'
|
||||||
active?: boolean
|
active?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SubmittedDatasetResult {
|
export interface SubmittedDatasetResult {
|
||||||
libds: string,
|
libds: string
|
||||||
success: EditorsStageDataSASResponse | undefined,
|
success: EditorsStageDataSASResponse | undefined
|
||||||
error: any,
|
error: any
|
||||||
active?: boolean
|
active?: boolean
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user