From d94df7f0ebae8feab5e1d5cf8011af8c8be2ca18 Mon Sep 17 00:00:00 2001 From: Mihajlo Medjedovic Date: Thu, 27 Jun 2024 11:00:19 +0200 Subject: [PATCH] fix: addressing PR comments --- client/cypress/e2e/editor.cy.ts | 7 ---- client/cypress/e2e/excel-multi-load.cy.ts | 26 ++++++------- client/cypress/e2e/excel.cy.ts | 4 -- client/cypress/e2e/filtering.cy.ts | 8 +--- client/cypress/e2e/licensing.cy.ts | 9 +---- client/cypress/e2e/liveness.cy.ts | 3 -- client/cypress/e2e/viewbox.cy.ts | 5 --- client/cypress/integration/editor.tests.ts | 7 ---- client/cypress/integration/excel.tests.ts | 4 -- client/cypress/integration/filtering.tests.ts | 8 +--- client/cypress/integration/licensing.tests.ts | 9 +---- client/cypress/integration/liveness.tests.ts | 3 -- client/cypress/integration/viewbox.tests.ts | 5 --- client/src/app/_globals.ts | 8 ++++ client/src/app/editor/editor.component.ts | 2 +- .../multi-dataset-route.component.scss | 0 .../multi-dataset-route.component.ts | 1 - client/src/app/services/sas-store.service.ts | 2 +- client/src/app/services/sas.service.ts | 4 +- .../src/app/services/spreadsheet.service.ts | 39 +++++-------------- .../excel-password-modal.component.scss | 0 .../excel-password-modal.component.ts | 3 +- client/src/app/shared/utils/hot.utils.ts | 4 +- .../shared/viewboxes/viewboxes.component.ts | 2 +- client/src/app/stage/stage.component.ts | 2 +- client/src/app/viewer/viewer.component.ts | 7 ++-- client/src/app/xlmap/xlmap.component.ts | 2 +- client/src/colors.scss | 4 +- client/src/styles.scss | 2 +- 29 files changed, 55 insertions(+), 125 deletions(-) delete mode 100644 client/src/app/routes/multi-dataset-route/multi-dataset-route.component.scss delete mode 100644 client/src/app/shared/excel-password-modal/excel-password-modal.component.scss diff --git a/client/cypress/e2e/editor.cy.ts b/client/cypress/e2e/editor.cy.ts index cb52eb5..a9d24b5 100644 --- a/client/cypress/e2e/editor.cy.ts +++ b/client/cypress/e2e/editor.cy.ts @@ -15,9 +15,6 @@ context('editor tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') }) @@ -118,10 +115,6 @@ context('editor tests: ', function () { }) }) }) - - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) }) const clickOnEdit = (callback?: any) => { diff --git a/client/cypress/e2e/excel-multi-load.cy.ts b/client/cypress/e2e/excel-multi-load.cy.ts index 6a9d03c..97c664d 100644 --- a/client/cypress/e2e/excel-multi-load.cy.ts +++ b/client/cypress/e2e/excel-multi-load.cy.ts @@ -9,6 +9,10 @@ const serverType = Cypress.env('serverType') const libraryToOpenIncludes = Cypress.env(`libraryToOpenIncludes_${serverType}`) const fixturePath = 'excels_multi_load/' +const library = 'DC996664' +const mpeXTestTable = 'MPE_X_TEST' +const mpeTablesTable = 'MPE_TABLES' + context('excel multi load tests: ', function () { this.beforeAll(() => { cy.visit(`${hostUrl}/SASLogon/logout`) @@ -17,9 +21,6 @@ context('excel multi load tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home/multi-load') @@ -34,11 +35,11 @@ context('excel multi load tests: ', function () { it('1 | Uploads Excel file with multiple sheets, 3 sheets including data, 2 sheets matched with dataset', (done) => { attachExcelFile('multi_load_test_2.xlsx', () => { checkHotUserDatasetTable('hotTableUserDataset', [ - ['DC996664', 'MPE_X_TEST'], - ['DC996664', 'MPE_TABLES'] + [library, mpeXTestTable], + [library, mpeTablesTable] ], () => { cy.get('#continue-btn').trigger('click').then(() => { - checkIfTreeHasTables(['DC996664.MPE_X_TEST', 'DC996664.MPE_TABLES'], undefined, (includes: boolean) => { + checkIfTreeHasTables([`${library}.${mpeXTestTable}`, `${library}.${mpeTablesTable}`], undefined, (includes: boolean) => { if (includes) { // MPE_TABLES sheet does not have data so 1 error image must be shown hasErrorTables(1, (valid: boolean) => { @@ -54,11 +55,11 @@ context('excel multi load tests: ', function () { it('2 | Uploads Excel file with multiple sheets, 2 sheets matched with dataset, 1 matched sheet does not have data', (done) => { attachExcelFile('multi_load_test_1.xlsx', () => { checkHotUserDatasetTable('hotTableUserDataset', [ - ['DC996664', 'MPE_X_TEST'], - ['DC996664', 'MPE_TABLES'] + [library, mpeXTestTable], + [library, mpeTablesTable] ], () => { cy.get('#continue-btn').trigger('click').then(() => { - checkIfTreeHasTables(['DC996664.MPE_X_TEST', 'DC996664.MPE_TABLES'], 'DC996664.MPE_X_TEST', (includes: boolean) => { + checkIfTreeHasTables([`${library}.${mpeXTestTable}`, `${library}.${mpeTablesTable}`], `${library}.${mpeXTestTable}`, (includes: boolean) => { if (includes) { cy.get('#hotTable').should('be.visible').then(() => { checkHotUserDatasetTable('hotTable', [ @@ -84,11 +85,11 @@ context('excel multi load tests: ', function () { it('3 | Uploads Excel file with multiple sheets, 1 sheets has 2 tables', (done) => { attachExcelFile('multi_load_test_1.xlsx', () => { checkHotUserDatasetTable('hotTableUserDataset', [ - ['DC996664', 'MPE_X_TEST'], - ['DC996664', 'MPE_TABLES'] + [library, mpeXTestTable], + [library, mpeTablesTable] ], () => { cy.get('#continue-btn').trigger('click').then(() => { - checkIfTreeHasTables(['DC996664.MPE_X_TEST', 'DC996664.MPE_TABLES'], 'DC996664.MPE_X_TEST', (includes: boolean) => { + checkIfTreeHasTables([`${library}.${mpeXTestTable}`, `${library}.${mpeTablesTable}`], `${library}.${mpeXTestTable}`, (includes: boolean) => { if (includes) { cy.get('#hotTable').should('be.visible').then(() => { checkHotUserDatasetTable('hotTable', [ @@ -125,7 +126,6 @@ context('excel multi load tests: ', function () { this.afterEach(() => { colorLog(`TEST END -------------`, '#3498DB') - // cy.visit(`${hostUrl}/SASLogon/logout`) }) }) diff --git a/client/cypress/e2e/excel.cy.ts b/client/cypress/e2e/excel.cy.ts index 6d42b79..ac2a9a7 100644 --- a/client/cypress/e2e/excel.cy.ts +++ b/client/cypress/e2e/excel.cy.ts @@ -17,9 +17,6 @@ context('excel tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') @@ -337,7 +334,6 @@ context('excel tests: ', function () { this.afterEach(() => { colorLog(`TEST END -------------`, '#3498DB') - // cy.visit(`${hostUrl}/SASLogon/logout`) }) }) diff --git a/client/cypress/e2e/filtering.cy.ts b/client/cypress/e2e/filtering.cy.ts index cbd2a6e..a543e20 100644 --- a/client/cypress/e2e/filtering.cy.ts +++ b/client/cypress/e2e/filtering.cy.ts @@ -15,9 +15,7 @@ context('filtering tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation, { timeout: longerCommandTimeout }) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() + visitPage('home') }) @@ -174,10 +172,6 @@ context('filtering tests: ', function () { // }) // }) // }) - - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) }) const checkInfoBarIncludes = (text: string, callback: any) => { diff --git a/client/cypress/e2e/licensing.cy.ts b/client/cypress/e2e/licensing.cy.ts index 4f835b2..b7dfa3a 100644 --- a/client/cypress/e2e/licensing.cy.ts +++ b/client/cypress/e2e/licensing.cy.ts @@ -23,15 +23,12 @@ interface EditConfigTableCells { context('licensing tests: ', function () { this.beforeAll(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) + cy.loginAndUpdateValidKey() }) this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') }) @@ -375,9 +372,7 @@ context('licensing tests: ', function () { }) } - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) + }) const logout = (callback?: any) => { diff --git a/client/cypress/e2e/liveness.cy.ts b/client/cypress/e2e/liveness.cy.ts index 8b5f5da..9304d1b 100644 --- a/client/cypress/e2e/liveness.cy.ts +++ b/client/cypress/e2e/liveness.cy.ts @@ -18,9 +18,6 @@ context('liveness tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') }) diff --git a/client/cypress/e2e/viewbox.cy.ts b/client/cypress/e2e/viewbox.cy.ts index 00c211f..08615a1 100644 --- a/client/cypress/e2e/viewbox.cy.ts +++ b/client/cypress/e2e/viewbox.cy.ts @@ -16,7 +16,6 @@ context('editor tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - cy.wait(2000) cy.get('body').then(($body) => { @@ -393,10 +392,6 @@ context('editor tests: ', function () { // } // ) // }) - - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) }) const removeAllColumns = () => { diff --git a/client/cypress/integration/editor.tests.ts b/client/cypress/integration/editor.tests.ts index 50f0c52..08b0c27 100644 --- a/client/cypress/integration/editor.tests.ts +++ b/client/cypress/integration/editor.tests.ts @@ -15,9 +15,6 @@ context('editor tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') }) @@ -118,10 +115,6 @@ context('editor tests: ', function () { }) }) }) - - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) }) const clickOnEdit = (callback?: any) => { diff --git a/client/cypress/integration/excel.tests.ts b/client/cypress/integration/excel.tests.ts index ceac1dc..260c690 100644 --- a/client/cypress/integration/excel.tests.ts +++ b/client/cypress/integration/excel.tests.ts @@ -19,9 +19,6 @@ context('excel tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') @@ -339,7 +336,6 @@ context('excel tests: ', function () { this.afterEach(() => { colorLog(`TEST END -------------`, '#3498DB') - // cy.visit(`${hostUrl}/SASLogon/logout`) }) }) diff --git a/client/cypress/integration/filtering.tests.ts b/client/cypress/integration/filtering.tests.ts index 19e368d..9ae13a3 100644 --- a/client/cypress/integration/filtering.tests.ts +++ b/client/cypress/integration/filtering.tests.ts @@ -15,9 +15,7 @@ context('filtering tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation, { timeout: longerCommandTimeout }) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() + visitPage('home') }) @@ -173,10 +171,6 @@ context('filtering tests: ', function () { }) }) }) - - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) }) const checkInfoBarIncludes = (text: string, callback: any) => { diff --git a/client/cypress/integration/licensing.tests.ts b/client/cypress/integration/licensing.tests.ts index 05031b9..d89c360 100644 --- a/client/cypress/integration/licensing.tests.ts +++ b/client/cypress/integration/licensing.tests.ts @@ -23,15 +23,12 @@ interface EditConfigTableCells { context('licensing tests: ', function () { this.beforeAll(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) + cy.loginAndUpdateValidKey() }) this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') }) @@ -375,9 +372,7 @@ context('licensing tests: ', function () { }) } - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) + }) const logout = (callback?: any) => { diff --git a/client/cypress/integration/liveness.tests.ts b/client/cypress/integration/liveness.tests.ts index 3e17c4e..cd86af3 100644 --- a/client/cypress/integration/liveness.tests.ts +++ b/client/cypress/integration/liveness.tests.ts @@ -18,9 +18,6 @@ context('liveness tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - // cy.get('input.username').type(username) - // cy.get('input.password').type(password) - // cy.get('.login-group button').click() visitPage('home') }) diff --git a/client/cypress/integration/viewbox.tests.ts b/client/cypress/integration/viewbox.tests.ts index ea139c8..b8ddc92 100644 --- a/client/cypress/integration/viewbox.tests.ts +++ b/client/cypress/integration/viewbox.tests.ts @@ -17,7 +17,6 @@ context('editor tests: ', function () { this.beforeEach(() => { cy.visit(hostUrl + appLocation) - cy.wait(2000) cy.get('body').then(($body) => { @@ -386,10 +385,6 @@ context('editor tests: ', function () { } ) }) - - this.afterEach(() => { - // cy.visit(`${hostUrl}/SASLogon/logout`) - }) }) const checkColumns = (columns: string[], callback: () => void) => { diff --git a/client/src/app/_globals.ts b/client/src/app/_globals.ts index f0ba4fb..a359950 100644 --- a/client/src/app/_globals.ts +++ b/client/src/app/_globals.ts @@ -43,6 +43,10 @@ export interface XLMapListItem { targetDS: string } +export interface HandsontableStaticConfig { + darkTableHeaderClass: string +} + /** * Cached filtering values across whole app (editor, viewer, viewboxes) * Cached lineage libraries, tables @@ -62,6 +66,7 @@ export const globals: { viyaApi: any usernav: any operators: any + handsontable: HandsontableStaticConfig [key: string]: any } = { rootParam: '', @@ -140,5 +145,8 @@ export const globals: { operators: { numOperators: ['=', '<', '>', '<=', '>=', 'BETWEEN', 'IN', 'NOT IN', 'NE'], charOperators: ['=', '<', '>', '<=', '>=', 'CONTAINS', 'IN', 'NOT IN', 'NE'] + }, + handsontable: { + darkTableHeaderClass: 'darkTH' } } diff --git a/client/src/app/editor/editor.component.ts b/client/src/app/editor/editor.component.ts index ff098fa..75fe59f 100644 --- a/client/src/app/editor/editor.component.ts +++ b/client/src/app/editor/editor.component.ts @@ -2468,7 +2468,7 @@ export class EditorComponent implements OnInit, AfterViewInit { } // Dark mode - th.classList.add('darkTH') + th.classList.add(globals.handsontable.darkTableHeaderClass) }, afterGetCellMeta: ( row: number, diff --git a/client/src/app/routes/multi-dataset-route/multi-dataset-route.component.scss b/client/src/app/routes/multi-dataset-route/multi-dataset-route.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/client/src/app/routes/multi-dataset-route/multi-dataset-route.component.ts b/client/src/app/routes/multi-dataset-route/multi-dataset-route.component.ts index 44eddf2..2cd6367 100644 --- a/client/src/app/routes/multi-dataset-route/multi-dataset-route.component.ts +++ b/client/src/app/routes/multi-dataset-route/multi-dataset-route.component.ts @@ -3,7 +3,6 @@ import { Component, OnInit, OnDestroy } from '@angular/core' @Component({ selector: 'app-multi-dataset-route', templateUrl: './multi-dataset-route.component.html', - styleUrls: ['./multi-dataset-route.component.scss'], host: { class: 'content-container' } diff --git a/client/src/app/services/sas-store.service.ts b/client/src/app/services/sas-store.service.ts index 4be8ab6..9a700fc 100644 --- a/client/src/app/services/sas-store.service.ts +++ b/client/src/app/services/sas-store.service.ts @@ -100,7 +100,7 @@ export class SasStoreService { tables[tableName] = [tableParams] - let res: any = await this.sasService.request(program, tables, null, { + let res = await this.sasService.request(program, tables, null, { suppressErrorAbortModal: suppressErrorSuccessMessages, suppressSuccessAbortModal: suppressErrorSuccessMessages }) diff --git a/client/src/app/services/sas.service.ts b/client/src/app/services/sas.service.ts index b34b2a0..e6c6950 100644 --- a/client/src/app/services/sas.service.ts +++ b/client/src/app/services/sas.service.ts @@ -97,12 +97,12 @@ export class SasService { * for example to suppress error or success abort modals after request is finished * @returns */ - public request( + public request( url: string, data: any, config?: any, wrapperOptions?: RequestWrapperOptions - ): Promise { + ): Promise { url = 'services/' + url if (!wrapperOptions) wrapperOptions = {} diff --git a/client/src/app/services/spreadsheet.service.ts b/client/src/app/services/spreadsheet.service.ts index a6f7d20..778882f 100644 --- a/client/src/app/services/spreadsheet.service.ts +++ b/client/src/app/services/spreadsheet.service.ts @@ -95,10 +95,10 @@ export class SpreadsheetService { ): Promise { return new Promise((resolve, reject) => { let data: any[] = [] - let uploader: FileUploader = parseParams.uploader || new FileUploader() + const uploader: FileUploader = parseParams.uploader || new FileUploader() - let file: File = parseParams.file - let filename = file.name + const file: File = parseParams.file + const filename = file.name if (!parseParams.encoding) parseParams.encoding = 'UTF-8' @@ -485,7 +485,7 @@ export class SpreadsheetService { let sheetName: string = '' let isComplete = false let missingHeaders: string[] = [] - let csvArrayHeaders: string[] = [ + const csvArrayHeaders: string[] = [ '_____DELETE__THIS__RECORD_____', ...parseParams.headerArray ] @@ -637,7 +637,7 @@ export class SpreadsheetService { parseParams: ParseParams ): Array { let headersFound = false - let missingErrorArray = [] + const missingErrorArray = [] let j = 0 while (j < row.length) { @@ -747,7 +747,8 @@ export class SpreadsheetService { * @param ws worksheet to be updated */ private update_sheet_range(ws: XLSX.WorkSheet) { - var range = { s: { r: Infinity, c: Infinity }, e: { r: 0, c: 0 } } + const range = { s: { r: Infinity, c: Infinity }, e: { r: 0, c: 0 } } + Object.keys(ws) .filter(function (x) { return x.charAt(0) != '!' @@ -772,26 +773,6 @@ export class SpreadsheetService { this.excelPasswordModalService.open().subscribe((result: Result) => { resolve(result.password) }) - - // Focus the password field - // setTimeout(() => { - // const filePasswordInputElement: any = - // document.querySelector('#filePasswordInput') - // if (filePasswordInputElement) { - // filePasswordInputElement.focus() - // filePasswordInputElement.value = '' - // } - // }, 100) - - // this.filePasswordSubject.subscribe((password: string | undefined) => { - // this.fileUnlockError = false - - // if (password) { - // resolve(password) - // } else { - // resolve(undefined) - // } - // }) }) } @@ -801,7 +782,7 @@ export class SpreadsheetService { parseParams: ParseParams ) { if (parseParams.dateHeaders.length > 0) { - let dateCols: number[] = [] + const dateCols: number[] = [] parseParams.dateHeaders.forEach((element) => { if (headers.indexOf(element) !== -1) { dateCols.push(headers.indexOf(element)) @@ -865,7 +846,7 @@ export class SpreadsheetService { dateTimeCols.forEach((element) => { const obj = row[element] if (isStringNumber(obj.v) || isStringDecimal(obj.v)) { - let date = excelDateToJSDate(Number(obj.v)) + const date = excelDateToJSDate(Number(obj.v)) obj.v = dateFormat(date) + ' ' + dateToUtcTime(date) } else { if (obj.v.indexOf(' ') === -1 && obj.v.indexOf(':') !== -1) { @@ -873,7 +854,7 @@ export class SpreadsheetService { str = str + ' ' + obj.v.substring(obj.v.indexOf(':') + 1) obj.v = str } - let date = new Date(obj.v) + const date = new Date(obj.v) if (date.toUTCString() !== 'Invalid Date') { obj.v = dateFormat(date) + ' ' + dateToTime(date) } diff --git a/client/src/app/shared/excel-password-modal/excel-password-modal.component.scss b/client/src/app/shared/excel-password-modal/excel-password-modal.component.scss deleted file mode 100644 index e69de29..0000000 diff --git a/client/src/app/shared/excel-password-modal/excel-password-modal.component.ts b/client/src/app/shared/excel-password-modal/excel-password-modal.component.ts index 82813ee..d78a5c8 100644 --- a/client/src/app/shared/excel-password-modal/excel-password-modal.component.ts +++ b/client/src/app/shared/excel-password-modal/excel-password-modal.component.ts @@ -7,8 +7,7 @@ import { @Component({ selector: 'app-excel-password-modal', - templateUrl: './excel-password-modal.component.html', - styleUrl: './excel-password-modal.component.scss' + templateUrl: './excel-password-modal.component.html' }) export class ExcelPasswordModalComponent { options$: Observable diff --git a/client/src/app/shared/utils/hot.utils.ts b/client/src/app/shared/utils/hot.utils.ts index caa232e..9c546c7 100644 --- a/client/src/app/shared/utils/hot.utils.ts +++ b/client/src/app/shared/utils/hot.utils.ts @@ -1,3 +1,5 @@ +import { globals } from "../../_globals" + /** * Function reused in HOT instances to add a class used for dark mode */ @@ -7,5 +9,5 @@ export const baseAfterGetColHeader = ( headerLevel: number ) => { // Dark mode - TH.classList.add('darkTH') + TH.classList.add(globals.handsontable.darkTableHeaderClass) } diff --git a/client/src/app/shared/viewboxes/viewboxes.component.ts b/client/src/app/shared/viewboxes/viewboxes.component.ts index 4c3abeb..41b7b9f 100644 --- a/client/src/app/shared/viewboxes/viewboxes.component.ts +++ b/client/src/app/shared/viewboxes/viewboxes.component.ts @@ -434,7 +434,7 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy { if (isPKCol) th.classList.add('primaryKeyHeaderStyle') // Dark mode - th.classList.add('darkTH') + th.classList.add(globals.handsontable.darkTableHeaderClass) } }) hotInstance?.render() diff --git a/client/src/app/stage/stage.component.ts b/client/src/app/stage/stage.component.ts index 475e6b4..76bfb70 100644 --- a/client/src/app/stage/stage.component.ts +++ b/client/src/app/stage/stage.component.ts @@ -35,7 +35,7 @@ export class StageComponent implements OnInit { maxRows: this.licenceState.value.stage_rows_allowed || Infinity, afterGetColHeader: (column, th, headerLevel) => { // Dark mode - th.classList.add('darkTH') + th.classList.add(globals.handsontable.darkTableHeaderClass) } } diff --git a/client/src/app/viewer/viewer.component.ts b/client/src/app/viewer/viewer.component.ts index f42d6ef..40116d8 100644 --- a/client/src/app/viewer/viewer.component.ts +++ b/client/src/app/viewer/viewer.component.ts @@ -9,7 +9,7 @@ import { import { SasStoreService } from '../services/sas-store.service' import { Subscription } from 'rxjs' -import { Params, Router } from '@angular/router' +import { Router } from '@angular/router' import { ActivatedRoute } from '@angular/router' import { globals } from '../_globals' @@ -18,7 +18,6 @@ import { HelperService } from '../services/helper.service' import { HotTableRegisterer } from '@handsontable/angular' import { SasService } from '../services/sas.service' import { SASjsConfig } from '@sasjs/adapter' -import { AppService } from '../services/app.service' import { QueryComponent } from '../query/query.component' import { FilterGroup, FilterQuery } from '../models/FilterQuery' @@ -118,7 +117,7 @@ export class ViewerComponent implements AfterContentInit, AfterViewInit { }, afterGetColHeader: (col: number, th: any, headerLevel: number) => { // Dark mode - th.classList.add('darkTH') + th.classList.add(globals.handsontable.darkTableHeaderClass) }, rowHeaderWidth: 15, rowHeights: 20, @@ -1076,7 +1075,7 @@ export class ViewerComponent implements AfterContentInit, AfterViewInit { if (isPKCol) th.classList.add('primaryKeyHeaderStyle') // Dark mode - th.classList.add('darkTH') + th.classList.add(globals.handsontable.darkTableHeaderClass) } }) } diff --git a/client/src/app/xlmap/xlmap.component.ts b/client/src/app/xlmap/xlmap.component.ts index efbec34..bee8bd0 100644 --- a/client/src/app/xlmap/xlmap.component.ts +++ b/client/src/app/xlmap/xlmap.component.ts @@ -145,7 +145,7 @@ export class XLMapComponent implements AfterContentInit, AfterViewInit, OnInit { public afterGetColHeader(column: number, th: any) { // Dark mode - th.classList.add('darkTH') + th.classList.add(globals.handsontable.darkTableHeaderClass) } public xlmapOnClick(xlmap: XLMapListItem) { diff --git a/client/src/colors.scss b/client/src/colors.scss index f4fef2c..a26d0b0 100644 --- a/client/src/colors.scss +++ b/client/src/colors.scss @@ -1,4 +1,6 @@ $headerBackground: #314351; $trackColor: #3b5268; -$thumbColor: #273849; \ No newline at end of file +$thumbColor: #273849; + +$codeBorder: #e2e2e2; \ No newline at end of file diff --git a/client/src/styles.scss b/client/src/styles.scss index d60957f..f7cd30a 100644 --- a/client/src/styles.scss +++ b/client/src/styles.scss @@ -103,7 +103,7 @@ body[cds-theme="light"] { white-space: pre-wrap; border-radius: 3px; - border: 1px solid #e2e2e2; + border: 1px solid $codeBorder; height: 48vh; overflow: auto;