Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dump angular 11 #5745

Merged
merged 6 commits into from
Jan 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"progress": false,
"outputPath": ".tmp/frontend",
"index": "src/app/frontend/index.html",
"main": "src/app/frontend/index.ts",
Expand Down Expand Up @@ -99,7 +100,6 @@
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"localize": true,
"extractLicenses": true,
"vendorChunk": false,
Expand Down
7,579 changes: 2,984 additions & 4,595 deletions package-lock.json

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"scripts": {
"start": "concurrently \"npm run start:backend --kubernetes-dashboard:sidecar_host=$npm_package_config_sidecar_host\" \"npm run start:frontend --kubernetes-dashboard:bind_address=$npm_package_config_bind_address --kubernetes-dashboard:port=$npm_package_config_port\"",
"start:https": "concurrently \"npm run start:backend:https --kubernetes-dashboard:sidecar_host=$npm_package_config_sidecar_host\" \"npm run start:frontend:https --kubernetes-dashboard:bind_address=$npm_package_config_bind_address --kubernetes-dashboard:port=$npm_package_config_port\"",
"start:frontend": "npm run postversion && ng serve --aot --progress=false --proxy-config aio/proxy.conf.json --host=$npm_package_config_bind_address --port $npm_package_config_port",
"start:frontend:https": "node aio/scripts/version.js && ng serve --progress=false --aot --proxy-config aio/https-proxy.conf.json --ssl --host=$npm_package_config_bind_address --port $npm_package_config_port",
"start:frontend": "npm run postversion && ng serve --proxy-config aio/proxy.conf.json --host=$npm_package_config_bind_address --port $npm_package_config_port",
"start:frontend:https": "node aio/scripts/version.js && ng serve --proxy-config aio/https-proxy.conf.json --ssl --host=$npm_package_config_bind_address --port $npm_package_config_port",
"start:backend": "KUBECONFIG=${KUBECONFIG:-$npm_package_config_kubeconfig}; gulp serve --kubeconfig $KUBECONFIG --sidecarServerHost $npm_package_config_sidecar_host",
"start:backend:https": "KUBECONFIG=${KUBECONFIG:-$npm_package_config_kubeconfig}; gulp serve --kubeconfig $KUBECONFIG --autoGenerateCerts true --sidecarServerHost $npm_package_config_sidecar_host",
"start:prod": "npm run build && ./$npm_package_config_dashboard_binary_path --kubeconfig $npm_package_config_kubeconfig --locale-config $npm_package_config_dashboard_locale_config --auto-generate-certificates --bind-address $npm_package_config_bind_address --sidecar-host $npm_package_config_sidecar_host --port $npm_package_config_port",
Expand Down Expand Up @@ -43,15 +43,15 @@
"check:frontend:scss": "./aio/scripts/format.sh --styles --check && ./node_modules/sass-lint/bin/sass-lint.js -c .sass-lint.yml 'src/app/frontend/**/*.scss' -v -q",
"check:frontend:html": "./aio/scripts/format.sh --html --check",
"check:license": "license-check-and-add check",
"check:i18n": "ng xi18n --no-progress --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
"check:i18n": "ng extract-i18n --no-progress --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
"fix": "concurrently \"npm run fix:backend\" \"npm run fix:frontend\" \"npm run fix:license\" \"npm run fix:i18n\"",
"fix:backend": "golangci-lint run -c .golangci.yml --fix ./src/app/backend/...",
"fix:frontend": "concurrently \"npm run fix:frontend:ts\" \"npm run fix:frontend:scss\" \"npm run fix:frontend:html\"",
"fix:frontend:ts": "gts fix",
"fix:frontend:scss": "scssfmt -r 'src/**/*.scss'",
"fix:frontend:html": "./aio/scripts/format.sh --html",
"fix:license": "license-check-and-add add",
"fix:i18n": "ng xi18n --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
"fix:i18n": "ng extract-i18n --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
"clean": "rm -rf .go_workspace .tmp coverage dist npm-debug.log",
"postversion": "node aio/scripts/version.js",
"postinstall": "node aio/scripts/version.js && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; } && go mod download && ./aio/scripts/install-codegen.sh && ngcc"
Expand Down Expand Up @@ -91,108 +91,108 @@
"beautifyOutput": true
},
"dependencies": {
"@angular/animations": "10.1.6",
"@angular/cdk": "10.2.5",
"@angular/common": "10.1.6",
"@angular/compiler": "10.1.6",
"@angular/core": "10.1.6",
"@angular/flex-layout": "10.0.0-beta.32",
"@angular/forms": "10.1.6",
"@angular/localize": "10.1.6",
"@angular/material": "10.2.5",
"@angular/platform-browser": "10.1.6",
"@angular/platform-browser-dynamic": "10.1.6",
"@angular/router": "10.1.6",
"@angular/animations": "11.0.6",
"@angular/cdk": "11.0.3",
"@angular/common": "11.0.6",
"@angular/compiler": "11.0.6",
"@angular/core": "11.0.6",
"@angular/flex-layout": "11.0.0-beta.33",
"@angular/forms": "11.0.6",
"@angular/localize": "11.0.6",
"@angular/material": "11.0.3",
"@angular/platform-browser": "11.0.6",
"@angular/platform-browser-dynamic": "11.0.6",
"@angular/router": "11.0.6",
"@swimlane/ngx-charts": "16.0.0",
"@types/c3": "0.7.4",
"@types/d3": "5.16.3",
"@types/d3-scale": "3.2.0",
"@types/c3": "0.7.5",
"@types/d3": "6.2.0",
"@types/d3-scale": "3.2.2",
"@types/file-saver": "2.0.1",
"@types/highlight.js": "9.12.4",
"@types/highlight.js": "10.1.0",
"ace-builds": "1.4.12",
"angular-page-visibility": "9.0.6",
"ansi-to-html": "0.6.14",
"c3": "0.7.20",
"core-js": "3.6.5",
"d3": "6.2.0",
"file-saver": "2.0.2",
"highlight.js": "10.3.1",
"js-yaml": "3.14.0",
"core-js": "3.8.2",
"d3": "6.3.1",
"file-saver": "2.0.5",
"highlight.js": "10.5.0",
"js-yaml": "4.0.0",
"material-design-icons": "3.0.1",
"ng-in-viewport": "6.1.4",
"ngx-cookie-service": "10.1.1",
"ngx-cookie-service": "11.0.2",
"ngx-filter-pipe": "2.1.2",
"normalize.css": "8.0.1",
"roboto-fontface": "0.10.0",
"rxjs": "6.6.3",
"rxjs-compat": "6.6.3",
"sockjs-client": "1.5.0",
"strip-ansi": "6.0.0",
"systemjs": "6.7.1",
"systemjs": "6.8.3",
"truncate-url": "1.0.0",
"tslib": "2.0.3",
"tslib": "2.1.0",
"web-animations-js": "2.3.2",
"xterm": "4.9.0",
"xterm-addon-fit": "0.4.0",
"zone.js": "0.11.2"
"zone.js": "0.11.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.1100.5",
"@angular/cli": "10.1.7",
"@angular/compiler-cli": "10.1.6",
"@angular/language-service": "10.1.6",
"@cypress/webpack-preprocessor": "5.4.8",
"@types/jasmine": "3.5.14",
"@angular-devkit/build-angular": "0.1100.6",
"@angular/cli": "11.0.6",
"@angular/compiler-cli": "11.0.6",
"@angular/language-service": "11.0.6",
"@cypress/webpack-preprocessor": "5.5.0",
"@types/jasmine": "3.6.2",
"@types/jasminewd2": "2.0.8",
"@types/js-yaml": "3.12.5",
"@types/lodash": "4.14.162",
"@types/node": "14.14.0",
"@types/js-yaml": "4.0.0",
"@types/lodash": "4.14.167",
"@types/node": "14.14.20",
"babel-cli": "6.26.0",
"babel-preset-env": "1.7.0",
"babel-register": "6.26.0",
"codelyzer": "6.0.1",
"concurrently": "5.3.0",
"cypress": "5.4.0",
"cypress": "6.2.1",
"del": "6.0.0",
"eslint": "7.11.0",
"eslint-plugin-rxjs": "0.0.3-beta.30",
"eslint": "7.17.0",
"eslint-plugin-rxjs": "2.1.5",
"git-describe": "4.0.4",
"gts": "3.0.1",
"gts": "3.0.2",
"gulp": "4.0.2",
"gulp-filter": "6.0.0",
"husky": "4.3.0",
"husky": "4.3.7",
"jasmine-core": "3.6.0",
"jasmine-spec-reporter": "6.0.0",
"js-beautify": "1.13.0",
"karma": "5.2.3",
"karma-chrome-launcher": "3.1.0",
"karma-cli": "2.0.0",
"karma-coverage-istanbul-reporter": "3.0.3",
"karma-firefox-launcher": "2.0.0",
"karma-firefox-launcher": "2.1.0",
"karma-jasmine": "4.0.1",
"karma-jasmine-html-reporter": "1.5.4",
"license-check-and-add": "3.0.4",
"lint-staged": "10.4.2",
"lint-staged": "10.5.3",
"lodash": "4.17.20",
"minimatch": "3.0.4",
"minimist": "1.2.5",
"ngx-i18nsupport": "0.17.1",
"node-gyp": "7.1.2",
"node-sass": "4.14.1",
"q": "1.5.1",
"raw-loader": "4.0.2",
"run-node": "2.0.0",
"sass": "1.32.2",
"sass-lint": "1.13.1",
"sass-loader": "10.0.3",
"sass-loader": "10.1.0",
"scssfmt": "1.0.7",
"semver": "7.3.2",
"source-map-explorer": "2.5.0",
"semver": "7.3.4",
"source-map-explorer": "2.5.1",
"tar": "6.0.5",
"through2": "4.0.2",
"ts-loader": "8.0.6",
"ts-node": "9.0.0",
"typescript": "4.0.3",
"wait-on": "5.2.0",
"webpack-dev-server": "3.11.0"
"ts-loader": "8.0.14",
"ts-node": "9.1.1",
"typescript": "^4.0.5",
"wait-on": "5.2.1",
"webpack-dev-server": "3.11.1"
},
"engines": {
"node": ">=10.13.0",
Expand Down
33 changes: 33 additions & 0 deletions src/app/frontend/common/pipes/coreformatter.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2017 The Kubernetes Authors.
//
// 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
//
// http://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} from '@angular/core/testing';

import {CoreFormatter} from './coreformatter';
import {PipesModule} from './module';

describe('CoreFormatter', () => {
let coreFormatter: CoreFormatter;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [PipesModule],
providers: [CoreFormatter],
});
coreFormatter = TestBed.inject(CoreFormatter);
});

it('create an instance', () => {
expect(coreFormatter).toBeTruthy();
});
});
8 changes: 5 additions & 3 deletions src/app/frontend/common/pipes/coreformatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
// limitations under the License.

import {DecimalPipe} from '@angular/common';
import {Pipe} from '@angular/core';
import {Pipe, PipeTransform} from '@angular/core';

/**
* Formats cores usage in millicores to a decimal prefix format, e.g. 321,20 kCPU.
*/
@Pipe({name: 'kdCores'})
export class CoreFormatter extends DecimalPipe {
export class CoreFormatter implements PipeTransform {
readonly base = 1000;
readonly powerSuffixes = ['m', '', 'k', 'M', 'G', 'T'];

constructor(private readonly decimalPipe_: DecimalPipe) {}

transform(value: number): string {
let divider = 1;
let power = 0;
Expand All @@ -32,7 +34,7 @@ export class CoreFormatter extends DecimalPipe {
power += 1;
}

const formatted = super.transform(value / divider, '1.2-2');
const formatted = this.decimalPipe_.transform(value / divider, '1.2-2');
const suffix = this.powerSuffixes[power];
return suffix ? `${formatted}${suffix}` : formatted;
}
Expand Down
33 changes: 33 additions & 0 deletions src/app/frontend/common/pipes/memoryformatter.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright 2017 The Kubernetes Authors.
//
// 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
//
// http://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} from '@angular/core/testing';

import {MemoryFormatter} from './memoryformatter';
import {PipesModule} from './module';

describe('MemoryFormatter', () => {
let memoryFormatter: MemoryFormatter;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [PipesModule],
providers: [MemoryFormatter],
});
memoryFormatter = TestBed.inject(MemoryFormatter);
});

it('create an instance', () => {
expect(memoryFormatter).toBeTruthy();
});
});
8 changes: 5 additions & 3 deletions src/app/frontend/common/pipes/memoryformatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
// limitations under the License.

import {DecimalPipe} from '@angular/common';
import {Pipe} from '@angular/core';
import {Pipe, PipeTransform} from '@angular/core';

/**
* Formats memory in bytes to a binary prefix format, e.g., 789,21 MiB.
*/
@Pipe({name: 'kdMemory'})
export class MemoryFormatter extends DecimalPipe {
export class MemoryFormatter implements PipeTransform {
readonly base = 1024;
readonly powerSuffixes = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi'];

constructor(private readonly decimalPipe_: DecimalPipe) {}

transform(value: number): string {
let divider = 1;
let power = 0;
Expand All @@ -32,7 +34,7 @@ export class MemoryFormatter extends DecimalPipe {
power += 1;
}

const formatted = super.transform(value / divider, '1.2-2');
const formatted = this.decimalPipe_.transform(value / divider, '1.2-2');
const suffix = this.powerSuffixes[power];
return suffix ? `${formatted}${suffix}` : formatted;
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/frontend/common/pipes/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DecimalPipe} from '@angular/common';
import {NgModule} from '@angular/core';

import {CommaSeparatedPipe} from './commaseparated';
Expand All @@ -30,6 +31,7 @@ import {TrimPipe} from './trim';
TrimPipe,
CommaSeparatedPipe,
],
providers: [DecimalPipe],
exports: [MemoryFormatter, CoreFormatter, RelativeTimeFormatter, SafeHtmlFormatter, TrimPipe, CommaSeparatedPipe],
})
export class PipesModule {}