Skip to content
Permalink
Browse files
Upgrade helix-front to Angular 13.3 (#2132)
Fix security vulnerabilities in helix-front dependencies.
Upgrade helix-front dependencies to improve contributor productivity.
  • Loading branch information
micahstubbs committed Jun 3, 2022
1 parent 3ed681b commit 8860a16b1d9a86ae20f7a2e53fdb6a3a22c3cd45
Showing 48 changed files with 7,487 additions and 22,516 deletions.
@@ -0,0 +1,113 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "hi",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"off",
{
"type": "attribute",
"prefix": "hi",
"style": "camelCase"
}
],
"@angular-eslint/no-output-rename": "off",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/member-delimiter-style": [
"off",
{
"multiline": {
"delimiter": "none",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/no-shadow": [
"off",
{
"hoist": "all"
}
],
"@typescript-eslint/semi": [
"off",
null
],
"brace-style": [
"error",
"1tbs"
],
"eqeqeq": [
"off",
"smart"
],
"guard-for-in": "off",
"id-blacklist": "off",
"id-match": "off",
"max-len": [
"off",
{
"code": 140
}
],
"no-redeclare": "error",
"no-underscore-dangle": "off",
"radix": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/ban-types": "off",
"@angular-eslint/no-output-native": "off",
"@typescript-eslint/no-unused-expressions": "off"
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/eqeqeq": "off"
}
}
]
}
@@ -26,11 +26,14 @@
!.vscode/extensions.json

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
package-lock.json
npm-debug.log
yarn-error.log
testem.log
/typings
/node
@@ -1 +1 @@
v12.20.2
v14.17.6
@@ -99,13 +99,17 @@
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"client/tsconfig.app.json",
"client/tsconfig.spec.json"
],
"exclude": []
"exclude": [],
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
@@ -124,12 +128,12 @@
"configurations": {}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": []
"lintFilePatterns": [
"e2e/**/*.ts",
"e2e/**/*.html"
]
}
}
}
@@ -144,5 +148,8 @@
"@schematics/angular:directive": {
"prefix": "hi"
}
},
"cli": {
"defaultCollection": "@angular-eslint/schematics"
}
}
@@ -34,7 +34,7 @@ <h6 *ngIf="!isLoading">Controller:
<mat-icon>menu</mat-icon>
</button>
<mat-menu #menu="matMenu">
<button mat-menu-item *ngIf="cluster?.controller == 'No Lead Controller!'" (click)="activateCluster()">
<button mat-menu-item *ngIf="cluster?.controller === 'No Lead Controller!'" (click)="activateCluster()">
<mat-icon>settings_input_antenna</mat-icon>
<span>Activate this Cluster</span>
</button>
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@import 'client/theme.scss';

.mat-spinner {
@@ -16,7 +16,7 @@ export class Cluster {

config: Object;

constructor (obj: any) {
constructor(obj: any) {
this.name = obj.id;
this.controller = obj.controller;
this.enabled = !obj.paused;
@@ -11,20 +11,16 @@ export class ClusterService extends HelixService {
public getAll() {
return this
.request('/clusters').pipe(
map(data => {
return data
map(data => data
.clusters
.sort()
.map(name => <Cluster>({name: name}));
}));
.map(name => <Cluster>({name}))));
}

public get(name: string) {
return this
.request(`/clusters/${ name }`).pipe(
map(data => {
return new Cluster(data);
}));
map(data => new Cluster(data)));
}

public create(name: string) {
@@ -55,7 +51,7 @@ export class ClusterService extends HelixService {
public enableMaintenanceMode(name: string, reason: string) {
return this
.post(`/clusters/${ name }?command=enableMaintenanceMode`, JSON.stringify({
reason: reason
reason
}));
}

@@ -10,15 +10,13 @@ export class ControllerService extends HelixService {
public get(clusterName: string) {
return this
.request(`/clusters/${clusterName}/controller`)
.pipe(map(data => {
return new Controller(
.pipe(map(data => new Controller(
data.controller,
clusterName,
data.LIVE_INSTANCE,
data.SESSION_ID,
data.HELIX_VERSION
);
}));
)));
}

}
@@ -25,7 +25,7 @@ export class UserService {
return this.http
.post(
`${ Settings.userAPI }/login`,
{ username: username, password: password },
{ username, password },
{ headers: this.getHeaders() }
);
}
@@ -25,7 +25,7 @@
border: 1px solid #65A19C;
-moz-border-radius: 80px / 24px;
-webkit-border-radius: 80px / 24px;
border-raius: 80px / 24px;
border-radius: 80px / 24px;
}

.rectangle {
@@ -35,7 +35,7 @@
border: 1px solid #73A1C7;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-raius: 5px;
border-radius: 5px;
}

.hint {
@@ -1,5 +1,5 @@
// Import theming functions
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
// Import custom theme
@import 'client/theme.scss';

@@ -54,13 +54,13 @@ export class HistoryListComponent implements OnInit {

getControllerCellClass({ value }): any {
return {
'current': value == this.rows[this.rows.length - 1].controller
current: value == this.rows[this.rows.length - 1].controller
};
}

getSessionCellClass({ value }): any {
return {
'current': value == this.rows[this.rows.length - 1].session
current: value == this.rows[this.rows.length - 1].session
};
}

@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

.info {
padding: 24px;
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

div.message {
padding: 20px;
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@import 'client/theme.scss';

.offline {
@@ -19,7 +19,7 @@ export class ResourceService extends HelixService {
for (const name of data.idealStates) {
res.push(<Resource>({
cluster: clusterName,
name: name,
name,
alive: data.externalViews.indexOf(name) >= 0
}));
}
@@ -46,15 +46,13 @@ export class ResourceService extends HelixService {
public get(clusterName: string, resourceName: string) {
return this
.request(`/clusters/${ clusterName }/resources/${ resourceName }`).pipe(
map(data => {
return new Resource(
map(data => new Resource(
clusterName,
resourceName,
data.resourceConfig,
data.idealState,
data.externalView
);
}));
)));
}

public getOnInstance(clusterName: string, instanceName: string, resourceName: string) {
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;
@import 'client/theme.scss';

.mat-icon {
@@ -37,9 +37,9 @@ export class DataTableComponent implements OnInit {
// only emit when value changes
if (row[prop] !== value) {
this.update.emit({
row: row,
column: column,
value: value
row,
column,
value
});
}
}
@@ -60,7 +60,7 @@ export class DataTableComponent implements OnInit {

this.dialog
.open(InputDialogComponent, {
data: data
data
})
.afterClosed()
.subscribe(result => {
@@ -82,7 +82,7 @@ export class DataTableComponent implements OnInit {
.subscribe(result => {
if (result) {
this.delete.emit({
row: row
row
});
}
});
@@ -1,4 +1,4 @@
@use '~@angular/material' as mat;
@use '@angular/material' as mat;

.secondary {
color: rgba(0, 0, 0, 0.54);

0 comments on commit 8860a16

Please sign in to comment.