Skip to content

Commit

Permalink
[YUNIKORN-1133] Upgrade angular framework to latest stable release (#76)
Browse files Browse the repository at this point in the history
Closes: #76

Signed-off-by: Craig Condit <[email protected]>
  • Loading branch information
akhilpb001 authored and craigcondit committed Apr 13, 2022
1 parent e3f7dc5 commit 6f23933
Show file tree
Hide file tree
Showing 56 changed files with 4,623 additions and 6,959 deletions.
12 changes: 8 additions & 4 deletions browserslist → .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
# For additional information regarding the format and rule options, please see:
# https:/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

> 0.5%
last 2 versions
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 dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
19 changes: 7 additions & 12 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,16 @@ jobs:
- name: Set Node.js Environment
uses: actions/setup-node@v2
with:
node-version: 14.18
node-version: 16.14.2
- run: |
npm install -g @angular/cli > /dev/null
npm install karma
npm install -g protractor
yarn install
npm install -g @angular/cli > /dev/null
npm install -g yarn > /dev/null
- name: Lint Test
run: yarn lint
- name: Install Dependencies
run: yarn install

- name: Unit Test
run: ng test --watch=false

- name: Build
run: ng build --prod
- name: Build Prod
run: yarn build:prod

- name: Test Coverage
run: yarn test:coverage
25 changes: 11 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,43 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
# Node
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
npm-debug.log
yarn-error.log

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
# Visual Studio Code
.vscode/*
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
# System files
.DS_Store
Thumbs.db
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.

# State 1
FROM node:14.18-alpine3.14 as buildstage
FROM node:16.14.2-alpine3.15 as buildstage

WORKDIR /usr/uiapp

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ build:

# Run the tests after building
test: build
ng test
ng e2e
yarn test:singleRun

# Build the web interface in a production ready version
.PHONY: build-prod
Expand All @@ -82,6 +81,7 @@ build-prod:
.PHONY: clean
clean:
rm -rf ./dist
rm -rf ./coverage
rm -rf ./node_modules
rm -rf ./out
rm -rf ./out-tsc
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ It depends on `yunikorn-core` which encapsulates all the actual scheduling logic

For detailed information on the components and how to build the overall scheduler please see the [yunikorn-core](https:/apache/yunikorn-core).

This project was generated with [Angular CLI](https:/angular/angular-cli) version 8.3.19.
This project was generated with [Angular CLI](https:/angular/angular-cli) version 13.3.0.

## Development Environment setup
### Dependencies
The project requires a number of external tools to be installed before the build and development:
- [Node.js](https://nodejs.org/en/)
- [Angular CLI](https:/angular/angular-cli)
- [Karma](https://karma-runner.github.io)
- [Protractor](http://www.protractortest.org/)
- [json-server](https://www.npmjs.com/package/json-server)
- [yarn](https://www.npmjs.com/package/yarn)
- [json-server](https://www.npmjs.com/package/json-server)

### Development server

Expand Down Expand Up @@ -63,8 +62,6 @@ The project uses [multi-stage build](https://docs.docker.com/develop/develop-ima
All tests can be executed via `make test`. It will first build the project and then execute the unit tests followed by the end to end tests.
If you want to run the unit tests separately, run `yarn test` to execute them via [Karma](https://karma-runner.github.io). If you want to run the unit tests with code coverage, run `yarn test:coverage`.

The end to end tests run via [Protractor](http://www.protractortest.org/) and can be directly run by executing `yarn e2e`.

## Local development
Beside the simple all in way to start the development server via make you can also start a development environment manually.

Expand All @@ -86,5 +83,4 @@ The port is also referenced in other scripts and configurations to this port als
- Makefile

## How do I contribute code?

See how to contribute code from [this guide](docs/how-to-contribute.md).
107 changes: 41 additions & 66 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"packageManager": "yarn"
},
"newProjectRoot": "projects",
"projects": {
"yunikorn-web": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
Expand All @@ -22,58 +28,55 @@
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumWarning": "3mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
"maximumWarning": "4kb",
"maximumError": "5kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "yunikorn-web:build"
},
"configurations": {
"production": {
"browserTarget": "yunikorn-web:build:production"
},
"development": {
"browserTarget": "yunikorn-web:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
Expand All @@ -88,42 +91,14 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"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": "yunikorn-web:serve"
},
"configurations": {
"production": {
"devServerTarget": "yunikorn-web:serve:production"
}
}
}
}
}},
}
},
"defaultProject": "yunikorn-web"
}
}
50 changes: 0 additions & 50 deletions e2e/protractor.conf.js

This file was deleted.

Loading

0 comments on commit 6f23933

Please sign in to comment.