fix(console): update dependencies, use prettier as default linter, refresh on policy change (#4375)

* privatelabeling refresh, org context color

* chore(deps): bump @grpc/grpc-js from 1.6.10 to 1.7.0 in /console (#4358)

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.6.10 to 1.7.0.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/[email protected]...@grpc/[email protected])

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump ngx-color from 8.0.2 to 8.0.3 in /console (#4357)

Bumps [ngx-color](https://github.com/scttcper/ngx-color) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/scttcper/ngx-color/releases)
- [Commits](https://github.com/scttcper/ngx-color/compare/v8.0.2...v8.0.3)

---
updated-dependencies:
- dependency-name: ngx-color
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/node from 17.0.45 to 18.7.16 in /console (#4341)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.45 to 18.7.16.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump jasmine-core from 4.2.0 to 4.4.0 in /console (#4317)

Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 4.2.0 to 4.4.0.
- [Release notes](https://github.com/jasmine/jasmine/releases)
- [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md)
- [Commits](https://github.com/jasmine/jasmine/compare/v4.2.0...v4.4.0)

---
updated-dependencies:
- dependency-name: jasmine-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @types/jasmine from 4.0.3 to 4.3.0 in /console (#4279)

Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 4.0.3 to 4.3.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)

---
updated-dependencies:
- dependency-name: "@types/jasmine"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* quicklink

* cli core

* material cdk

* eslint

* add grantid

* show oidc config error

* use prettier config, linter

* rm stylelint, fix lint

* prettier - ignore proto output

* labelling

* update contribution guide

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elio Bischof <[email protected]>
This commit is contained in:
Max Peintner
2022-09-19 13:35:52 +02:00
committed by GitHub
co-authored by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Elio Bischof
parent 49396c4678
commit c0f8f4e5f2
302 changed files with 14497 additions and 8691 deletions
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { DurationToSecondsPipe } from './duration-to-seconds.pipe';
@NgModule({
declarations: [
DurationToSecondsPipe,
],
imports: [
CommonModule,
],
exports: [
DurationToSecondsPipe,
],
declarations: [DurationToSecondsPipe],
imports: [CommonModule],
exports: [DurationToSecondsPipe],
})
export class DurationToSecondsPipeModule { }
export class DurationToSecondsPipeModule {}
@@ -5,7 +5,6 @@ import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
name: 'durationToSeconds',
})
export class DurationToSecondsPipe implements PipeTransform {
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
if (value) {
return this.durationToSeconds(value);
@@ -16,10 +15,9 @@ export class DurationToSecondsPipe implements PipeTransform {
private durationToSeconds(date: Duration.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ms = (date.seconds * 1000 + date.nanos / 1000 / 1000);
const ms = date.seconds * 1000 + date.nanos / 1000 / 1000;
const secs = ms / 1000;
return `${secs.toFixed(2)} sec`
return `${secs.toFixed(2)} sec`;
}
}
}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { HasRolePipe } from './has-role.pipe';
@NgModule({
declarations: [
HasRolePipe,
],
imports: [
CommonModule,
],
exports: [
HasRolePipe,
],
declarations: [HasRolePipe],
imports: [CommonModule],
exports: [HasRolePipe],
})
export class HasRolePipeModule { }
export class HasRolePipeModule {}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { LocalizedDatePipe } from './localized-date.pipe';
@NgModule({
declarations: [
LocalizedDatePipe,
],
imports: [
CommonModule,
],
exports: [
LocalizedDatePipe,
],
declarations: [LocalizedDatePipe],
imports: [CommonModule],
exports: [LocalizedDatePipe],
})
export class LocalizedDatePipeModule { }
export class LocalizedDatePipeModule {}
@@ -22,7 +22,9 @@ export class LocalizedDatePipe implements PipeTransform {
return moment(value).format(`${format}, HH:mm`);
}
} else {
const lang = ['de', 'en', 'fr', 'it', 'zh'].includes(this.translateService.currentLang) ? this.translateService.currentLang : 'en';
const lang = ['de', 'en', 'fr', 'it', 'zh'].includes(this.translateService.currentLang)
? this.translateService.currentLang
: 'en';
const datePipe: DatePipe = new DatePipe(lang);
return datePipe.transform(value, pattern ?? 'mediumDate');
}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { OriginPipe } from './origin.pipe';
@NgModule({
declarations: [
OriginPipe,
],
imports: [
CommonModule,
],
exports: [
OriginPipe,
],
declarations: [OriginPipe],
imports: [CommonModule],
exports: [OriginPipe],
})
export class OriginPipeModule { }
export class OriginPipeModule {}
@@ -1,10 +1,10 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'origin',
name: 'origin',
})
export class OriginPipe implements PipeTransform {
public transform(value: string): boolean {
return new RegExp(/^((https?:\/\/).*?([\w\d-]*\.[\w\d]+))($|\/.*$)/gm).test(value);
}
public transform(value: string): boolean {
return new RegExp(/^((https?:\/\/).*?([\w\d-]*\.[\w\d]+))($|\/.*$)/gm).test(value);
}
}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { RedirectPipe } from './redirect.pipe';
@NgModule({
declarations: [
RedirectPipe,
],
imports: [
CommonModule,
],
exports: [
RedirectPipe,
],
declarations: [RedirectPipe],
imports: [CommonModule],
exports: [RedirectPipe],
})
export class RedirectPipeModule { }
export class RedirectPipeModule {}
@@ -1,25 +1,31 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'redirect',
name: 'redirect',
})
export class RedirectPipe implements PipeTransform {
public transform(uri: string, isNative: boolean): boolean {
if (isNative) {
if (uri.startsWith('http://localhost/') || uri.startsWith('http://localhost:') || uri.startsWith('http://127.0.0.1') || uri.startsWith('http://[::1]') || uri.startsWith('http://[0:0:0:0:0:0:0:1]')) {
return true;
}
if (!uri.startsWith('https://') && !uri.startsWith('http://')) {
return true;
} else {
return false;
}
} else {
if (uri.startsWith('https://')) {
return true;
} else {
return false;
}
}
public transform(uri: string, isNative: boolean): boolean {
if (isNative) {
if (
uri.startsWith('http://localhost/') ||
uri.startsWith('http://localhost:') ||
uri.startsWith('http://127.0.0.1') ||
uri.startsWith('http://[::1]') ||
uri.startsWith('http://[0:0:0:0:0:0:0:1]')
) {
return true;
}
if (!uri.startsWith('https://') && !uri.startsWith('http://')) {
return true;
} else {
return false;
}
} else {
if (uri.startsWith('https://')) {
return true;
} else {
return false;
}
}
}
}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { RegexpPipe } from './regexp.pipe';
@NgModule({
declarations: [
RegexpPipe,
],
imports: [
CommonModule,
],
exports: [
RegexpPipe,
],
declarations: [RegexpPipe],
imports: [CommonModule],
exports: [RegexpPipe],
})
export class RegExpPipeModule { }
export class RegExpPipeModule {}
@@ -1,10 +1,10 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'regexp',
name: 'regexp',
})
export class RegexpPipe implements PipeTransform {
public transform(value: string): RegExp {
return new RegExp(value);
}
public transform(value: string): RegExp {
return new RegExp(value);
}
}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { TimestampToDatePipe } from './timestamp-to-date.pipe';
@NgModule({
declarations: [
TimestampToDatePipe,
],
imports: [
CommonModule,
],
exports: [
TimestampToDatePipe,
],
declarations: [TimestampToDatePipe],
imports: [CommonModule],
exports: [TimestampToDatePipe],
})
export class TimestampToDatePipeModule { }
export class TimestampToDatePipeModule {}
@@ -2,19 +2,17 @@ import { Pipe, PipeTransform } from '@angular/core';
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
@Pipe({
name: 'timestampToDate',
name: 'timestampToDate',
})
export class TimestampToDatePipe implements PipeTransform {
transform(value: Timestamp.AsObject, ...args: unknown[]): unknown {
return this.dateFromTimestamp(value);
}
transform(value: Timestamp.AsObject, ...args: unknown[]): unknown {
return this.dateFromTimestamp(value);
}
private dateFromTimestamp(date: Timestamp.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000);
return ts;
}
private dateFromTimestamp(date: Timestamp.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000);
return ts;
}
}
}
@@ -3,16 +3,9 @@ import { NgModule } from '@angular/core';
import { TimestampToRetentionPipe } from './timestamp-to-retention.pipe';
@NgModule({
declarations: [
TimestampToRetentionPipe,
],
imports: [
CommonModule,
],
exports: [
TimestampToRetentionPipe,
],
declarations: [TimestampToRetentionPipe],
imports: [CommonModule],
exports: [TimestampToRetentionPipe],
})
export class TimestampToRetentionPipeModule { }
export class TimestampToRetentionPipeModule {}
@@ -5,7 +5,6 @@ import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
name: 'timestampToRetention',
})
export class TimestampToRetentionPipe implements PipeTransform {
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
if (value) {
return this.retentionFromTimestamp(value);
@@ -16,10 +15,9 @@ export class TimestampToRetentionPipe implements PipeTransform {
private retentionFromTimestamp(date: Duration.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ms = (date.seconds * 1000 + date.nanos / 1000 / 1000);
const ms = date.seconds * 1000 + date.nanos / 1000 / 1000;
const mins = ms / 1000 / 60;
return +(mins / 60 / 24).toFixed(2);
}
}
}
@@ -3,15 +3,9 @@ import { NgModule } from '@angular/core';
import { TruncatePipePipe } from './truncate-pipe.pipe';
@NgModule({
declarations: [TruncatePipePipe],
imports: [
CommonModule,
],
exports: [
TruncatePipePipe,
],
declarations: [TruncatePipePipe],
imports: [CommonModule],
exports: [TruncatePipePipe],
})
export class TruncatePipeModule { }
export class TruncatePipeModule {}
@@ -1,13 +1,12 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'truncate',
name: 'truncate',
})
export class TruncatePipePipe implements PipeTransform {
transform(value: string, ...args: unknown[]): unknown {
const limit = args.length > 0 ? parseInt(args[0] as string, 10) : 20;
const trail = args.length > 1 ? args[1] : '...';
return value.length > limit ? value.substring(0, limit) + trail : value;
}
transform(value: string, ...args: unknown[]): unknown {
const limit = args.length > 0 ? parseInt(args[0] as string, 10) : 20;
const trail = args.length > 1 ? args[1] : '...';
return value.length > limit ? value.substring(0, limit) + trail : value;
}
}