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/grpc-js@1.6.10...@grpc/grpc-js@1.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Elio Bischof <eliobischof@gmail.com>
This commit is contained in:
Max Peintner 2022-09-19 13:35:52 +02:00 committed by GitHub
parent 49396c4678
commit c0f8f4e5f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
302 changed files with 14497 additions and 8691 deletions

View File

@ -57,7 +57,7 @@ We accept contributions through pull requests. You need a github account for tha
7. Use [Semantic Release commit messages](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#type) to simplify creation of release notes. In the title of the pull request [correct tagging](#commit-messages) is required and will be requested by the reviewers.
8. On GitHub, [send a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to `zitadel:main`. Request review from one of the maintainers.
8. On GitHub, [send a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review) to `zitadel:main`. Request review from one of the maintainers.
### Reviewing a Pull Request
@ -107,7 +107,6 @@ We add the label "good first issue" for problems we think are a good starting po
- [Issues for first time contributors](https://github.com/zitadel/zitadel/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)
- [All issues](https://github.com/zitadel/zitadel/issues)
### Backend / Login
By executing the commands from this section, you run everything you need to develop the ZITADEL backend locally.
@ -117,6 +116,7 @@ Then, you test your changes via the console your binary is serving at http://<sp
Once you are happy with your changes, you run end-to-end tests and tear everything down.
The commands in this section are tested against the following software versions:
- [Docker version 20.10.17](https://docs.docker.com/engine/install/)
- [Goreleaser version v1.8.3](https://goreleaser.com/install/)
- [Go version 1.19](https://go.dev/doc/install)
@ -175,6 +175,9 @@ By executing the commands from this section, you run everything you need to deve
Using [Docker Compose](https://docs.docker.com/compose/), you run [CockroachDB](https://www.cockroachlabs.com/docs/v22.1/start-a-local-cluster-in-docker-mac.html) and the [latest release of ZITADEL](https://github.com/zitadel/zitadel/releases/latest) on your local machine.
You use the ZITADEL container as backend for your console.
The console is run in your [Node](https://nodejs.org/en/about/) environment using [a local development server for Angular](https://angular.io/cli/serve#ng-serve), so you have fast feedback about your changes.
We use angular-eslint/Prettier for linting/formatting, so please run `npm run lint:fix` before committing. (VSCode users, check out [this ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and [this Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) to fix lint and formatting issues in development)
Once you are happy with your changes, you run end-to-end tests and tear everything down.
The commands in this section are tested against the following software versions:
@ -189,10 +192,10 @@ The commands in this section are tested against the following software versions:
<summary>Note for WSL2 on Windows 10</summary>
Following the suggestions <a href="https://stackoverflow.com/questions/62641553/setup-cypress-on-wsl-ubuntu-for-windows-10">here </a> subsequently <a href="https://github.com/microsoft/WSL/issues/4106">here </a> may need to XLaunch and configure your DISPLAY variable. Use at your own risk.
1. Install `VcXsrv Windows X Server`
2. Set the target of your shortcut to `"C:\Program Files\VcXsrv\xlaunch.exe" -ac`
3. In WSL2 run `export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0` to set your DISPLAY variable
4. When starting XLaunch, make sure to disable access control
1. Install `VcXsrv Windows X Server`
2. Set the target of your shortcut to `"C:\Program Files\VcXsrv\xlaunch.exe" -ac`
3. In WSL2 run `export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0` to set your DISPLAY variable
4. When starting XLaunch, make sure to disable access control
</details>
Run the database and the latest backend locally.
@ -210,13 +213,13 @@ You can now run a local development server with live code reloading at http://lo
To allow console access via http://localhost:4200, you have to configure the ZITADEL backend.
1. Navigate to http://localhost:8080/ui/console/projects.
2. When prompted, login with *zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost* and *Password1!*
3. Select the *ZITADEL* project.
3. Select the *Console* application.
4. Select *Redirect Settings*
5. Add *http://<span because="breaks the link"></span>localhost:4200/auth/callback* to the *Redirect URIs*
6. Add *http://<span because="breaks the link"></span>localhost:4200/signedout* to the *Post Logout URIs*
7. Select the *Save* button
2. When prompted, login with _zitadel-admin@<span because="breaks the mailto"></span>zitadel.localhost_ and _Password1!_
3. Select the _ZITADEL_ project.
4. Select the _Console_ application.
5. Select _Redirect Settings_
6. Add _http://<span because="breaks the link"></span>localhost:4200/auth/callback_ to the _Redirect URIs_
7. Add _http://<span because="breaks the link"></span>localhost:4200/signedout_ to the _Post Logout URIs_
8. Select the _Save_ button
You can run the local console development server now.

4
console/.prettierignore Normal file
View File

@ -0,0 +1,4 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# grpc output
/src/app/proto

View File

@ -1,38 +0,0 @@
{
"plugins": ["stylelint-scss"],
"extends": "stylelint-config-standard",
"rules": {
"value-keyword-case": null,
"at-rule-no-unknown": null,
"no-descending-specificity": null,
"no-invalid-position-at-import-rule": null,
"at-rule-empty-line-before": [
"always",
{
"except": ["blockless-after-same-name-blockless", "first-nested"],
"ignore": ["after-comment"],
"ignoreAtRules": ["else"]
}
],
"block-closing-brace-newline-after": [
"always",
{
"ignoreAtRules": ["if", "else"]
}
],
"max-line-length": 125,
"no-empty-source": null,
"number-leading-zero": null,
"scss/at-rule-no-unknown": null,
"scss/at-else-if-parentheses-space-before": "always",
"scss/at-function-parentheses-space-before": "never",
"scss/at-if-closing-brace-newline-after": "always-last-in-chain",
"scss/at-import-no-partial-leading-underscore": true,
"scss/at-mixin-argumentless-call-parentheses": "always",
"scss/at-mixin-parentheses-space-before": "never",
"scss/dollar-variable-colon-newline-after": "always-multi-line",
"scss/dollar-variable-colon-space-after": "always-single-line",
"scss/double-slash-comment-whitespace-inside": "always",
"scss/no-duplicate-dollar-variables": true
}
}

3753
console/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,25 +6,26 @@
"start": "ng serve",
"build": "ng build",
"prodbuild": "ng build --configuration production --base-href=/ui/console/",
"lint": "ng lint && stylelint './src/**/*.scss' --syntax scss",
"lint": "ng lint && prettier --check src",
"lint:fix": "prettier --write src",
"generate": "DOCKER_BUILDKIT=1 docker build -f ../build/grpc/Dockerfile -t zitadel-base:local .. && DOCKER_BUILDKIT=1 docker build -f ../build/console/Dockerfile .. --target npm-copy -o .."
},
"private": true,
"dependencies": {
"@angular/animations": "^14.2.0",
"@angular/cdk": "^14.2.0",
"@angular/common": "^14.2.0",
"@angular/compiler": "^14.2.0",
"@angular/core": "^14.2.0",
"@angular/forms": "^14.2.0",
"@angular/material": "^14.2.0",
"@angular/material-moment-adapter": "^14.2.0",
"@angular/platform-browser": "^14.2.0",
"@angular/platform-browser-dynamic": "^14.2.0",
"@angular/router": "^14.2.0",
"@angular/service-worker": "^14.2.0",
"@angular/animations": "^14.2.2",
"@angular/cdk": "^14.2.2",
"@angular/common": "^14.2.2",
"@angular/compiler": "^14.2.2",
"@angular/core": "^14.2.2",
"@angular/forms": "^14.2.2",
"@angular/material": "^14.2.2",
"@angular/material-moment-adapter": "^14.2.2",
"@angular/platform-browser": "^14.2.2",
"@angular/platform-browser-dynamic": "^14.2.2",
"@angular/router": "^14.2.2",
"@angular/service-worker": "^14.2.2",
"@ctrl/ngx-codemirror": "^5.1.1",
"@grpc/grpc-js": "^1.5.7",
"@grpc/grpc-js": "^1.7.0",
"@ngx-translate/core": "^14.0.0",
"@ngx-translate/http-loader": "^7.0.0",
"@types/file-saver": "^2.0.2",
@ -42,8 +43,8 @@
"material-design-icons-iconfont": "^6.1.1",
"moment": "^2.29.4",
"ng-qrcode": "^7.0.0",
"ngx-color": "^8.0.2",
"ngx-quicklink": "^0.2.6",
"ngx-color": "^8.0.3",
"ngx-quicklink": "^0.3.0",
"rxjs": "~7.5.2",
"tinycolor2": "^1.4.2",
"tslib": "^2.2.0",
@ -51,35 +52,32 @@
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.1",
"@angular-eslint/builder": "^14.0.3",
"@angular-eslint/eslint-plugin": "^14.0.3",
"@angular-eslint/eslint-plugin-template": "^14.0.3",
"@angular-eslint/schematics": "^14.0.3",
"@angular-eslint/template-parser": "^14.0.3",
"@angular/cli": "^14.2.1",
"@angular/compiler-cli": "^14.2.0",
"@angular/language-service": "^14.2.0",
"@types/jasmine": "~4.0.3",
"@angular-devkit/build-angular": "^14.2.2",
"@angular-eslint/builder": "^14.0.4",
"@angular-eslint/eslint-plugin": "^14.0.4",
"@angular-eslint/eslint-plugin-template": "^14.0.4",
"@angular-eslint/schematics": "^14.0.4",
"@angular-eslint/template-parser": "^14.0.4",
"@angular/cli": "^14.2.2",
"@angular/compiler-cli": "^14.2.2",
"@angular/language-service": "^14.2.2",
"@types/jasmine": "~4.3.0",
"@types/jasminewd2": "~2.0.10",
"@types/jsonwebtoken": "^8.5.5",
"@types/node": "^17.0.42",
"@types/node": "^18.7.16",
"@typescript-eslint/eslint-plugin": "5.36.1",
"@typescript-eslint/parser": "5.36.1",
"codelyzer": "^6.0.0",
"eslint": "^8.18.0",
"jasmine-core": "~4.2.0",
"jasmine-core": "~4.4.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"prettier": "^2.4.1",
"prettier": "^2.7.1",
"protractor": "~7.0.0",
"stylelint": "^13.10.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-scss": "^3.21.0",
"typescript": "^4.4.4"
}
}

View File

@ -1,13 +1,13 @@
import {
animate,
animateChild,
AnimationTriggerMetadata,
group,
query,
stagger,
style,
transition,
trigger,
animate,
animateChild,
AnimationTriggerMetadata,
group,
query,
stagger,
style,
transition,
trigger,
} from '@angular/animations';
export const toolbarAnimation: AnimationTriggerMetadata = trigger('toolbar', [

View File

@ -50,8 +50,8 @@ import { OverlayService } from './services/overlay/overlay.service';
import { RefreshService } from './services/refresh.service';
import { SeoService } from './services/seo.service';
import {
StatehandlerProcessorService,
StatehandlerProcessorServiceImpl,
StatehandlerProcessorService,
StatehandlerProcessorServiceImpl,
} from './services/statehandler/statehandler-processor.service';
import { StatehandlerService, StatehandlerServiceImpl } from './services/statehandler/statehandler.service';
import { StorageService } from './services/storage.service';

View File

@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
import { CopyToClipboardDirective } from './copy-to-clipboard.directive';
@NgModule({
declarations: [
CopyToClipboardDirective,
],
imports: [
CommonModule,
],
exports: [
CopyToClipboardDirective,
],
declarations: [CopyToClipboardDirective],
imports: [CommonModule],
exports: [CopyToClipboardDirective],
})
export class CopyToClipboardModule { }
export class CopyToClipboardModule {}

View File

@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
import { DropzoneDirective } from './dropzone.directive';
@NgModule({
declarations: [
DropzoneDirective,
],
imports: [
CommonModule,
],
exports: [
DropzoneDirective,
],
declarations: [DropzoneDirective],
imports: [CommonModule],
exports: [DropzoneDirective],
})
export class DropzoneModule { }
export class DropzoneModule {}

View File

@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
import { HasRoleDirective } from './has-role.directive';
@NgModule({
declarations: [
HasRoleDirective,
],
imports: [
CommonModule,
],
exports: [
HasRoleDirective,
],
declarations: [HasRoleDirective],
imports: [CommonModule],
exports: [HasRoleDirective],
})
export class HasRoleModule { }
export class HasRoleModule {}

View File

@ -7,7 +7,7 @@ export class ScrollableDirective {
// when using this directive, add overflow-y scroll to css
@Output() scrollPosition: EventEmitter<any> = new EventEmitter();
constructor(public el: ElementRef) { }
constructor(public el: ElementRef) {}
@HostListener('scroll', ['$event'])
public onScroll(event: any): void {
@ -25,8 +25,6 @@ export class ScrollableDirective {
if (top === 0) {
this.scrollPosition.emit('top');
}
} catch (err) { }
} catch (err) {}
}
}

View File

@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
import { ScrollableDirective } from './scrollable.directive';
@NgModule({
declarations: [
ScrollableDirective,
],
imports: [
CommonModule,
],
exports: [
ScrollableDirective,
],
declarations: [ScrollableDirective],
imports: [CommonModule],
exports: [ScrollableDirective],
})
export class ScrollableModule { }
export class ScrollableModule {}

View File

@ -5,24 +5,23 @@ import { map, tap } from 'rxjs/operators';
import { GrpcAuthService } from '../services/grpc-auth.service';
@Injectable({
providedIn: 'root',
providedIn: 'root',
})
export class UserGuard implements CanActivate {
constructor(private authService: GrpcAuthService, private router: Router) { }
constructor(private authService: GrpcAuthService, private router: Router) {}
public canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot,
): Observable<boolean> | Promise<boolean> | boolean {
return this.authService.user.pipe(
map(user => user?.id !== route.params.id),
tap((isNotMe) => {
if (!isNotMe) {
this.router.navigate(['/users', 'me']);
}
}),
);
}
public canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot,
): Observable<boolean> | Promise<boolean> | boolean {
return this.authService.user.pipe(
map((user) => user?.id !== route.params.id),
tap((isNotMe) => {
if (!isNotMe) {
this.router.navigate(['/users', 'me']);
}
}),
);
}
}

View File

@ -8,9 +8,8 @@ describe('ActionKeysComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ActionKeysComponent ]
})
.compileComponents();
declarations: [ActionKeysComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AddKeyDialogComponent } from './add-key-dialog.component';
describe('AddKeyDialogComponent', () => {
let component: AddKeyDialogComponent;
let fixture: ComponentFixture<AddKeyDialogComponent>;
let component: AddKeyDialogComponent;
let fixture: ComponentFixture<AddKeyDialogComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AddKeyDialogComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AddKeyDialogComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddKeyDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(AddKeyDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -19,10 +19,7 @@ export class AddKeyDialogComponent {
public type!: KeyType;
public dateControl: UntypedFormControl = new UntypedFormControl('', []);
constructor(
public dialogRef: MatDialogRef<AddKeyDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
) {
constructor(public dialogRef: MatDialogRef<AddKeyDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
this.types = [KeyType.KEY_TYPE_JSON];
this.type = KeyType.KEY_TYPE_JSON;
const today = new Date();

View File

@ -13,19 +13,19 @@ import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/local
import { AddKeyDialogComponent } from './add-key-dialog.component';
@NgModule({
declarations: [AddKeyDialogComponent],
imports: [
CommonModule,
TranslateModule,
MatButtonModule,
InputModule,
MatSelectModule,
MatIconModule,
FormsModule,
MatDatepickerModule,
MatMomentDateModule,
ReactiveFormsModule,
LocalizedDatePipeModule,
],
declarations: [AddKeyDialogComponent],
imports: [
CommonModule,
TranslateModule,
MatButtonModule,
InputModule,
MatSelectModule,
MatIconModule,
FormsModule,
MatDatepickerModule,
MatMomentDateModule,
ReactiveFormsModule,
LocalizedDatePipeModule,
],
})
export class AddKeyDialogModule { }
export class AddKeyDialogModule {}

View File

@ -2,25 +2,23 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MemberCreateDialogComponent } from './member-create-dialog.component';
describe('AddMemberDialogComponent', () => {
let component: MemberCreateDialogComponent;
let fixture: ComponentFixture<MemberCreateDialogComponent>;
let component: MemberCreateDialogComponent;
let fixture: ComponentFixture<MemberCreateDialogComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MemberCreateDialogComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MemberCreateDialogComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MemberCreateDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(MemberCreateDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -6,13 +6,11 @@ describe('AddMemberRolesDialogComponent', () => {
let component: AddMemberRolesDialogComponent;
let fixture: ComponentFixture<AddMemberRolesDialogComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AddMemberRolesDialogComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AddMemberRolesDialogComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AddMemberRolesDialogComponent);

View File

@ -8,9 +8,8 @@ describe('AddTokenDialogComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AddTokenDialogComponent ]
})
.compileComponents();
declarations: [AddTokenDialogComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -4,12 +4,8 @@ import { NgModule } from '@angular/core';
import { AppCardComponent } from './app-card.component';
@NgModule({
declarations: [AppCardComponent],
imports: [
CommonModule,
],
exports: [
AppCardComponent,
],
declarations: [AppCardComponent],
imports: [CommonModule],
exports: [AppCardComponent],
})
export class AppCardModule { }
export class AppCardModule {}

View File

@ -1,9 +1,9 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import {
APIAuthMethodType,
OIDCAuthMethodType,
OIDCGrantType,
OIDCResponseType,
APIAuthMethodType,
OIDCAuthMethodType,
OIDCGrantType,
OIDCResponseType,
} from 'src/app/proto/generated/zitadel/app_pb';
export interface RadioItemAuthType {

View File

@ -8,20 +8,8 @@ import { AppAuthMethodRadioComponent } from './app-auth-method-radio/app-auth-me
import { AppTypeRadioComponent } from './app-type-radio/app-type-radio.component';
@NgModule({
declarations: [
AppTypeRadioComponent,
AppAuthMethodRadioComponent,
],
imports: [
CommonModule,
FormsModule,
MatRippleModule,
TranslateModule,
],
exports: [
AppAuthMethodRadioComponent,
AppTypeRadioComponent,
],
declarations: [AppTypeRadioComponent, AppAuthMethodRadioComponent],
imports: [CommonModule, FormsModule, MatRippleModule, TranslateModule],
exports: [AppAuthMethodRadioComponent, AppTypeRadioComponent],
})
export class AppRadioModule { }
export class AppRadioModule {}

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AvatarComponent } from './avatar.component';
describe('AvatarComponent', () => {
let component: AvatarComponent;
let fixture: ComponentFixture<AvatarComponent>;
let component: AvatarComponent;
let fixture: ComponentFixture<AvatarComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AvatarComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AvatarComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AvatarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(AvatarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -9,8 +9,7 @@ describe('CardComponent', () => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CardComponent],
})
.compileComponents();
}).compileComponents();
}));
beforeEach(() => {

View File

@ -6,18 +6,9 @@ import { MatTooltipModule } from '@angular/material/tooltip';
import { CardComponent } from './card.component';
@NgModule({
declarations: [CardComponent],
imports: [
CommonModule,
MatIconModule,
MatButtonModule,
MatTooltipModule,
],
exports: [
CardComponent,
],
imports: [CommonModule, MatIconModule, MatButtonModule, MatTooltipModule],
exports: [CardComponent],
})
export class CardModule { }
export class CardModule {}

View File

@ -5,13 +5,19 @@
<div class="scroll-container">
<li class="item" *ngFor="let hist of data | async; index as histindex">
<span *ngIf="hist.values[0].dates[0]" class="date">
{{ hist.values[0].dates[0]| timestampToDate | localizedDate: 'dd. MMM YYYY' }}
{{ hist.values[0].dates[0] | timestampToDate | localizedDate: 'dd. MMM YYYY' }}
</span>
<div class="item" *ngFor="let dayelement of hist.values; index as i">
<div class="row">
<cnsl-avatar matTooltip="{{ dayelement.editorDisplayName }}" *ngIf="dayelement.editorDisplayName; else spacer"
class="avatar" [name]="dayelement.editorDisplayName" [size]="32"
[forColor]="dayelement?.editorPreferredLoginName ?? 'A'" [avatarUrl]="dayelement.editorAvatarUrl || ''">
<cnsl-avatar
matTooltip="{{ dayelement.editorDisplayName }}"
*ngIf="dayelement.editorDisplayName; else spacer"
class="avatar"
[name]="dayelement.editorDisplayName"
[size]="32"
[forColor]="dayelement?.editorPreferredLoginName ?? 'A'"
[avatarUrl]="dayelement.editorAvatarUrl || ''"
>
</cnsl-avatar>
<ng-template #spacer>
<div class="spacer"></div>
@ -20,10 +26,11 @@
<div class="change-action" *ngFor="let action of dayelement.eventTypes; index as j">
<div>
<span class="msg">{{ action.localizedMessage }}</span>
<span class="block"
matTooltip="{{ dayelement.dates[j] | timestampToDate | localizedDate: 'dd. MM YYYY, HH:mm' }}">{{
dayelement.dates[j] | timestampToDate | localizedDate: 'HH:mm'
}}</span>
<span
class="block"
matTooltip="{{ dayelement.dates[j] | timestampToDate | localizedDate: 'dd. MM YYYY, HH:mm' }}"
>{{ dayelement.dates[j] | timestampToDate | localizedDate: 'HH:mm' }}</span
>
</div>
</div>
</div>
@ -35,10 +42,10 @@
</div>
<button (click)="more()" class="load-more-button" *ngIf="!bottom" mat-stroked-button>
{{'CHANGES.LOADMORE' | translate}}
{{ 'CHANGES.LOADMORE' | translate }}
</button>
<div *ngIf="bottom" class="end-container">
<span class="cnsl-secondary-text">{{'CHANGES.BOTTOM' | translate}}</span>
<span class="cnsl-secondary-text">{{ 'CHANGES.BOTTOM' | translate }}</span>
</div>
</div>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ChangesComponent } from './changes.component';
describe('ChangesComponent', () => {
let component: ChangesComponent;
let fixture: ComponentFixture<ChangesComponent>;
let component: ChangesComponent;
let fixture: ComponentFixture<ChangesComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ChangesComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ChangesComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ChangesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(ChangesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -19,7 +19,7 @@ export enum ChangeType {
USER = 'user',
ORG = 'org',
PROJECT = 'project',
PROJECT_GRANT= 'project-grant',
PROJECT_GRANT = 'project-grant',
APP = 'app',
}

View File

@ -14,28 +14,22 @@ import { AvatarModule } from '../avatar/avatar.module';
import { ChangesComponent } from './changes.component';
@NgModule({
declarations: [
ChangesComponent,
],
imports: [
CommonModule,
ScrollableModule,
MatProgressSpinnerModule,
TranslateModule,
MatIconModule,
MatButtonModule,
HasRolePipeModule,
ScrollingModule,
LocalizedDatePipeModule,
TimestampToDatePipeModule,
MatTooltipModule,
AvatarModule,
],
exports: [
ChangesComponent,
ScrollableModule,
],
declarations: [ChangesComponent],
imports: [
CommonModule,
ScrollableModule,
MatProgressSpinnerModule,
TranslateModule,
MatIconModule,
MatButtonModule,
HasRolePipeModule,
ScrollingModule,
LocalizedDatePipeModule,
TimestampToDatePipeModule,
MatTooltipModule,
AvatarModule,
],
exports: [ChangesComponent, ScrollableModule],
})
export class ChangesModule { }
export class ChangesModule {}

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ClientKeysComponent } from './client-keys.component';
describe('ClientKeysComponent', () => {
let component: ClientKeysComponent;
let fixture: ComponentFixture<ClientKeysComponent>;
let component: ClientKeysComponent;
let fixture: ComponentFixture<ClientKeysComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ClientKeysComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ClientKeysComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ClientKeysComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(ClientKeysComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,16 +1,24 @@
<div class="contributor-groups">
<div class="contributor-people">
<div class="contributor-img-list" [ngClass]="{'padd-left': totalResult > 0}" [@cardAnimation]="totalResult">
<div class="contributor-img-list" [ngClass]="{ 'padd-left': totalResult > 0 }" [@cardAnimation]="totalResult">
<mat-spinner class="spinner" diameter="20" *ngIf="loading"></mat-spinner>
<ng-container *ngIf="totalResult < 10; else compact">
<ng-container *ngFor="let member of membersSubject | async; index as i">
<div @animate (click)="emitShowDetail()" class="contributor-avatar-circle"
matTooltip="{{ member.displayName }} | {{member.rolesList | roletransform}}"
[ngStyle]="{'z-index': 20 - i}">
<cnsl-avatar *ngIf="member && member.displayName && member.firstName && member.lastName; else cog"
class="contributor-avatar dontcloseonclick" [avatarUrl]="member.avatarUrl|| ''"
[name]="member.displayName ? member.displayName : (member.firstName + ' '+ member.lastName)"
[forColor]="member.preferredLoginName" [size]="32">
<div
@animate
(click)="emitShowDetail()"
class="contributor-avatar-circle"
matTooltip="{{ member.displayName }} | {{ member.rolesList | roletransform }}"
[ngStyle]="{ 'z-index': 20 - i }"
>
<cnsl-avatar
*ngIf="member && member.displayName && member.firstName && member.lastName; else cog"
class="contributor-avatar dontcloseonclick"
[avatarUrl]="member.avatarUrl || ''"
[name]="member.displayName ? member.displayName : member.firstName + ' ' + member.lastName"
[forColor]="member.preferredLoginName"
[size]="32"
>
</cnsl-avatar>
<ng-template #cog>
<cnsl-avatar [forColor]="member.preferredLoginName" [isMachine]="true">
@ -22,11 +30,17 @@
</ng-container>
<ng-template #compact>
<div (click)="emitShowDetail()" class="contributor-avatar-circle" matTooltip="Click to show detail">
<span>{{totalResult}}</span>
<span>{{ totalResult }}</span>
</div>
</ng-template>
<button class="add-img" [ngClass]="{'no-margin': totalResult === 0}" (click)="emitAddMember()"
[disabled]="disabled" mat-icon-button aria-label="Add member">
<button
class="add-img"
[ngClass]="{ 'no-margin': totalResult === 0 }"
(click)="emitAddMember()"
[disabled]="disabled"
mat-icon-button
aria-label="Add member"
>
<mat-icon>add</mat-icon>
</button>
</div>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ContributorsComponent } from './contributors.component';
describe('ContributorsComponent', () => {
let component: ContributorsComponent;
let fixture: ComponentFixture<ContributorsComponent>;
let component: ContributorsComponent;
let fixture: ComponentFixture<ContributorsComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ContributorsComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ContributorsComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ContributorsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(ContributorsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -9,17 +9,18 @@ import { Member } from 'src/app/proto/generated/zitadel/member_pb';
styleUrls: ['./contributors.component.scss'],
animations: [
trigger('cardAnimation', [
transition('* => *', [
query('@animate', stagger('40ms', animateChild()), { optional: true }),
]),
transition('* => *', [query('@animate', stagger('40ms', animateChild()), { optional: true })]),
]),
trigger('animate', [
transition(':enter', [
animate('.2s ease-in', keyframes([
style({ opacity: 0, offset: 0 }),
style({ opacity: .5, transform: 'scale(1.05)', offset: 0.3 }),
style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
])),
animate(
'.2s ease-in',
keyframes([
style({ opacity: 0, offset: 0 }),
style({ opacity: 0.5, transform: 'scale(1.05)', offset: 0.3 }),
style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
]),
),
]),
]),
],

View File

@ -8,9 +8,8 @@ describe('CreateLayoutComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ CreateLayoutComponent ]
})
.compileComponents();
declarations: [CreateLayoutComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -20,6 +20,5 @@
</div>
<ng-content></ng-content>
</div>
</div>
</div>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { DetailLayoutComponent } from './detail-layout.component';
describe('DetailLayoutComponent', () => {
let component: DetailLayoutComponent;
let fixture: ComponentFixture<DetailLayoutComponent>;
let component: DetailLayoutComponent;
let fixture: ComponentFixture<DetailLayoutComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DetailLayoutComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [DetailLayoutComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DetailLayoutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(DetailLayoutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,19 +1,29 @@
<div *ngIf="currentMap">
<form [formGroup]="form">
<ng-container *ngFor="let key of (current$ | async) | keyvalue">
<ng-container *ngFor="let key of current$ | async | keyvalue">
<div *ngIf="key.key !== 'isDefault'" class="edit-text-block">
<div class="edit-text-flex" *ngIf="(default$ | async) as defaultmap">
<div class="edit-text-flex" *ngIf="default$ | async as defaultmap">
<cnsl-form-field class="edit-text-formfield">
<cnsl-label>{{key.key}}</cnsl-label>
<textarea class="edit-text-area" cnslInput [formControlName]="key.key"
[placeholder]="$any(defaultmap[key.key])" [name]="key.key"
[ngClass]="{'defaulttext': form.get(key.key)?.value === ''}"></textarea>
<cnsl-label>{{ key.key }}</cnsl-label>
<textarea
class="edit-text-area"
cnslInput
[formControlName]="key.key"
[placeholder]="$any(defaultmap[key.key])"
[name]="key.key"
[ngClass]="{ defaulttext: form.get(key.key)?.value === '' }"
></textarea>
<div class="edit-text-chips" *ngIf="warnText[key.key] === undefined">
<ng-container *ngFor="let chip of chips">
<div class="chip" cnslCopyToClipboard [valueToCopy]="chip.value" (copiedValue)="copied = $event"
(click)="addChip(key.key, chip.value)">
<span class="key">{{chip.key | translate}}</span>
<span class="value">{{chip.value}}</span>
<div
class="chip"
cnslCopyToClipboard
[valueToCopy]="chip.value"
(copiedValue)="copied = $event"
(click)="addChip(key.key, chip.value)"
>
<span class="key">{{ chip.key | translate }}</span>
<span class="value">{{ chip.value }}</span>
<i *ngIf="copied !== chip.value" class="las la-clipboard"></i>
<i *ngIf="copied === chip.value" class="las la-clipboard-check"></i>
</div>
@ -21,21 +31,36 @@
</div>
</cnsl-form-field>
<div class="edit-text-actions">
<button matTooltip="{{'ACTIONS.RESETDEFAULT'| translate }}" mat-icon-button
<button
matTooltip="{{ 'ACTIONS.RESETDEFAULT' | translate }}"
mat-icon-button
[disabled]="form.get(key.key)?.value === defaultmap[key.key] || disabled"
(click)="form.get(key.key)?.setValue(defaultmap[key.key])"
(mouseenter)="form.get(key.key)?.value !== defaultmap[key.key] && setWarnText(key.key, $any(defaultmap[key.key]))"
(mouseleave)="setWarnText(key.key, undefined)"><i class="las la-history"></i></button>
<button matTooltip="{{'ACTIONS.RESETCURRENT'| translate }}" mat-icon-button
(mouseenter)="
form.get(key.key)?.value !== defaultmap[key.key] && setWarnText(key.key, $any(defaultmap[key.key]))
"
(mouseleave)="setWarnText(key.key, undefined)"
>
<i class="las la-history"></i>
</button>
<button
matTooltip="{{ 'ACTIONS.RESETCURRENT' | translate }}"
mat-icon-button
[disabled]="form.get(key.key)?.value === currentMap[key.key] || disabled"
(click)="form.get(key.key)?.setValue(currentMap[key.key])"
(mouseenter)="form.get(key.key)?.value !== currentMap[key.key] && setWarnText(key.key, $any(currentMap[key.key]))"
(mouseleave)="setWarnText(key.key, undefined)"><i class="las la-undo"></i></button>
(mouseenter)="
form.get(key.key)?.value !== currentMap[key.key] && setWarnText(key.key, $any(currentMap[key.key]))
"
(mouseleave)="setWarnText(key.key, undefined)"
>
<i class="las la-undo"></i>
</button>
</div>
</div>
</div>
<cnsl-info-section *ngIf="warnText[key.key] !== undefined" class="edit-text-info" [type]="InfoSectionType.WARN">
{{'ACTIONS.RESETTO'| translate }} <cite>'{{warnText[key.key]}}'</cite></cnsl-info-section>
{{ 'ACTIONS.RESETTO' | translate }} <cite>'{{ warnText[key.key] }}'</cite></cnsl-info-section
>
</ng-container>
</form>
</div>

View File

@ -9,8 +9,7 @@ describe('EditTextComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [EditTextComponent],
})
.compileComponents();
}).compileComponents();
});
beforeEach(() => {

View File

@ -14,9 +14,7 @@ import { InfoSectionModule } from '../info-section/info-section.module';
import { EditTextComponent } from './edit-text.component';
@NgModule({
declarations: [
EditTextComponent,
],
declarations: [EditTextComponent],
imports: [
CommonModule,
InfoSectionModule,
@ -32,8 +30,6 @@ import { EditTextComponent } from './edit-text.component';
TextFieldModule,
CopyToClipboardModule,
],
exports: [
EditTextComponent,
],
exports: [EditTextComponent],
})
export class EditTextModule { }
export class EditTextModule {}

View File

@ -8,9 +8,8 @@ describe('FilterUserComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FilterUserComponent ]
})
.compileComponents();
declarations: [FilterUserComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -4,11 +4,11 @@ import { ActivatedRoute, Router } from '@angular/router';
import { take } from 'rxjs';
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
import {
DisplayNameQuery,
UserGrantOrgNameQuery,
UserGrantProjectNameQuery,
UserGrantQuery,
UserNameQuery,
DisplayNameQuery,
UserGrantOrgNameQuery,
UserGrantProjectNameQuery,
UserGrantQuery,
UserNameQuery,
} from 'src/app/proto/generated/zitadel/user_pb';
import { FilterComponent } from '../filter/filter.component';

View File

@ -8,9 +8,8 @@ describe('FilterUserComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FilterUserComponent ]
})
.compileComponents();
declarations: [FilterUserComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -4,12 +4,12 @@ import { ActivatedRoute, Router } from '@angular/router';
import { take } from 'rxjs';
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
import {
DisplayNameQuery,
EmailQuery,
SearchQuery as UserSearchQuery,
StateQuery,
UserNameQuery,
UserState,
DisplayNameQuery,
EmailQuery,
SearchQuery as UserSearchQuery,
StateQuery,
UserNameQuery,
UserState,
} from 'src/app/proto/generated/zitadel/user_pb';
import { FilterComponent } from '../filter/filter.component';

View File

@ -8,9 +8,8 @@ describe('FilterComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FilterComponent ]
})
.compileComponents();
declarations: [FilterComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -8,9 +8,8 @@ describe('FooterComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ FooterComponent ]
})
.compileComponents();
declarations: [FooterComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -4,14 +4,14 @@ import { animate, AnimationTriggerMetadata, state, style, transition, trigger }
* Animations used by the CnslFormFieldComponent.
*/
export const cnslFormFieldAnimations: {
readonly transitionMessages: AnimationTriggerMetadata;
readonly transitionMessages: AnimationTriggerMetadata;
} = {
/** Animation that transitions the form field's error and hint messages. */
transitionMessages: trigger('transitionMessages', [
state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),
transition('void => enter', [
style({ opacity: 0, transform: 'translateY(-100%)' }),
animate('3000ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
]),
/** Animation that transitions the form field's error and hint messages. */
transitionMessages: trigger('transitionMessages', [
state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),
transition('void => enter', [
style({ opacity: 0, transform: 'translateY(-100%)' }),
animate('3000ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
]),
]),
};

View File

@ -7,8 +7,8 @@ export const CNSL_ERROR = new InjectionToken<CnslErrorDirective>('CnslError');
@Directive({
selector: '[cnslError]',
host: {
'class': 'cnsl-error',
'role': 'alert',
class: 'cnsl-error',
role: 'alert',
'[attr.id]': 'id',
},
providers: [{ provide: CNSL_ERROR, useExisting: CnslErrorDirective }],
@ -16,5 +16,5 @@ export const CNSL_ERROR = new InjectionToken<CnslErrorDirective>('CnslError');
export class CnslErrorDirective {
@Input() id: string = `cnsl-error-${nextUniqueId++}`;
constructor() { }
constructor() {}
}

View File

@ -1,17 +1,15 @@
<div class="cnsl-form-field-wrapper" (click)="_control.onContainerClick && _control.onContainerClick($event)">
<ng-content select="cnsl-label"></ng-content>
<div class="cnsl-rel" #inputContainer>
<ng-content></ng-content>
<ng-content select="cnslSuffix"></ng-content>
<ng-content select="cnsl-label"></ng-content>
<div class="cnsl-rel" #inputContainer>
<ng-content></ng-content>
<ng-content select="cnslSuffix"></ng-content>
</div>
<div class="cnsl-form-field-subscript-wrapper" [ngSwitch]="_getDisplayedMessages()">
<div *ngSwitchCase="'error'" class="cnsl-form-field-error-wrapper" [@transitionMessages]="_subscriptAnimationState">
<ng-content select="cnsl-error"></ng-content>
</div>
<div class="cnsl-form-field-subscript-wrapper" [ngSwitch]="_getDisplayedMessages()">
<div *ngSwitchCase="'error'" class="cnsl-form-field-error-wrapper"
[@transitionMessages]="_subscriptAnimationState">
<ng-content select="cnsl-error"></ng-content>
</div>
<div *ngSwitchCase="'hint'" class="cnsl-form-field-hint-wrapper"
[@transitionMessages]="_subscriptAnimationState">
<ng-content select="cnsl-hint"></ng-content>
</div>
<div *ngSwitchCase="'hint'" class="cnsl-form-field-hint-wrapper" [@transitionMessages]="_subscriptAnimationState">
<ng-content select="cnsl-hint"></ng-content>
</div>
</div>
</div>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { CnslFormFieldComponent } from './form-field.component';
describe('CnslFormFieldComponent', () => {
let component: CnslFormFieldComponent;
let fixture: ComponentFixture<CnslFormFieldComponent>;
let component: CnslFormFieldComponent;
let fixture: ComponentFixture<CnslFormFieldComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CnslFormFieldComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [CnslFormFieldComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CnslFormFieldComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(CnslFormFieldComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -8,20 +8,8 @@ import { CnslErrorDirective } from './error.directive';
import { CnslFormFieldComponent } from './form-field.component';
@NgModule({
declarations: [
CnslFormFieldComponent,
CnslErrorDirective,
],
imports: [
CommonModule,
MatRippleModule,
LabelModule,
],
exports: [
CnslFormFieldComponent,
LabelComponent,
CnslErrorDirective,
],
declarations: [CnslFormFieldComponent, CnslErrorDirective],
imports: [CommonModule, MatRippleModule, LabelModule],
exports: [CnslFormFieldComponent, LabelComponent, CnslErrorDirective],
})
export class FormFieldModule { }
export class FormFieldModule {}

View File

@ -17,11 +17,6 @@
$is-dark-theme: map-get($theme, is-dark);
$back: map-get($background, background);
.show-all {
color: mat.get-color-from-palette($primary, 300) !important;
border-top: 1px solid map-get($foreground, divider);
}
.filter-form {
margin: 0 0.5rem;
color: mat.get-color-from-palette($foreground, text) !important;

View File

@ -8,9 +8,8 @@ describe('HeaderComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HeaderComponent ]
})
.compileComponents();
declarations: [HeaderComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -4,15 +4,15 @@ import { RouterModule, Routes } from '@angular/router';
import { IdpCreateComponent } from './idp-create.component';
const routes: Routes = [
{
path: '',
component: IdpCreateComponent,
data: { animation: 'DetailPage' },
},
{
path: '',
component: IdpCreateComponent,
data: { animation: 'DetailPage' },
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class IdpCreateRoutingModule { }
export class IdpCreateRoutingModule {}

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IdpCreateComponent } from './idp-create.component';
describe('IdpCreateComponent', () => {
let component: IdpCreateComponent;
let fixture: ComponentFixture<IdpCreateComponent>;
let component: IdpCreateComponent;
let fixture: ComponentFixture<IdpCreateComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdpCreateComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdpCreateComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(IdpCreateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(IdpCreateComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,12 +1,19 @@
<div class="idp-radio-button-wrapper">
<ng-container *ngFor="let type of types">
<input class="idp mat-elevation-z1" type="radio" (change)="emitChange()" [value]="type" [(ngModel)]="selected" [id]="type.titleI18nKey" />
<label class="cnsl-idp-type-radio-button" [for]="type.titleI18nKey">
<div class="cnsl-idp-type-radio-header" >
<mat-icon class="icon" *ngIf="type.mdi" [svgIcon]="type.mdi"></mat-icon>
<span class="fill-space"></span>
<span>{{type.titleI18nKey | translate}}</span>
</div>
</label>
</ng-container>
<ng-container *ngFor="let type of types">
<input
class="idp mat-elevation-z1"
type="radio"
(change)="emitChange()"
[value]="type"
[(ngModel)]="selected"
[id]="type.titleI18nKey"
/>
<label class="cnsl-idp-type-radio-button" [for]="type.titleI18nKey">
<div class="cnsl-idp-type-radio-header">
<mat-icon class="icon" *ngIf="type.mdi" [svgIcon]="type.mdi"></mat-icon>
<span class="fill-space"></span>
<span>{{ type.titleI18nKey | translate }}</span>
</div>
</label>
</ng-container>
</div>

View File

@ -1,4 +1,3 @@
export enum IdpCreateType {
OIDC = 'OIDC',
JWT = 'JWT',

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IdpTableComponent } from './idp-table.component';
describe('UserTableComponent', () => {
let component: IdpTableComponent;
let fixture: ComponentFixture<IdpTableComponent>;
let component: IdpTableComponent;
let fixture: ComponentFixture<IdpTableComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdpTableComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdpTableComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(IdpTableComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(IdpTableComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -4,15 +4,15 @@ import { RouterModule, Routes } from '@angular/router';
import { IdpComponent } from './idp.component';
const routes: Routes = [
{
path: '',
component: IdpComponent,
data: { animation: 'DetailPage' },
},
{
path: '',
component: IdpComponent,
data: { animation: 'DetailPage' },
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class IdpRoutingModule { }
export class IdpRoutingModule {}

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IdpComponent } from './idp.component';
describe('IdComponent', () => {
let component: IdpComponent;
let fixture: ComponentFixture<IdpComponent>;
let component: IdpComponent;
let fixture: ComponentFixture<IdpComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdpComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [IdpComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(IdpComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(IdpComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,17 +1,24 @@
<div class="context_intro_overlay">
<div class="overlay-info-row">
<span class="info">INFO <span *ngIf="data.number && data.count">{{data.number}}/{{data.count}}</span></span>
<span class="info"
>INFO <span *ngIf="data.number && data.count">{{ data.number }}/{{ data.count }}</span></span
>
<button mat-icon-button (click)="workflowService.reset()">
<mat-icon>close</mat-icon>
</button>
</div>
<p>{{data.i18nText | translate}}</p>
<p>{{ data.i18nText | translate }}</p>
<div class="overlay-actions">
<button (click)="workflowService.nextStep()" *ngIf="workflowService.nextPossible && !workflowService.isLast"
mat-stroked-button>{{'ACTIONS.NEXT' | translate}}</button>
<button
(click)="workflowService.nextStep()"
*ngIf="workflowService.nextPossible && !workflowService.isLast"
mat-stroked-button
>
{{ 'ACTIONS.NEXT' | translate }}
</button>
<button *ngIf="workflowService.isLast" (click)="workflowService.nextStep()" color="primary"
mat-raised-button>{{'ACTIONS.FINISHED' |
translate}}</button>
<button *ngIf="workflowService.isLast" (click)="workflowService.nextStep()" color="primary" mat-raised-button>
{{ 'ACTIONS.FINISHED' | translate }}
</button>
</div>
</div>

View File

@ -8,9 +8,8 @@ describe('InfoOverlayComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ InfoOverlayComponent ]
})
.compileComponents();
declarations: [InfoOverlayComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -210,6 +210,11 @@
<p *ngIf="grantedProject && grantedProject.projectId" class="info-row-desc">{{ grantedProject.projectId }}</p>
</div>
<div class="info-wrapper">
<p class="info-row-title">{{ 'PROJECT.GRANT.GRANTID' | translate }}</p>
<p *ngIf="grantedProject && grantedProject.grantId" class="info-row-desc">{{ grantedProject.grantId }}</p>
</div>
<div class="info-wrapper">
<p class="info-row-title">{{ 'PROJECT.PAGES.CREATEDON' | translate }}</p>
<p *ngIf="grantedProject && grantedProject.details && grantedProject.details.creationDate" class="info-row-desc">

View File

@ -9,8 +9,7 @@ describe('InfoRowComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [InfoRowComponent],
})
.compileComponents();
}).compileComponents();
});
beforeEach(() => {

View File

@ -10,12 +10,8 @@ import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/
import { InfoRowComponent } from './info-row.component';
@NgModule({
declarations: [
InfoRowComponent,
],
declarations: [InfoRowComponent],
imports: [
CommonModule,
FormsModule,
@ -26,8 +22,6 @@ import { InfoRowComponent } from './info-row.component';
LocalizedDatePipeModule,
TimestampToDatePipeModule,
],
exports: [
InfoRowComponent,
],
exports: [InfoRowComponent],
})
export class InfoRowModule { }
export class InfoRowModule {}

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { InfoSectionComponent } from './info-section.component';
describe('InfoSectionComponent', () => {
let component: InfoSectionComponent;
let fixture: ComponentFixture<InfoSectionComponent>;
let component: InfoSectionComponent;
let fixture: ComponentFixture<InfoSectionComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [InfoSectionComponent],
})
.compileComponents();
});
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [InfoSectionComponent],
}).compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(InfoSectionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(InfoSectionComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -5,17 +5,9 @@ import { TranslateModule } from '@ngx-translate/core';
import { InfoSectionComponent } from './info-section.component';
@NgModule({
declarations: [InfoSectionComponent],
imports: [
CommonModule,
TranslateModule,
RouterModule,
],
exports: [
InfoSectionComponent,
],
imports: [CommonModule, TranslateModule, RouterModule],
exports: [InfoSectionComponent],
})
export class InfoSectionModule { }
export class InfoSectionModule {}

View File

@ -1,19 +1,18 @@
import { Injectable } from '@angular/core';
import { UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms';
/** Provider that defines how form controls behave with regards to displaying error messages. */
@Injectable({ providedIn: 'root' })
export class ErrorStateMatcher {
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
}
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
}
}
/** Error state matcher that matches when a control is invalid and dirty. */
@Injectable()
export class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
}
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
}
}

View File

@ -7,16 +7,10 @@ import { LabelModule } from '../label/label.module';
import { ErrorStateMatcher } from './error-options';
import { InputDirective } from './input.directive';
@NgModule({
declarations: [InputDirective],
imports: [
LabelModule,
CommonModule,
FormFieldModule,
MatRippleModule,
],
exports: [InputDirective, FormFieldModule],
providers: [ErrorStateMatcher],
declarations: [InputDirective],
imports: [LabelModule, CommonModule, FormFieldModule, MatRippleModule],
exports: [InputDirective, FormFieldModule],
providers: [ErrorStateMatcher],
})
export class InputModule { }
export class InputModule {}

View File

@ -8,9 +8,8 @@ describe('KeyboardShortcutsComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ KeyboardShortcutsComponent ]
})
.compileComponents();
declarations: [KeyboardShortcutsComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -1,3 +1,3 @@
<span class="cnsl-label">
<ng-content></ng-content>
<ng-content></ng-content>
</span>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { AvatarComponent } from './avatar.component';
describe('AvatarComponent', () => {
let component: AvatarComponent;
let fixture: ComponentFixture<AvatarComponent>;
let component: AvatarComponent;
let fixture: ComponentFixture<AvatarComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AvatarComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [AvatarComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AvatarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(AvatarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -1,10 +1,10 @@
import { Component } from '@angular/core';
@Component({
selector: 'cnsl-label',
templateUrl: './label.component.html',
styleUrls: ['./label.component.scss'],
selector: 'cnsl-label',
templateUrl: './label.component.html',
styleUrls: ['./label.component.scss'],
})
export class LabelComponent {
constructor() { }
constructor() {}
}

View File

@ -4,17 +4,9 @@ import { MatRippleModule } from '@angular/material/core';
import { LabelComponent } from './label.component';
@NgModule({
declarations: [LabelComponent],
imports: [
CommonModule,
MatRippleModule,
],
exports: [
LabelComponent,
],
declarations: [LabelComponent],
imports: [CommonModule, MatRippleModule],
exports: [LabelComponent],
})
export class LabelModule { }
export class LabelModule {}

View File

@ -1,8 +1,17 @@
<cnsl-refresh-table [loading]="loading$ | async" (refreshed)="refreshPage()" [dataSize]="dataSource.data.length"
[timestamp]="keyResult?.details?.viewTimestamp" [selection]="selection">
<cnsl-refresh-table
[loading]="loading$ | async"
(refreshed)="refreshPage()"
[dataSize]="dataSource.data.length"
[timestamp]="keyResult?.details?.viewTimestamp"
[selection]="selection"
>
<div actions>
<a [disabled]="([('user.write:' + userId), 'user.write'] | hasRole | async) === false" color="primary"
mat-raised-button (click)="openAddKey()">
<a
[disabled]="(['user.write:' + userId, 'user.write'] | hasRole | async) === false"
color="primary"
mat-raised-button
(click)="openAddKey()"
>
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
</a>
</div>
@ -11,39 +20,46 @@
<table class="table" mat-table [dataSource]="dataSource">
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef>
<mat-checkbox color="primary" (change)="$event ? masterToggle() : null"
<mat-checkbox
color="primary"
(change)="$event ? masterToggle() : null"
[checked]="selection.hasValue() && isAllSelected()"
[indeterminate]="selection.hasValue() && !isAllSelected()">
[indeterminate]="selection.hasValue() && !isAllSelected()"
>
</mat-checkbox>
</th>
<td mat-cell *matCellDef="let key">
<mat-checkbox color="primary" (click)="$event.stopPropagation()"
(change)="$event ? selection.toggle(key) : null" [checked]="selection.isSelected(key)">
<mat-checkbox
color="primary"
(click)="$event.stopPropagation()"
(change)="$event ? selection.toggle(key) : null"
[checked]="selection.isSelected(key)"
>
</mat-checkbox>
</td>
</ng-container>
<ng-container matColumnDef="id">
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.ID' | translate }} </th>
<td mat-cell *matCellDef="let key"> {{key?.id}} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.ID' | translate }}</th>
<td mat-cell *matCellDef="let key">{{ key?.id }}</td>
</ng-container>
<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.TYPE' | translate }} </th>
<td mat-cell *matCellDef="let key"> {{'USER.MACHINE.KEYTYPES.'+key?.type | translate}} </td>
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.TYPE' | translate }}</th>
<td mat-cell *matCellDef="let key">{{ 'USER.MACHINE.KEYTYPES.' + key?.type | translate }}</td>
</ng-container>
<ng-container matColumnDef="creationDate">
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.CREATIONDATE' | translate }} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.CREATIONDATE' | translate }}</th>
<td mat-cell *matCellDef="let key">
{{key.details?.creationDate | timestampToDate | localizedDate: 'fromNow'}}
{{ key.details?.creationDate | timestampToDate | localizedDate: 'fromNow' }}
</td>
</ng-container>
<ng-container matColumnDef="expirationDate">
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.EXPIRATIONDATE' | translate }} </th>
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.EXPIRATIONDATE' | translate }}</th>
<td mat-cell *matCellDef="let key">
{{key.expirationDate | timestampToDate | localizedDate: 'fromNow'}}
{{ key.expirationDate | timestampToDate | localizedDate: 'fromNow' }}
</td>
</ng-container>
@ -51,8 +67,14 @@
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let key">
<cnsl-table-actions>
<button actions [disabled]="([('user.write:' + userId), 'user.write'] | hasRole | async) === false"
mat-icon-button color="warn" matTooltip="{{'ACTIONS.DELETE' | translate}}" (click)="deleteKey(key)">
<button
actions
[disabled]="(['user.write:' + userId, 'user.write'] | hasRole | async) === false"
mat-icon-button
color="warn"
matTooltip="{{ 'ACTIONS.DELETE' | translate }}"
(click)="deleteKey(key)"
>
<i class="las la-trash"></i>
</button>
</cnsl-table-actions>
@ -60,13 +82,16 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns;">
</tr>
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns"></tr>
</table>
</div>
<cnsl-paginator #paginator class="paginator" [timestamp]="keyResult?.details?.viewTimestamp"
[length]="keyResult?.details?.totalResult || 0" [pageSize]="20" [pageSizeOptions]="[10, 20, 50, 100]"
(page)="changePage()"></cnsl-paginator>
<cnsl-paginator
#paginator
class="paginator"
[timestamp]="keyResult?.details?.viewTimestamp"
[length]="keyResult?.details?.totalResult || 0"
[pageSize]="20"
[pageSizeOptions]="[10, 20, 50, 100]"
(page)="changePage()"
></cnsl-paginator>
</cnsl-refresh-table>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MachineKeysComponent } from './machine-keys.component';
describe('MachineKeysComponent', () => {
let component: MachineKeysComponent;
let fixture: ComponentFixture<MachineKeysComponent>;
let component: MachineKeysComponent;
let fixture: ComponentFixture<MachineKeysComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MachineKeysComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MachineKeysComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MachineKeysComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(MachineKeysComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -9,14 +9,12 @@ describe('MembersTableComponent', () => {
let component: MembersTableComponent;
let fixture: ComponentFixture<MembersTableComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MembersTableComponent],
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MembersTableComponent],
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MembersTableComponent);

View File

@ -9,14 +9,12 @@ describe('MembershipsTableComponent', () => {
let component: MembershipsTableComponent;
let fixture: ComponentFixture<MembershipsTableComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MembershipsTableComponent],
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MembershipsTableComponent],
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MembershipsTableComponent);

View File

@ -1,8 +1,8 @@
<div class="meta-wrapper">
<div class="main-content" [ngClass]="{'hidden': (hidden)}">
<div class="main-content" [ngClass]="{ hidden: hidden }">
<ng-content></ng-content>
</div>
<div class="meta" [ngClass]="{'hidden': hidden}">
<div class="meta" [ngClass]="{ hidden: hidden }">
<ng-content class="meta-content" select="[metainfo]"></ng-content>
</div>
</div>

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MetaLayoutComponent } from './meta-layout.component';
describe('MetaLayoutComponent', () => {
let component: MetaLayoutComponent;
let fixture: ComponentFixture<MetaLayoutComponent>;
let component: MetaLayoutComponent;
let fixture: ComponentFixture<MetaLayoutComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MetaLayoutComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MetaLayoutComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(MetaLayoutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(MetaLayoutComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -9,14 +9,13 @@ import { map } from 'rxjs/operators';
styleUrls: ['./meta-layout.component.scss'],
})
export class MetaLayoutComponent {
constructor(private breakpointObserver: BreakpointObserver) {
this.isSmallScreen$.subscribe(small => this.hidden = small);
this.isSmallScreen$.subscribe((small) => (this.hidden = small));
}
public hidden: boolean = false;
public isSmallScreen$: Observable<boolean> = this.breakpointObserver
.observe('(max-width: 1000px)')
.pipe(map(result => {
public isSmallScreen$: Observable<boolean> = this.breakpointObserver.observe('(max-width: 1000px)').pipe(
map((result) => {
return result.matches;
}));
}),
);
}

View File

@ -5,15 +5,9 @@ import { MatButtonModule } from '@angular/material/button';
import { MetaLayoutComponent } from './meta-layout.component';
@NgModule({
declarations: [MetaLayoutComponent],
imports: [
CommonModule,
MatButtonModule,
LayoutModule,
],
exports: [MetaLayoutComponent],
declarations: [MetaLayoutComponent],
imports: [CommonModule, MatButtonModule, LayoutModule],
exports: [MetaLayoutComponent],
})
export class MetaLayoutModule { }
export class MetaLayoutModule {}

View File

@ -8,11 +8,11 @@
.title-row {
display: flex;
align-items: center;
margin: .5rem 0;
margin: 0.5rem 0;
.title {
font-size: 14px;
letter-spacing: .05em;
letter-spacing: 0.05em;
text-transform: uppercase;
display: block;
}
@ -28,13 +28,13 @@
.meta-row {
display: flex;
margin-bottom: .5rem;
margin-bottom: 0.5rem;
align-items: center;
.first {
flex: 1;
font-size: 13px;
margin-right: .5rem;
margin-right: 0.5rem;
}
.fill-space {

View File

@ -6,13 +6,11 @@ describe('NameDialogComponent', () => {
let component: NameDialogComponent;
let fixture: ComponentFixture<NameDialogComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NameDialogComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [NameDialogComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NameDialogComponent);

View File

@ -8,8 +8,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
})
export class NameDialogComponent {
public name: string = '';
constructor(public dialogRef: MatDialogRef<NameDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any) {
constructor(public dialogRef: MatDialogRef<NameDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
this.name = data.name ?? '';
}

View File

@ -9,19 +9,8 @@ import { InputModule } from '../input/input.module';
import { NameDialogComponent } from './name-dialog.component';
@NgModule({
declarations: [
NameDialogComponent,
],
imports: [
CommonModule,
MatDialogModule,
MatButtonModule,
TranslateModule,
InputModule,
FormsModule,
],
exports: [
NameDialogComponent,
],
declarations: [NameDialogComponent],
imports: [CommonModule, MatDialogModule, MatButtonModule, TranslateModule, InputModule, FormsModule],
exports: [NameDialogComponent],
})
export class NameDialogModule { }
export class NameDialogModule {}

View File

@ -8,9 +8,8 @@ describe('NavToggleComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ NavToggleComponent ]
})
.compileComponents();
declarations: [NavToggleComponent],
}).compileComponents();
fixture = TestBed.createComponent(NavToggleComponent);
component = fixture.componentInstance;

View File

@ -9,8 +9,7 @@ describe('NavComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [NavComponent],
})
.compileComponents();
}).compileComponents();
});
beforeEach(() => {

View File

@ -42,6 +42,8 @@
.show-all {
width: 100%;
color: mat.get-color-from-palette($foreground, text);
border-top: 1px solid map-get($foreground, divider);
}
.org-wrapper {

View File

@ -6,13 +6,11 @@ describe('OrgContextComponent', () => {
let component: OrgContextComponent;
let fixture: ComponentFixture<OrgContextComponent>;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [OrgContextComponent],
}).compileComponents();
}),
);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [OrgContextComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(OrgContextComponent);

View File

@ -49,10 +49,8 @@
}
}
/* stylelint-disable */
::ng-deep .paginator-select.mat-select {
min-width: 60px;
height: 36px !important;
padding-top: 8px !important;
}
/* stylelint-enable */

View File

@ -8,9 +8,8 @@ describe('PaginatorComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PaginatorComponent ],
})
.compileComponents();
declarations: [PaginatorComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -10,22 +10,18 @@ import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/
import { FormFieldModule } from '../form-field/form-field.module';
import { PaginatorComponent } from './paginator.component';
@NgModule({
declarations: [PaginatorComponent],
imports: [
CommonModule,
FormsModule,
TranslateModule,
MatButtonModule,
TimestampToDatePipeModule,
FormFieldModule,
MatSelectModule,
LocalizedDatePipeModule,
],
exports: [
PaginatorComponent,
],
declarations: [PaginatorComponent],
imports: [
CommonModule,
FormsModule,
TranslateModule,
MatButtonModule,
TimestampToDatePipeModule,
FormFieldModule,
MatSelectModule,
LocalizedDatePipeModule,
],
exports: [PaginatorComponent],
})
export class PaginatorModule { }
export class PaginatorModule {}

View File

@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { PasswordComplexityViewComponent } from './password-complexity-view.component';
describe('PasswordComplexityViewComponent', () => {
let component: PasswordComplexityViewComponent;
let fixture: ComponentFixture<PasswordComplexityViewComponent>;
let component: PasswordComplexityViewComponent;
let fixture: ComponentFixture<PasswordComplexityViewComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PasswordComplexityViewComponent],
})
.compileComponents();
}));
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [PasswordComplexityViewComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PasswordComplexityViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
beforeEach(() => {
fixture = TestBed.createComponent(PasswordComplexityViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -6,17 +6,9 @@ import { TranslateModule } from '@ngx-translate/core';
import { PasswordComplexityViewComponent } from './password-complexity-view.component';
@NgModule({
declarations: [PasswordComplexityViewComponent],
imports: [
CommonModule,
MatProgressSpinnerModule,
TranslateModule,
FormsModule,
],
exports: [
PasswordComplexityViewComponent,
],
declarations: [PasswordComplexityViewComponent],
imports: [CommonModule, MatProgressSpinnerModule, TranslateModule, FormsModule],
exports: [PasswordComplexityViewComponent],
})
export class PasswordComplexityViewModule { }
export class PasswordComplexityViewModule {}

View File

@ -8,9 +8,8 @@ describe('PersonalAccessTokensComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ PersonalAccessTokensComponent ]
})
.compileComponents();
declarations: [PersonalAccessTokensComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -2,9 +2,9 @@ import { Component, Injector, Input, OnDestroy, OnInit, Type } from '@angular/co
import { MatDialog } from '@angular/material/dialog';
import { Subscription } from 'rxjs';
import {
AddCustomDomainPolicyRequest,
GetCustomOrgIAMPolicyResponse,
UpdateDomainPolicyRequest,
AddCustomDomainPolicyRequest,
GetCustomOrgIAMPolicyResponse,
UpdateDomainPolicyRequest,
} from 'src/app/proto/generated/zitadel/admin_pb';
import { GetOrgIAMPolicyResponse } from 'src/app/proto/generated/zitadel/management_pb';
import { Org } from 'src/app/proto/generated/zitadel/org_pb';

View File

@ -8,9 +8,8 @@ describe('GeneralSettingsComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ GeneralSettingsComponent ]
})
.compileComponents();
declarations: [GeneralSettingsComponent],
}).compileComponents();
});
beforeEach(() => {

View File

@ -6,16 +6,16 @@ import { BehaviorSubject, Observable } from 'rxjs';
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
import {
AddMultiFactorToLoginPolicyRequest as AdminAddMultiFactorToLoginPolicyRequest,
AddSecondFactorToLoginPolicyRequest as AdminAddSecondFactorToLoginPolicyRequest,
RemoveMultiFactorFromLoginPolicyRequest as AdminRemoveMultiFactorFromLoginPolicyRequest,
RemoveSecondFactorFromLoginPolicyRequest as AdminRemoveSecondFactorFromLoginPolicyRequest,
AddMultiFactorToLoginPolicyRequest as AdminAddMultiFactorToLoginPolicyRequest,
AddSecondFactorToLoginPolicyRequest as AdminAddSecondFactorToLoginPolicyRequest,
RemoveMultiFactorFromLoginPolicyRequest as AdminRemoveMultiFactorFromLoginPolicyRequest,
RemoveSecondFactorFromLoginPolicyRequest as AdminRemoveSecondFactorFromLoginPolicyRequest,
} from 'src/app/proto/generated/zitadel/admin_pb';
import {
AddMultiFactorToLoginPolicyRequest as MgmtAddMultiFactorToLoginPolicyRequest,
AddSecondFactorToLoginPolicyRequest as MgmtAddSecondFactorToLoginPolicyRequest,
RemoveMultiFactorFromLoginPolicyRequest as MgmtRemoveMultiFactorFromLoginPolicyRequest,
RemoveSecondFactorFromLoginPolicyRequest as MgmtRemoveSecondFactorFromLoginPolicyRequest,
AddMultiFactorToLoginPolicyRequest as MgmtAddMultiFactorToLoginPolicyRequest,
AddSecondFactorToLoginPolicyRequest as MgmtAddSecondFactorToLoginPolicyRequest,
RemoveMultiFactorFromLoginPolicyRequest as MgmtRemoveMultiFactorFromLoginPolicyRequest,
RemoveSecondFactorFromLoginPolicyRequest as MgmtRemoveSecondFactorFromLoginPolicyRequest,
} from 'src/app/proto/generated/zitadel/management_pb';
import { MultiFactorType, SecondFactorType } from 'src/app/proto/generated/zitadel/policy_pb';
import { AdminService } from 'src/app/services/admin.service';

View File

@ -4,17 +4,17 @@ import { RouterModule, Routes } from '@angular/router';
import { LoginPolicyComponent } from './login-policy.component';
const routes: Routes = [
{
path: '',
component: LoginPolicyComponent,
data: {
animation: 'DetailPage',
},
{
path: '',
component: LoginPolicyComponent,
data: {
animation: 'DetailPage',
},
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class LoginPolicyRoutingModule { }
export class LoginPolicyRoutingModule {}

Some files were not shown because too many files have changed in this diff Show More