style: lint
This commit is contained in:
parent
4d276657b3
commit
82c285e348
@ -23,7 +23,13 @@ import {
|
||||
trashIcon
|
||||
} from '@cds/core/icon'
|
||||
|
||||
ClarityIcons.addIcons(moonIcon, sunIcon, exclamationTriangleIcon, tableIcon, trashIcon)
|
||||
ClarityIcons.addIcons(
|
||||
moonIcon,
|
||||
sunIcon,
|
||||
exclamationTriangleIcon,
|
||||
tableIcon,
|
||||
trashIcon
|
||||
)
|
||||
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
|
@ -44,7 +44,10 @@
|
||||
status="danger"
|
||||
shape="exclamation-circle"
|
||||
></cds-icon>
|
||||
<cds-icon *ngIf="dataset.datasource && dataset.parseResult" shape="table"></cds-icon>
|
||||
<cds-icon
|
||||
*ngIf="dataset.datasource && dataset.parseResult"
|
||||
shape="table"
|
||||
></cds-icon>
|
||||
{{ dataset.libds }}
|
||||
</button>
|
||||
</clr-tree-node>
|
||||
@ -111,17 +114,24 @@
|
||||
<p cds-text="secondary regular" class="mb-20">
|
||||
Selected file: <strong>{{ selectedFile.name }}</strong>
|
||||
<clr-tooltip>
|
||||
<cds-icon clrTooltipTrigger (click)="onDiscardFile()" shape="trash" status="danger" class="ml-5 cursor-pointer"></cds-icon>
|
||||
<clr-tooltip-content>
|
||||
Discard the file
|
||||
</clr-tooltip-content>
|
||||
<cds-icon
|
||||
clrTooltipTrigger
|
||||
(click)="onDiscardFile()"
|
||||
shape="trash"
|
||||
status="danger"
|
||||
class="ml-5 cursor-pointer"
|
||||
></cds-icon>
|
||||
<clr-tooltip-content> Discard the file </clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
</p>
|
||||
<p cds-text="secondary regular" class="mb-15">
|
||||
Paste or type the list of datasets to upload:
|
||||
</p>
|
||||
|
||||
<clr-control-helper class="mb-5">Each row is one dataset. We will automatically detect tables by the sheetname and populate if any.</clr-control-helper>
|
||||
<clr-control-helper class="mb-5"
|
||||
>Each row is one dataset. We will automatically detect tables by
|
||||
the sheetname and populate if any.</clr-control-helper
|
||||
>
|
||||
|
||||
<hot-table
|
||||
hotId="hotInstanceUserDataset"
|
||||
@ -174,7 +184,8 @@
|
||||
>"{{
|
||||
activeParsedDataset.parseResult.rangeSheetRes?.sheetName
|
||||
}}"!{{
|
||||
activeParsedDataset.parseResult.rangeSheetRes?.rangeAddress
|
||||
activeParsedDataset.parseResult.rangeSheetRes
|
||||
?.rangeAddress
|
||||
}}</strong
|
||||
>
|
||||
</ng-container>
|
||||
@ -187,8 +198,15 @@
|
||||
Matched with dataset:
|
||||
<strong>
|
||||
<clr-tooltip>
|
||||
<a clrTooltipTrigger [routerLink]="'/editor/' + activeParsedDataset.libds">{{ activeParsedDataset.libds }}</a>
|
||||
<clr-tooltip-content [clrPosition]="'top-right'" [clrSize]="'sm'">
|
||||
<a
|
||||
clrTooltipTrigger
|
||||
[routerLink]="'/editor/' + activeParsedDataset.libds"
|
||||
>{{ activeParsedDataset.libds }}</a
|
||||
>
|
||||
<clr-tooltip-content
|
||||
[clrPosition]="'top-right'"
|
||||
[clrSize]="'sm'"
|
||||
>
|
||||
Click to edit the table
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
@ -203,7 +221,12 @@
|
||||
clrToggle
|
||||
[(ngModel)]="activeParsedDataset.includeInSubmission"
|
||||
name="options"
|
||||
[disabled]="!(activeParsedDataset.datasource && activeParsedDataset.parseResult)"
|
||||
[disabled]="
|
||||
!(
|
||||
activeParsedDataset.datasource &&
|
||||
activeParsedDataset.parseResult
|
||||
)
|
||||
"
|
||||
required
|
||||
value="option1"
|
||||
/>
|
||||
@ -238,21 +261,25 @@
|
||||
*ngIf="!activeSubmittedDataset"
|
||||
class="no-table-selected pointer-events-none"
|
||||
>
|
||||
<clr-icon
|
||||
shape="warning-standard"
|
||||
size="40"
|
||||
class="is-info icon-dc-fill"
|
||||
></clr-icon>
|
||||
<p class="text-center color-gray mt-10" cds-text="section">
|
||||
Please select a dataset on the left to review the submit results
|
||||
</p>
|
||||
</div>
|
||||
<clr-icon
|
||||
shape="warning-standard"
|
||||
size="40"
|
||||
class="is-info icon-dc-fill"
|
||||
></clr-icon>
|
||||
<p class="text-center color-gray mt-10" cds-text="section">
|
||||
Please select a dataset on the left to review the submit results
|
||||
</p>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="activeSubmittedDataset">
|
||||
<div class="d-flex clr-justify-content-between p-10">
|
||||
<div>
|
||||
<p *ngIf="activeSubmittedDataset.parseResult" cds-text="secondary regular" class="mb-10">
|
||||
<p
|
||||
*ngIf="activeSubmittedDataset.parseResult"
|
||||
cds-text="secondary regular"
|
||||
class="mb-10"
|
||||
>
|
||||
Found in range:
|
||||
<strong
|
||||
>"{{
|
||||
@ -266,8 +293,15 @@
|
||||
Matched with dataset:
|
||||
<strong>
|
||||
<clr-tooltip>
|
||||
<a clrTooltipTrigger [routerLink]="'/editor/' + activeSubmittedDataset.libds">{{ activeSubmittedDataset.libds }}</a>
|
||||
<clr-tooltip-content [clrPosition]="'top-right'" [clrSize]="'sm'">
|
||||
<a
|
||||
clrTooltipTrigger
|
||||
[routerLink]="'/editor/' + activeSubmittedDataset.libds"
|
||||
>{{ activeSubmittedDataset.libds }}</a
|
||||
>
|
||||
<clr-tooltip-content
|
||||
[clrPosition]="'top-right'"
|
||||
[clrSize]="'sm'"
|
||||
>
|
||||
Click to edit the table
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
@ -275,26 +309,37 @@
|
||||
</p>
|
||||
<p cds-text="secondary regular" class="mb-10">
|
||||
Status:
|
||||
<span *ngIf="activeSubmittedDataset.success" class="color-green"><strong>SUCCESS</strong></span>
|
||||
<span *ngIf="activeSubmittedDataset.error" class="color-red"><strong>ERROR</strong></span>
|
||||
<span *ngIf="activeSubmittedDataset.success" class="color-green"
|
||||
><strong>SUCCESS</strong></span
|
||||
>
|
||||
<span *ngIf="activeSubmittedDataset.error" class="color-red"
|
||||
><strong>ERROR</strong></span
|
||||
>
|
||||
</p>
|
||||
<p *ngIf="activeSubmittedDataset.error" cds-text="secondary regular">
|
||||
<p
|
||||
*ngIf="activeSubmittedDataset.error"
|
||||
cds-text="secondary regular"
|
||||
>
|
||||
Error details:
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button
|
||||
*ngIf="!submittingCsv && activeSubmittedDataset.error"
|
||||
(click)="reSubmitTable(activeSubmittedDataset)"
|
||||
class="btn btn-primary mt-10"
|
||||
[clrLoading]="submitLoading"
|
||||
*ngIf="!submittingCsv && activeSubmittedDataset.error"
|
||||
(click)="reSubmitTable(activeSubmittedDataset)"
|
||||
class="btn btn-primary mt-10"
|
||||
[clrLoading]="submitLoading"
|
||||
>
|
||||
Resubmit
|
||||
</button>
|
||||
<button
|
||||
(click)="downloadFile(activeSubmittedDataset.success || activeSubmittedDataset.error)"
|
||||
class="btn btn-primary-outline mt-10"
|
||||
(click)="
|
||||
downloadFile(
|
||||
activeSubmittedDataset.success || activeSubmittedDataset.error
|
||||
)
|
||||
"
|
||||
class="btn btn-primary-outline mt-10"
|
||||
>
|
||||
Download log
|
||||
</button>
|
||||
@ -327,13 +372,18 @@
|
||||
|
||||
<clr-modal [(clrModalOpen)]="showSubmitReasonModal" [clrModalClosable]="false">
|
||||
<h3 class="modal-title">
|
||||
Submit {{ tablesToSubmit.length }} {{ tablesToSubmit.length === 1 ? 'table' : 'tables' }} for approval
|
||||
Submit {{ tablesToSubmit.length }}
|
||||
{{ tablesToSubmit.length === 1 ? 'table' : 'tables' }} for approval
|
||||
</h3>
|
||||
<div class="modal-body">
|
||||
<p *ngIf="licenceState.value.submit_rows_limit !== Infinity" cds-text="body" class="licence-limit-notice mt-0 mb-15">
|
||||
<p
|
||||
*ngIf="licenceState.value.submit_rows_limit !== Infinity"
|
||||
cds-text="body"
|
||||
class="licence-limit-notice mt-0 mb-15"
|
||||
>
|
||||
Due to current licence, only
|
||||
{{ licenceState.value.submit_rows_limit }} rows in each file will
|
||||
be submitted. To remove the restriction, contact
|
||||
{{ licenceState.value.submit_rows_limit }} rows in each file will be
|
||||
submitted. To remove the restriction, contact
|
||||
support@datacontroller.io.
|
||||
</p>
|
||||
|
||||
@ -350,7 +400,8 @@
|
||||
</div>
|
||||
|
||||
<p cds-text="caption_clean" class="mt-10">
|
||||
Tables will be sent sequentially, logs will be available after all tables are submitted.
|
||||
Tables will be sent sequentially, logs will be available after all tables
|
||||
are submitted.
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@ -375,7 +426,8 @@
|
||||
|
||||
<clr-modal [(clrModalOpen)]="csvSubmitting" [clrModalClosable]="false">
|
||||
<h3 class="modal-title">
|
||||
Submitting {{ csvFiles.length }} CSV {{ csvFiles.length === 1 ? 'file' : 'files'}}
|
||||
Submitting {{ csvFiles.length }} CSV
|
||||
{{ csvFiles.length === 1 ? 'file' : 'files' }}
|
||||
</h3>
|
||||
<div class="modal-body">
|
||||
<div class="text-center">
|
||||
@ -386,4 +438,4 @@
|
||||
This will take few moments
|
||||
</p>
|
||||
</div>
|
||||
</clr-modal>
|
||||
</clr-modal>
|
||||
|
@ -624,21 +624,21 @@ export class MultiDatasetComponent implements OnInit {
|
||||
let success
|
||||
|
||||
await this.sasService
|
||||
.uploadFile('services/editors/loadfile', [file], { table: libds })
|
||||
.then(
|
||||
(res: any) => {
|
||||
if (typeof res.sasjsAbort !== 'undefined') {
|
||||
error = res.sasjsAbort
|
||||
} else {
|
||||
success = res
|
||||
}
|
||||
},
|
||||
(err: any) => {
|
||||
console.error('err', err)
|
||||
.uploadFile('services/editors/loadfile', [file], { table: libds })
|
||||
.then(
|
||||
(res: any) => {
|
||||
if (typeof res.sasjsAbort !== 'undefined') {
|
||||
error = res.sasjsAbort
|
||||
} else {
|
||||
success = res
|
||||
}
|
||||
},
|
||||
(err: any) => {
|
||||
console.error('err', err)
|
||||
|
||||
error = err
|
||||
}
|
||||
)
|
||||
error = err
|
||||
}
|
||||
)
|
||||
|
||||
requestsResults.push({
|
||||
success,
|
||||
|
@ -1,7 +1,11 @@
|
||||
/**
|
||||
* Function reused in HOT instances to add a class used for dark mode
|
||||
*/
|
||||
export const baseAfterGetColHeader = (column: number, TH: HTMLTableCellElement, headerLevel: number) => {
|
||||
export const baseAfterGetColHeader = (
|
||||
column: number,
|
||||
TH: HTMLTableCellElement,
|
||||
headerLevel: number
|
||||
) => {
|
||||
// Dark mode
|
||||
TH.classList.add('darkTH')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user