Compare commits
87 Commits
dbeb003292
...
v6.3.0
Author | SHA1 | Date | |
---|---|---|---|
8cbcd18f4b | |||
6bb2378790 | |||
e7d0ffe8c0 | |||
ab89600c73 | |||
830e3816a0 | |||
dadac4f13f | |||
1de48a49af | |||
687a1e1cb5 | |||
665a04f5c5 | |||
fdb18d242b | |||
ec173da4ce | |||
bb35cc15d2 | |||
181f52eaea | |||
fc7c8101ed | |||
a347603fe0 | |||
09022c995f | |||
3609943f30 | |||
a1d308ea07 | |||
5579db0eaf | |||
3a3e488b23 | |||
0a82ec0a70 | |||
bc1d89218e | |||
817b9adeac | |||
a7aa42a59b | |||
34f239036d | |||
91f128c2fe | |||
a00ebea692 | |||
c27cdab3fc | |||
d7da2d7890 | |||
76f0fd4232 | |||
008b45ad17 | |||
4d49263816 | |||
6a2482e5c6 | |||
b5c3fb2af4 | |||
fa2c8eb839 | |||
f3e82b4ee2 | |||
ba67248155 | |||
a6d962bfaa | |||
95cddb52d4 | |||
5a5118d775 | |||
1b1cdd7a4b | |||
a9ddf7f7dd | |||
b54b3f1778 | |||
349a63c591 | |||
293d33912f | |||
357b9849e7 | |||
0c8a9eef32 | |||
112b1d0da4 | |||
a05007416a | |||
9f7dd55583 | |||
11b06f6416 | |||
adb7eb7755 | |||
b776b80728 | |||
73a149ea7b | |||
ef8784093b | |||
b30c788e3d | |||
23899bdff3 | |||
8bd0dd22c2 | |||
c55b00c74f | |||
c895f509b0 | |||
5968915331 | |||
44ffc082f6 | |||
b716ae5675 | |||
01a0b59494 | |||
8ebc3da0bb | |||
133577a4fa | |||
a19615db41 | |||
32b212a6bf | |||
00ec4529cd | |||
102d03888f | |||
9f8247320e | |||
ef871de30e | |||
b3a15ce26b | |||
270695aec2 | |||
ad7392a326 | |||
92a50a42e2 | |||
a3a8856d8c | |||
150c19b1b0 | |||
f04c51ee4e | |||
c4338bf957 | |||
5b06f4ede8 | |||
e7ab2cc956 | |||
5ebf8a66f7 | |||
3d4e886b9b | |||
a00d31caf3 | |||
40fe707287 | |||
8296be01ba |
@ -1,5 +1,5 @@
|
||||
name: Build
|
||||
run-name: Running Lint Check
|
||||
run-name: Running Lint Check and Licence checker on Pull Request
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
@ -18,8 +18,11 @@ jobs:
|
||||
env:
|
||||
NPMRC: ${{ secrets.NPMRC}}
|
||||
|
||||
- run: npm run lint:check
|
||||
- run: |
|
||||
- name: Lint check
|
||||
run: npm run lint:check
|
||||
|
||||
- name: Licence checker
|
||||
run: |
|
||||
cd client
|
||||
npm ci
|
||||
npm run license-checker
|
@ -1,223 +0,0 @@
|
||||
name: Test
|
||||
run-name: Building and testing development branch
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 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
|
||||
|
||||
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
|
||||
|
||||
- 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: apt-get update -y
|
||||
- run: apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
||||
- run: apt -y install jq
|
||||
|
||||
- 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
|
||||
|
||||
# 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
|
||||
- run: unzip linux.zip
|
||||
- run: touch .env
|
||||
- run: echo RUN_TIMES=js >> .env
|
||||
- run: echo NODE_PATH=node >> .env
|
||||
- run: echo CORS=enable >> .env
|
||||
- run: echo WHITELIST=http://localhost:4200 >> .env
|
||||
- run: cat .env
|
||||
- run: pm2 start api-linux --wait-ready
|
||||
|
||||
- name: Deploy mocked services
|
||||
run: |
|
||||
cd ./sas/mocks/sasjs
|
||||
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: |
|
||||
apt-get update
|
||||
apt-get install zip
|
||||
|
||||
- name: Prepare and run frontend and cypress
|
||||
run: |
|
||||
cd ./client
|
||||
mv ./cypress.env.example.json ./cypress.env.json
|
||||
replace-in-files --regex='"username".*' --replacement='"username":"'${{ secrets.CYPRESS_USERNAME_SASJS }}'",' ./cypress.env.json
|
||||
replace-in-files --regex='"password".*' --replacement='"password":"'${{ secrets.CYPRESS_PWD_SASJS }}'" ' ./cypress.env.json
|
||||
cat ./cypress.env.json
|
||||
npm run postinstall
|
||||
# Prepare index.html to SASJS local
|
||||
replace-in-files --regex='serverUrl=".*?"' --replacement='serverUrl="http://localhost:5000"' ./src/index.html
|
||||
replace-in-files --regex='appLoc=".*?"' --replacement='appLoc="/Public/app/devtest"' ./src/index.html
|
||||
replace-in-files --regex='serverType=".*?"' --replacement='serverType="SASJS"' ./src/index.html
|
||||
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"
|
||||
|
||||
- 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
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Write .npmrc file
|
||||
run: echo "$NPMRC" > client/.npmrc
|
||||
shell: bash
|
||||
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: apt-get update -y
|
||||
- run: apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
||||
- run: apt -y install jq
|
||||
|
||||
- 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
|
||||
|
||||
# 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
|
||||
- run: unzip linux.zip
|
||||
- run: touch .env
|
||||
- run: echo RUN_TIMES=js >> .env
|
||||
- run: echo NODE_PATH=node >> .env
|
||||
- run: echo CORS=enable >> .env
|
||||
- run: echo WHITELIST=http://localhost:4200 >> .env
|
||||
- run: cat .env
|
||||
- run: pm2 start api-linux --wait-ready
|
||||
|
||||
- name: Deploy mocked services
|
||||
run: |
|
||||
cd ./sas/mocks/sasjs
|
||||
npm install -g @sasjs/cli
|
||||
npm install -g replace-in-files-cli
|
||||
sasjs cbd -t server-ci
|
||||
|
||||
- name: Install ZIP
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install zip
|
||||
|
||||
- name: Prepare and run frontend and cypress
|
||||
run: |
|
||||
cd ./client
|
||||
mv ./cypress.env.example.json ./cypress.env.json
|
||||
replace-in-files --regex='"username".*' --replacement='"username":"'${{ secrets.CYPRESS_USERNAME_SASJS }}'",' ./cypress.env.json
|
||||
replace-in-files --regex='"password".*' --replacement='"password":"'${{ secrets.CYPRESS_PWD_SASJS }}'" ' ./cypress.env.json
|
||||
cat ./cypress.env.json
|
||||
npm run postinstall
|
||||
npm install @sasjs/adapter@latest
|
||||
# Prepare index.html to SASJS local
|
||||
replace-in-files --regex='serverUrl=".*?"' --replacement='serverUrl="http://localhost:5000"' ./src/index.html
|
||||
replace-in-files --regex='appLoc=".*?"' --replacement='appLoc="/Public/app/devtest"' ./src/index.html
|
||||
replace-in-files --regex='serverType=".*?"' --replacement='serverType="SASJS"' ./src/index.html
|
||||
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"
|
||||
|
||||
- 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
|
@ -1,13 +1,151 @@
|
||||
name: Release
|
||||
run-name: Releasing DC
|
||||
run-name: Testing and Releasing DC
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
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
|
||||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
||||
apt install -y ./google-chrome*.deb;
|
||||
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 --omit=dev
|
||||
cd ./sas
|
||||
npm audit --audit-level=critical --omit=dev
|
||||
cd ../client
|
||||
npm audit --audit-level=critical --omit=dev
|
||||
|
||||
- name: Angular Tests
|
||||
run: |
|
||||
cd client
|
||||
npm test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
|
||||
|
||||
- name: Angular Production Build
|
||||
run: |
|
||||
cd client
|
||||
npm run postinstall
|
||||
npm run build
|
||||
|
||||
Build-and-test-development:
|
||||
runs-on: ubuntu-latest
|
||||
needs: Build-production-and-ng-test
|
||||
|
||||
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
|
||||
|
||||
- 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: apt-get update -y
|
||||
- run: apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
||||
- run: apt -y install jq
|
||||
|
||||
- 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
|
||||
|
||||
# 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
|
||||
- run: unzip linux.zip
|
||||
- run: touch .env
|
||||
- run: echo RUN_TIMES=js >> .env
|
||||
- run: echo NODE_PATH=node >> .env
|
||||
- run: echo CORS=enable >> .env
|
||||
- run: echo WHITELIST=http://localhost:4200 >> .env
|
||||
- run: cat .env
|
||||
- run: pm2 start api-linux --wait-ready
|
||||
|
||||
- name: Deploy mocked services
|
||||
run: |
|
||||
cd ./sas/mocks/sasjs
|
||||
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: |
|
||||
apt-get update
|
||||
apt-get install zip
|
||||
|
||||
- name: Prepare and run frontend and cypress
|
||||
run: |
|
||||
cd ./client
|
||||
mv ./cypress.env.example.json ./cypress.env.json
|
||||
replace-in-files --regex='"username".*' --replacement='"username":"'${{ secrets.CYPRESS_USERNAME_SASJS }}'",' ./cypress.env.json
|
||||
replace-in-files --regex='"password".*' --replacement='"password":"'${{ secrets.CYPRESS_PWD_SASJS }}'" ' ./cypress.env.json
|
||||
cat ./cypress.env.json
|
||||
npm run postinstall
|
||||
# Prepare index.html to SASJS local
|
||||
replace-in-files --regex='serverUrl=".*?"' --replacement='serverUrl="http://localhost:5000"' ./src/index.html
|
||||
replace-in-files --regex='appLoc=".*?"' --replacement='appLoc="/Public/app/devtest"' ./src/index.html
|
||||
replace-in-files --regex='serverType=".*?"' --replacement='serverType="SASJS"' ./src/index.html
|
||||
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"
|
||||
|
||||
- name: Zip Cypress videos
|
||||
if: always()
|
||||
run: |
|
||||
zip -r cypress-videos ./client/cypress/videos
|
||||
|
||||
- name: Add cypress videos artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cypress-videos.zip
|
||||
path: cypress-videos.zip
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [Build-production-and-ng-test, Build-and-test-development]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
@ -30,11 +168,16 @@ jobs:
|
||||
npm i -g @sasjs/cli
|
||||
# jq is used to parse the release JSON
|
||||
apt-get install jq -y
|
||||
# doxygen is used for the SASJS docs
|
||||
apt-get update
|
||||
apt-get install doxygen -y
|
||||
|
||||
- name: Create Empty Release (assets are posted later)
|
||||
run: |
|
||||
npm i
|
||||
npm i -g semantic-release
|
||||
# We do a semantic-release DRY RUN to make the job fail if there are no changes to release
|
||||
GITEA_TOKEN=${{ secrets.RELEASE_TOKEN }} GITEA_URL=https://git.datacontroller.io semantic-release --dry-run | grep -q "There are no relevant changes, so no new version is released." && exit 1
|
||||
GITEA_TOKEN=${{ secrets.RELEASE_TOKEN }} GITEA_URL=https://git.datacontroller.io semantic-release
|
||||
|
||||
- name: Frontend Build
|
||||
@ -48,7 +191,7 @@ jobs:
|
||||
description: Compile SAS 9 services, remove tests & create deployment program
|
||||
run: |
|
||||
cd sas
|
||||
npm ci
|
||||
npm i
|
||||
sasjs c -t sas9
|
||||
rm -rf sasjsbuild/tests
|
||||
sasjs b -t sas9
|
||||
@ -100,12 +243,18 @@ jobs:
|
||||
npm run compodoc:build
|
||||
surfer put --token ${{ secrets.TSDOC_TOKEN }} --server webdoc.datacontroller.io documentation/* /
|
||||
|
||||
- name: Release code.datacontroller.io
|
||||
run: |
|
||||
cd sas
|
||||
sasjs doc
|
||||
surfer put --token ${{ secrets.CODE_DATACONTROLLER_IO }} --server code.datacontroller.io sasjsbuild/sasdocs/* /
|
||||
|
||||
- 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 }}
|
||||
curl --data '{"draft": false,"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
|
||||
|
@ -6,11 +6,13 @@
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
"@semantic-release/npm",
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
"assets": [
|
||||
"CHANGELOG.md"
|
||||
"CHANGELOG.md",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
83
CHANGELOG.md
83
CHANGELOG.md
@ -1,23 +1,75 @@
|
||||
## [6.2.1](https://git.datacontroller.io/dc/dc/compare/v6.2.0...v6.2.1) (2023-09-25)
|
||||
# [6.3.0](https://git.datacontroller.io/dc/dc/compare/v6.2.8...v6.3.0) (2023-12-04)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* viewer row handle ([dadac4f](https://git.datacontroller.io/dc/dc/commit/dadac4f13f85b5446198b6340cad28844defc94d))
|
||||
|
||||
## [6.2.8](https://git.datacontroller.io/dc/dc/compare/v6.2.7...v6.2.8) (2023-12-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bumping sasjs/core to fix mp_loadformat issue ([a1d308e](https://git.datacontroller.io/dc/dc/commit/a1d308ea078786b27bf7ec940d018fc657d4c398))
|
||||
* new logic for -fc suffix. Closes [#63](https://git.datacontroller.io/dc/dc/issues/63) ([5579db0](https://git.datacontroller.io/dc/dc/commit/5579db0eafc668b1bc310099b7cc3062e0598fc4))
|
||||
|
||||
## [6.2.7](https://git.datacontroller.io/dc/dc/compare/v6.2.6...v6.2.7) (2023-11-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **audit:** updated crypto-js (hashing rows in dynamic cell validation) ([a7aa42a](https://git.datacontroller.io/dc/dc/commit/a7aa42a59b71597399924b8d2d06010c806321f3))
|
||||
* missing dependency and avoiding label length limit issue ([91f128c](https://git.datacontroller.io/dc/dc/commit/91f128c2fead1e4f72267d689e67f49ec9a2ab35))
|
||||
|
||||
## [6.2.6](https://git.datacontroller.io/dc/dc/compare/v6.2.5...v6.2.6) (2023-10-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bumping core to address mm_assigndirectlib issue ([c27cdab](https://git.datacontroller.io/dc/dc/commit/c27cdab3fccbde814a29424d0344173a73ea816c))
|
||||
|
||||
## [6.2.5](https://git.datacontroller.io/dc/dc/compare/v6.2.4...v6.2.5) (2023-10-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* enabling AUTHDOMAIN in MM_ASSIGNDIRECTLIB ([008b45a](https://git.datacontroller.io/dc/dc/commit/008b45ad175ec0e6026f5ef3bc210470226e328f))
|
||||
|
||||
## [6.2.4](https://git.datacontroller.io/dc/dc/compare/v6.2.3...v6.2.4) (2023-10-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Enable display of metadata-only tables. Closes [#56](https://git.datacontroller.io/dc/dc/issues/56) ([f3e82b4](https://git.datacontroller.io/dc/dc/commit/f3e82b4ee2a9c1c851f812ac60e9eaf05f91a0f9))
|
||||
|
||||
## [6.2.3](https://git.datacontroller.io/dc/dc/compare/v6.2.2...v6.2.3) (2023-10-12)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* bumping core library to avoid non-ascii char in mp_validatecols.sas. [#50](https://git.datacontroller.io/dc/dc/issues/50) ([11b06f6](https://git.datacontroller.io/dc/dc/commit/11b06f6416300b6d70b1570c415d5a5c004976db))
|
||||
* removing copyright symbol from mpe_alerts macro. [#50](https://git.datacontroller.io/dc/dc/issues/50) ([adb7eb7](https://git.datacontroller.io/dc/dc/commit/adb7eb77550c68a2dab15a6ff358129820e9b612))
|
||||
|
||||
## [6.2.2](https://git.datacontroller.io/dc/dc/compare/v6.2.1...v6.2.2) (2023-10-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* updated SheetJS (crypto) to the latest ([8bd0dd2](https://git.datacontroller.io/dc/dc/commit/8bd0dd22c258911672303869e4df893a98e93575))
|
||||
|
||||
## [6.2.1](https://git.datacontroller.io/dc/dc/compare/v6.2.0...v6.2.1) (2023-10-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* approve, history and submit pages grouped in review module ([e056ece](https://git.datacontroller.io/dc/dc/commit/e056ece2234ef6aab050f6a5b1f8de633b163d91))
|
||||
* closes [#39](https://git.datacontroller.io/dc/dc/issues/39) upcase issue in MPE_SECURITY ([a00d31c](https://git.datacontroller.io/dc/dc/commit/a00d31caf3c5634cd61a4700fb175e76856edbb6))
|
||||
* handsontable v13 ([6f482ec](https://git.datacontroller.io/dc/dc/commit/6f482ec6d909907a304ef9975262889e2370035f))
|
||||
* latest adapter ([5e30dc0](https://git.datacontroller.io/dc/dc/commit/5e30dc0f892fab2af41f4ea56e30f27ec3b3912e))
|
||||
* sasjs/cli and sasjs/core updated to the latest ([8571e01](https://git.datacontroller.io/dc/dc/commit/8571e01e44a8cb6df9d150d271c34bb75bffdf31))
|
||||
* updating editors/stagedata to address issues in particular viya configurations as described in issue [#33](https://git.datacontroller.io/dc/dc/issues/33) ([94ab949](https://git.datacontroller.io/dc/dc/commit/94ab949df8c75072525751a2156b7a32c2e641dc))
|
||||
* updating logic for REPLACE loadtype ([1f2ce55](https://git.datacontroller.io/dc/dc/commit/1f2ce55f249f4af56f0cacdec47e69246cd47431))
|
||||
|
||||
## [6.2.1](https://git.datacontroller.io/dc/dc/compare/v6.2.0...v6.2.1) (2023-08-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* approve, history and submit pages grouped in review module ([e056ece](https://git.datacontroller.io/dc/dc/commit/e056ece2234ef6aab050f6a5b1f8de633b163d91))
|
||||
* updating logic for REPLACE loadtype ([1f2ce55](https://git.datacontroller.io/dc/dc/commit/1f2ce55f249f4af56f0cacdec47e69246cd47431))
|
||||
|
||||
# [6.2.0](https://git.datacontroller.io/dc/dc/compare/v6.1.0...v6.2.0) (2023-08-24)
|
||||
|
||||
|
||||
@ -25,19 +77,6 @@
|
||||
|
||||
* 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))
|
||||
|
@ -53,6 +53,17 @@ npm run lint:fix
|
||||
Typedoc is used for generating typescript documentation based on the code.
|
||||
That part is automated and beign done as a part of CI job.
|
||||
|
||||
# Release
|
||||
Release is automated as a part of CI job. Workflow file: `.gitea/workflows/release.yaml`.
|
||||
It will run automatically when branch merged to the `main` branch.
|
||||
IMPORTANT!
|
||||
If release job fails, after it has been created empty release and a tag, we must not re-run the relase job until we removed the newly create GIT TAG and RELEASE.
|
||||
To remove the git tag run:
|
||||
```
|
||||
git push -d origin vX.X.X
|
||||
```
|
||||
To remove the release, you need to do it with repo administration over at [https://git.datacontroller.io/dc/dc](https://git.datacontroller.io/dc/dc)
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
## Makedata service "could not create directory" error
|
||||
|
3420
client/package-lock.json
generated
3420
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -57,7 +57,7 @@
|
||||
"base64-arraybuffer": "^0.2.0",
|
||||
"buffer": "^5.4.3",
|
||||
"crypto-browserify": "3.12.0",
|
||||
"crypto-js": "^3.3.0",
|
||||
"crypto-js": "^4.2.0",
|
||||
"d3-graphviz": "^5.0.2",
|
||||
"fs-extra": "^7.0.1",
|
||||
"handsontable": "^13.1.0",
|
||||
@ -93,7 +93,7 @@
|
||||
"@compodoc/compodoc": "^1.1.21",
|
||||
"@cypress/webpack-preprocessor": "^5.17.1",
|
||||
"@types/core-js": "^2.5.5",
|
||||
"@types/crypto-js": "^4.0.1",
|
||||
"@types/crypto-js": "^4.2.1",
|
||||
"@types/es6-shim": "^0.31.39",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/lodash-es": "^4.17.3",
|
||||
|
@ -280,7 +280,7 @@
|
||||
licenceState.value.editor_rows_allowed === 1
|
||||
? 'row'
|
||||
: 'rows'
|
||||
}}, contact support@datacontroller.io</span
|
||||
}}, contact support@datacontroller.io</span
|
||||
>
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
@ -417,7 +417,7 @@
|
||||
licenceState.value.editor_rows_allowed === 1
|
||||
? 'row'
|
||||
: 'rows'
|
||||
}}, contact support@datacontroller.io</span
|
||||
}}, contact support@datacontroller.io</span
|
||||
>
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
@ -467,7 +467,7 @@
|
||||
: 'rows'
|
||||
}}
|
||||
will be submitted. To remove the restriction, contact
|
||||
support@datacontroller.io</span
|
||||
support@datacontroller.io</span
|
||||
>
|
||||
<div *ngIf="tableTrue" class="clr-offset-md-2 clr-col-md-8">
|
||||
<div class="form-group">
|
||||
@ -528,7 +528,7 @@
|
||||
Due to current licence, only
|
||||
{{ licenceState.value.submit_rows_limit }} rows in a file will
|
||||
be submitted. To remove the restriction, contact
|
||||
support@datacontroller.io
|
||||
support@datacontroller.io
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -100,7 +100,7 @@
|
||||
*clrIfOpen
|
||||
>
|
||||
<span *ngIf="tableLocked">
|
||||
To unlock all tables, contact support@datacontroller.io
|
||||
To unlock all tables, contact support@datacontroller.io
|
||||
</span>
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
|
@ -72,7 +72,7 @@
|
||||
>
|
||||
To unlock more than
|
||||
{{ licenceState.value.history_rows_allowed }} records, contact
|
||||
support@datacontroller.io
|
||||
support@datacontroller.io
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
[ngClass]="classes"
|
||||
[class.unset]="classes !== ''"
|
||||
href="mailto:support@datacontroller.io?subject=Licence"
|
||||
>support@datacontroller.io</a
|
||||
>support@datacontroller.io</a
|
||||
>
|
||||
|
@ -106,7 +106,7 @@
|
||||
*clrIfOpen
|
||||
>
|
||||
<span *ngIf="tableLocked">
|
||||
To unlock all tables, contact support@datacontroller.io
|
||||
To unlock all tables, contact support@datacontroller.io
|
||||
</span>
|
||||
</clr-tooltip-content>
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
class="licence-notice"
|
||||
>To unlock more then {{ licenceState.value.viewbox_limit }}
|
||||
{{ licenceState.value.viewbox_limit === 1 ? 'viewbox' : 'viewboxes' }},
|
||||
contact support@datacontroller.io</span
|
||||
contact support@datacontroller.io</span
|
||||
>
|
||||
</h3>
|
||||
|
||||
|
@ -105,7 +105,7 @@
|
||||
*clrIfOpen
|
||||
>
|
||||
<span *ngIf="tableLocked">
|
||||
To unlock all tables, contact support@datacontroller.io
|
||||
To unlock all tables, contact support@datacontroller.io
|
||||
</span>
|
||||
</clr-tooltip-content>
|
||||
</clr-tooltip>
|
||||
@ -630,6 +630,9 @@
|
||||
[cells]="hotTable.cells"
|
||||
[maxRows]="hotTable.maxRows"
|
||||
[manualColumnResize]="true"
|
||||
[rowHeaders]="hotTable.rowHeaders"
|
||||
[rowHeaderWidth]="hotTable.rowHeaderWidth"
|
||||
[rowHeights]="hotTable.rowHeights"
|
||||
[licenseKey]="hotTable.licenseKey"
|
||||
>
|
||||
</hot-table>
|
||||
|
@ -108,6 +108,11 @@ export class ViewerComponent implements AfterContentInit, AfterViewInit {
|
||||
settings: {},
|
||||
afterGetColHeader: undefined,
|
||||
licenseKey: undefined,
|
||||
rowHeaders: (index: number) => {
|
||||
return ' '
|
||||
},
|
||||
rowHeaderWidth: 15,
|
||||
rowHeights: 20,
|
||||
contextMenu: ['copy_with_column_headers', 'copy_column_headers_only'],
|
||||
copyPaste: {
|
||||
copyColumnHeaders: true,
|
||||
|
6047
package-lock.json
generated
6047
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "dcfrontend",
|
||||
"version": "6.0.0",
|
||||
"version": "6.3.0",
|
||||
"description": "Data Controller",
|
||||
"devDependencies": {
|
||||
"@saithodev/semantic-release-gitea": "^2.1.0",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/commit-analyzer": "^10.0.1",
|
||||
"@semantic-release/npm": "11.0.0",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@semantic-release/release-notes-generator": "^11.0.4",
|
||||
"commit-and-tag-version": "^11.2.2",
|
||||
"prettier": "3.0.0"
|
||||
"commit-and-tag-version": "^11.2.2"
|
||||
},
|
||||
"scripts": {
|
||||
"install": "cd client && npm i && cd ../sas && npm i",
|
||||
@ -23,5 +23,10 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.datacontroller.io/dc/dc.git"
|
||||
}
|
||||
},
|
||||
"private": true,
|
||||
"//": [
|
||||
"Readme",
|
||||
"We must set private: true so that semantic-release/npm plugin will update the package.json version but not try to release it as NPM package"
|
||||
]
|
||||
}
|
||||
|
71
sas/package-lock.json
generated
71
sas/package-lock.json
generated
@ -6,8 +6,8 @@
|
||||
"": {
|
||||
"name": "dc-sas",
|
||||
"dependencies": {
|
||||
"@sasjs/cli": "^4.10.1",
|
||||
"@sasjs/core": "^4.46.6"
|
||||
"@sasjs/cli": "^4.11.1",
|
||||
"@sasjs/core": "^4.48.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@coolaj86/urequest": {
|
||||
@ -29,9 +29,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sasjs/adapter": {
|
||||
"version": "4.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.9.2.tgz",
|
||||
"integrity": "sha512-WAWhJAbhsOwChbRB6N+dcgj9Tods2Hq/ygsCASALbjKvqxtYlUDVBoEhdedur0VdsWyUaTAqcwioCiCpWtcRZA==",
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.10.1.tgz",
|
||||
"integrity": "sha512-/z6eR+3nNaLPyycK8YmpF+GAWNy0zgdl8n4cv4r45hjVBulPHVop7oj57JM/0uIPVOTT2V9IwrMCT/sFPq++vw==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@sasjs/utils": "2.52.0",
|
||||
@ -78,12 +78,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@sasjs/cli": {
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.10.1.tgz",
|
||||
"integrity": "sha512-qnhTdwENC8j9NJwZKtVVXNmKfmdoIkMIYxgUnH4tw08630qCNPZaH/jGrwVFF5MSUyUswgOoLVyNjxSPAYaWMA==",
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.11.1.tgz",
|
||||
"integrity": "sha512-aI8V3YJGFXcY9OlNas0h8ZrajLIRPn4KmGkaOLHTDa8rZ2SOtj6W5by1RwyPB9iPIHcqW3JV3OgmtEB048zuYQ==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@sasjs/adapter": "4.9.2",
|
||||
"@sasjs/adapter": "4.10.1",
|
||||
"@sasjs/core": "4.46.3",
|
||||
"@sasjs/lint": "2.3.1",
|
||||
"@sasjs/utils": "3.4.0",
|
||||
@ -116,9 +116,9 @@
|
||||
"integrity": "sha512-Grwydm5GxBsYk238PZw41XPjXVVQ9vWcvfZ06L2P0bQbvK0sGn7l69JA7H5MGr3QcaLpiD4Kg70cAh7PgE+JOw=="
|
||||
},
|
||||
"node_modules/@sasjs/core": {
|
||||
"version": "4.46.6",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.46.6.tgz",
|
||||
"integrity": "sha512-aXftehSL6eCGlfWxllR1fzzmUNf6mk32hGrcP/LK+lClTXTaC6Vjm4b9NdMtqy/7TK3uwXmV2+ChhOuXEUNipg=="
|
||||
"version": "4.48.4",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.48.4.tgz",
|
||||
"integrity": "sha512-KTLHRR47I627NKZG0qMW+wGJP4gFGyeEEyBDsVaSnevdvCz01oP/lpLxx4fIESPQ/YzLNEv+RcP8kcxkdSPQow=="
|
||||
},
|
||||
"node_modules/@sasjs/lint": {
|
||||
"version": "2.3.1",
|
||||
@ -229,12 +229,6 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/tough-cookie": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz",
|
||||
"integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/abab": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
|
||||
@ -662,9 +656,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
|
||||
"version": "1.15.3",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
@ -1755,9 +1749,9 @@
|
||||
}
|
||||
},
|
||||
"@sasjs/adapter": {
|
||||
"version": "4.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.9.2.tgz",
|
||||
"integrity": "sha512-WAWhJAbhsOwChbRB6N+dcgj9Tods2Hq/ygsCASALbjKvqxtYlUDVBoEhdedur0VdsWyUaTAqcwioCiCpWtcRZA==",
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/adapter/-/adapter-4.10.1.tgz",
|
||||
"integrity": "sha512-/z6eR+3nNaLPyycK8YmpF+GAWNy0zgdl8n4cv4r45hjVBulPHVop7oj57JM/0uIPVOTT2V9IwrMCT/sFPq++vw==",
|
||||
"requires": {
|
||||
"@sasjs/utils": "2.52.0",
|
||||
"axios": "0.27.2",
|
||||
@ -1798,11 +1792,11 @@
|
||||
}
|
||||
},
|
||||
"@sasjs/cli": {
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.10.1.tgz",
|
||||
"integrity": "sha512-qnhTdwENC8j9NJwZKtVVXNmKfmdoIkMIYxgUnH4tw08630qCNPZaH/jGrwVFF5MSUyUswgOoLVyNjxSPAYaWMA==",
|
||||
"version": "4.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/cli/-/cli-4.11.1.tgz",
|
||||
"integrity": "sha512-aI8V3YJGFXcY9OlNas0h8ZrajLIRPn4KmGkaOLHTDa8rZ2SOtj6W5by1RwyPB9iPIHcqW3JV3OgmtEB048zuYQ==",
|
||||
"requires": {
|
||||
"@sasjs/adapter": "4.9.2",
|
||||
"@sasjs/adapter": "4.10.1",
|
||||
"@sasjs/core": "4.46.3",
|
||||
"@sasjs/lint": "2.3.1",
|
||||
"@sasjs/utils": "3.4.0",
|
||||
@ -1834,9 +1828,9 @@
|
||||
}
|
||||
},
|
||||
"@sasjs/core": {
|
||||
"version": "4.46.6",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.46.6.tgz",
|
||||
"integrity": "sha512-aXftehSL6eCGlfWxllR1fzzmUNf6mk32hGrcP/LK+lClTXTaC6Vjm4b9NdMtqy/7TK3uwXmV2+ChhOuXEUNipg=="
|
||||
"version": "4.48.4",
|
||||
"resolved": "https://registry.npmjs.org/@sasjs/core/-/core-4.48.4.tgz",
|
||||
"integrity": "sha512-KTLHRR47I627NKZG0qMW+wGJP4gFGyeEEyBDsVaSnevdvCz01oP/lpLxx4fIESPQ/YzLNEv+RcP8kcxkdSPQow=="
|
||||
},
|
||||
"@sasjs/lint": {
|
||||
"version": "2.3.1",
|
||||
@ -1933,12 +1927,6 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/tough-cookie": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz",
|
||||
"integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==",
|
||||
"peer": true
|
||||
},
|
||||
"abab": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
|
||||
@ -2243,9 +2231,9 @@
|
||||
}
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
|
||||
"integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA=="
|
||||
"version": "1.15.3",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
|
||||
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q=="
|
||||
},
|
||||
"form-data": {
|
||||
"version": "4.0.0",
|
||||
@ -2965,8 +2953,7 @@
|
||||
"ws": {
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
||||
"requires": {}
|
||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA=="
|
||||
},
|
||||
"xml": {
|
||||
"version": "1.0.1",
|
||||
|
@ -28,6 +28,6 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@sasjs/cli": "^4.11.1",
|
||||
"@sasjs/core": "^4.47.0"
|
||||
"@sasjs/core": "^4.48.4"
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
This site contains the SAS code used in Data Controller for SAS. The pages were generated using [`sasjs doc`](https://cli.sasjs.io/doc).
|
||||
|
||||
You can download Data Controller from [here](https://4gl.uk/dcdeploy).
|
||||
You can download Data Controller from [here](https://git.datacontroller.io/dc/dc/releases).
|
||||
|
||||
The main website is [https://datacontroller.io](https://datacontroller.io) and the user guide is [here](https://docs.datacontroller.io).
|
||||
|
||||
|
@ -1,21 +1,33 @@
|
||||
/**
|
||||
@file
|
||||
@brief Checks the level of access a user has to the MP Editor
|
||||
@brief Checks group access level for a table or library
|
||||
@details In order for a user to be able to EDIT or APPROVE a table they must
|
||||
be in a metadata group that has been granted access to that table in the
|
||||
&mpelib..mpe_security table. Alternatively, they may be in the
|
||||
&mpeadmins group (has overall access).
|
||||
be in a group that has been granted access to that table in the
|
||||
MPE_SECURITY table. Alternatively, they may be in the &mpeadmins
|
||||
group (which has full access to everything).
|
||||
|
||||
@param [in] base_table The base table to check for
|
||||
@param [in] user= The user for which the access level should be returned. If
|
||||
not provided, the mf_user() result is used instead.
|
||||
@param [in] access_level= (APPROVE) access_level (per MPE_SECURITY) reqd.
|
||||
Valid values:
|
||||
@li EDIT
|
||||
@li APPROVE
|
||||
@li VIEW
|
||||
@param [in] cntl_lib_var= (MPELIB) The name of a global macro variable that
|
||||
contains the libref in which the MPE_SECURITY table is stored
|
||||
@param [out] outds= (MED_ACCESSCHECK) Output WORK table containing all the
|
||||
groups for which the user is granted the particular ACCESS_LEVEL.
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mp_abort.sas
|
||||
@li mf_getuniquename.sas
|
||||
@li mf_getuser.sas
|
||||
@li mf_verifymacvars.sas
|
||||
@li mpe_getgroups.sas
|
||||
@li mp_dropmembers.sas
|
||||
|
||||
@param [in] access_level= access_level (per &mpelib..mp_editor_security) reqd
|
||||
|
||||
@returns outds A table containing all the groups that user is a member of,
|
||||
which are granted the access_level requested.
|
||||
<h4> Related Macros </h4>
|
||||
@li mpe_accesscheck.test.sas
|
||||
|
||||
@version 9.2
|
||||
@author 4GL Apps Ltd
|
||||
@ -25,65 +37,64 @@
|
||||
**/
|
||||
|
||||
%macro mpe_accesscheck(
|
||||
base_table /* base table to check for */
|
||||
base_table
|
||||
,outds=med_accesscheck /* WORK table to contain access details */
|
||||
,user= /* metadata user to check for */
|
||||
,access_level=APPROVE
|
||||
,cntl_lib_var=MPELIB
|
||||
);
|
||||
|
||||
%if &user= %then %let user=%mf_getuser();
|
||||
|
||||
%if %index(&outds,.) %then %do;
|
||||
%local lib ds;
|
||||
%let lib=%scan(&outds,1,.);
|
||||
%let ds=%scan(&outds,2,.);
|
||||
%if %upcase(&lib) ne WORK %then %do;
|
||||
%mp_abort(msg=outds should be a WORK table
|
||||
,mac=mpe_accesscheck);
|
||||
%end;
|
||||
%end;
|
||||
%else %let ds=&outds;
|
||||
%mp_abort(
|
||||
iftrue=(%index(&outds,.)>0 and %upcase(%scan(&outds,1,.)) ne WORK)
|
||||
,mac=mpe_accesscheck
|
||||
,msg=%str(outds should be a WORK table)
|
||||
)
|
||||
|
||||
%mp_abort(
|
||||
iftrue=(%mf_verifymacvars(base_table user access_level)=0)
|
||||
,mac=bitemporal_dataloader
|
||||
,msg=%str(Missing base_table/user access_level)
|
||||
,mac=mpe_accesscheck
|
||||
,msg=%str(Missing base_table/user access_level variables)
|
||||
)
|
||||
|
||||
/* ensure any existing table is dropped */
|
||||
%mp_dropmembers(&ds)
|
||||
/* make unique temp table vars */
|
||||
%local tempds1 tempds2;
|
||||
%let tempds1=%mf_getuniquename(prefix=usergroups);
|
||||
%let tempds2=%mf_getuniquename(prefix=tablegroups);
|
||||
|
||||
/* create a new table for temp use */
|
||||
data; run;
|
||||
%local tempds; %let tempds=&syslast;
|
||||
|
||||
/* overwrite with the list of groups */
|
||||
%mpe_getgroups(user=&user,outds=&tempds);
|
||||
/* get list of user groups */
|
||||
%mpe_getgroups(user=&user,outds=&tempds1)
|
||||
|
||||
/* get list of groups with access for that table */
|
||||
proc sql;
|
||||
create table &tempds2 as
|
||||
select distinct sas_group
|
||||
from &&&cntl_lib_var...mpe_security
|
||||
where &dc_dttmtfmt. lt tx_to
|
||||
and access_level="&access_level"
|
||||
and (
|
||||
(libref="%scan(&base_table,1,.)" and upcase(dsn)="%scan(&base_table,2,.)")
|
||||
or (libref="%scan(&base_table,1,.)" and dsn="*ALL*")
|
||||
or (libref="*ALL*")
|
||||
);
|
||||
%if &_debug ge 131 %then %do;
|
||||
data _null_;
|
||||
set &tempds;
|
||||
set &tempds1;
|
||||
putlog (_all_)(=);
|
||||
run;
|
||||
data _null_;
|
||||
set &tempds2;
|
||||
putlog (_all_)(=);
|
||||
run;
|
||||
%end;
|
||||
|
||||
proc sql;
|
||||
create table &outds as
|
||||
select * from &tempds
|
||||
select * from &tempds1
|
||||
where groupname="&mpeadmins"
|
||||
or groupname in
|
||||
(select sas_group from &mpelib..mpe_security
|
||||
where &dc_dttmtfmt. lt tx_to
|
||||
and access_level="&access_level"
|
||||
& (
|
||||
(libref="%scan(&base_table,1,.)" and dsn="%scan(&base_table,2,.)")
|
||||
or (libref="%scan(&base_table,1,.)" and dsn="*ALL*")
|
||||
or (libref="*ALL*")
|
||||
)
|
||||
);
|
||||
or groupname in (select * from &tempds2);
|
||||
|
||||
%put base_table=&base_table;
|
||||
%put libref=%scan(&base_table,1,.);
|
||||
%put dsn=%scan(&base_table,2,.);
|
||||
%put access_level=&access_level;
|
||||
%put &sysmacroname: base_table=&base_table;
|
||||
%put &sysmacroname: access_level=&access_level;
|
||||
%mend mpe_accesscheck;
|
||||
|
68
sas/sasjs/macros/mpe_accesscheck.test.sas
Normal file
68
sas/sasjs/macros/mpe_accesscheck.test.sas
Normal file
@ -0,0 +1,68 @@
|
||||
/**
|
||||
@file
|
||||
@brief Testing mpe_accesscheck macro
|
||||
@details Checking functionality of mpe_accesscheck.sas macro
|
||||
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mf_getuniquename.sas
|
||||
@li mf_getuser.sas
|
||||
@li mp_assertdsobs.sas
|
||||
@li mpe_getgroups.sas
|
||||
@li mpe_accesscheck.sas
|
||||
|
||||
|
||||
@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.
|
||||
|
||||
**/
|
||||
|
||||
/* get the groups this user is actually a member of */
|
||||
%mpe_getgroups(user=%mf_getuser(),outds=work.groups)
|
||||
|
||||
data _null_;
|
||||
set work.groups;
|
||||
call symputx('groupname',groupname);
|
||||
run;
|
||||
|
||||
/* create demo MPE_SECURITY table */
|
||||
data work.mpe_security;
|
||||
if 0 then set &dc_libref..mpe_security;
|
||||
do access_level='EDIT','APPROVE','VIEW','SIGNOFF','AUDIT';
|
||||
LIBREF='SOMELIB';
|
||||
DSN='SOMEDS';
|
||||
sas_group="&groupname";
|
||||
tx_from=0;
|
||||
tx_to='31dec4999:23:59:59'dt;
|
||||
output;
|
||||
end;
|
||||
run;
|
||||
|
||||
%let WRK=WORK;
|
||||
|
||||
%mpe_accesscheck(
|
||||
SOMELIB.SOMEDS
|
||||
,outds=work.test1
|
||||
,access_level=APPROVE
|
||||
,cntl_lib_var=WRK
|
||||
)
|
||||
%mp_assertdsobs(work.test1,
|
||||
desc=Test 1 - One record returned,
|
||||
test=EQUALS 1,
|
||||
outds=work.test_results
|
||||
)
|
||||
|
||||
%mpe_accesscheck(
|
||||
SOMELIB.INVALID
|
||||
,outds=work.test2
|
||||
,access_level=APPROVE
|
||||
,cntl_lib_var=WRK
|
||||
)
|
||||
%mp_assertdsobs(work.test2,
|
||||
desc=Test 12 - 0 records returned,
|
||||
test=EQUALS 0,
|
||||
outds=work.test_results
|
||||
)
|
||||
|
@ -131,7 +131,7 @@ filename __out email ("&emails")
|
||||
txt=symget('SUBMITTED_TXT');
|
||||
put "Reason provided: " txt;
|
||||
put " ";
|
||||
put "This is an automated email by Data Controller for SAS®. For "
|
||||
put "This is an automated email by Data Controller for SAS. For "
|
||||
"documentation, please visit https://docs.datacontroller.io";
|
||||
run;
|
||||
%end;
|
||||
@ -144,7 +144,7 @@ filename __out email ("&emails")
|
||||
put "Please be advised that a change to table &alert_lib..&alert_ds has "
|
||||
"been approved by &from_user on the '&syshostname' SAS server.";
|
||||
put " ";
|
||||
put "This is an automated email by Data Controller for SAS®. For "
|
||||
put "This is an automated email by Data Controller for SAS. For "
|
||||
"documentation, please visit https://docs.datacontroller.io";
|
||||
run;
|
||||
%end;
|
||||
@ -165,7 +165,7 @@ filename __out email ("&emails")
|
||||
txt=symget('REVIEW_REASON_TXT');
|
||||
put "Reason provided: " txt;
|
||||
put " ";
|
||||
put "This is an automated email by Data Controller for SAS®. For "
|
||||
put "This is an automated email by Data Controller for SAS. For "
|
||||
"documentation, please visit https://docs.datacontroller.io";
|
||||
run;
|
||||
%end;
|
||||
|
@ -1014,7 +1014,8 @@ insert into &lib..mpe_selectbox set
|
||||
,buskey='LIBREF DSN ACCESS_LEVEL SAS_GROUP'
|
||||
,var_txfrom='TX_FROM'
|
||||
,var_txto='TX_TO'
|
||||
,notes='Shows which metadata groups can edit which tables'
|
||||
,notes='Determines which groups can view/edit/approve which tables'
|
||||
,post_edit_hook='services/hooks/mpe_security_postedit'
|
||||
;
|
||||
insert into &lib..mpe_tables
|
||||
set tx_from=0
|
||||
@ -1351,6 +1352,15 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,rule_value='UPCASE'
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
,base_ds="MPE_SECURITY"
|
||||
,base_col="LIBREF"
|
||||
,rule_type='CASE'
|
||||
,rule_value="UPCASE"
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
@ -1369,6 +1379,15 @@ insert into &lib..MPE_VALIDATIONS set
|
||||
,rule_value="&lib..MPE_TABLES.LIBREF"
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
,base_ds="MPE_SECURITY"
|
||||
,base_col="DSN"
|
||||
,rule_type='CASE'
|
||||
,rule_value="UPCASE"
|
||||
,rule_active=1
|
||||
,tx_to='31DEC5999:23:59:59'dt;
|
||||
insert into &lib..MPE_VALIDATIONS set
|
||||
tx_from=0
|
||||
,base_lib="&lib"
|
||||
|
34
sas/sasjs/services/hooks/mpe_security_postedit.sas
Normal file
34
sas/sasjs/services/hooks/mpe_security_postedit.sas
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
@file
|
||||
@brief Post Edit Hook script for the MPE_SECURITY table
|
||||
@details Post edit hooks provide additional backend validation against
|
||||
user-sourced data. The incoming dataset is always `work.staging_ds` and this
|
||||
file is included from the mpe_loader.sas macro.
|
||||
|
||||
Available (at runtime) macro variables:
|
||||
@li DC_LIBREF - The DC control library for your site
|
||||
@li LIBREF - The library of the dataset being edited (is assigned)
|
||||
@li DS - The dataset being edited
|
||||
|
||||
|
||||
**/
|
||||
|
||||
/* ensure upcase and check access level values*/
|
||||
%let errval=0;
|
||||
%let errmsg=;
|
||||
data work.staging_ds;
|
||||
set work.staging_ds;
|
||||
LIBREF=upcase(LIBREF);
|
||||
DSN=upcase(DSN);
|
||||
ACCESS_LEVEL=upcase(ACCESS_LEVEL);
|
||||
if ACCESS_LEVEL not in ('EDIT','APPROVE','VIEW','SIGNOFF','AUDIT') then do;
|
||||
putlog "ERR" +(-1) "OR: invalid ACCESS_LEVEL - " access_level;
|
||||
call symputx('errval',1);
|
||||
call symputx('errmsg',"Invalid ACCESS_LEVEL: "!!access_level);
|
||||
end;
|
||||
run;
|
||||
|
||||
%mp_abort(iftrue=(&errval=1)
|
||||
,mac=mpe_security_postedit.sas
|
||||
,msg=%str(&errmsg)
|
||||
)
|
@ -45,7 +45,7 @@ data work.staging_ds;
|
||||
/* force correct BUSKEY and DSN when loading format catalogs */
|
||||
if LOADTYPE='FORMAT_CAT' then do;
|
||||
BUSKEY='TYPE FMTNAME FMTROW';
|
||||
if subpad(dsn,length(dsn)-3,3) ne '-FC' then dsn=cats(dsn,'-FC');
|
||||
DSN=scan(dsn,1,'-')!!'-FC';
|
||||
end;
|
||||
run;
|
||||
|
||||
|
@ -290,6 +290,7 @@ run;
|
||||
run;
|
||||
data work.groups;
|
||||
length groupuri groupname $32 groupdesc $128 ;
|
||||
call missing (of _all_);
|
||||
output;
|
||||
stop;
|
||||
run;
|
||||
|
Reference in New Issue
Block a user