Compare commits

...
119 Commits
Author SHA1 Message Date
Dima May 0af837321c creating_release_version_3.6.0 2024-11-20 15:20:15 +00:00
Dima May 0b92440cbc Merge pull request #256 from NationalSecurityAgency/t#255/upgrade_spring_boot
#255 - upgrading spring boot
2024-11-19 06:49:58 -05:00
rmmayo 24e6aca4f8 #255 - upgrading spring boot 2024-11-18 17:58:24 +00:00
Ryan Mayo 5cb0d9f455 Merge pull request #254 from NationalSecurityAgency/t#209/disable_skills_client
T#209/disable skills client
2024-10-09 13:15:44 +00:00
Dima May f6fddedeae #251: improved readme 2024-10-09 12:38:07 +00:00
Dima May 6851ef187b #251: only run disabled test for 3.6.0 and above 2024-10-09 12:02:27 +00:00
Dima May 133019e4e5 #251: to avoid a race condition fixed index.html page to add success handle after configure method completed 2024-10-09 10:50:08 +00:00
Dima May 59c4ce4c70 #209: fix unit tests 2024-10-08 21:11:26 +00:00
Dima May 727a2b6cf6 #209: added an option to disable skills-client 2024-10-08 20:55:37 +00:00
Ryan Mayo 1d36f49586 Merge pull request #253 from NationalSecurityAgency/t#213/iframe_aria_label
#213: added aria-label to iframe
2024-10-08 20:20:55 +00:00
Dima May 7480f6ab2a #213: added aria-label to iframe 2024-10-08 19:23:22 +00:00
Dima May 2207dcc248 Update README.md 2024-10-08 15:13:46 +00:00
Dima May 139db488cc Merge pull request #250 from NationalSecurityAgency/dependabot/maven/skills-client-integration/skills-int-e2e-test/commons-io-commons-io-2.14.0
Bump commons-io:commons-io from 2.8.0 to 2.14.0 in /skills-client-integration/skills-int-e2e-test
2024-10-08 14:57:05 +00:00
Ryan Mayo 059e208b53 Merge pull request #252 from NationalSecurityAgency/t#251/compat_ci
T#251/compat ci
2024-10-08 14:26:53 +00:00
Dima May 7d8e8f5b53 #251: do not run unsupported test for lib prior 3.2.0 2024-10-08 13:50:19 +00:00
Dima May 0a15a7651f #251: upgraded all js libs for skills-client-js; reverted removal of clientDisplayDefaultOptions.html 2024-10-08 13:36:24 +00:00
Dima May d03a5b3fec #251: upgraded all js libs for skills-int-client-js; fixed tests to run with 3.2.0 version of skills-client-js 2024-10-08 13:21:25 +00:00
Dima May a9d0a674f4 #251: cleaning up 2024-10-07 20:40:07 +00:00
Dima May 2152366635 #251: fixed tests against sills-service 2.12.6 2024-10-07 16:12:15 +00:00
Dima May ad31359fdd #251: filter skills-service tags from testing 2024-10-07 14:45:37 +00:00
Dima May 610e844f8e #251: filter skills-service tags from testing 2024-10-07 14:44:38 +00:00
Dima May bfd93347a4 #251: filter skills-service tags from testing 2024-10-07 14:04:04 +00:00
Dima May eb6395844b #251: filter skills-service tags from testing 2024-10-07 14:02:07 +00:00
Dima May 0286c9e705 #251: filter skills-service tags from testing 2024-10-07 13:59:28 +00:00
Dima May e7a6ba07ce #251: filter skills-service tags from testing 2024-10-07 13:54:10 +00:00
Dima May 3144e84bd3 #251: filter skills-service tags from testing 2024-10-07 13:52:37 +00:00
Dima May 5f9d1daf0f #251: filter skills-service tags from testing 2024-10-07 13:49:07 +00:00
Dima May 9d844f8e67 #251: run skills-service backward compat tests 2024-10-04 17:44:16 +00:00
Dima May 303748a980 #251: run skills-service backward compat tests 2024-10-04 17:38:15 +00:00
Dima May 89b55047e9 #251: run skills-service backward compat tests 2024-10-04 17:34:38 +00:00
Dima May 0bc3f485a9 #251: run skills-service backward compat tests 2024-10-04 17:24:21 +00:00
Dima May 514c9555e0 #251: run skills-service backward compat tests 2024-10-04 17:23:13 +00:00
Dima May 94ed933a4b #251: run skills-service backward compat tests 2024-10-04 17:21:53 +00:00
Dima May 2cd9ed554d #251: run skills-service backward compat tests 2024-10-04 17:17:35 +00:00
Dima May a881f59e9c #251: run skills-service backward compat tests 2024-10-04 17:14:36 +00:00
Dima May c700ecd5f7 #251: run skills-service backward compat tests 2024-10-04 17:12:08 +00:00
Dima May 7bd9939acd #251: run skills-service backward compat tests 2024-10-04 17:07:19 +00:00
Dima May 884463917b #251: run skills-service backward compat tests 2024-10-04 17:04:40 +00:00
Dima May 55cc382f4b #251: run skills-service backward compat tests 2024-10-04 17:01:22 +00:00
Dima May da3a3cbf7f #251: run skills-service backward compat tests 2024-10-04 16:59:42 +00:00
Dima May fb02712eaf #251: run skills-service backward compat tests 2024-10-04 16:56:36 +00:00
Dima May 5fd7b97802 #251: run skills-service backward compat tests 2024-10-04 16:55:52 +00:00
Dima May d529670ebf #251: run skills-service backward compat tests 2024-10-04 16:36:11 +00:00
Dima May 9cf2f879b2 #251: run skills-service backward compat tests 2024-10-04 16:27:27 +00:00
Dima May e372fe335f #251: run skills-service backward compat tests 2024-10-04 16:18:33 +00:00
Dima May bf0a5c2b40 #251: run skills-service backward compat tests 2024-10-04 16:12:51 +00:00
Dima May db3b51fbb0 #251: run skills-service backward compat tests 2024-10-04 15:38:05 +00:00
dependabot[bot] 7fca01690c Bump commons-io:commons-io
Bumps commons-io:commons-io from 2.8.0 to 2.14.0.

---
updated-dependencies:
- dependency-name: commons-io:commons-io
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-10-03 18:51:34 +00:00
Dima May 6ebb19bcd0 Merge pull request #248 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/rollup-4.22.4
Bump rollup from 4.22.2 to 4.22.4 in /skills-client-js
2024-10-01 09:28:26 -04:00
dependabot[bot] 47eb39b7a5 Bump rollup from 4.22.2 to 4.22.4 in /skills-client-js
Bumps [rollup](https://github.com/rollup/rollup) from 4.22.2 to 4.22.4.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.22.2...v4.22.4)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
2024-10-01 11:03:36 +00:00
Ryan Mayo 66b9070fb2 Merge pull request #247 from NationalSecurityAgency/t#242/ci_and_upgrades
T#242/ci and upgrades
2024-10-01 07:03:09 -04:00
Dima May ee2f3acb04 #242: fixing oauth CI 2024-10-01 10:46:55 +00:00
Dima May 5aeba4fbdf #242: tests improvements 2024-10-01 10:20:26 +00:00
rmmayo c9d5e52b26 #245 - upgraded spring boot to 3.3.4 2024-10-01 00:52:43 +00:00
Dima May 1cc3cf90fb #242: fixing tests for oauth 2024-10-01 00:33:46 +00:00
Dima May efbcbd4691 #242: CI updates and fixes 2024-09-30 20:35:54 +00:00
Dima May 4015922833 #242: disable oauth tests on check-in for now 2024-09-30 12:49:03 +00:00
Dima May b74e94e4f8 #242: fixing tests 2024-09-30 12:38:46 +00:00
Dima May 0097090d64 #242: fixing CI 2024-09-30 12:06:27 +00:00
Dima May c8ebf124b5 #242: debug ci 2024-09-30 11:04:54 +00:00
Dima May 905fab93bd #242: add more transcript export tests; refactored cypress tests into multiple suites 2024-09-27 14:23:11 +00:00
Dima May 868eaefbec #242: kickoff tests 2024-09-27 12:46:08 +00:00
Dima May a15853c374 #242: inserted header 2024-09-27 12:10:24 +00:00
Dima May 17d1a7af4c #242: additional cypress test for back and forward navigation, breadcrumb navigation and a transcript download test 2024-09-26 20:36:26 +00:00
Dima May f1caf21a48 #242: fixing tests 2024-09-26 18:05:17 +00:00
Dima May 15d9d98e98 #242: fixing tests 2024-09-24 15:05:25 +00:00
Dima May af16c671cc #242: copy skills-service.jar in the proper location 2024-09-23 20:56:01 +00:00
Dima May d0f8995829 #242: skip tests 2024-09-23 20:42:35 +00:00
Dima May cd3fd7ba4b #242: checking out specific branch and building skills-service 2024-09-23 20:36:03 +00:00
Dima May 3d274eb8a2 #242: started fixing cypress specs; changed build to use native node 2024-09-23 20:30:56 +00:00
Dima May dd582da97d #242: started fixing cypress specs; changed build to use native node 2024-09-23 20:30:01 +00:00
Dima May 11ace4d8b6 #242: started fixing cypress specs; changed build to use native node 2024-09-23 20:20:20 +00:00
Dima May dc21097da1 upgrade github actions 2024-09-20 15:52:31 +00:00
Dima May 8bdeda36d3 upgraded skills-client-js libs 2024-09-20 15:45:28 +00:00
Dima May 323f2455b2 Merge pull request #241 from NationalSecurityAgency/upgrade-spring-3-3
Upgrade Spring Boot to 3.3.3
2024-09-05 13:17:35 -04:00
Don Walizer a0b16eca7b Upgrade Spring Boot to 3.3.3 2024-09-05 12:59:15 -04:00
Ryan Mayo 2f4d4e4008 Merge pull request #240 from NationalSecurityAgency/cleanup-libraries-update-axios
Remove old libraries, upgrade axios
2024-08-20 14:34:45 -04:00
Don Walizer ee44e6f990 Fix version in package.json 2024-08-20 14:33:58 -04:00
Don Walizer 09d2b01029 Remove old libraries, upgrade axios 2024-08-20 12:58:04 -04:00
Dima May abf3812439 update docker-compose to docker compose 2024-07-31 19:24:49 +00:00
Don Walizer 67df81d4fd Merge pull request #239 from NationalSecurityAgency/update-spring-3-2-4
Upgrade Spring to 3.2.4
2024-04-04 15:49:49 -04:00
Don Walizer 0a01ff53a3 Upgrade Spring to 3.2.4 2024-04-03 11:45:32 -04:00
Dima May 53fcc9562d Merge pull request #238 from NationalSecurityAgency/t#236/timeout_ci2
T#236/timeout ci2
2024-01-22 08:24:28 -05:00
rmmayo d8b719a728 #236 - add a wait before going back in the browser 2024-01-18 10:58:45 -05:00
rmmayo 06aa74a5f7 #236 - upgrade cypress 2024-01-18 08:30:46 -05:00
rmmayo 92354ed015 #236 - add a wait after going back in the browser 2024-01-18 08:26:20 -05:00
Dima May c83e3d5c22 Update README.md 2024-01-18 07:38:31 -05:00
Dima May 594471d12c Merge pull request #237 from NationalSecurityAgency/t#236/timeout_ci
T#236/timeout ci
2024-01-16 15:26:11 -05:00
rmmayo fdecf37ec0 #236 - upgrade cypress 2024-01-16 10:32:39 -05:00
rmmayo 0cfafd1d45 #236 - upgrade cypress 2024-01-16 10:25:59 -05:00
rmmayo 9891dea2e5 #236 - upgrade cypress 2024-01-16 10:22:37 -05:00
rmmayo a07a4e24eb #236 - upgrade cypress 2024-01-16 10:19:57 -05:00
rmmayo 4f86ed1913 #236 - upgrade cypress 2024-01-16 10:04:12 -05:00
rmmayo 482ae93e0f #236 - upgrade cypress 2024-01-16 09:46:30 -05:00
rmmayo 5ed4a68cb1 #236 - upgrade cypress 2024-01-16 09:14:16 -05:00
Dima May b784b5de26 Update README.md 2023-12-22 08:05:59 -05:00
Dima May ca03f0f709 Merge pull request #235 from NationalSecurityAgency/update-js-example
Add ability to specify ID for skill reporting event
2023-12-15 15:42:55 -05:00
Don Walizer 9ccaa12ac9 Add ability to specify ID for skill reporting event 2023-12-15 13:35:08 -05:00
Dima May 594d61503d Merge pull request #233 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-js/axios-1.6.0
Bump axios from 0.27.2 to 1.6.0 in /skills-client-js
2023-12-14 08:09:56 -05:00
Don Walizer e11f7ec67f Modify version 2023-12-13 12:41:41 -05:00
Don Walizer f2f6104e7c Update axios, axios-mock-adapter, add ignore pattern 2023-12-13 10:10:36 -05:00
Don Walizer 53bd0136a5 Merge pull request #230 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-js/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-integration/skills-int-client-js
2023-12-08 15:21:40 -05:00
Don Walizer 6fbc73c259 Merge pull request #232 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-react18/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-integration/skills-int-client-react18
2023-12-08 15:16:51 -05:00
Don Walizer 67c5d77730 Merge pull request #231 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-react17/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-integration/skills-int-client-react17
2023-12-08 15:16:21 -05:00
Don Walizer a1d17002fc Merge pull request #229 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-vue/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-integration/skills-int-client-vue
2023-12-08 15:16:15 -05:00
Don Walizer f236d29053 Merge pull request #228 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-vue/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-vue
2023-12-08 15:15:45 -05:00
Don Walizer 752aff86e6 Merge pull request #227 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-react/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-integration/skills-int-client-react
2023-12-08 15:15:31 -05:00
Don Walizer 109f1a900f Merge pull request #226 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-react/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-react
2023-12-08 15:15:24 -05:00
Don Walizer 7c6a7293f7 Merge pull request #225 from NationalSecurityAgency/dependabot/npm_and_yarn/skills-client-integration/skills-int-client-ng/axios-1.6.0
Bump axios from 0.23.0 to 1.6.0 in /skills-client-integration/skills-int-client-ng
2023-12-08 15:15:04 -05:00
Dima May 8a9c9ffe56 Merge pull request #234 from NationalSecurityAgency/update-spring
Update spring
2023-12-08 14:56:59 -05:00
dependabot[bot] 39f8779394 Bump axios from 0.27.2 to 1.6.0 in /skills-client-js
Bumps [axios](https://github.com/axios/axios) from 0.27.2 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.27.2...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-11 05:50:05 +00:00
dependabot[bot] 67a9d5fe90 Bump axios in /skills-client-integration/skills-int-client-react18
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:38:30 +00:00
dependabot[bot] b4efd29492 Bump axios in /skills-client-integration/skills-int-client-react17
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:32:15 +00:00
dependabot[bot] abcb97d564 Bump axios in /skills-client-integration/skills-int-client-js
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:29:00 +00:00
dependabot[bot] fc3af550de Bump axios in /skills-client-integration/skills-int-client-vue
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:29:00 +00:00
dependabot[bot] bcb42fc81d Bump axios from 0.23.0 to 1.6.0 in /skills-client-vue
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:28:51 +00:00
dependabot[bot] 4b05314e3b Bump axios in /skills-client-integration/skills-int-client-react
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:28:51 +00:00
dependabot[bot] 712dcbcde8 Bump axios from 0.23.0 to 1.6.0 in /skills-client-react
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:28:50 +00:00
dependabot[bot] e0f5c18b61 Bump axios in /skills-client-integration/skills-int-client-ng
Bumps [axios](https://github.com/axios/axios) from 0.23.0 to 1.6.0.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.23.0...v1.6.0)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
2023-11-10 21:28:50 +00:00
291 changed files with 2413 additions and 11405 deletions

No files matched your search

@@ -34,14 +34,15 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20.11.0'
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
@@ -52,7 +53,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -60,7 +61,7 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -69,11 +70,25 @@ jobs:
# - name: build skill-service
# run: ./.github/workflows/scripts/getSkillsService.sh
- name: download skill-service
# - name: download skill-service
# run: |
# mkdir skills-service
# cd skills-service
# curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
# ls ./
# cd ..
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v4
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
mvn --batch-mode clean install -DskipTests
cp ./service/target/skills-service-*.jar ./
ls ./
cd ..
@@ -94,31 +109,32 @@ jobs:
npm run cyServices:start:integration-apps
cd ../../
# - name: Run Cypress tests
# uses: cypress-io/github-action@v2
# with:
# working-directory: skills-client-integration/skills-int-e2e-test
# record: true
# parallel: false
# group: 'skills-client expired token tests'
# tag: "${{ github.workflow }}"
# spec: cypress/integration/timeout.specs.js
# env: 'timeout=true'
# env:
# # pass the Dashboard record key as an environment variable
# CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# # pass GitHub token to allow accurately detecting a build vs a re-run build
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npm run cy:run:timeout
cd ../../
uses: cypress-io/github-action@v5
with:
working-directory: skills-client-integration/skills-int-e2e-test
record: true
parallel: false
group: 'skills-client expired token tests'
tag: "${{ github.workflow }}"
spec: cypress/e2e/timeout.specs.js
env: 'timeout=true'
browser: chrome
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Run Cypress tests
# run: |
# cd skills-client-integration/skills-int-e2e-test
# npm run cy:run:timeout
# cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: result artifacts
path: |
+36 -24
View File
@@ -3,20 +3,17 @@
name: Continuous Integration with OAuth
on:
schedule:
- cron: '0 7 * * *'
push:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
pull_request:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
workflow_dispatch:
#on:
# push:
# paths-ignore:
# - 'README.md'
# - .github/workflows/skills-service-backward-compat.yml
# - .github/workflows/client-libs-backward-compat.yml
# pull_request:
# paths-ignore:
# - 'README.md'
# - .github/workflows/skills-service-backward-compat.yml
# - .github/workflows/client-libs-backward-compat.yml
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
@@ -46,14 +43,15 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20.11.0'
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
@@ -64,7 +62,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -72,18 +70,32 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: download skill-service
# - name: download skill-service
# run: |
# mkdir skills-service
# cd skills-service
# curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
# ls ./
# cd ..
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v4
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
mvn --batch-mode clean install -DskipTests
cp ./service/target/skills-service-*.jar ./
ls ./
cd ..
@@ -112,7 +124,7 @@ jobs:
- name: Register hydra client
run: |
cd skills-client-integration/skills-int-e2e-test/hydra
docker-compose -f quickstart.yml exec -T hydra \
docker compose -f quickstart.yml exec -T hydra \
hydra clients create \
--endpoint http://localhost:4445/ \
--id skilltree-test \
@@ -153,7 +165,7 @@ jobs:
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: result artifacts
path: |
+17 -10
View File
@@ -43,14 +43,15 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20.11.0'
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
@@ -61,7 +62,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -69,18 +70,24 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: download skill-service
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v4
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
mvn --batch-mode clean install -DskipTests
cp ./service/target/skills-service-*.jar ./
ls ./
cd ..
@@ -112,7 +119,7 @@ jobs:
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: result artifacts
path: |
@@ -1,114 +0,0 @@
# This is a basic workflow to help you get started with Actions
name: Client Libs Backward Compatibility
#on:
# push:
# paths-ignore:
# - 'README.md'
# pull_request:
# paths-ignore:
# - 'README.md'
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test-client-libs-backward-compat:
# The type of runner that the job will run on
runs-on: ubuntu-latest
services:
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: skillsPassword
POSTGRES_DB: skills
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v2-beta
with:
node-version: '14'
- uses: actions/setup-java@v1
with:
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Download Releases to Test
run: |
mkdir -p skills-service-versions
cd skills-service-versions
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
ls ./
cd ../
- name: setup npm links
run: ./.github/workflows/scripts/setupNpmLinks.sh
- name: build integration test apps
run: |
cd ./skills-client-integration
mvn --batch-mode clean install
cd ../
- name: run backwards compat tests
run: |
cd skills-client-integration/skills-int-e2e-test
mvn --batch-mode clean package
export NO_COLOR=1
export CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}
java -cp target/skills-int-e2e-test-*.jar -Dloader.main=skills.TestClientLibsBackwardsCompat org.springframework.boot.loader.launch.PropertiesLauncher -record -tag "${{ github.workflow }}" --minVersion "1.9.0"
cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: result artifacts
path: |
./skills-client-integration/skills-int-e2e-test/target/logs/*
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
@@ -0,0 +1,198 @@
name: Client Libs Backward Compatibility
on:
push:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
pull_request:
paths-ignore:
- 'README.md'
- .github/workflows/skills-service-backward-compat.yml
- .github/workflows/client-libs-backward-compat.yml
workflow_dispatch:
jobs:
get_skills_service_versions:
runs-on: ubuntu-latest
outputs:
services: ${{ steps.generate-matrix.outputs.services }}
versions: ${{ steps.generate-matrix.outputs.versions }}
steps:
- name: Generate Matrix
id: generate-matrix
run: |
TO_EXCLUDE='["3.1.0","3.0.3","3.0.2","3.0.1","3.0.0"]'
RESPONSE=$(curl -s -X GET 'https://api.github.com/repos/NationalSecurityAgency/skills-service/releases')
ALL_TAG_NAMES=$(echo "$RESPONSE" | jq -c '[.[] | .tag_name]')
echo "ALL_TAG_NAMES=$ALL_TAG_NAMES"
FILTERED_TAG_NAMES=$(jq --argjson to_exclude "$TO_EXCLUDE" '. - $to_exclude' <<< "$ALL_TAG_NAMES")
echo "FILTERED_TAG_NAMES=$FILTERED_TAG_NAMES"
TOP_TAGS=$(jq -c '.[0:5]' <<< "$FILTERED_TAG_NAMES")
echo "TOP_TAGS=$TOP_TAGS"
echo ::set-output name=versions::${TOP_TAGS}
build_skills_client_int:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.11.0'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: setup npm links
run: ./.github/workflows/scripts/setupNpmLinks.sh
- name: build integration test apps
env:
MAVEN_OPTS: -Xmx2048m
run: |
cd ./skills-client-integration
mvn --batch-mode clean install
cd ../
- name: upload service jar
uses: actions/upload-artifact@v4
with:
name: service jar
path: ./skills-client-integration/skills-int-service/target/skills-int-service-*.jar
run_backward_compatibility_tests:
runs-on: ubuntu-latest
services:
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: skillsPassword
POSTGRES_DB: skills
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
needs:
- get_skills_service_versions
- build_skills_client_int
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.get_skills_service_versions.outputs.versions) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.11.0'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '19' # The JDK version to make available on the path.
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: download skill-service:${{ matrix.version }}
run: |
mkdir skills-service
cd skills-service
wget https://github.com/NationalSecurityAgency/skills-service/releases/download/${{ matrix.version }}/skills-service-${{ matrix.version }}.jar
ls ./
cd ..
- name: download integration test apps
uses: actions/download-artifact@v4
with:
name: service jar
path: ./skills-client-integration/skills-int-service/target/
- name: start services for cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npm install
npm run cyServices:start:skills-service:ci
npm run cyServices:start:integration-apps
cd ../../
- name: Run Cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npx cypress run --env skills-service.minVersion=${{ matrix.version }}
cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: result artifacts for ${{ matrix.version }}
path: |
./skills-service/*.jar
./skills-client-integration/skills-int-service/target/*.jar
./skills-client-integration/skills-int-e2e-test/target/logs/*.out
./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
./skills-client-integration/skills-int-e2e-test/logs
./skills-client-integration/skills-int-e2e-test/cypress/videos
./skills-client-integration/skills-int-e2e-test/cypress/screenshots
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/**/__diff_output__/*.png
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/__diff_output__/*.png
+1 -1
View File
@@ -9,7 +9,7 @@ PROMETHEUS=${PROMETHEUS:-false}
echo "PWD: "
echo $(pwd)
cd ./skills-client-integration/skills-int-e2e-test/hydra
DC="docker-compose -f quickstart.yml"
DC="docker compose -f quickstart.yml"
if [[ $DB == "mysql" ]]; then
DC+=" -f quickstart-mysql.yml"
fi
@@ -2,25 +2,88 @@
name: Skills-service Backward Compatibility
#on:
# push:
# paths-ignore:
# - 'README.md'
# pull_request:
# paths-ignore:
# - 'README.md'
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
schedule:
- cron: '0 6 * * *'
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test-skill-service-backward-compat:
# The type of runner that the job will run on
build-skills-service:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.11.0'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
11
19
- name: Print Versions
run: |
mvn --version
java -version
npm -version
node --version
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Checkout specific branch fo skills-service
uses: actions/checkout@v4
with:
repository: NationalSecurityAgency/skills-service
path: skills-service
- name: build skill-service
run: |
cd skills-service
mvn --batch-mode clean install -DskipTests
cd ..
- name: upload service jar
uses: actions/upload-artifact@v4
with:
name: service jar
path: ./skills-service/service/target/skills-service-*.jar
test-skill-service-backward-compat:
runs-on: ubuntu-latest
needs: [build-skills-service]
strategy:
fail-fast: false
matrix:
skillsJsVersion: [ '3.1.1', '3.2.0', '3.3.0', '3.3.1', '3.4.0', '3.4.1', '3.5.0']
services:
postgres:
# Docker Hub image
@@ -42,13 +105,13 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v2-beta
- uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20.11.0'
- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
@@ -63,7 +126,7 @@ jobs:
node --version
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -71,7 +134,7 @@ jobs:
${{ runner.os }}-maven-
- name: Cache npm
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
@@ -80,31 +143,99 @@ jobs:
# - name: build skill-service
# run: ./.github/workflows/scripts/getSkillsService.sh
- name: download skill-service
run: |
mkdir skills-service
cd skills-service
curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
ls ./
cd ..
# - name: download skill-service
# run: |
# mkdir skills-service
# cd skills-service
# curl -s https://api.github.com/repos/NationalSecurityAgency/skills-service/releases/latest | grep browser_download_url | cut -d '"' -f 4 | wget -qi -
# ls ./
# cd ..
- name: run backwards compat tests
# - name: Checkout specific branch fo skills-service
# uses: actions/checkout@v4
# with:
# repository: NationalSecurityAgency/skills-service
# path: skills-service
#
# - name: build skill-service
# run: |
# cd skills-service
# mvn --batch-mode clean install -DskipTests
# cp ./service/target/skills-service-*.jar ./
# ls ./
# cd ..
- uses: actions/download-artifact@v4
with:
name: service jar
path: ./skills-service/
- name: build integration test apps
env:
MAVEN_OPTS: -Xmx2048m
run: |
cd ./skills-client-integration/skills-int-client-js
npm install @skilltree/skills-client-js@${{ matrix.skillsJsVersion }} --save-exact
cd ..
mvn --batch-mode clean install
cd ../
- name: start services for cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
mvn --batch-mode clean package
export NO_COLOR=1
java -jar target/skills-int-e2e-test-*.jar
npm install
ls ../
echo "------"
ls ../../
echo "------"
ls ../../skills-service/
echo "------"
npm run cyServices:start:skills-service:ci
npm run cyServices:start:integration-apps
cd ../../
- name: Run Cypress tests
run: |
cd skills-client-integration/skills-int-e2e-test
npm run cy:run
cd ../../
- name: upload result artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: result artifacts
name: result artifacts for [${{ matrix.skillsJsVersion }}] version
path: |
./skills-client-integration/skills-int-e2e-test/target/logs/*
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
./skills-service/*.jar
./skills-client-integration/skills-int-service/target/*.jar
./skills-client-integration/skills-int-e2e-test/target/logs/*.out
./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
/home/runner/.npm/_logs/*
./skills-client-integration/skills-int-e2e-test/logs
./skills-client-integration/skills-int-e2e-test/cypress/videos
./skills-client-integration/skills-int-e2e-test/cypress/screenshots
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/**/__diff_output__/*.png
./skills-client-integration/skills-int-e2e-test/cypress/snapshots/**/__diff_output__/*.png
# - name: run backwards compat tests
# run: |
# cd skills-client-integration/skills-int-e2e-test
# mvn --batch-mode clean package
# export NO_COLOR=1
# java -jar target/skills-int-e2e-test-*.jar
# cd ../../
#
# - name: upload result artifacts
# if: ${{ always() }}
# uses: actions/upload-artifact@v4
# with:
# name: result artifacts
# path: |
# ./skills-client-integration/skills-int-e2e-test/target/logs/*
# ./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
# ./skills-client-integration/skills-int-e2e-test/target/skills-client/skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
# ./skills-client-integration/skills-int-e2e-test/cypress/videos/*.mp4
# ./skills-client-integration/skills-int-e2e-test/cypress/screenshots/**/*.png
# /home/runner/.npm/_logs/*
+1
View File
@@ -15,3 +15,4 @@
/skills-client-ng/package-lock.json
/skills-client-ng/dist/
/skills-client-ng/projects/skilltree/skills-client-ng/src/version.js
/skills-client-integration/skills-int-e2e-test/cypress/downloads/*
+7 -5
View File
@@ -8,15 +8,17 @@ These pages provide in-depth guidance on the installation, usage and contributio
## Workflow Status
[![CI Badge](https://github.com/NationalSecurityAgency/skills-client/workflows/Continuous%20Integration/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions?query=workflow%3A%22Continuous+Integration%22)
[![Continuous Integration](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/build-and-test.yml)
[![Run integration tests using OAuth](https://github.com/NationalSecurityAgency/skills-client/workflows/Continuous%20Integration%20with%20OAuth/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions?query=workflow%3A%22Continuous+Integration+with+OAuth%22)
[![Continuous Integration with OAuth](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/build-and-test-oauth.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/build-and-test-oauth.yml)
[![Run integration tests for expired tokens](https://github.com/NationalSecurityAgency/skills-client/workflows/Continuous%20Integration%20expired%20token%20tests/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions?query=workflow%3A%22Continuous+Integration+expired+token+tests%22)
[![Continuous Integration expired token tests](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/build-and-test-expired-token.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/build-and-test-expired-token.yml)
[![Skills-service Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/skills-service-backward-compat.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/skills-service-backward-compat.yml)
[![Client Libs Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/client-libs-backwards-compat.yml/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions/workflows/client-libs-backwards-compat.yml)
[![Skills-service Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/workflows/Skills-service%20Backward%20Compatibility/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions?query=workflow%3A%22Skills-service+Backward+Compatibility%22)
[![Client Libs Backward Compatibility](https://github.com/NationalSecurityAgency/skills-client/workflows/Client%20Libs%20Backward%20Compatibility/badge.svg)](https://github.com/NationalSecurityAgency/skills-client/actions?query=workflow%3A%22Client+Libs+Backward+Compatibility%22)
@@ -3,7 +3,7 @@
"rollup.config.js", "app/assets/**", "target/**", "pom.xml",
"build/**", "**/robots.txt", "**.svg", "vue.config.js",
"cypress/videos/**", "**/*.jar", "**.xml", "src/license/*.properties",
"nohup.out", "logs/*", "**.patch", "**.yml"
"nohup.out", "logs/*", "**.patch", "**.yml", "cypress/downloads/**", "**.config.js"
],
"license": "../license-add/LICENSE-HEADER.txt",
"licenseFormats": {
+2 -2
View File
@@ -7,13 +7,13 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.0</version>
<version>3.3.5</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<packaging>pom</packaging>
<version>3.5.0-SNAPSHOT</version>
<version>3.6.0-SNAPSHOT</version>
<licenses>
<license>
@@ -17,14 +17,14 @@ limitations under the License.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skills Examples - Native Javascript</title>
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/js-beautify/js/lib/beautify.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="assets/js/@skilltree/skills-client-js/dist/skills-client-js.umd.min.js"></script>
@@ -32,15 +32,19 @@ limitations under the License.
<script type="text/javascript">
const params = new URLSearchParams(window.location.search);
const isSummaryOnly = params.get('isSummaryOnly') ? JSON.parse(params.get('isSummaryOnly')) : false;
const internalBackButton = params.get('internalBackButton') ? JSON.parse(params.get('internalBackButton')) : false;
let clientDisplay = null;
const options = {
autoScrollStrategy: 'top-of-page',
isSummaryOnly,
internalBackButton,
};
const internalBackButtonParam = 'internalBackButton'
if (params.get(internalBackButtonParam)) {
options.internalBackButton = JSON.parse(params.get(internalBackButtonParam))
}
const themes = {
default: {
name: 'Bright (default)',
@@ -155,32 +159,38 @@ limitations under the License.
<div id="app">
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="#" class="navbar-brand">Native Javascript Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li class="nav-item pr-3">
<a class="nav-link" href="index.html" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item active pr-3">
<a class="nav-link" href="javascript:void(0)" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
</nav>
</div>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
<div class="container-fluid">
<a href="#" class="navbar-brand">Client Test</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="index.html" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="javascript:void(0)" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid mt-3">
<div class="container">
<div class="">
<div class="form-row align-items-center">
<div class="d-inline dropdown">
<button class="btn btn-outline-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenuButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Change Theme
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="javascript:void(0)" id="default-theme-dropdown-item" onclick="applyTheme(themes.default)">Bright (Default)</a>
<a class="dropdown-item" href="javascript:void(0)" id="darkblue-theme-dropdown-item" onclick="applyTheme(themes.darkBlue)">Dark Blue</a>
</div>
</ul>
</div>
<div class="d-inline custom-control custom-checkbox mx-2">
@@ -192,26 +202,19 @@ limitations under the License.
<label class="custom-control-label" for="internalBackButtonControl">Internal Back Button</label>
</div>
<button class="btn btn-outline-primary" type="button" data-cy="navigateButton" onclick="navigate()">
<button class="btn btn-primary" type="button" data-cy="navigateButton" onclick="navigate()">
Navigate
</button>
</div>
<div>
<div class="my-3">
<span id="skillsDisplayPath" data-cy="skillsDisplayPath"></span>
</div>
<div
style="min-height: 860px">
<div id="skills-client-display" />
<div id="skills-client-display"></div>
</div>
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p>Native Javascript Examples Guide</p>
<p></p>
</div>
</footer>
</div>
</div>
@@ -220,5 +223,5 @@ limitations under the License.
<script type="text/javascript">
document.getElementById("displayTypeControl").checked = isSummaryOnly;
document.getElementById("internalBackButtonControl").checked = internalBackButton;
document.getElementById("internalBackButtonControl").checked = params.get(internalBackButtonParam) ? JSON.parse(params.get(internalBackButtonParam)) : false
</script>
@@ -17,14 +17,14 @@ limitations under the License.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skills Examples - Native Javascript</title>
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/js-beautify/js/lib/beautify.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="text/javascript" src="assets/js/@skilltree/skills-client-js/dist/skills-client-js.umd.min.js"></script>
@@ -53,37 +53,12 @@ limitations under the License.
<body>
<div id="app">
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="#" class="navbar-brand">Native Javascript Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li class="nav-item pr-3">
<a class="nav-link" href="index.html" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item active pr-3">
<a class="nav-link" href="javascript:void(0)" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
</nav>
</div>
<div class="container-fluid mt-3">
<div class="container">
<div
style="min-height: 860px">
<div id="skills-client-display" />
</div>
<div class="container-fluid mt-3">
<div class="container">
<div style="min-height: 860px">
<div id="skills-client-display"></div>
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p>Native Javascript Examples Guide</p>
<p></p>
</div>
</footer>
</div>
</div>
@@ -0,0 +1,73 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="module">
import { SkillsReporter, SkillsConfiguration, SkillsLevelJS, SkillsDisplayJS, Logger } from './assets/js/@skilltree/skills-client-js/dist/skills-client-js.esm.min.js'
axios.get("/api/config")
.then((result) => {
SkillsConfiguration.configure({...result.data, enabled: false});
});
document.querySelector('#reportSkillBtn').addEventListener('click', () => {
SkillsReporter.reportSkill('someId')
});
SkillsConfiguration.afterConfigure().then(() => {
const initializeSkillsDisplay = () => {
const clientDisplay = new SkillsDisplayJS();
clientDisplay.attachTo(document.querySelector('#skills-client-display'));
};
if (document.readyState === "complete"
|| document.readyState === "loaded"
|| document.readyState === "interactive") {
initializeSkillsDisplay();
} else {
document.addEventListener("DOMContentLoaded", initializeSkillsDisplay);
}
});
</script>
</head>
<body>
<div id="app">
<button
id="reportSkillBtn"
data-cy="reportSkillButton"
class="btn btn-outline-primary">
Report Skill
</button>
<div data-cy="levelComponentRes">Level: [<span id="skillLevel"/>]</div>
<div data-cy="skillsDisplayRes">Skills Display: [<div id="skills-client-display"></div>]</div>
</div>
</body>
</html>
@@ -17,13 +17,15 @@ limitations under the License.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Skills Examples - Native Javascript</title>
<title>Skill Client Test</title>
<link rel="icon" type="image/x-icon" href="./skilltree.ico">
<link rel="stylesheet" type="text/css" href="./assets/app.css"/>
<link rel="stylesheet" type="text/css" href="./assets/js/bootstrap/dist/css/bootstrap.css">
<script type="text/javascript" src="./assets/js/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./assets/js/axios/dist/axios.min.js"></script>
<script type="text/javascript" src="./assets/js/js-beautify/js/lib/beautify.js"></script>
<script type="text/javascript" src="./assets/js/bootstrap/dist/js/bootstrap.bundle.js"></script>
<script type="module">
import { SkillsReporter, SkillsConfiguration, SkillsLevelJS, Logger } from './assets/js/@skilltree/skills-client-js/dist/skills-client-js.esm.min.js'
@@ -32,33 +34,43 @@ limitations under the License.
.then((result) => {
SkillsConfiguration.configure(result.data);
});
SkillsReporter.addSuccessHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
const reportSkill = (skillId) => {
SkillsReporter.reportSkill(skillId)
.then((response) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(response, null, 2);
});
};
document.querySelector('#exampleDirectiveClickEvent').addEventListener('click', () => { reportSkill('IronMan'); });
const toggleAllEvents = () => {
const notifyIfSkillNotApplied = document.querySelector('#all-events-check').checked
SkillsReporter.configure( { notifyIfSkillNotApplied });
}
document.querySelector('#all-events-check').addEventListener('click', toggleAllEvents);
toggleAllEvents();
SkillsConfiguration.afterConfigure()
.then(() => {
if (window.Cypress) {
window.skillsLogger = Logger;
}
const skillLevel = new SkillsLevelJS();
skillLevel.attachTo('#skillLevel')
});
.then(() => {
SkillsReporter.addSuccessHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
SkillsReporter.addErrorHandler((result) => {
document.querySelector('#global-event-result-container-js').innerHTML = JSON.stringify(result, null, 2);
});
const reportSkill = (skillId) => {
SkillsReporter.reportSkill(skillId)
.then((response) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(response, null, 2);
}).catch((err) => {
document.querySelector('#report-result-container').innerHTML = JSON.stringify(err, null, 2);
});
};
document.querySelector('#exampleDirectiveClickEvent').addEventListener('click', () => {
var skillId = document.getElementById('skillId').value;
reportSkill(skillId);
});
const toggleAllEvents = () => {
const notifyIfSkillNotApplied = document.querySelector('#all-events-check').checked
SkillsReporter.configure({notifyIfSkillNotApplied});
}
document.querySelector('#all-events-check').addEventListener('click', toggleAllEvents);
toggleAllEvents();
if (window.Cypress) {
window.skillsLogger = Logger;
}
const skillLevel = new SkillsLevelJS();
skillLevel.attachTo('#skillLevel')
});
</script>
</head>
@@ -67,20 +79,26 @@ limitations under the License.
<div id="app">
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="#" class="navbar-brand">Native Javascript Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li class="nav-item active pr-3">
<a class="nav-link" href="javascript:void(0)" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item pr-3">
<a class="nav-link" href="clientDisplay.html" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
<button type="button" class="btn btn-primary">
<span id="skillLevel"/>
</button>
<nav class="navbar navbar-expand-lg navbar-light" style="background-color: #e3f2fd;">
<div class="container-fluid">
<a href="#" class="navbar-brand">Client Test</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="javascript:void(0)" data-cy="reportSkillsLink">Report Skill Events</a>
</li>
<li class="nav-item">
<a class="nav-link" href="clientDisplay.html" data-cy="userDisplayLink">User Display</a>
</li>
</ul>
<button type="button" class="btn btn-primary">
<span id="skillLevel"/>
</button>
</div>
</div>
</nav>
</div>
@@ -95,7 +113,7 @@ limitations under the License.
<pre id="global-event-result-container-js" data-cy="globalEventResult"></pre>
</div>
<div>
<h5 class="text-info"><strong>Skills Directive - Click Event</strong></h5>
<h5 class="text-info"><strong>Report Any Skill</strong></h5>
<div class="card card-body bg-light">
<pre class="m-0 sample-code">
<code class="javascript">SkillsReporter.reportSkill(this.skill)
@@ -105,12 +123,18 @@ limitations under the License.
</div>
<div class="card card-body mt-3">
<div class="text-primary">Skill Id:</div>
<div class="code-example">
<input class="form-control" id="skillId" type="text" value="IronMan" />
</div>
<div>
<div id="exampleDirectiveClickEvent">
<button
data-cy="exampleDirectiveClickEventButton"
class="btn btn-outline-primary">
Report Skill
</button>
<button
data-cy="exampleDirectiveClickEventButton"
class="btn btn-outline-primary">
Report Skill
</button>
</div>
</div>
<hr>
<div class="text-primary">Result:</div>
@@ -124,13 +148,6 @@ limitations under the License.
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p>Native Javascript Examples Guide</p>
<p></p>
</div>
</footer>
</div>
</div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

@@ -1,6 +1,6 @@
{
"name": "skills-int-client-js",
"version": "3.5.0",
"version": "3.6.0",
"license": "Apache-2.0",
"description": "SkillTree Client Lib Integration Tests - Native JS",
"main": "index.js",
@@ -12,20 +12,19 @@
"licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'",
"licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json",
"licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck",
"build": "npm run licenseCheck && echo nothingelsetodo"
"build": "npm install && npm run licenseCheck && echo nothingelsetodo"
},
"author": "SkillTree Team",
"dependencies": {
"@skilltree/skills-client-js": "3.5.0",
"axios": "0.23.0",
"bootstrap": "4.5.2",
"jquery": "3.5.1",
"js-beautify": "1.13.0"
"@skilltree/skills-client-js": "3.6.0",
"axios": "1.7.7",
"bootstrap": "5.3.3",
"jquery": "3.7.1"
},
"devDependencies": {
"fs-extra": "8.1.0",
"license-check-and-add": "3.0.4",
"fs-extra": "11.2.0",
"license-check-and-add": "4.0.5",
"license-checker": "25.0.1",
"live-server": "1.2.1"
"live-server": "1.2.2"
}
}
}
@@ -7,7 +7,7 @@
<parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<version>3.5.0-SNAPSHOT</version>
<version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>skills-int-client-js</artifactId>
@@ -19,56 +19,77 @@
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>install node and npm</id>
<id>exec-npm-install</id>
<phase>install</phase>
<goals>
<goal>install-node-and-npm</goal>
<goal>exec</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
<executable>npm</executable>
<arguments>
<argument>run</argument>
<argument>build</argument>
</arguments>
<workingDirectory>${basedir}</workingDirectory>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>--unsafe-perm install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<!--TODO: uncomment when we have at least 1 unit test-->
<!--<execution>-->
<!--<id>npm run test</id>-->
<!--<goals>-->
<!--<goal>npm</goal>-->
<!--</goals>-->
<!--<phase>test</phase>-->
<!--<configuration>-->
<!--<arguments>run unit</arguments>-->
<!--</configuration>-->
<!--</execution>-->
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>com.github.eirslett</groupId>-->
<!-- <artifactId>frontend-maven-plugin</artifactId>-->
<!-- <version>${frontend-maven-plugin.version}</version>-->
<!-- <configuration>-->
<!-- <installDirectory>target</installDirectory>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>install node and npm</id>-->
<!-- <goals>-->
<!-- <goal>install-node-and-npm</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <nodeVersion>${node.version}</nodeVersion>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- <id>npm install</id>-->
<!-- <goals>-->
<!-- <goal>npm</goal>-->
<!-- </goals>-->
<!-- <phase>generate-resources</phase>-->
<!-- <configuration>-->
<!-- <arguments>&#45;&#45;unsafe-perm install</arguments>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- <execution>-->
<!-- <id>npm run build</id>-->
<!-- <goals>-->
<!-- <goal>npm</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <arguments>run build</arguments>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- &lt;!&ndash;TODO: uncomment when we have at least 1 unit test&ndash;&gt;-->
<!-- &lt;!&ndash;<execution>&ndash;&gt;-->
<!-- &lt;!&ndash;<id>npm run test</id>&ndash;&gt;-->
<!-- &lt;!&ndash;<goals>&ndash;&gt;-->
<!-- &lt;!&ndash;<goal>npm</goal>&ndash;&gt;-->
<!-- &lt;!&ndash;</goals>&ndash;&gt;-->
<!-- &lt;!&ndash;<phase>test</phase>&ndash;&gt;-->
<!-- &lt;!&ndash;<configuration>&ndash;&gt;-->
<!-- &lt;!&ndash;<arguments>run unit</arguments>&ndash;&gt;-->
<!-- &lt;!&ndash;</configuration>&ndash;&gt;-->
<!-- &lt;!&ndash;</execution>&ndash;&gt;-->
<!-- </executions>-->
<!-- </plugin>-->
</plugins>
</build>
</project>
@@ -1,18 +0,0 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support
# You can see what browsers were selected by your queries by running:
# npx browserslist
last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
@@ -1,16 +0,0 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false
@@ -1,49 +0,0 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out
# dependencies
/node_modules
# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
package-lock.json
projects/skilltree/skills-client-ng/src/version.js
@@ -1 +0,0 @@
package-lock=false
@@ -1,42 +0,0 @@
<!---
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
# SkillsIntClientNg
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.2.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
@@ -1,129 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"skills-int-client-ng": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": [
"axios",
"highlight.js",
"lodash/debounce",
"js-beautify"
],
"preserveSymlinks": true,
"outputPath": "dist/skills-int-client-ng",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css",
"./node_modules/bootstrap/dist/css/bootstrap.css",
"./node_modules/highlight.js/styles/github.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.min.js",
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "skills-int-client-ng:build"
},
"configurations": {
"production": {
"browserTarget": "skills-int-client-ng:build:production"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "skills-int-client-ng:serve"
},
"configurations": {
"production": {
"devServerTarget": "skills-int-client-ng:serve:production"
}
}
}
}
}},
"defaultProject": "skills-int-client-ng"
}
@@ -1,51 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
/**
* @type { import("protractor").Config }
*/
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json')
});
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.PRETTY
}
}));
}
};
@@ -1,38 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('skills-int-client-ng app is running!');
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE,
} as logging.Entry));
});
});
@@ -1,26 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}
@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
@@ -1,47 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, './coverage/skills-int-client-ng'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
@@ -1,13 +0,0 @@
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -1,23 +0,0 @@
{
"ignore": [ ".git", "coverage", ".*/**", ".*", "*.iml", "tsconfig.*", "skills.d.ts", "angular.json", "pom.xml"],
"license": "license-add/LICENSE-HEADER.txt",
"licenseFormats": {
"js": {
"prepend": "/*",
"append": " */",
"eachLine": {
"prepend": " * "
}
},
"dotfile": {
"eachLine": {
"prepend": "# "
}
},
"md": {
"prepend": "<!---",
"append": " -->"
}
},
"trailingWhitespace": "TRIM"
}
@@ -1,29 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = {
packages: {
'@skilltree/skills-client-ng': {
ignorableDeepImportMatchers: [
/lodash\//
]
},
'ngx-highlightjs': {
ignorableDeepImportMatchers: [
/highlight/
]
},
}
};
@@ -1,67 +0,0 @@
{
"name": "skills-int-client-ng",
"version": "3.6.0",
"license": "Apache-2.0",
"description": "SkillTree Client Lib - Angular",
"author": "SkillTree Team",
"scripts": {
"licenseDepCheck2": "license-checker --production --onlyAllow='MIT;ISC;Apache-2.0;0BSD' --summary",
"licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-3-Clause;Apache-2.0;0BSD;CC-BY-4.0' --summary",
"licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'",
"licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json",
"licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ",
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"serve": "npm run start",
"build": "npm run licenseCheck && ng build --configuration production --deploy-url=/angular/",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"dependencies": {
"@angular/animations": "14.3.0",
"@angular/common": "14.3.0",
"@angular/compiler": "14.3.0",
"@angular/core": "14.3.0",
"@angular/forms": "14.3.0",
"@angular/platform-browser": "14.3.0",
"@angular/platform-browser-dynamic": "14.3.0",
"@angular/router": "14.3.0",
"@ng-bootstrap/ng-bootstrap": "13.0.0",
"@popperjs/core": "2.11.8",
"@skilltree/skills-client-ng": "3.6.0",
"@types/js-beautify": "1.11.0",
"axios": "0.23.0",
"bootstrap": "4.5.3",
"highlight.js": "11.3.1",
"jquery": "3.5.1",
"js-beautify": "1.13.0",
"ngx-highlightjs": "4.1.2",
"popper.js": "^1.16.1",
"rxjs": "6.6.3",
"tslib": "2.0.3",
"zone.js": "0.12.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "14.2.11",
"@angular/cli": "14.2.11",
"@angular/compiler-cli": "14.3.0",
"@types/jasmine": "3.6.0",
"@types/jasminewd2": "2.0.8",
"@types/node": "14.11.8",
"codelyzer": "6.0.1",
"jasmine-core": "3.6.0",
"jasmine-spec-reporter": "6.0.0",
"karma": "6.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.5.4",
"license-check-and-add": "3.0.4",
"license-checker": "25.0.1",
"protractor": "7.0.0",
"ts-node": "9.0.0",
"tslint": "6.1.3",
"typescript": "4.6.2"
}
}
@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<version>3.5.0-SNAPSHOT</version>
</parent>
<artifactId>skills-int-client-ng</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>${node.version}</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<!--TODO: uncomment when we have at least 1 unit test-->
<!--<execution>-->
<!--<id>npm run test</id>-->
<!--<goals>-->
<!--<goal>npm</goal>-->
<!--</goals>-->
<!--<phase>test</phase>-->
<!--<configuration>-->
<!--<arguments>run unit</arguments>-->
<!--</configuration>-->
<!--</execution>-->
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -1,7 +0,0 @@
{
"/api":
{
"target": "http://localhost:8090",
"secure": false
}
}
@@ -1,39 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ReportSkillsComponent } from './components/report-skills/report-skills.component';
import { SkillsDisplayComponent } from './components/skills-display/skills-display.component';
const routes: Routes = [{
path: '',
redirectTo: 'reportSkills',
pathMatch: 'full'
}, {
path: 'angular/reportSkills',
component: ReportSkillsComponent
}, {
path: 'angular/showSkills',
component: SkillsDisplayComponent
}
];
@NgModule({
imports: [RouterModule.forRoot(routes, { anchorScrolling: 'enabled'})],
exports: [RouterModule]
})
export class AppRoutingModule { }
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,21 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div>
<app-navigation></app-navigation>
<div class="container-fluid mt-3">
<router-outlet></router-outlet>
</div>
</div>
@@ -1,50 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule
],
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'skills-int-client-ng'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.componentInstance;
expect(app.title).toEqual('skills-int-client-ng');
});
it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('skills-int-client-ng app is running!');
});
});
@@ -1,25 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'skills-int-client-ng';
}
@@ -1,72 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { HighlightModule, HIGHLIGHT_OPTIONS } from 'ngx-highlightjs';
import { SkillsLevelModule, SkillsDisplayModule, SkilltreeModule } from '@skilltree/skills-client-ng'
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { NavigationComponent } from './components/navigation/navigation.component';
import { CodeExampleLayoutComponent } from './components/report-skills/code-example/code-example-layout.component';
import { ButtonCodeExampleComponent } from './components/report-skills/code-example/button-code-example.component';
import { InputCodeExampleComponent } from './components/report-skills/code-example/input-code-example.component';
import { AnySkillCodeExampleComponent } from './components/report-skills/code-example/anyskill-code-example.component';
import { ExampleService } from './components/report-skills/code-example/example.service';
import { ReportSkillsComponent } from './components/report-skills/report-skills.component';
import { SkillsDisplayComponent } from './components/skills-display/skills-display.component';
import { PlaceholderDirective } from './directives/placeholder.directive';
@NgModule({
declarations: [
AppComponent,
ReportSkillsComponent,
NavigationComponent,
SkillsDisplayComponent,
CodeExampleLayoutComponent,
ButtonCodeExampleComponent,
AnySkillCodeExampleComponent,
InputCodeExampleComponent,
PlaceholderDirective
],
imports: [
BrowserModule,
AppRoutingModule,
NgbModule,
FormsModule,
HighlightModule,
SkillsLevelModule,
SkilltreeModule,
SkillsDisplayModule,
RouterModule.forRoot([
{ path: '', component: ReportSkillsComponent },
])
],
providers: [
ExampleService,
{
provide: HIGHLIGHT_OPTIONS,
useValue: {
fullLibraryLoader: () => import('highlight.js'),
}
}
],
bootstrap: [AppComponent]
})
export class AppModule { }
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,35 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div>
<div>
<nav class="navbar navbar-dark bg-info">
<a href="/angular/reportSkills" class="navbar-brand">Angular Integration Examples</a>
<ul class="navbar-nav flex-row mr-auto">
<li [routerLinkActive]="['active']" class="nav-item active pr-3">
<a class="nav-link" routerLink="/angular/reportSkills">Report Skill Events</a>
</li>
<li [routerLinkActive]="['active']" class="nav-item pr-3">
<a class="nav-link" routerLink="/angular/showSkills">User Display</a>
</li>
</ul>
<button type="button" class="btn btn-primary">
<span id="skillLevel"></span>
<skills-level></skills-level>
</button>
</nav>
</div>
</div>
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavigationComponent } from './navigation.component';
describe('NavigationComponent', () => {
let component: NavigationComponent;
let fixture: ComponentFixture<NavigationComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NavigationComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavigationComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,32 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-navigation',
templateUrl: './navigation.component.html',
styleUrls: ['./navigation.component.css']
})
export class NavigationComponent implements OnInit {
constructor(public route: ActivatedRoute) {
}
ngOnInit(): void {
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,22 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div data-cy="anySkillDropDown" ngbDropdown class="d-inline-block mx-2">
<button data-cy="anySkillDropDownButton" class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>{{skillId}}</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button data-cy="anySkillDropDownItemButton" ngbDropdownItem *ngFor="let selectedSkill of available" (click)="setSelectedSkill(selectedSkill)">{{selectedSkill}}</button>
</div>
</div>
<button class="btn btn-outline-primary" [disabled]="!hasSelectedSkill()" (click)="reportSkill()">Report Skill</button>
@@ -1,73 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import axios from 'axios';
import { Example } from './example';
import { SkillsReporter } from '@skilltree/skills-client-ng';
@Component({
selector: 'app-anyskill-code-example',
templateUrl: './anyskill-code-example.component.html',
styleUrls: ['./anyskill-code-example.component.css']
})
export class AnySkillCodeExampleComponent implements OnInit {
@Input() example: Example
placeholder: string = 'Select a skill id';
skillId: string;
available: string[] = [''];
@Output() skillReportSuccess = new EventEmitter<string>();
constructor() {
}
ngOnInit(): void {
this.skillId = this.placeholder;
axios.get("/api/skills")
.then((result) => {
this.available = result.data as string[];
});
}
hasSelectedSkill() {
return this.skillId && this.skillId !== this.placeholder;
}
setSelectedSkill(selectedSkill: string) {
this.skillId = selectedSkill;
}
reportSkill() {
SkillsReporter.reportSkill(this.skillId)
.then((res) => {
this.skillReportSuccess.emit(res);
})
.catch((res) => {
this.skillReportSuccess.emit(res);
});
}
getSampleCode() {
let sampleCode = `SkillsReporter.reportSkill(this.skill)
.then((res) => {
this.reportResult = res;
});`;
sampleCode = 'SkillsReporter.reportSkill(this.skill)\n .then((res) => {\n this.reportResult = res;\n \});';
return sampleCode;
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,16 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<button class="btn btn-outline-primary" [skilltree]="skillId" (skills-report-success)="onReporterResponse($event)" (skills-report-error)="onReporterResponse($event)" >Report Skill</button>
@@ -1,50 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Example } from './example';
@Component({
selector: 'app-button-code-example',
templateUrl: './button-code-example.component.html',
styleUrls: ['./button-code-example.component.css']
})
export class ButtonCodeExampleComponent implements OnInit {
@Input() example: Example
skillId: string
@Output() skillReportSuccess = new EventEmitter<string>();
constructor() {
}
ngOnInit(): void {
this.skillId = this.example.skillId;
}
onReporterResponse(event) {
this.skillReportSuccess.emit(event.detail)
}
getSampleCode() {
let sampleCode = `<button \n [skilltree]="\'${this.example.skillId}\'" \n (skills-report-success)="onReporterResponse($event)"`;
if (this.example.handleError) {
sampleCode += '\n (skills-report-error)="onReporterError($event)"';
}
sampleCode += '>\n Report Skill\n</button>'
return sampleCode
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,33 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div>
<h5 class="text-info"><strong>{{ title }}</strong></h5>
<div class="card card-body bg-light">
<pre><code [highlight]="sampleCode" [languages]="['html', 'javascript']"></code></pre>
</div>
<div class="card card-body mt-3" [id]="formatId(title)">
<div id="exampleDirectiveClickEvent">
<div class="code-example">
<ng-template appPlaceholder></ng-template>
</div>
</div>
<hr>
<div class="text-primary">Result:</div>
<div class="border rounded p-3 bg-light">
<pre>{{ reportResult }}</pre>
</div>
</div>
</div>
@@ -1,63 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, AfterViewInit, Input, ViewChild, ComponentFactoryResolver } from '@angular/core';
import { PlaceholderDirective } from 'src/app/directives/placeholder.directive';
import { Example } from './example';
@Component({
selector: 'app-code-example-layout',
templateUrl: './code-example-layout.component.html',
styleUrls: ['./code-example-layout.component.css']
})
export class CodeExampleLayoutComponent implements OnInit, AfterViewInit {
@ViewChild(PlaceholderDirective) codeExampleHost: PlaceholderDirective;
@Input() example: Example;
skillId: string;
title: string;
sampleCode: string;
reportResult: string = "";
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
}
formatId(title: string) {
return title.replace(/ /gi,'').replace(/-/g,'');
}
ngOnInit(): void {
this.skillId = this.example.skillId;
this.title = this.example.title;
}
ngAfterViewInit(): void {
setTimeout(() => {
this.viewLoaded();
});
}
viewLoaded() {
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.example.component);
const viewContainerRef = this.codeExampleHost.viewContainerRef;
viewContainerRef.clear();
const componentRef = viewContainerRef.createComponent(componentFactory);
componentRef.instance.example = this.example;
this.sampleCode = componentRef.instance.getSampleCode();
componentRef.instance.skillReportSuccess.subscribe(val => this.reportResult = JSON.stringify(val, null, ' '));
}
}
@@ -1,57 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Injectable } from '@angular/core';
import { Example } from './example'
import { ButtonCodeExampleComponent } from './button-code-example.component';
import { InputCodeExampleComponent } from './input-code-example.component';
import { AnySkillCodeExampleComponent } from './anyskill-code-example.component';
@Injectable()
export class ExampleService {
getExamples() {
return [
new Example(
ButtonCodeExampleComponent,
'Skills Directive - Click Event',
'IronMan',
),
new Example(
InputCodeExampleComponent,
'Skills Directive - Input Event',
'Thor',
),
new Example(
ButtonCodeExampleComponent,
'Skills Directive - Error with Button',
'DoesNotExist',
true
),
new Example(
InputCodeExampleComponent,
'Skills Directive - Error with Input',
'DoesNotExist',
true
),
new Example(
AnySkillCodeExampleComponent,
'Pure JS - Report Any Skill',
'',
true
)
];
}
}
@@ -1,25 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Type } from "@angular/core";
export class Example {
constructor(
public component: Type<any>,
public title: string,
public skillId: string,
// public sampleCode: string,
public handleError: boolean = false) { }
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,16 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<input class="form-control" type="text" [skilltree]="skillId" (skills-report-success)="onReporterResponse($event)" (skills-report-error)="onReporterResponse($event)"/>
@@ -1,50 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { Example } from './example';
@Component({
selector: 'app-input-code-example',
templateUrl: './input-code-example.component.html',
styleUrls: ['./input-code-example.component.css']
})
export class InputCodeExampleComponent implements OnInit {
@Input() example: Example
skillId: string
@Output() skillReportSuccess = new EventEmitter<string>();
constructor() {
}
ngOnInit(): void {
this.skillId = this.example.skillId;
}
onReporterResponse(event) {
this.skillReportSuccess.emit(event.detail)
}
getSampleCode() {
let sampleCode = `<input \n type="text" \n [skilltree]="\'${this.example.skillId}\'" \n (skills-report-success)="onReporterResponse($event)"`;
if (this.example.handleError) {
sampleCode += '\n (skills-report-error)="onReporterError($event)"';
}
sampleCode += ' />'
return sampleCode;
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,35 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<h2>Report Skills Examples</h2>
<div class="text-primary">Global Event Result:</div>
<div id="globalEventResultDiv" class="border rounded p-3 bg-light">
<pre data-cy="globalEventResult">{{ globalEventResult }}</pre>
</div>
<div class="mt-5 mb-5" *ngFor="let example of examples">
<ng-template #examplesTarget></ng-template>
</div>
</div>
<footer class="text-muted bg-light py-5">
<div class="container">
<p class="float-right">
<a href="angular/reportSkills#">Back to top</a>
</p>
<p>Angular Examples Guide</p>
</div>
</footer>
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReportSkillsComponent } from './report-skills.component';
describe('ReportSkillsComponent', () => {
let component: ReportSkillsComponent;
let fixture: ComponentFixture<ReportSkillsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ReportSkillsComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ReportSkillsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,87 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import {
Component,
OnInit,
AfterViewInit,
OnDestroy,
ComponentFactoryResolver,
ViewChildren,
ViewContainerRef,
QueryList,
ChangeDetectorRef
} from '@angular/core';
import { Example } from './code-example/example'
import { ExampleService } from './code-example/example.service';
import { CodeExampleLayoutComponent } from './code-example/code-example-layout.component'
import { SkillsReporter } from '@skilltree/skills-client-ng';
@Component({
selector: 'app-report-skills',
templateUrl: './report-skills.component.html',
styleUrls: ['./report-skills.component.css']
})
export class ReportSkillsComponent implements OnInit, AfterViewInit, OnDestroy {
globalEventResult: string = ''
examples: Example[]
private loadedComponents = [];
@ViewChildren('examplesTarget', { read: ViewContainerRef }) exampleTargets: QueryList<ViewContainerRef>;
constructor(private exampleService: ExampleService, private componentFactoryResolver: ComponentFactoryResolver, private ref: ChangeDetectorRef) { }
ngOnInit() {
SkillsReporter.addSuccessHandler(result => {
this.globalEventResult = JSON.stringify(result, null, ' ')
// force change detection
this.ref.detectChanges();
});
}
ngAfterViewInit(): void {
setTimeout(() => {
this.viewLoaded();
});
}
ngOnDestroy(): void {
this.loadedComponents.forEach(component => component.destroy());
}
async viewLoaded() {
this.exampleTargets.changes.subscribe(() => {
this.loadExampleComponents();
});
await this.loadExamples();
}
async loadExamples() {
this.examples = this.exampleService.getExamples();
}
private loadExampleComponents() {
this.exampleTargets.toArray().forEach((viewContainerRef, i) => {
let example = this.examples[i];
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(CodeExampleLayoutComponent);
let componentRef = viewContainerRef.createComponent(componentFactory);
componentRef.instance.example = example;
componentRef.changeDetectorRef.detectChanges();
this.loadedComponents.push(componentRef);
});
}
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,65 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<div class="container">
<div class="d-flex align-items-center mb-3">
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>Change Theme</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem *ngFor="let themeItem of themes"
(click)="setIsThemeUrlParam(themeItem)">{{themeItem.name}}</button>
</div>
</div>
<div class="custom-control custom-switch d-inline-block ml-3 border-right pr-2">
<input type="checkbox" class="custom-control-input" id="customSwitch1" (click)="setIsSummaryOnlyUrlParam()"
[checked]="displayOptions.isSummaryOnly">
<label class="custom-control-label" for="customSwitch1">Summary Only</label>
</div>
<div class="custom-control custom-switch d-inline-block ml-3 border-right pr-2">
<input type="checkbox" class="custom-control-input" id="customSwitch2" (click)="setInternalBackButtonUrlParam()"
[checked]="displayOptions.internalBackButton">
<label class="custom-control-label" for="customSwitch2">Internal Back Button</label>
</div>
<button class="btn btn-outline-primary" id="navButton" data-cy="navigateButton" (click)="navigate()">Navigate</button>
<a href="javascript:void(0)" class="ml-2" (click)="scrollTo('sample-code')">Show Source</a>
</div>
<div>
<span id="skillsDisplayPath" data-cy="skillsDisplayPath">Skills Display Path: [{{ skillsDisplayRoutePath }}]</span>
</div>
<div class="border rounded">
<skills-display #skillsDisplay *ngIf="selectedTheme" [options]="displayOptions" [version]="version" [theme]="selectedTheme.theme" [handleRouteChanged]="skillsDisplayRouteChanged">
</skills-display>
</div>
<div [hidden]="!showSampleCode" id="sample-code" class="row">
<div class="col-12">
<div class="mb-5 mt-5 card bg-light">
<h5 class=" card-header text-info">
<strong>Sample Code</strong>
</h5>
<div class="card-body py-0">
<pre><code [highlight]="getSampleCode()" [languages]="['html', 'javascript']"></code></pre>
</div>
</div>
</div>
</div>
</div>
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SkillsDisplayComponent } from './skills-display.component';
describe('SkillsDisplayComponent', () => {
let component: SkillsDisplayComponent;
let fixture: ComponentFixture<SkillsDisplayComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SkillsDisplayComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SkillsDisplayComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -1,120 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Component, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { themes } from './themes'
import { ViewportScroller } from '@angular/common';
import { js_beautify } from 'js-beautify'
@Component({
selector: 'app-skills-display',
templateUrl: './skills-display.component.html',
styleUrls: ['./skills-display.component.css']
})
export class SkillsDisplayComponent implements OnInit {
@ViewChild('skillsDisplay')
skillsDisplay: any;
displayOptions: any;
version: number;
selectedTheme: any;
themes: Array<any> = themes;
showSampleCode: boolean = false;
skillsDisplayRoutePath: string = '/';
constructor(private route: ActivatedRoute, private router: Router, private viewportScroller: ViewportScroller) { }
ngOnInit(): void {
this.route.queryParams.subscribe(params => {
this.version = params['skillsVersion'] ? JSON.parse(params['skillsVersion']) : 1000;
this.displayOptions = {
autoScrollStrategy: 'top-of-page',
isSummaryOnly: params['isSummaryOnly'] ? JSON.parse(params['isSummaryOnly']) : false,
internalBackButton: params['internalBackButton'] ? JSON.parse(params['internalBackButton']) : false,
};
this.selectedTheme = params['themeName'] ? this.findTheme(params['themeName']) : this.themes[0];
});
}
navigate() {
this.skillsDisplay.navigate('/subjects/subj0')
}
findTheme(name: string) {
return this.themes.find((item) => item.name === name);
}
skillsDisplayRouteChanged = (newPath: string) => {
this.skillsDisplayRoutePath = newPath;
}
refreshPage() {
setTimeout(() => {
document.location.reload();
}, 250);
}
setIsThemeUrlParam(theme) {
this.router.navigate(['angular/showSkills'], { queryParams: { themeName: theme.name }, queryParamsHandling: 'merge' });
this.refreshPage();
}
setIsSummaryOnlyUrlParam() {
this.displayOptions.isSummaryOnly = !this.displayOptions.isSummaryOnly;
this.router.navigate(['angular/showSkills'], { queryParams: { isSummaryOnly: this.displayOptions.isSummaryOnly }, queryParamsHandling: 'merge' });
this.refreshPage();
}
setInternalBackButtonUrlParam() {
this.displayOptions.internalBackButton = !this.displayOptions.internalBackButton;
this.router.navigate(['angular/showSkills'], { queryParams: { internalBackButton: this.displayOptions.internalBackButton }, queryParamsHandling: 'merge' });
this.refreshPage();
}
scrollTo(elementId: string) {
this.showSampleCode = true;
setTimeout(() => {
this.viewportScroller.scrollToAnchor(elementId);
}, 250);
}
getSampleCode() {
let sampleCode = `
<template>
<skills-level /> <!-- You can display the user's current Level using the SkillsLevel component -->
<skills-display :theme="selectedTheme" ${(this.displayOptions.isSummaryOnly || this.displayOptions.internalBackButton) ? ':options="displayOptions"' : ''}/>
</template>
<script>
${js_beautify(`
import { SkillsDisplay, SkillsLevel } from '@skilltree/skills-client-vue';
export default {
components: {
SkillsDisplay,
},
data() {
return {${this.displayOptions.isSummaryOnly ? '\ndisplayOptions: { isSummaryOnly: true, },' : ''}
selectedTheme: ${JSON.stringify(this.selectedTheme, null, ' ')}
};
},
};
`)}
</script>
`;
return sampleCode;
}
}
@@ -1,65 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const themes : Array<any> = [
{
name: 'Bright (default)',
theme: {
backgroundColor: '#f7f7f7',
},
},
{
name: 'Dark Blue',
theme: {
backgroundColor: '#626d7d',
pageTitleTextColor: 'white',
textSecondaryColor: 'white',
textPrimaryColor: 'white',
stars: {
unearnedColor: '#787886',
earnedColor: 'gold',
},
progressIndicators: {
beforeTodayColor: '#3e4d44',
earnedTodayColor: '#667da4',
completeColor: '#59ad52',
incompleteColor: '#cdcdcd',
},
charts: {
axisLabelColor: 'white',
},
tiles: {
backgroundColor:'#152E4d',
watermarkIconColor: '#a6c5f7',
},
graphLegendBorderColor: '1px solid grey',
},
}
];
@@ -1,23 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { PlaceholderDirective } from './placeholder.directive';
describe('PlaceholderDirective', () => {
it('should create an instance', () => {
const directive = new PlaceholderDirective();
expect(directive).toBeTruthy();
});
});
@@ -1,25 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { Directive, ViewContainerRef } from '@angular/core';
@Directive({
selector: '[appPlaceholder]'
})
export class PlaceholderDirective {
constructor(public viewContainerRef: ViewContainerRef) { }
}
@@ -1,15 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@@ -1,18 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
export const environment = {
production: true
};
@@ -1,31 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mode, you can import the following file
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
*
* This import should be commented out in production mode because it will have a negative impact
* on performance if an error is thrown.
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

@@ -1,28 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SkillsIntClientNg</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
@@ -1,37 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import axios from 'axios';
import { SkillsConfiguration, Logger } from '@skilltree/skills-client-ng'
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
axios.get("/api/config")
.then((result) => {
SkillsConfiguration.configure(result.data);
})
.then(() => {
if ((<any> window).Cypress) {
(<any> window).skillsLogger = Logger;
}
platformBrowserDynamic().bootstrapModule(AppModule)
.catch(err => console.error(err));
})
@@ -1,82 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/***************************************************************************************************
* Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
*/
// import '@angular/localize/init';
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
@@ -1,16 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/* You can add global styles to this file, and also import other style files */
@@ -1,40 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: {
context(path: string, deep?: boolean, filter?: RegExp): {
keys(): string[];
<T>(id: string): T;
};
};
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
@@ -1,15 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": [ "node"]
},
"files": [
"src/main.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.d.ts"
]
}
@@ -1,20 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"module": "es2020",
"lib": [
"es2018",
"dom"
]
}
}
@@ -1,20 +0,0 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
It is not intended to be used to perform a compilation.
To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./e2e/tsconfig.json"
}
]
}
@@ -1,18 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
"jasmine"
]
},
"files": [
"src/test.ts",
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
]
}
@@ -1,152 +0,0 @@
{
"extends": "tslint:recommended",
"rules": {
"align": {
"options": [
"parameters",
"statements"
]
},
"array-type": false,
"arrow-return-shorthand": true,
"curly": true,
"deprecation": {
"severity": "warning"
},
"component-class-suffix": true,
"contextual-lifecycle": true,
"directive-class-suffix": true,
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
],
"eofline": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": {
"options": [
"spaces"
]
},
"max-classes-per-file": false,
"max-line-length": [
true,
140
],
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-empty": false,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-non-null-assertion": true,
"no-redundant-jsdoc": true,
"no-switch-case-fall-through": true,
"no-var-requires": false,
"object-literal-key-quotes": [
true,
"as-needed"
],
"quotemark": [
true,
"single"
],
"semicolon": {
"options": [
"always"
]
},
"space-before-function-paren": {
"options": {
"anonymous": "never",
"asyncArrow": "always",
"constructor": "never",
"method": "never",
"named": "never"
}
},
"typedef": [
true,
"call-signature"
],
"typedef-whitespace": {
"options": [
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
]
},
"variable-name": {
"options": [
"ban-keywords",
"check-format",
"allow-pascal-case"
]
},
"whitespace": {
"options": [
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type",
"check-typecast"
]
},
"no-conflicting-lifecycle": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-inputs-metadata-property": true,
"no-output-native": true,
"no-output-on-prefix": true,
"no-output-rename": true,
"no-outputs-metadata-property": true,
"template-banana-in-box": true,
"template-no-negated-async": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true
},
"rulesDirectory": [
"codelyzer"
]
}
@@ -1 +0,0 @@
BROWSER=none
@@ -1,23 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
@@ -1 +0,0 @@
package-lock=false
@@ -1,83 +0,0 @@
<!---
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br />
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br />
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br />
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br />
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `npm run build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
@@ -1,56 +0,0 @@
{
"name": "skills-int-client-react",
"version": "3.5.0",
"license": "Apache-2.0",
"description": "SkillTree Client Lib Integration Tests - React",
"homepage": "/react/",
"dependencies": {
"@skilltree/skills-client-react": "3.5.0",
"axios": "0.23.0",
"bootstrap": "4.5.3",
"core-js": "3.6.5",
"highlightjs": "9.16.2",
"js-beautify": "1.13.0",
"prop-types": "15.7.2",
"react": "16.13.1",
"react-bootstrap": "1.3.0",
"react-dom": "16.13.1",
"react-highlight": "0.12.0",
"react-router": "5.2.0",
"react-router-dom": "5.2.0"
},
"scripts": {
"serve": "PORT=8083 craco start",
"buildDepsAndServe": "cd ../../skills-client-js/ && npm run build && cd ../skills-client-react/ && npm run build && cd ../skills-client-integration/skills-int-client-react/ && npm run serve",
"licenseDepCheck": "license-checker --production --onlyAllow='MIT;ISC;BSD-3;BSD-2-Clause;Apache-2.0' --summary",
"licenseHeaderCheck": "license-check-and-add check -f '../license-add/license-add-config.json'",
"licenseHeaderAdd": "license-check-and-add add -f ../license-add/license-add-config.json",
"licenseCheck": "npm run licenseHeaderCheck && npm run licenseDepCheck ",
"clean": "find node_modules/ -maxdepth 1 ! -name \"@skilltree\" ! -name node_modules -exec rm -rf {} \\;",
"reinstall": "npm run clean && npm install",
"build": "npm run licenseCheck && craco build",
"test": "craco test",
"eject": "craco eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"license-check-and-add": "3.0.4",
"license-checker": "25.0.1",
"react-scripts": "4.0.3",
"@craco/craco": "6.4.0"
}
}
@@ -1,75 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>skills</groupId>
<artifactId>skills-client-integration</artifactId>
<version>3.5.0-SNAPSHOT</version>
</parent>
<artifactId>skills-int-client-react</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>${frontend-maven-plugin.version}</version>
<configuration>
<installDirectory>target</installDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v12.6.0</nodeVersion>
</configuration>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<!--TODO: uncomment when we have at least 1 unit test-->
<!--<execution>-->
<!--<id>npm run test</id>-->
<!--<goals>-->
<!--<goal>npm</goal>-->
<!--</goals>-->
<!--<phase>test</phase>-->
<!--<configuration>-->
<!--<arguments>run unit</arguments>-->
<!--</configuration>-->
<!--</execution>-->
</executions>
</plugin>
</plugins>
</build>
</project>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

@@ -1,60 +0,0 @@
<!--
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="stylesheet" href="~highlight.js/styles/darcula.css">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

@@ -1,25 +0,0 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
@@ -1,2 +0,0 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
@@ -1,37 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #09d3ac;
}
@@ -1,45 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import Navigation from "./skillsDisplay/Navigation";
import './App.css';
import {
HashRouter as Router,
Switch,
Route,
} from "react-router-dom";
import ShowSkills from "./skillsDisplay/ShowSkills";
import ReportSkill from "./skillsDisplay/ReportSkill";
export default function App() {
return (
<Router>
<div className="App">
<Navigation projectId="movies"/>
</div>
<Switch>
<Route exact path="/showSkills">
<ShowSkills/>
</Route>
<Route exact path="/">
<ReportSkill/>
</Route>
{/*<Route exact path="/reportSkillEvent">
</Route>*/}
</Switch>
</Router>
);
}
@@ -1,28 +0,0 @@
/*
Copyright 2020 SkillTree
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue",
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}
@@ -1,41 +0,0 @@
/*
* Copyright 2020 SkillTree
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import axios from 'axios';
import './index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { SkillsConfiguration, Logger } from '@skilltree/skills-client-react';
axios.get("/api/config")
.then((result) => {
SkillsConfiguration.configure(result.data);
})
.then(() => {
SkillsConfiguration.afterConfigure().then(() => {
if (window.Cypress) {
window.skillsLogger = Logger;
}
ReactDOM.render(<App />, document.getElementById('root'));
})
});
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
Loaded 100 of 291 files, more files were not shown because too many files have changed in this diff. Show more