Compare commits

...

27 Commits

Author SHA1 Message Date
semantic-release-bot e4a0089102 chore(release): 6.2.0 [skip ci]
Build / Build-and-ng-test (pull_request) Successful in 23s Details
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)

### Bug Fixes

* re-enabling full REPLACE uploads ([08e39c4](08e39c4fca))

### Features

* support for European numeric formats ([e48e47b](e48e47bc63))
2023-08-24 08:53:36 +00:00
Mihajlo Medjedovic ba022d8a35 ci: surfer install
Release / release (push) Failing after 11m15s Details
2023-08-24 10:51:38 +02:00
semantic-release-bot c8ac859d2e chore(release): 6.2.0 [skip ci]
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)

### Bug Fixes

* re-enabling full REPLACE uploads ([08e39c4](08e39c4fca))

### Features

* support for European numeric formats ([e48e47b](e48e47bc63))
2023-08-24 08:30:06 +00:00
allan d6fd72e880 Merge pull request 'Create Release' (#22) from development into main
Release / release (push) Failing after 11m15s Details
Reviewed-on: #22
2023-08-23 23:12:38 +00:00
allan 61cc360c85 Merge pull request 'fix: re-enabling full REPLACE uploads' (#21) from issue20 into development
Build / Build-and-ng-test (pull_request) Successful in 23s Details
Reviewed-on: #21
2023-08-23 23:10:23 +00:00
Allan 08e39c4fca fix: re-enabling full REPLACE uploads
Build / Build-and-ng-test (pull_request) Successful in 24s Details
Implemented by provision of the necessary temp tables
2023-08-24 00:09:25 +01:00
allan 8c2ee441fc Merge pull request 'Added support for European numeric formats' (#16) from issue-1 into development
Reviewed-on: #16
Reviewed-by: allan <allan@4gl.io>
2023-08-23 14:46:37 +00:00
allan 0a7d23c763 Merge branch 'development' into issue-1
Build / Build-and-ng-test (pull_request) Successful in 25s Details
2023-08-23 14:45:59 +00:00
allan 0ae35214fb Merge pull request 'Removed ng build and ng test from PR action' (#17) from ci into development
Reviewed-on: #17
Reviewed-by: allan <allan@4gl.io>
2023-07-31 12:05:32 +00:00
Mihajlo Medjedovic 34ffac39cb ci: PR will only run lint check
Build / Build-and-ng-test (pull_request) Successful in 23s Details
2023-07-31 13:13:00 +02:00
Mihajlo Medjedovic 52d4b3eefc chore(git): Merge branch 'issue-1' of ssh://git.datacontroller.io:29419/dc/dc into issue-1
Build / Build-and-ng-test (pull_request) Successful in 7m52s Details
2023-07-31 10:12:40 +02:00
Mihajlo Medjedovic 908d2761f2 chore: addressing comments 2023-07-31 10:12:22 +02:00
mihajlo 7c98ad8c5b Merge branch 'development' into issue-1
Build / Build-and-ng-test (pull_request) Successful in 7m40s Details
2023-07-28 18:10:25 +00:00
Mihajlo Medjedovic 5bb55e6484 style: lint
Build / Build-and-ng-test (pull_request) Successful in 7m39s Details
2023-07-28 20:03:58 +02:00
Mihajlo Medjedovic e48e47bc63 feat: support for European numeric formats 2023-07-28 20:03:41 +02:00
allan 2a3f4f755c Merge pull request 'Releasing of `tsdoc.datacontroller.io`' (#15) from ci into development
Test / Build-and-test-development (push) Successful in 11m20s Details
Test / Build-and-test-development-latest-adapter (push) Successful in 11m23s Details
Reviewed-on: #15
Reviewed-by: allan <allan@4gl.io>
2023-07-27 19:34:16 +00:00
Mihajlo Medjedovic ddfae9227c chore(git): Merge branch 'development' into ci
Build / Build-and-ng-test (pull_request) Successful in 7m31s Details
2023-07-27 19:26:06 +02:00
mihajlo c74378423d Merge pull request 'chore: improving the descriptions of the steps in the release.yaml file' (#11) from releasedoc into development
Test / Build-and-test-development (push) Successful in 11m25s Details
Test / Build-and-test-development-latest-adapter (push) Successful in 11m25s Details
Reviewed-on: #11
Reviewed-by: mihajlo <mihajlo@4gl.io>
2023-07-27 17:24:51 +00:00
Mihajlo Medjedovic 0e020623a5 chore(git): Merge branch 'development' into releasedoc
Build / Build-and-ng-test (pull_request) Successful in 7m34s Details
2023-07-27 19:23:57 +02:00
Mihajlo Medjedovic eeb4000efe ci: releasing typedoc 2023-07-27 19:20:14 +02:00
mihajlo 2053c858ac Merge pull request 'Added cypress videos to the build artifacts' (#14) from ci into development
Test / Build-and-test-development (push) Successful in 11m29s Details
Test / Build-and-test-development-latest-adapter (push) Successful in 11m34s Details
Reviewed-on: #14
Reviewed-by: allan <allan@4gl.io>
2023-07-27 12:58:08 +00:00
Mihajlo Medjedovic 4c2c5d5526 style: lint
Build / Build-and-ng-test (pull_request) Successful in 7m38s Details
2023-07-27 13:49:13 +02:00
Mihajlo Medjedovic 7ccc745eb2 chore(git): Merge branch 'development' into ci
Build / Build-and-ng-test (pull_request) Failing after 1m2s Details
2023-07-27 13:15:39 +02:00
Mihajlo Medjedovic e93367fb42 ci: capturing cypress videos
Build / Build-and-ng-test (pull_request) Failing after 1m3s Details
2023-07-27 13:09:16 +02:00
allan 250fb1e8cf Merge pull request 'ci: release' (#13) from ci into development
Test / Build-and-test-development (push) Failing after 12m32s Details
Test / Build-and-test-development-latest-adapter (push) Successful in 11m15s Details
Reviewed-on: #13
Reviewed-by: allan <allan@4gl.io>
2023-07-26 19:02:05 +00:00
Mihajlo Medjedovic 1c2b87940d ci: release
Build / Build-and-ng-test (pull_request) Successful in 7m30s Details
2023-07-26 13:39:04 +02:00
Allan 25fed203c6 chore: improving the descriptions of the steps in the release.yaml file
Build / Build-and-ng-test (pull_request) Successful in 7m29s Details
2023-07-25 21:36:10 +01:00
16 changed files with 552 additions and 410 deletions

View File

@ -1,5 +1,5 @@
name: Build
run-name: Building and testing DC
run-name: Running Lint Check
on: [pull_request]
jobs:
@ -18,21 +18,4 @@ jobs:
env:
NPMRC: ${{ secrets.NPMRC}}
- run: apt-get update
- run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- run: apt install -y ./google-chrome*.deb;
- run: export CHROME_BIN=/usr/bin/google-chrome
- run: npm run lint:check
# Install dependencies~
- run: npm ci
# Audit should fail and stop the CI if critical vulnerability found
- run: npm audit --audit-level=critical
- run: |
cd ./sas
npm audit --audit-level=critical
- run: |
cd ./client
npm audit --audit-level=critical
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
npm run postinstall
npm run build
- run: npm run lint:check

View File

@ -6,6 +6,53 @@ on:
- development
jobs:
Build-production-and-ng-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Write .npmrc file
run: |
touch client/.npmrc
echo '${{ secrets.NPMRC}}' > client/.npmrc
- name: Install Chrome for Angular tests
run: apt-get update
run: wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
run: apt install -y ./google-chrome*.deb;
run: export CHROME_BIN=/usr/bin/google-chrome
- name: Write cypress credentials
run: echo "$CYPRESS_CREDS" > ./client/cypress.env.json
shell: bash
env:
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
- name: Install dependencies
run: npm ci
- name: Check audit
# Audit should fail and stop the CI if critical vulnerability found
run: |
npm audit --audit-level=critical
cd ./sas
npm audit --audit-level=critical
cd ./client
npm audit --audit-level=critical
- name: Angular Tests
run: |
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
- name: Angular Production Build
run: |
npm run postinstall
npm run build
Build-and-test-development:
runs-on: ubuntu-latest
@ -34,7 +81,9 @@ jobs:
env:
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
- run: npm ci
- name: Install dependencies
run: npm ci
# Install pm2 and prepare SASJS server
- run: npm i -g pm2
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
@ -77,6 +126,17 @@ jobs:
# Start frontend and run cypress
npm start & npx wait-on http://localhost:4200 && npx cypress run --browser chrome --spec "cypress/e2e/liveness.cy.ts,cypress/e2e/editor.cy.ts,cypress/e2e/excel.cy.ts,cypress/e2e/filtering.cy.ts,cypress/e2e/licensing.cy.ts"
- name: Zip Cypress videos
if: always()
run: |
zip -r cypress-videos ./client/cypress/videos
- name: Cypress videos artifacts
uses: actions/upload-artifact@v3
with:
name: cypress-videos.zip
path: cypress-videos.zip
Build-and-test-development-latest-adapter:
runs-on: ubuntu-latest
@ -106,7 +166,9 @@ jobs:
env:
CYPRESS_CREDS: ${{ secrets.CYPRESS_CREDS }}
- run: npm ci
- name: Install dependencies
run: npm ci
# Install pm2 and prepare SASJS server
- run: npm i -g pm2
- run: curl -L https://github.com/sasjs/server/releases/latest/download/linux.zip > linux.zip
@ -125,7 +187,6 @@ jobs:
npm install -g @sasjs/cli
npm install -g replace-in-files-cli
sasjs cbd -t server-ci
# sasjs request services/admin/makedata -t server-ci -d ./deploy/makeData4GL.json -c ./deploy/requestConfig.json -o ./output.json
- name: Install ZIP
run: |
@ -148,4 +209,15 @@ jobs:
replace-in-files --regex='"hosturl".*' --replacement='hosturl:"http://localhost:4200",' ./cypress.config.ts
cat ./cypress.config.ts
# Start frontend and run cypress
npm start & npx wait-on http://localhost:4200 && npx cypress run --browser chrome --spec "cypress/e2e/liveness.cy.ts,cypress/e2e/editor.cy.ts,cypress/e2e/excel.cy.ts,cypress/e2e/filtering.cy.ts,cypress/e2e/licensing.cy.ts"
npm start & npx wait-on http://localhost:4200 && npx cypress run --browser chrome --spec "cypress/e2e/liveness.cy.ts,cypress/e2e/editor.cy.ts,cypress/e2e/excel.cy.ts,cypress/e2e/filtering.cy.ts,cypress/e2e/licensing.cy.ts"
- name: Zip Cypress videos
if: always()
run: |
zip -r cypress-videos ./client/cypress/videos
- name: Cypress videos artifacts
uses: actions/upload-artifact@v3
with:
name: cypress-videos-latest-adapter.zip
path: cypress-videos.zip

View File

@ -22,32 +22,30 @@ jobs:
env:
NPMRC: ${{ secrets.NPMRC}}
- name: Install ZIP and SASjs CLI
- name: Install packages
run: |
apt-get update
apt-get install zip -y
# sasjs cli is used to compile & build the SAS services
npm i -g @sasjs/cli
# test
- name: Install JQ for parsing JSON
run: |
apt-get update
# jq is used to parse the release JSON
apt-get install jq -y
- name: Install Semantic Release and plugins and create Release
- name: Create Empty Release (assets are posted later)
run: |
npm i
npm i -g semantic-release
GITEA_TOKEN=${{ secrets.RELEASE_TOKEN }} GITEA_URL=https://git.datacontroller.io semantic-release
- name: Frontend Build
description: Must be created AFTER the release as the version (git tag) is used in the interface
run: |
cd client
npm ci
npm run build
- name: Build SAS9 EBI Release
description: compile SAS 9 services, remove tests & create deployment program
description: Compile SAS 9 services, remove tests & create deployment program
run: |
cd sas
npm ci
@ -64,7 +62,7 @@ jobs:
cp sasjsbuild/mysas9deploy.sas ./sas9.sas
- name: Build SASjs Server Release
description: compile Base (SASjs) services, remove tests & create deployment JSON
description: Compile Base (SASjs) services, remove tests & create deployment JSON
run: |
cd sas
cp sasjs/utils/favicon.ico ../client/dist/favicon.ico
@ -98,12 +96,17 @@ jobs:
- name: Release Typedoc
run: |
cd client
npm -g install cloudron-surfer
npm run typedoc
# deploy docs
surfer put --token ${{ secrets.TSDOC_TOKEN }} --server tsdoc.datacontroller.io ../tsdoc /
- name: Upload assets to release
run: |
RELEASE_ID=`curl -k 'https://git.datacontroller.io/api/v1/repos/dc/dc/releases/latest?access_token=${{ secrets.RELEASE_TOKEN }}' | jq -r '.id'`
RELEASE_BODY=`curl -k 'https://git.datacontroller.io/api/v1/repos/dc/dc/releases/latest?access_token=${{ secrets.RELEASE_TOKEN }}' | jq -r '.body'`
# Update body
curl --data '{"draft": true,"body":"'"$RELEASE_BODY\n\nFor installation instructions, please visit https://docs.datacontroller.io/"'"}' -X PATCH --header 'Content-Type: application/json' -k https://git.datacontroller.io/api/v1/repos/dc/dc/releases/$RELEASE_ID?access_token=${{ secrets.RELEASE_TOKEN }}
# Upload assets
URL="https://git.datacontroller.io/api/v1/repos/dc/dc/releases/$RELEASE_ID/assets?access_token=${{ secrets.RELEASE_TOKEN }}"
curl -k $URL -F attachment=@frontend.zip
curl -k $URL -F attachment=@sas/demostream_sas9.sas

View File

@ -1,3 +1,27 @@
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)
### Bug Fixes
* re-enabling full REPLACE uploads ([08e39c4](https://git.datacontroller.io/dc/dc/commit/08e39c4fca570406f9aad3d907cb04596421d074))
### Features
* support for European numeric formats ([e48e47b](https://git.datacontroller.io/dc/dc/commit/e48e47bc635452b59e107b235e597c26e748875e))
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)
### Bug Fixes
* re-enabling full REPLACE uploads ([08e39c4](https://git.datacontroller.io/dc/dc/commit/08e39c4fca570406f9aad3d907cb04596421d074))
### Features
* support for European numeric formats ([e48e47b](https://git.datacontroller.io/dc/dc/commit/e48e47bc635452b59e107b235e597c26e748875e))
# [6.1.0](https://git.datacontroller.io/dc/dc/compare/v6.0.0...v6.1.0) (2023-07-25)

719
client/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -29,7 +29,7 @@
"cy:run": "cypress run",
"audit:prod": "npm audit --omit=dev",
"sasdocs": "sasjs doc && ./sasjs/utils/deploydocs.sh",
"typedoc": "typedoc --options typedoc.json && cd ../dc-devdocs"
"typedoc": "typedoc --options typedoc.json && cd ../tsdoc"
},
"private": true,
"dependencies": {
@ -69,7 +69,6 @@
"ngx-clipboard": "^16.0.0",
"ngx-json-viewer": "file:libraries/ngx-json-viewer-3.2.1.tgz",
"nodejs": "0.0.0",
"numbro": "^2.1.1",
"os-browserify": "0.3.0",
"rxjs": "^7.8.0",
"save-svg-as-png": "^1.4.17",

View File

@ -1,5 +1,5 @@
declare module 'save-svg-as-png'
declare module 'numbro/dist/languages.min'
declare interface Navigator {
msSaveBlob: (blob: any, defaultName?: string) => boolean
}

View File

@ -385,7 +385,6 @@
[class.hidden]="hotTable.hidden"
[licenseKey]="hotTable.licenseKey"
>
<!--[licenseKey]=""-->
</hot-table>
</div>

View File

@ -63,6 +63,8 @@ import {
} from './utils/renderers.utils'
import { isStringDecimal, isStringNumber } from './utils/types.utils'
import { LicenceService } from '../services/licence.service'
import * as numbro from 'numbro'
import * as languages from 'numbro/dist/languages.min'
@Component({
selector: 'app-editor',
@ -362,6 +364,10 @@ export class EditorComponent implements OnInit, AfterViewInit {
private cdf: ChangeDetectorRef,
private hotRegisterer: HotTableRegisterer
) {
const lang = languages[window.navigator.language]
if (lang)
numbro.default.registerLanguage(languages[window.navigator.language])
this.hotRegisterer = new HotTableRegisterer()
this.parseRestrictions()

View File

@ -19,6 +19,7 @@ import { mergeColsRules } from './utils/mergeColsRules'
import { parseColType } from './utils/parseColType'
import { dqValidate } from './validations/dq-validation'
import { specialMissingNumericValidator } from './validations/hot-custom-validators'
import { applyNumericFormats } from './utils/applyNumericFormats'
export class DcValidator {
private rules: DcValidation[] = []
@ -41,6 +42,7 @@ export class DcValidator {
this.hotInstance = hotInstance
this.rules = parseColType(sasparams.COLTYPE)
this.rules = mergeColsRules(cols, this.rules, $dataFormats)
this.rules = applyNumericFormats(this.rules)
this.dqrules = dqRules
this.dqdata = dqData
this.primaryKeys = sasparams.PK.split(' ')

View File

@ -0,0 +1,26 @@
import { DcValidation } from '../models/dc-validation.model'
import * as languages from 'numbro/dist/languages.min'
/**
* Applying the numeric formats based on the browser locale/language
* So that correct decimal separators are applied.
* For example european format (thousand dot, decimal comma): 1.000,00
*
* @param rules Cell Validation rules to be updated
* Those rules are passed in the `columns` property Of handsontable settings.
*/
export const applyNumericFormats = (rules: DcValidation[]): DcValidation[] => {
const lang = languages[window.navigator.language]
if (!lang) return rules
for (let rule of rules) {
if (rule.type === 'numeric')
rule.numericFormat = {
pattern: '0,0',
culture: window.navigator.language // use this for EUR (German),
// more cultures available on http://numbrojs.com/languages.html
}
}
return rules
}

View File

@ -6,7 +6,8 @@ import { DcValidation } from '../models/dc-validation.model'
* Merging old validation params from sasparams with cols params
* @param sasparams sasparams coming from SAS
* @param cols cols coming from SAS
* @param rules rules to be updated
* @param rules Cell Validation rules to be updated
* Those rules are passed in the `columns` property Of handsontable settings.
* @returns
*/
export const mergeColsRules = (

View File

@ -5,27 +5,17 @@ Licence Agreement for Data Controller for SAS®
Copyright (c) Bowe IO Ltd
Data Controller is a software distributed by 4GL Apps, a brand owned by Bowe IO Ltd, a UK Limited Company headquarted in 29 Oldfield Rd, Cumbria, registered by companies house under number 08777171, VAT number: 203914240
Data Controller software is distributed by 4GL Apps, a brand owned by Bowe IO Ltd, a UK Limited Company headquarted in 29 Oldfield Rd, Cumbria, registered at Companies House with company number 08777171, VAT number: 203914240
This software is protected by applicable copyright laws, including international treaties, and dual-
licensed depending on whether your use for commercial purposes, meaning intended for or
resulting in commercial advantage or monetary compensation, or not.
This software is protected by applicable copyright laws, including international treaties, and dual-licensed depending on whether your use for commercial purposes, meaning intended for or resulting in commercial advantage or monetary compensation, or not.
If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing
the suitability, performance, and usefulness of this software outside the production environment,
you agree to be bound by the terms included in the "licence-non-commercial-datacontroller.md" file.
If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing the suitability, performance, and usefulness of this software outside the production environment, you agree to be bound by the terms included in the "licence-non-commercial-datacontroller.md" file available here: https://git.datacontroller.io/dc/dc/src/branch/main/licence-non-commercial-datacontroller.md
Your use of this software for commercial purposes is subject to the terms included in an applicable
license agreement.
Your use of this software for commercial purposes is subject to the terms included in an applicable license agreement.
In any case, you must not make any such use of this software as to develop software which may be
considered competitive with this software.
In any case, you must not make any such use of this software as to develop software which may be considered competitive with this software.
UNLESS EXPRESSLY AGREED OTHERWISE, 4GL APPS PROVIDES THIS SOFTWARE ON AN "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO
LEGAL THEORY, SHALL 4GL APPS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
USE OR INABILITY TO USE THIS SOFTWARE.
UNLESS EXPRESSLY AGREED OTHERWISE, 4GL APPS PROVIDES THIS SOFTWARE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO LEGAL THEORY, SHALL 4GL APPS BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM USE OR INABILITY TO USE THIS SOFTWARE.
`

View File

@ -1,12 +1,12 @@
{
"out": "../dc-devdocs",
"tsconfig": "./tsconfig.app.json",
"entryPointStrategy": "expand",
"entryPoints": [
"./src"
],
"exclude": "**/*+(index|.spec|.e2e).ts",
"externalPattern": "**/node_modules/**",
"excludeExternals": true,
"excludePrivate": true
}
"out": "../tsdoc",
"tsconfig": "./tsconfig.app.json",
"entryPointStrategy": "expand",
"entryPoints": [
"./src"
],
"exclude": "**/*+(index|.spec|.e2e).ts",
"externalPattern": "**/node_modules/**",
"excludeExternals": true,
"excludePrivate": true
}

View File

@ -141,6 +141,13 @@ run;
%mp_lockanytable(UNLOCK,lib=&lib,ds=&ds,ctl_ds=&dclib..mpe_lockanytable)
%end;
%else %do;
/* is full replace so treat everything as a mod in diff screen */
data work.outds_mod work.outds_add work.outds_del;
set work.&staging_ds;
output work.outds_mod; /* _add and _del will be empty */
run;
%end;
%end;
%else %if &loadtype=UPDATE %then %do;
%bitemporal_dataloader(bus_from=,bus_to=

View File

@ -597,6 +597,7 @@ run;
%if &LOADTYPE=REPLACE %then %do;
data work.outds_add; run;
data work.outds_mod; run;
data work.outds_del; run;
%end;
libname approve "&mpelocapprovals/&TABLE";
data; set &libds;stop;run;