mirror of
https://github.com/zitadel/zitadel.git
synced 2025-02-28 19:27:46 +00:00
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:
parent
49396c4678
commit
c0f8f4e5f2
@ -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.
|
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
|
### 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)
|
- [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)
|
- [All issues](https://github.com/zitadel/zitadel/issues)
|
||||||
|
|
||||||
|
|
||||||
### Backend / Login
|
### Backend / Login
|
||||||
|
|
||||||
By executing the commands from this section, you run everything you need to develop the ZITADEL backend locally.
|
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.
|
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:
|
The commands in this section are tested against the following software versions:
|
||||||
|
|
||||||
- [Docker version 20.10.17](https://docs.docker.com/engine/install/)
|
- [Docker version 20.10.17](https://docs.docker.com/engine/install/)
|
||||||
- [Goreleaser version v1.8.3](https://goreleaser.com/install/)
|
- [Goreleaser version v1.8.3](https://goreleaser.com/install/)
|
||||||
- [Go version 1.19](https://go.dev/doc/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.
|
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.
|
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.
|
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.
|
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:
|
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>
|
<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.
|
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`
|
1. Install `VcXsrv Windows X Server`
|
||||||
2. Set the target of your shortcut to `"C:\Program Files\VcXsrv\xlaunch.exe" -ac`
|
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
|
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
|
4. When starting XLaunch, make sure to disable access control
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
Run the database and the latest backend locally.
|
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.
|
To allow console access via http://localhost:4200, you have to configure the ZITADEL backend.
|
||||||
|
|
||||||
1. Navigate to http://localhost:8080/ui/console/projects.
|
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!*
|
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 _ZITADEL_ project.
|
||||||
3. Select the *Console* application.
|
4. Select the _Console_ application.
|
||||||
4. Select *Redirect Settings*
|
5. 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/auth/callback_ to the _Redirect URIs_
|
||||||
6. Add *http://<span because="breaks the link"></span>localhost:4200/signedout* to the *Post Logout URIs*
|
7. Add _http://<span because="breaks the link"></span>localhost:4200/signedout_ to the _Post Logout URIs_
|
||||||
7. Select the *Save* button
|
8. Select the _Save_ button
|
||||||
|
|
||||||
You can run the local console development server now.
|
You can run the local console development server now.
|
||||||
|
|
||||||
|
4
console/.prettierignore
Normal file
4
console/.prettierignore
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# grpc output
|
||||||
|
/src/app/proto
|
@ -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
3753
console/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,25 +6,26 @@
|
|||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"prodbuild": "ng build --configuration production --base-href=/ui/console/",
|
"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 .."
|
"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,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^14.2.0",
|
"@angular/animations": "^14.2.2",
|
||||||
"@angular/cdk": "^14.2.0",
|
"@angular/cdk": "^14.2.2",
|
||||||
"@angular/common": "^14.2.0",
|
"@angular/common": "^14.2.2",
|
||||||
"@angular/compiler": "^14.2.0",
|
"@angular/compiler": "^14.2.2",
|
||||||
"@angular/core": "^14.2.0",
|
"@angular/core": "^14.2.2",
|
||||||
"@angular/forms": "^14.2.0",
|
"@angular/forms": "^14.2.2",
|
||||||
"@angular/material": "^14.2.0",
|
"@angular/material": "^14.2.2",
|
||||||
"@angular/material-moment-adapter": "^14.2.0",
|
"@angular/material-moment-adapter": "^14.2.2",
|
||||||
"@angular/platform-browser": "^14.2.0",
|
"@angular/platform-browser": "^14.2.2",
|
||||||
"@angular/platform-browser-dynamic": "^14.2.0",
|
"@angular/platform-browser-dynamic": "^14.2.2",
|
||||||
"@angular/router": "^14.2.0",
|
"@angular/router": "^14.2.2",
|
||||||
"@angular/service-worker": "^14.2.0",
|
"@angular/service-worker": "^14.2.2",
|
||||||
"@ctrl/ngx-codemirror": "^5.1.1",
|
"@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/core": "^14.0.0",
|
||||||
"@ngx-translate/http-loader": "^7.0.0",
|
"@ngx-translate/http-loader": "^7.0.0",
|
||||||
"@types/file-saver": "^2.0.2",
|
"@types/file-saver": "^2.0.2",
|
||||||
@ -42,8 +43,8 @@
|
|||||||
"material-design-icons-iconfont": "^6.1.1",
|
"material-design-icons-iconfont": "^6.1.1",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"ng-qrcode": "^7.0.0",
|
"ng-qrcode": "^7.0.0",
|
||||||
"ngx-color": "^8.0.2",
|
"ngx-color": "^8.0.3",
|
||||||
"ngx-quicklink": "^0.2.6",
|
"ngx-quicklink": "^0.3.0",
|
||||||
"rxjs": "~7.5.2",
|
"rxjs": "~7.5.2",
|
||||||
"tinycolor2": "^1.4.2",
|
"tinycolor2": "^1.4.2",
|
||||||
"tslib": "^2.2.0",
|
"tslib": "^2.2.0",
|
||||||
@ -51,35 +52,32 @@
|
|||||||
"zone.js": "~0.11.4"
|
"zone.js": "~0.11.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^14.2.1",
|
"@angular-devkit/build-angular": "^14.2.2",
|
||||||
"@angular-eslint/builder": "^14.0.3",
|
"@angular-eslint/builder": "^14.0.4",
|
||||||
"@angular-eslint/eslint-plugin": "^14.0.3",
|
"@angular-eslint/eslint-plugin": "^14.0.4",
|
||||||
"@angular-eslint/eslint-plugin-template": "^14.0.3",
|
"@angular-eslint/eslint-plugin-template": "^14.0.4",
|
||||||
"@angular-eslint/schematics": "^14.0.3",
|
"@angular-eslint/schematics": "^14.0.4",
|
||||||
"@angular-eslint/template-parser": "^14.0.3",
|
"@angular-eslint/template-parser": "^14.0.4",
|
||||||
"@angular/cli": "^14.2.1",
|
"@angular/cli": "^14.2.2",
|
||||||
"@angular/compiler-cli": "^14.2.0",
|
"@angular/compiler-cli": "^14.2.2",
|
||||||
"@angular/language-service": "^14.2.0",
|
"@angular/language-service": "^14.2.2",
|
||||||
"@types/jasmine": "~4.0.3",
|
"@types/jasmine": "~4.3.0",
|
||||||
"@types/jasminewd2": "~2.0.10",
|
"@types/jasminewd2": "~2.0.10",
|
||||||
"@types/jsonwebtoken": "^8.5.5",
|
"@types/jsonwebtoken": "^8.5.5",
|
||||||
"@types/node": "^17.0.42",
|
"@types/node": "^18.7.16",
|
||||||
"@typescript-eslint/eslint-plugin": "5.36.1",
|
"@typescript-eslint/eslint-plugin": "5.36.1",
|
||||||
"@typescript-eslint/parser": "5.36.1",
|
"@typescript-eslint/parser": "5.36.1",
|
||||||
"codelyzer": "^6.0.0",
|
"codelyzer": "^6.0.0",
|
||||||
"eslint": "^8.18.0",
|
"eslint": "^8.18.0",
|
||||||
"jasmine-core": "~4.2.0",
|
"jasmine-core": "~4.4.0",
|
||||||
"jasmine-spec-reporter": "~7.0.0",
|
"jasmine-spec-reporter": "~7.0.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
"karma-chrome-launcher": "~3.1.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "~5.1.0",
|
"karma-jasmine": "~5.1.0",
|
||||||
"karma-jasmine-html-reporter": "^2.0.0",
|
"karma-jasmine-html-reporter": "^2.0.0",
|
||||||
"prettier": "^2.4.1",
|
"prettier": "^2.7.1",
|
||||||
"protractor": "~7.0.0",
|
"protractor": "~7.0.0",
|
||||||
"stylelint": "^13.10.0",
|
|
||||||
"stylelint-config-standard": "^22.0.0",
|
|
||||||
"stylelint-scss": "^3.21.0",
|
|
||||||
"typescript": "^4.4.4"
|
"typescript": "^4.4.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import {
|
import {
|
||||||
animate,
|
animate,
|
||||||
animateChild,
|
animateChild,
|
||||||
AnimationTriggerMetadata,
|
AnimationTriggerMetadata,
|
||||||
group,
|
group,
|
||||||
query,
|
query,
|
||||||
stagger,
|
stagger,
|
||||||
style,
|
style,
|
||||||
transition,
|
transition,
|
||||||
trigger,
|
trigger,
|
||||||
} from '@angular/animations';
|
} from '@angular/animations';
|
||||||
|
|
||||||
export const toolbarAnimation: AnimationTriggerMetadata = trigger('toolbar', [
|
export const toolbarAnimation: AnimationTriggerMetadata = trigger('toolbar', [
|
||||||
|
@ -50,8 +50,8 @@ import { OverlayService } from './services/overlay/overlay.service';
|
|||||||
import { RefreshService } from './services/refresh.service';
|
import { RefreshService } from './services/refresh.service';
|
||||||
import { SeoService } from './services/seo.service';
|
import { SeoService } from './services/seo.service';
|
||||||
import {
|
import {
|
||||||
StatehandlerProcessorService,
|
StatehandlerProcessorService,
|
||||||
StatehandlerProcessorServiceImpl,
|
StatehandlerProcessorServiceImpl,
|
||||||
} from './services/statehandler/statehandler-processor.service';
|
} from './services/statehandler/statehandler-processor.service';
|
||||||
import { StatehandlerService, StatehandlerServiceImpl } from './services/statehandler/statehandler.service';
|
import { StatehandlerService, StatehandlerServiceImpl } from './services/statehandler/statehandler.service';
|
||||||
import { StorageService } from './services/storage.service';
|
import { StorageService } from './services/storage.service';
|
||||||
|
@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
|
|||||||
|
|
||||||
import { CopyToClipboardDirective } from './copy-to-clipboard.directive';
|
import { CopyToClipboardDirective } from './copy-to-clipboard.directive';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [CopyToClipboardDirective],
|
||||||
CopyToClipboardDirective,
|
imports: [CommonModule],
|
||||||
],
|
exports: [CopyToClipboardDirective],
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
CopyToClipboardDirective,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class CopyToClipboardModule { }
|
export class CopyToClipboardModule {}
|
||||||
|
@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
|
|||||||
|
|
||||||
import { DropzoneDirective } from './dropzone.directive';
|
import { DropzoneDirective } from './dropzone.directive';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [DropzoneDirective],
|
||||||
DropzoneDirective,
|
imports: [CommonModule],
|
||||||
],
|
exports: [DropzoneDirective],
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
DropzoneDirective,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class DropzoneModule { }
|
export class DropzoneModule {}
|
||||||
|
@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
|
|||||||
|
|
||||||
import { HasRoleDirective } from './has-role.directive';
|
import { HasRoleDirective } from './has-role.directive';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [HasRoleDirective],
|
||||||
HasRoleDirective,
|
imports: [CommonModule],
|
||||||
],
|
exports: [HasRoleDirective],
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
HasRoleDirective,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class HasRoleModule { }
|
export class HasRoleModule {}
|
||||||
|
@ -7,7 +7,7 @@ export class ScrollableDirective {
|
|||||||
// when using this directive, add overflow-y scroll to css
|
// when using this directive, add overflow-y scroll to css
|
||||||
@Output() scrollPosition: EventEmitter<any> = new EventEmitter();
|
@Output() scrollPosition: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
constructor(public el: ElementRef) { }
|
constructor(public el: ElementRef) {}
|
||||||
|
|
||||||
@HostListener('scroll', ['$event'])
|
@HostListener('scroll', ['$event'])
|
||||||
public onScroll(event: any): void {
|
public onScroll(event: any): void {
|
||||||
@ -25,8 +25,6 @@ export class ScrollableDirective {
|
|||||||
if (top === 0) {
|
if (top === 0) {
|
||||||
this.scrollPosition.emit('top');
|
this.scrollPosition.emit('top');
|
||||||
}
|
}
|
||||||
|
} catch (err) {}
|
||||||
} catch (err) { }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,9 @@ import { NgModule } from '@angular/core';
|
|||||||
|
|
||||||
import { ScrollableDirective } from './scrollable.directive';
|
import { ScrollableDirective } from './scrollable.directive';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [ScrollableDirective],
|
||||||
ScrollableDirective,
|
imports: [CommonModule],
|
||||||
],
|
exports: [ScrollableDirective],
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
ScrollableDirective,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class ScrollableModule { }
|
export class ScrollableModule {}
|
||||||
|
@ -5,24 +5,23 @@ import { map, tap } from 'rxjs/operators';
|
|||||||
|
|
||||||
import { GrpcAuthService } from '../services/grpc-auth.service';
|
import { GrpcAuthService } from '../services/grpc-auth.service';
|
||||||
|
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root',
|
providedIn: 'root',
|
||||||
})
|
})
|
||||||
export class UserGuard implements CanActivate {
|
export class UserGuard implements CanActivate {
|
||||||
constructor(private authService: GrpcAuthService, private router: Router) { }
|
constructor(private authService: GrpcAuthService, private router: Router) {}
|
||||||
|
|
||||||
public canActivate(
|
public canActivate(
|
||||||
route: ActivatedRouteSnapshot,
|
route: ActivatedRouteSnapshot,
|
||||||
state: RouterStateSnapshot,
|
state: RouterStateSnapshot,
|
||||||
): Observable<boolean> | Promise<boolean> | boolean {
|
): Observable<boolean> | Promise<boolean> | boolean {
|
||||||
return this.authService.user.pipe(
|
return this.authService.user.pipe(
|
||||||
map(user => user?.id !== route.params.id),
|
map((user) => user?.id !== route.params.id),
|
||||||
tap((isNotMe) => {
|
tap((isNotMe) => {
|
||||||
if (!isNotMe) {
|
if (!isNotMe) {
|
||||||
this.router.navigate(['/users', 'me']);
|
this.router.navigate(['/users', 'me']);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,9 +8,8 @@ describe('ActionKeysComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ ActionKeysComponent ]
|
declarations: [ActionKeysComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { AddKeyDialogComponent } from './add-key-dialog.component';
|
import { AddKeyDialogComponent } from './add-key-dialog.component';
|
||||||
|
|
||||||
describe('AddKeyDialogComponent', () => {
|
describe('AddKeyDialogComponent', () => {
|
||||||
let component: AddKeyDialogComponent;
|
let component: AddKeyDialogComponent;
|
||||||
let fixture: ComponentFixture<AddKeyDialogComponent>;
|
let fixture: ComponentFixture<AddKeyDialogComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [AddKeyDialogComponent],
|
declarations: [AddKeyDialogComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(AddKeyDialogComponent);
|
fixture = TestBed.createComponent(AddKeyDialogComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -19,10 +19,7 @@ export class AddKeyDialogComponent {
|
|||||||
public type!: KeyType;
|
public type!: KeyType;
|
||||||
public dateControl: UntypedFormControl = new UntypedFormControl('', []);
|
public dateControl: UntypedFormControl = new UntypedFormControl('', []);
|
||||||
|
|
||||||
constructor(
|
constructor(public dialogRef: MatDialogRef<AddKeyDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
public dialogRef: MatDialogRef<AddKeyDialogComponent>,
|
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
||||||
) {
|
|
||||||
this.types = [KeyType.KEY_TYPE_JSON];
|
this.types = [KeyType.KEY_TYPE_JSON];
|
||||||
this.type = KeyType.KEY_TYPE_JSON;
|
this.type = KeyType.KEY_TYPE_JSON;
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
|
@ -13,19 +13,19 @@ import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/local
|
|||||||
import { AddKeyDialogComponent } from './add-key-dialog.component';
|
import { AddKeyDialogComponent } from './add-key-dialog.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AddKeyDialogComponent],
|
declarations: [AddKeyDialogComponent],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
InputModule,
|
InputModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
MatDatepickerModule,
|
MatDatepickerModule,
|
||||||
MatMomentDateModule,
|
MatMomentDateModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
LocalizedDatePipeModule,
|
LocalizedDatePipeModule,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class AddKeyDialogModule { }
|
export class AddKeyDialogModule {}
|
||||||
|
@ -2,25 +2,23 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
|
|
||||||
import { MemberCreateDialogComponent } from './member-create-dialog.component';
|
import { MemberCreateDialogComponent } from './member-create-dialog.component';
|
||||||
|
|
||||||
|
|
||||||
describe('AddMemberDialogComponent', () => {
|
describe('AddMemberDialogComponent', () => {
|
||||||
let component: MemberCreateDialogComponent;
|
let component: MemberCreateDialogComponent;
|
||||||
let fixture: ComponentFixture<MemberCreateDialogComponent>;
|
let fixture: ComponentFixture<MemberCreateDialogComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [MemberCreateDialogComponent],
|
declarations: [MemberCreateDialogComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(MemberCreateDialogComponent);
|
fixture = TestBed.createComponent(MemberCreateDialogComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -6,13 +6,11 @@ describe('AddMemberRolesDialogComponent', () => {
|
|||||||
let component: AddMemberRolesDialogComponent;
|
let component: AddMemberRolesDialogComponent;
|
||||||
let fixture: ComponentFixture<AddMemberRolesDialogComponent>;
|
let fixture: ComponentFixture<AddMemberRolesDialogComponent>;
|
||||||
|
|
||||||
beforeEach(
|
beforeEach(waitForAsync(() => {
|
||||||
waitForAsync(() => {
|
TestBed.configureTestingModule({
|
||||||
TestBed.configureTestingModule({
|
declarations: [AddMemberRolesDialogComponent],
|
||||||
declarations: [AddMemberRolesDialogComponent],
|
}).compileComponents();
|
||||||
}).compileComponents();
|
}));
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(AddMemberRolesDialogComponent);
|
fixture = TestBed.createComponent(AddMemberRolesDialogComponent);
|
||||||
|
@ -8,9 +8,8 @@ describe('AddTokenDialogComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ AddTokenDialogComponent ]
|
declarations: [AddTokenDialogComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -4,12 +4,8 @@ import { NgModule } from '@angular/core';
|
|||||||
import { AppCardComponent } from './app-card.component';
|
import { AppCardComponent } from './app-card.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [AppCardComponent],
|
declarations: [AppCardComponent],
|
||||||
imports: [
|
imports: [CommonModule],
|
||||||
CommonModule,
|
exports: [AppCardComponent],
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
AppCardComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class AppCardModule { }
|
export class AppCardModule {}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
APIAuthMethodType,
|
APIAuthMethodType,
|
||||||
OIDCAuthMethodType,
|
OIDCAuthMethodType,
|
||||||
OIDCGrantType,
|
OIDCGrantType,
|
||||||
OIDCResponseType,
|
OIDCResponseType,
|
||||||
} from 'src/app/proto/generated/zitadel/app_pb';
|
} from 'src/app/proto/generated/zitadel/app_pb';
|
||||||
|
|
||||||
export interface RadioItemAuthType {
|
export interface RadioItemAuthType {
|
||||||
|
@ -8,20 +8,8 @@ import { AppAuthMethodRadioComponent } from './app-auth-method-radio/app-auth-me
|
|||||||
import { AppTypeRadioComponent } from './app-type-radio/app-type-radio.component';
|
import { AppTypeRadioComponent } from './app-type-radio/app-type-radio.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [AppTypeRadioComponent, AppAuthMethodRadioComponent],
|
||||||
AppTypeRadioComponent,
|
imports: [CommonModule, FormsModule, MatRippleModule, TranslateModule],
|
||||||
AppAuthMethodRadioComponent,
|
exports: [AppAuthMethodRadioComponent, AppTypeRadioComponent],
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
FormsModule,
|
|
||||||
MatRippleModule,
|
|
||||||
TranslateModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
AppAuthMethodRadioComponent,
|
|
||||||
AppTypeRadioComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class AppRadioModule { }
|
export class AppRadioModule {}
|
||||||
|
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { AvatarComponent } from './avatar.component';
|
import { AvatarComponent } from './avatar.component';
|
||||||
|
|
||||||
describe('AvatarComponent', () => {
|
describe('AvatarComponent', () => {
|
||||||
let component: AvatarComponent;
|
let component: AvatarComponent;
|
||||||
let fixture: ComponentFixture<AvatarComponent>;
|
let fixture: ComponentFixture<AvatarComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [AvatarComponent],
|
declarations: [AvatarComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(AvatarComponent);
|
fixture = TestBed.createComponent(AvatarComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -9,8 +9,7 @@ describe('CardComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [CardComponent],
|
declarations: [CardComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -6,18 +6,9 @@ import { MatTooltipModule } from '@angular/material/tooltip';
|
|||||||
|
|
||||||
import { CardComponent } from './card.component';
|
import { CardComponent } from './card.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [CardComponent],
|
declarations: [CardComponent],
|
||||||
imports: [
|
imports: [CommonModule, MatIconModule, MatButtonModule, MatTooltipModule],
|
||||||
CommonModule,
|
exports: [CardComponent],
|
||||||
MatIconModule,
|
|
||||||
MatButtonModule,
|
|
||||||
MatTooltipModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
CardComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class CardModule { }
|
export class CardModule {}
|
||||||
|
@ -5,13 +5,19 @@
|
|||||||
<div class="scroll-container">
|
<div class="scroll-container">
|
||||||
<li class="item" *ngFor="let hist of data | async; index as histindex">
|
<li class="item" *ngFor="let hist of data | async; index as histindex">
|
||||||
<span *ngIf="hist.values[0].dates[0]" class="date">
|
<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>
|
</span>
|
||||||
<div class="item" *ngFor="let dayelement of hist.values; index as i">
|
<div class="item" *ngFor="let dayelement of hist.values; index as i">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<cnsl-avatar matTooltip="{{ dayelement.editorDisplayName }}" *ngIf="dayelement.editorDisplayName; else spacer"
|
<cnsl-avatar
|
||||||
class="avatar" [name]="dayelement.editorDisplayName" [size]="32"
|
matTooltip="{{ dayelement.editorDisplayName }}"
|
||||||
[forColor]="dayelement?.editorPreferredLoginName ?? 'A'" [avatarUrl]="dayelement.editorAvatarUrl || ''">
|
*ngIf="dayelement.editorDisplayName; else spacer"
|
||||||
|
class="avatar"
|
||||||
|
[name]="dayelement.editorDisplayName"
|
||||||
|
[size]="32"
|
||||||
|
[forColor]="dayelement?.editorPreferredLoginName ?? 'A'"
|
||||||
|
[avatarUrl]="dayelement.editorAvatarUrl || ''"
|
||||||
|
>
|
||||||
</cnsl-avatar>
|
</cnsl-avatar>
|
||||||
<ng-template #spacer>
|
<ng-template #spacer>
|
||||||
<div class="spacer"></div>
|
<div class="spacer"></div>
|
||||||
@ -20,10 +26,11 @@
|
|||||||
<div class="change-action" *ngFor="let action of dayelement.eventTypes; index as j">
|
<div class="change-action" *ngFor="let action of dayelement.eventTypes; index as j">
|
||||||
<div>
|
<div>
|
||||||
<span class="msg">{{ action.localizedMessage }}</span>
|
<span class="msg">{{ action.localizedMessage }}</span>
|
||||||
<span class="block"
|
<span
|
||||||
matTooltip="{{ dayelement.dates[j] | timestampToDate | localizedDate: 'dd. MM YYYY, HH:mm' }}">{{
|
class="block"
|
||||||
dayelement.dates[j] | timestampToDate | localizedDate: 'HH:mm'
|
matTooltip="{{ dayelement.dates[j] | timestampToDate | localizedDate: 'dd. MM YYYY, HH:mm' }}"
|
||||||
}}</span>
|
>{{ dayelement.dates[j] | timestampToDate | localizedDate: 'HH:mm' }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -35,10 +42,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button (click)="more()" class="load-more-button" *ngIf="!bottom" mat-stroked-button>
|
<button (click)="more()" class="load-more-button" *ngIf="!bottom" mat-stroked-button>
|
||||||
{{'CHANGES.LOADMORE' | translate}}
|
{{ 'CHANGES.LOADMORE' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div *ngIf="bottom" class="end-container">
|
<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>
|
||||||
</div>
|
</div>
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { ChangesComponent } from './changes.component';
|
import { ChangesComponent } from './changes.component';
|
||||||
|
|
||||||
describe('ChangesComponent', () => {
|
describe('ChangesComponent', () => {
|
||||||
let component: ChangesComponent;
|
let component: ChangesComponent;
|
||||||
let fixture: ComponentFixture<ChangesComponent>;
|
let fixture: ComponentFixture<ChangesComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ChangesComponent],
|
declarations: [ChangesComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ChangesComponent);
|
fixture = TestBed.createComponent(ChangesComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -19,7 +19,7 @@ export enum ChangeType {
|
|||||||
USER = 'user',
|
USER = 'user',
|
||||||
ORG = 'org',
|
ORG = 'org',
|
||||||
PROJECT = 'project',
|
PROJECT = 'project',
|
||||||
PROJECT_GRANT= 'project-grant',
|
PROJECT_GRANT = 'project-grant',
|
||||||
APP = 'app',
|
APP = 'app',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,28 +14,22 @@ import { AvatarModule } from '../avatar/avatar.module';
|
|||||||
|
|
||||||
import { ChangesComponent } from './changes.component';
|
import { ChangesComponent } from './changes.component';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [ChangesComponent],
|
||||||
ChangesComponent,
|
imports: [
|
||||||
],
|
CommonModule,
|
||||||
imports: [
|
ScrollableModule,
|
||||||
CommonModule,
|
MatProgressSpinnerModule,
|
||||||
ScrollableModule,
|
TranslateModule,
|
||||||
MatProgressSpinnerModule,
|
MatIconModule,
|
||||||
TranslateModule,
|
MatButtonModule,
|
||||||
MatIconModule,
|
HasRolePipeModule,
|
||||||
MatButtonModule,
|
ScrollingModule,
|
||||||
HasRolePipeModule,
|
LocalizedDatePipeModule,
|
||||||
ScrollingModule,
|
TimestampToDatePipeModule,
|
||||||
LocalizedDatePipeModule,
|
MatTooltipModule,
|
||||||
TimestampToDatePipeModule,
|
AvatarModule,
|
||||||
MatTooltipModule,
|
],
|
||||||
AvatarModule,
|
exports: [ChangesComponent, ScrollableModule],
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
ChangesComponent,
|
|
||||||
ScrollableModule,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class ChangesModule { }
|
export class ChangesModule {}
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { ClientKeysComponent } from './client-keys.component';
|
import { ClientKeysComponent } from './client-keys.component';
|
||||||
|
|
||||||
describe('ClientKeysComponent', () => {
|
describe('ClientKeysComponent', () => {
|
||||||
let component: ClientKeysComponent;
|
let component: ClientKeysComponent;
|
||||||
let fixture: ComponentFixture<ClientKeysComponent>;
|
let fixture: ComponentFixture<ClientKeysComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ClientKeysComponent],
|
declarations: [ClientKeysComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ClientKeysComponent);
|
fixture = TestBed.createComponent(ClientKeysComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,16 +1,24 @@
|
|||||||
<div class="contributor-groups">
|
<div class="contributor-groups">
|
||||||
<div class="contributor-people">
|
<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>
|
<mat-spinner class="spinner" diameter="20" *ngIf="loading"></mat-spinner>
|
||||||
<ng-container *ngIf="totalResult < 10; else compact">
|
<ng-container *ngIf="totalResult < 10; else compact">
|
||||||
<ng-container *ngFor="let member of membersSubject | async; index as i">
|
<ng-container *ngFor="let member of membersSubject | async; index as i">
|
||||||
<div @animate (click)="emitShowDetail()" class="contributor-avatar-circle"
|
<div
|
||||||
matTooltip="{{ member.displayName }} | {{member.rolesList | roletransform}}"
|
@animate
|
||||||
[ngStyle]="{'z-index': 20 - i}">
|
(click)="emitShowDetail()"
|
||||||
<cnsl-avatar *ngIf="member && member.displayName && member.firstName && member.lastName; else cog"
|
class="contributor-avatar-circle"
|
||||||
class="contributor-avatar dontcloseonclick" [avatarUrl]="member.avatarUrl|| ''"
|
matTooltip="{{ member.displayName }} | {{ member.rolesList | roletransform }}"
|
||||||
[name]="member.displayName ? member.displayName : (member.firstName + ' '+ member.lastName)"
|
[ngStyle]="{ 'z-index': 20 - i }"
|
||||||
[forColor]="member.preferredLoginName" [size]="32">
|
>
|
||||||
|
<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>
|
</cnsl-avatar>
|
||||||
<ng-template #cog>
|
<ng-template #cog>
|
||||||
<cnsl-avatar [forColor]="member.preferredLoginName" [isMachine]="true">
|
<cnsl-avatar [forColor]="member.preferredLoginName" [isMachine]="true">
|
||||||
@ -22,11 +30,17 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-template #compact>
|
<ng-template #compact>
|
||||||
<div (click)="emitShowDetail()" class="contributor-avatar-circle" matTooltip="Click to show detail">
|
<div (click)="emitShowDetail()" class="contributor-avatar-circle" matTooltip="Click to show detail">
|
||||||
<span>{{totalResult}}</span>
|
<span>{{ totalResult }}</span>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<button class="add-img" [ngClass]="{'no-margin': totalResult === 0}" (click)="emitAddMember()"
|
<button
|
||||||
[disabled]="disabled" mat-icon-button aria-label="Add member">
|
class="add-img"
|
||||||
|
[ngClass]="{ 'no-margin': totalResult === 0 }"
|
||||||
|
(click)="emitAddMember()"
|
||||||
|
[disabled]="disabled"
|
||||||
|
mat-icon-button
|
||||||
|
aria-label="Add member"
|
||||||
|
>
|
||||||
<mat-icon>add</mat-icon>
|
<mat-icon>add</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { ContributorsComponent } from './contributors.component';
|
import { ContributorsComponent } from './contributors.component';
|
||||||
|
|
||||||
describe('ContributorsComponent', () => {
|
describe('ContributorsComponent', () => {
|
||||||
let component: ContributorsComponent;
|
let component: ContributorsComponent;
|
||||||
let fixture: ComponentFixture<ContributorsComponent>;
|
let fixture: ComponentFixture<ContributorsComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ContributorsComponent],
|
declarations: [ContributorsComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(ContributorsComponent);
|
fixture = TestBed.createComponent(ContributorsComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -9,17 +9,18 @@ import { Member } from 'src/app/proto/generated/zitadel/member_pb';
|
|||||||
styleUrls: ['./contributors.component.scss'],
|
styleUrls: ['./contributors.component.scss'],
|
||||||
animations: [
|
animations: [
|
||||||
trigger('cardAnimation', [
|
trigger('cardAnimation', [
|
||||||
transition('* => *', [
|
transition('* => *', [query('@animate', stagger('40ms', animateChild()), { optional: true })]),
|
||||||
query('@animate', stagger('40ms', animateChild()), { optional: true }),
|
|
||||||
]),
|
|
||||||
]),
|
]),
|
||||||
trigger('animate', [
|
trigger('animate', [
|
||||||
transition(':enter', [
|
transition(':enter', [
|
||||||
animate('.2s ease-in', keyframes([
|
animate(
|
||||||
style({ opacity: 0, offset: 0 }),
|
'.2s ease-in',
|
||||||
style({ opacity: .5, transform: 'scale(1.05)', offset: 0.3 }),
|
keyframes([
|
||||||
style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
|
style({ opacity: 0, offset: 0 }),
|
||||||
])),
|
style({ opacity: 0.5, transform: 'scale(1.05)', offset: 0.3 }),
|
||||||
|
style({ opacity: 1, transform: 'scale(1)', offset: 1 }),
|
||||||
|
]),
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
|
@ -8,9 +8,8 @@ describe('CreateLayoutComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ CreateLayoutComponent ]
|
declarations: [CreateLayoutComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -20,6 +20,5 @@
|
|||||||
</div>
|
</div>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { DetailLayoutComponent } from './detail-layout.component';
|
import { DetailLayoutComponent } from './detail-layout.component';
|
||||||
|
|
||||||
describe('DetailLayoutComponent', () => {
|
describe('DetailLayoutComponent', () => {
|
||||||
let component: DetailLayoutComponent;
|
let component: DetailLayoutComponent;
|
||||||
let fixture: ComponentFixture<DetailLayoutComponent>;
|
let fixture: ComponentFixture<DetailLayoutComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DetailLayoutComponent],
|
declarations: [DetailLayoutComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(DetailLayoutComponent);
|
fixture = TestBed.createComponent(DetailLayoutComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,19 +1,29 @@
|
|||||||
<div *ngIf="currentMap">
|
<div *ngIf="currentMap">
|
||||||
<form [formGroup]="form">
|
<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 *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-form-field class="edit-text-formfield">
|
||||||
<cnsl-label>{{key.key}}</cnsl-label>
|
<cnsl-label>{{ key.key }}</cnsl-label>
|
||||||
<textarea class="edit-text-area" cnslInput [formControlName]="key.key"
|
<textarea
|
||||||
[placeholder]="$any(defaultmap[key.key])" [name]="key.key"
|
class="edit-text-area"
|
||||||
[ngClass]="{'defaulttext': form.get(key.key)?.value === ''}"></textarea>
|
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">
|
<div class="edit-text-chips" *ngIf="warnText[key.key] === undefined">
|
||||||
<ng-container *ngFor="let chip of chips">
|
<ng-container *ngFor="let chip of chips">
|
||||||
<div class="chip" cnslCopyToClipboard [valueToCopy]="chip.value" (copiedValue)="copied = $event"
|
<div
|
||||||
(click)="addChip(key.key, chip.value)">
|
class="chip"
|
||||||
<span class="key">{{chip.key | translate}}</span>
|
cnslCopyToClipboard
|
||||||
<span class="value">{{chip.value}}</span>
|
[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"></i>
|
||||||
<i *ngIf="copied === chip.value" class="las la-clipboard-check"></i>
|
<i *ngIf="copied === chip.value" class="las la-clipboard-check"></i>
|
||||||
</div>
|
</div>
|
||||||
@ -21,21 +31,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</cnsl-form-field>
|
</cnsl-form-field>
|
||||||
<div class="edit-text-actions">
|
<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"
|
[disabled]="form.get(key.key)?.value === defaultmap[key.key] || disabled"
|
||||||
(click)="form.get(key.key)?.setValue(defaultmap[key.key])"
|
(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]))"
|
(mouseenter)="
|
||||||
(mouseleave)="setWarnText(key.key, undefined)"><i class="las la-history"></i></button>
|
form.get(key.key)?.value !== defaultmap[key.key] && setWarnText(key.key, $any(defaultmap[key.key]))
|
||||||
<button matTooltip="{{'ACTIONS.RESETCURRENT'| translate }}" mat-icon-button
|
"
|
||||||
|
(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"
|
[disabled]="form.get(key.key)?.value === currentMap[key.key] || disabled"
|
||||||
(click)="form.get(key.key)?.setValue(currentMap[key.key])"
|
(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]))"
|
(mouseenter)="
|
||||||
(mouseleave)="setWarnText(key.key, undefined)"><i class="las la-undo"></i></button>
|
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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<cnsl-info-section *ngIf="warnText[key.key] !== undefined" class="edit-text-info" [type]="InfoSectionType.WARN">
|
<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>
|
</ng-container>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
@ -9,8 +9,7 @@ describe('EditTextComponent', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [EditTextComponent],
|
declarations: [EditTextComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -14,9 +14,7 @@ import { InfoSectionModule } from '../info-section/info-section.module';
|
|||||||
import { EditTextComponent } from './edit-text.component';
|
import { EditTextComponent } from './edit-text.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [EditTextComponent],
|
||||||
EditTextComponent,
|
|
||||||
],
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
InfoSectionModule,
|
InfoSectionModule,
|
||||||
@ -32,8 +30,6 @@ import { EditTextComponent } from './edit-text.component';
|
|||||||
TextFieldModule,
|
TextFieldModule,
|
||||||
CopyToClipboardModule,
|
CopyToClipboardModule,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [EditTextComponent],
|
||||||
EditTextComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class EditTextModule { }
|
export class EditTextModule {}
|
||||||
|
@ -8,9 +8,8 @@ describe('FilterUserComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ FilterUserComponent ]
|
declarations: [FilterUserComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -4,11 +4,11 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
import { take } from 'rxjs';
|
import { take } from 'rxjs';
|
||||||
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
|
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
|
||||||
import {
|
import {
|
||||||
DisplayNameQuery,
|
DisplayNameQuery,
|
||||||
UserGrantOrgNameQuery,
|
UserGrantOrgNameQuery,
|
||||||
UserGrantProjectNameQuery,
|
UserGrantProjectNameQuery,
|
||||||
UserGrantQuery,
|
UserGrantQuery,
|
||||||
UserNameQuery,
|
UserNameQuery,
|
||||||
} from 'src/app/proto/generated/zitadel/user_pb';
|
} from 'src/app/proto/generated/zitadel/user_pb';
|
||||||
|
|
||||||
import { FilterComponent } from '../filter/filter.component';
|
import { FilterComponent } from '../filter/filter.component';
|
||||||
|
@ -8,9 +8,8 @@ describe('FilterUserComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ FilterUserComponent ]
|
declarations: [FilterUserComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -4,12 +4,12 @@ import { ActivatedRoute, Router } from '@angular/router';
|
|||||||
import { take } from 'rxjs';
|
import { take } from 'rxjs';
|
||||||
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
|
import { TextQueryMethod } from 'src/app/proto/generated/zitadel/object_pb';
|
||||||
import {
|
import {
|
||||||
DisplayNameQuery,
|
DisplayNameQuery,
|
||||||
EmailQuery,
|
EmailQuery,
|
||||||
SearchQuery as UserSearchQuery,
|
SearchQuery as UserSearchQuery,
|
||||||
StateQuery,
|
StateQuery,
|
||||||
UserNameQuery,
|
UserNameQuery,
|
||||||
UserState,
|
UserState,
|
||||||
} from 'src/app/proto/generated/zitadel/user_pb';
|
} from 'src/app/proto/generated/zitadel/user_pb';
|
||||||
|
|
||||||
import { FilterComponent } from '../filter/filter.component';
|
import { FilterComponent } from '../filter/filter.component';
|
||||||
|
@ -8,9 +8,8 @@ describe('FilterComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ FilterComponent ]
|
declarations: [FilterComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -8,9 +8,8 @@ describe('FooterComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ FooterComponent ]
|
declarations: [FooterComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -4,14 +4,14 @@ import { animate, AnimationTriggerMetadata, state, style, transition, trigger }
|
|||||||
* Animations used by the CnslFormFieldComponent.
|
* Animations used by the CnslFormFieldComponent.
|
||||||
*/
|
*/
|
||||||
export const cnslFormFieldAnimations: {
|
export const cnslFormFieldAnimations: {
|
||||||
readonly transitionMessages: AnimationTriggerMetadata;
|
readonly transitionMessages: AnimationTriggerMetadata;
|
||||||
} = {
|
} = {
|
||||||
/** Animation that transitions the form field's error and hint messages. */
|
/** Animation that transitions the form field's error and hint messages. */
|
||||||
transitionMessages: trigger('transitionMessages', [
|
transitionMessages: trigger('transitionMessages', [
|
||||||
state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),
|
state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),
|
||||||
transition('void => enter', [
|
transition('void => enter', [
|
||||||
style({ opacity: 0, transform: 'translateY(-100%)' }),
|
style({ opacity: 0, transform: 'translateY(-100%)' }),
|
||||||
animate('3000ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
|
animate('3000ms cubic-bezier(0.55, 0, 0.55, 0.2)'),
|
||||||
]),
|
|
||||||
]),
|
]),
|
||||||
|
]),
|
||||||
};
|
};
|
||||||
|
@ -7,8 +7,8 @@ export const CNSL_ERROR = new InjectionToken<CnslErrorDirective>('CnslError');
|
|||||||
@Directive({
|
@Directive({
|
||||||
selector: '[cnslError]',
|
selector: '[cnslError]',
|
||||||
host: {
|
host: {
|
||||||
'class': 'cnsl-error',
|
class: 'cnsl-error',
|
||||||
'role': 'alert',
|
role: 'alert',
|
||||||
'[attr.id]': 'id',
|
'[attr.id]': 'id',
|
||||||
},
|
},
|
||||||
providers: [{ provide: CNSL_ERROR, useExisting: CnslErrorDirective }],
|
providers: [{ provide: CNSL_ERROR, useExisting: CnslErrorDirective }],
|
||||||
@ -16,5 +16,5 @@ export const CNSL_ERROR = new InjectionToken<CnslErrorDirective>('CnslError');
|
|||||||
export class CnslErrorDirective {
|
export class CnslErrorDirective {
|
||||||
@Input() id: string = `cnsl-error-${nextUniqueId++}`;
|
@Input() id: string = `cnsl-error-${nextUniqueId++}`;
|
||||||
|
|
||||||
constructor() { }
|
constructor() {}
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,15 @@
|
|||||||
<div class="cnsl-form-field-wrapper" (click)="_control.onContainerClick && _control.onContainerClick($event)">
|
<div class="cnsl-form-field-wrapper" (click)="_control.onContainerClick && _control.onContainerClick($event)">
|
||||||
<ng-content select="cnsl-label"></ng-content>
|
<ng-content select="cnsl-label"></ng-content>
|
||||||
<div class="cnsl-rel" #inputContainer>
|
<div class="cnsl-rel" #inputContainer>
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
<ng-content select="cnslSuffix"></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>
|
||||||
<div class="cnsl-form-field-subscript-wrapper" [ngSwitch]="_getDisplayedMessages()">
|
<div *ngSwitchCase="'hint'" class="cnsl-form-field-hint-wrapper" [@transitionMessages]="_subscriptAnimationState">
|
||||||
<div *ngSwitchCase="'error'" class="cnsl-form-field-error-wrapper"
|
<ng-content select="cnsl-hint"></ng-content>
|
||||||
[@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>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { CnslFormFieldComponent } from './form-field.component';
|
import { CnslFormFieldComponent } from './form-field.component';
|
||||||
|
|
||||||
describe('CnslFormFieldComponent', () => {
|
describe('CnslFormFieldComponent', () => {
|
||||||
let component: CnslFormFieldComponent;
|
let component: CnslFormFieldComponent;
|
||||||
let fixture: ComponentFixture<CnslFormFieldComponent>;
|
let fixture: ComponentFixture<CnslFormFieldComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [CnslFormFieldComponent],
|
declarations: [CnslFormFieldComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(CnslFormFieldComponent);
|
fixture = TestBed.createComponent(CnslFormFieldComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -8,20 +8,8 @@ import { CnslErrorDirective } from './error.directive';
|
|||||||
import { CnslFormFieldComponent } from './form-field.component';
|
import { CnslFormFieldComponent } from './form-field.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [CnslFormFieldComponent, CnslErrorDirective],
|
||||||
CnslFormFieldComponent,
|
imports: [CommonModule, MatRippleModule, LabelModule],
|
||||||
CnslErrorDirective,
|
exports: [CnslFormFieldComponent, LabelComponent, CnslErrorDirective],
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
MatRippleModule,
|
|
||||||
LabelModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
CnslFormFieldComponent,
|
|
||||||
LabelComponent,
|
|
||||||
CnslErrorDirective,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class FormFieldModule { }
|
export class FormFieldModule {}
|
||||||
|
|
||||||
|
@ -17,11 +17,6 @@
|
|||||||
$is-dark-theme: map-get($theme, is-dark);
|
$is-dark-theme: map-get($theme, is-dark);
|
||||||
$back: map-get($background, background);
|
$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 {
|
.filter-form {
|
||||||
margin: 0 0.5rem;
|
margin: 0 0.5rem;
|
||||||
color: mat.get-color-from-palette($foreground, text) !important;
|
color: mat.get-color-from-palette($foreground, text) !important;
|
||||||
|
@ -8,9 +8,8 @@ describe('HeaderComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ HeaderComponent ]
|
declarations: [HeaderComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -4,15 +4,15 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { IdpCreateComponent } from './idp-create.component';
|
import { IdpCreateComponent } from './idp-create.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: IdpCreateComponent,
|
component: IdpCreateComponent,
|
||||||
data: { animation: 'DetailPage' },
|
data: { animation: 'DetailPage' },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class IdpCreateRoutingModule { }
|
export class IdpCreateRoutingModule {}
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { IdpCreateComponent } from './idp-create.component';
|
import { IdpCreateComponent } from './idp-create.component';
|
||||||
|
|
||||||
describe('IdpCreateComponent', () => {
|
describe('IdpCreateComponent', () => {
|
||||||
let component: IdpCreateComponent;
|
let component: IdpCreateComponent;
|
||||||
let fixture: ComponentFixture<IdpCreateComponent>;
|
let fixture: ComponentFixture<IdpCreateComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [IdpCreateComponent],
|
declarations: [IdpCreateComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(IdpCreateComponent);
|
fixture = TestBed.createComponent(IdpCreateComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,12 +1,19 @@
|
|||||||
<div class="idp-radio-button-wrapper">
|
<div class="idp-radio-button-wrapper">
|
||||||
<ng-container *ngFor="let type of types">
|
<ng-container *ngFor="let type of types">
|
||||||
<input class="idp mat-elevation-z1" type="radio" (change)="emitChange()" [value]="type" [(ngModel)]="selected" [id]="type.titleI18nKey" />
|
<input
|
||||||
<label class="cnsl-idp-type-radio-button" [for]="type.titleI18nKey">
|
class="idp mat-elevation-z1"
|
||||||
<div class="cnsl-idp-type-radio-header" >
|
type="radio"
|
||||||
<mat-icon class="icon" *ngIf="type.mdi" [svgIcon]="type.mdi"></mat-icon>
|
(change)="emitChange()"
|
||||||
<span class="fill-space"></span>
|
[value]="type"
|
||||||
<span>{{type.titleI18nKey | translate}}</span>
|
[(ngModel)]="selected"
|
||||||
</div>
|
[id]="type.titleI18nKey"
|
||||||
</label>
|
/>
|
||||||
</ng-container>
|
<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>
|
</div>
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export enum IdpCreateType {
|
export enum IdpCreateType {
|
||||||
OIDC = 'OIDC',
|
OIDC = 'OIDC',
|
||||||
JWT = 'JWT',
|
JWT = 'JWT',
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { IdpTableComponent } from './idp-table.component';
|
import { IdpTableComponent } from './idp-table.component';
|
||||||
|
|
||||||
describe('UserTableComponent', () => {
|
describe('UserTableComponent', () => {
|
||||||
let component: IdpTableComponent;
|
let component: IdpTableComponent;
|
||||||
let fixture: ComponentFixture<IdpTableComponent>;
|
let fixture: ComponentFixture<IdpTableComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [IdpTableComponent],
|
declarations: [IdpTableComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(IdpTableComponent);
|
fixture = TestBed.createComponent(IdpTableComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -4,15 +4,15 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { IdpComponent } from './idp.component';
|
import { IdpComponent } from './idp.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: IdpComponent,
|
component: IdpComponent,
|
||||||
data: { animation: 'DetailPage' },
|
data: { animation: 'DetailPage' },
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class IdpRoutingModule { }
|
export class IdpRoutingModule {}
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { IdpComponent } from './idp.component';
|
import { IdpComponent } from './idp.component';
|
||||||
|
|
||||||
describe('IdComponent', () => {
|
describe('IdComponent', () => {
|
||||||
let component: IdpComponent;
|
let component: IdpComponent;
|
||||||
let fixture: ComponentFixture<IdpComponent>;
|
let fixture: ComponentFixture<IdpComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [IdpComponent],
|
declarations: [IdpComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(IdpComponent);
|
fixture = TestBed.createComponent(IdpComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
<div class="context_intro_overlay">
|
<div class="context_intro_overlay">
|
||||||
<div class="overlay-info-row">
|
<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()">
|
<button mat-icon-button (click)="workflowService.reset()">
|
||||||
<mat-icon>close</mat-icon>
|
<mat-icon>close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<p>{{data.i18nText | translate}}</p>
|
<p>{{ data.i18nText | translate }}</p>
|
||||||
<div class="overlay-actions">
|
<div class="overlay-actions">
|
||||||
<button (click)="workflowService.nextStep()" *ngIf="workflowService.nextPossible && !workflowService.isLast"
|
<button
|
||||||
mat-stroked-button>{{'ACTIONS.NEXT' | translate}}</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"
|
<button *ngIf="workflowService.isLast" (click)="workflowService.nextStep()" color="primary" mat-raised-button>
|
||||||
mat-raised-button>{{'ACTIONS.FINISHED' |
|
{{ 'ACTIONS.FINISHED' | translate }}
|
||||||
translate}}</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -8,9 +8,8 @@ describe('InfoOverlayComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ InfoOverlayComponent ]
|
declarations: [InfoOverlayComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -210,6 +210,11 @@
|
|||||||
<p *ngIf="grantedProject && grantedProject.projectId" class="info-row-desc">{{ grantedProject.projectId }}</p>
|
<p *ngIf="grantedProject && grantedProject.projectId" class="info-row-desc">{{ grantedProject.projectId }}</p>
|
||||||
</div>
|
</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">
|
<div class="info-wrapper">
|
||||||
<p class="info-row-title">{{ 'PROJECT.PAGES.CREATEDON' | translate }}</p>
|
<p class="info-row-title">{{ 'PROJECT.PAGES.CREATEDON' | translate }}</p>
|
||||||
<p *ngIf="grantedProject && grantedProject.details && grantedProject.details.creationDate" class="info-row-desc">
|
<p *ngIf="grantedProject && grantedProject.details && grantedProject.details.creationDate" class="info-row-desc">
|
||||||
|
@ -9,8 +9,7 @@ describe('InfoRowComponent', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [InfoRowComponent],
|
declarations: [InfoRowComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -10,12 +10,8 @@ import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/
|
|||||||
|
|
||||||
import { InfoRowComponent } from './info-row.component';
|
import { InfoRowComponent } from './info-row.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [InfoRowComponent],
|
||||||
InfoRowComponent,
|
|
||||||
],
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
@ -26,8 +22,6 @@ import { InfoRowComponent } from './info-row.component';
|
|||||||
LocalizedDatePipeModule,
|
LocalizedDatePipeModule,
|
||||||
TimestampToDatePipeModule,
|
TimestampToDatePipeModule,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [InfoRowComponent],
|
||||||
InfoRowComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class InfoRowModule { }
|
export class InfoRowModule {}
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { InfoSectionComponent } from './info-section.component';
|
import { InfoSectionComponent } from './info-section.component';
|
||||||
|
|
||||||
describe('InfoSectionComponent', () => {
|
describe('InfoSectionComponent', () => {
|
||||||
let component: InfoSectionComponent;
|
let component: InfoSectionComponent;
|
||||||
let fixture: ComponentFixture<InfoSectionComponent>;
|
let fixture: ComponentFixture<InfoSectionComponent>;
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [InfoSectionComponent],
|
declarations: [InfoSectionComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(InfoSectionComponent);
|
fixture = TestBed.createComponent(InfoSectionComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -5,17 +5,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { InfoSectionComponent } from './info-section.component';
|
import { InfoSectionComponent } from './info-section.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [InfoSectionComponent],
|
declarations: [InfoSectionComponent],
|
||||||
imports: [
|
imports: [CommonModule, TranslateModule, RouterModule],
|
||||||
CommonModule,
|
exports: [InfoSectionComponent],
|
||||||
TranslateModule,
|
|
||||||
RouterModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
InfoSectionComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class InfoSectionModule { }
|
export class InfoSectionModule {}
|
||||||
|
@ -1,19 +1,18 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms';
|
import { UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms';
|
||||||
|
|
||||||
|
|
||||||
/** Provider that defines how form controls behave with regards to displaying error messages. */
|
/** Provider that defines how form controls behave with regards to displaying error messages. */
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class ErrorStateMatcher {
|
export class ErrorStateMatcher {
|
||||||
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
|
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
|
||||||
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
|
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Error state matcher that matches when a control is invalid and dirty. */
|
/** Error state matcher that matches when a control is invalid and dirty. */
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {
|
export class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {
|
||||||
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
|
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
|
||||||
return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
|
return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,16 +7,10 @@ import { LabelModule } from '../label/label.module';
|
|||||||
import { ErrorStateMatcher } from './error-options';
|
import { ErrorStateMatcher } from './error-options';
|
||||||
import { InputDirective } from './input.directive';
|
import { InputDirective } from './input.directive';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [InputDirective],
|
declarations: [InputDirective],
|
||||||
imports: [
|
imports: [LabelModule, CommonModule, FormFieldModule, MatRippleModule],
|
||||||
LabelModule,
|
exports: [InputDirective, FormFieldModule],
|
||||||
CommonModule,
|
providers: [ErrorStateMatcher],
|
||||||
FormFieldModule,
|
|
||||||
MatRippleModule,
|
|
||||||
],
|
|
||||||
exports: [InputDirective, FormFieldModule],
|
|
||||||
providers: [ErrorStateMatcher],
|
|
||||||
})
|
})
|
||||||
export class InputModule { }
|
export class InputModule {}
|
||||||
|
@ -8,9 +8,8 @@ describe('KeyboardShortcutsComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ KeyboardShortcutsComponent ]
|
declarations: [KeyboardShortcutsComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
<span class="cnsl-label">
|
<span class="cnsl-label">
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</span>
|
</span>
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { AvatarComponent } from './avatar.component';
|
import { AvatarComponent } from './avatar.component';
|
||||||
|
|
||||||
describe('AvatarComponent', () => {
|
describe('AvatarComponent', () => {
|
||||||
let component: AvatarComponent;
|
let component: AvatarComponent;
|
||||||
let fixture: ComponentFixture<AvatarComponent>;
|
let fixture: ComponentFixture<AvatarComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [AvatarComponent],
|
declarations: [AvatarComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(AvatarComponent);
|
fixture = TestBed.createComponent(AvatarComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'cnsl-label',
|
selector: 'cnsl-label',
|
||||||
templateUrl: './label.component.html',
|
templateUrl: './label.component.html',
|
||||||
styleUrls: ['./label.component.scss'],
|
styleUrls: ['./label.component.scss'],
|
||||||
})
|
})
|
||||||
export class LabelComponent {
|
export class LabelComponent {
|
||||||
constructor() { }
|
constructor() {}
|
||||||
}
|
}
|
||||||
|
@ -4,17 +4,9 @@ import { MatRippleModule } from '@angular/material/core';
|
|||||||
|
|
||||||
import { LabelComponent } from './label.component';
|
import { LabelComponent } from './label.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [LabelComponent],
|
declarations: [LabelComponent],
|
||||||
imports: [
|
imports: [CommonModule, MatRippleModule],
|
||||||
CommonModule,
|
exports: [LabelComponent],
|
||||||
MatRippleModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
LabelComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class LabelModule { }
|
export class LabelModule {}
|
||||||
|
|
||||||
|
@ -1,8 +1,17 @@
|
|||||||
<cnsl-refresh-table [loading]="loading$ | async" (refreshed)="refreshPage()" [dataSize]="dataSource.data.length"
|
<cnsl-refresh-table
|
||||||
[timestamp]="keyResult?.details?.viewTimestamp" [selection]="selection">
|
[loading]="loading$ | async"
|
||||||
|
(refreshed)="refreshPage()"
|
||||||
|
[dataSize]="dataSource.data.length"
|
||||||
|
[timestamp]="keyResult?.details?.viewTimestamp"
|
||||||
|
[selection]="selection"
|
||||||
|
>
|
||||||
<div actions>
|
<div actions>
|
||||||
<a [disabled]="([('user.write:' + userId), 'user.write'] | hasRole | async) === false" color="primary"
|
<a
|
||||||
mat-raised-button (click)="openAddKey()">
|
[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 }}
|
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@ -11,39 +20,46 @@
|
|||||||
<table class="table" mat-table [dataSource]="dataSource">
|
<table class="table" mat-table [dataSource]="dataSource">
|
||||||
<ng-container matColumnDef="select">
|
<ng-container matColumnDef="select">
|
||||||
<th mat-header-cell *matHeaderCellDef>
|
<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()"
|
[checked]="selection.hasValue() && isAllSelected()"
|
||||||
[indeterminate]="selection.hasValue() && !isAllSelected()">
|
[indeterminate]="selection.hasValue() && !isAllSelected()"
|
||||||
|
>
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
</th>
|
</th>
|
||||||
<td mat-cell *matCellDef="let key">
|
<td mat-cell *matCellDef="let key">
|
||||||
<mat-checkbox color="primary" (click)="$event.stopPropagation()"
|
<mat-checkbox
|
||||||
(change)="$event ? selection.toggle(key) : null" [checked]="selection.isSelected(key)">
|
color="primary"
|
||||||
|
(click)="$event.stopPropagation()"
|
||||||
|
(change)="$event ? selection.toggle(key) : null"
|
||||||
|
[checked]="selection.isSelected(key)"
|
||||||
|
>
|
||||||
</mat-checkbox>
|
</mat-checkbox>
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="id">
|
<ng-container matColumnDef="id">
|
||||||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.ID' | translate }} </th>
|
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.ID' | translate }}</th>
|
||||||
<td mat-cell *matCellDef="let key"> {{key?.id}} </td>
|
<td mat-cell *matCellDef="let key">{{ key?.id }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="type">
|
<ng-container matColumnDef="type">
|
||||||
<th mat-header-cell *matHeaderCellDef> {{ 'USER.MACHINE.TYPE' | translate }} </th>
|
<th mat-header-cell *matHeaderCellDef>{{ 'USER.MACHINE.TYPE' | translate }}</th>
|
||||||
<td mat-cell *matCellDef="let key"> {{'USER.MACHINE.KEYTYPES.'+key?.type | translate}} </td>
|
<td mat-cell *matCellDef="let key">{{ 'USER.MACHINE.KEYTYPES.' + key?.type | translate }}</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="creationDate">
|
<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">
|
<td mat-cell *matCellDef="let key">
|
||||||
{{key.details?.creationDate | timestampToDate | localizedDate: 'fromNow'}}
|
{{ key.details?.creationDate | timestampToDate | localizedDate: 'fromNow' }}
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="expirationDate">
|
<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">
|
<td mat-cell *matCellDef="let key">
|
||||||
{{key.expirationDate | timestampToDate | localizedDate: 'fromNow'}}
|
{{ key.expirationDate | timestampToDate | localizedDate: 'fromNow' }}
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
@ -51,8 +67,14 @@
|
|||||||
<th mat-header-cell *matHeaderCellDef></th>
|
<th mat-header-cell *matHeaderCellDef></th>
|
||||||
<td mat-cell *matCellDef="let key">
|
<td mat-cell *matCellDef="let key">
|
||||||
<cnsl-table-actions>
|
<cnsl-table-actions>
|
||||||
<button actions [disabled]="([('user.write:' + userId), 'user.write'] | hasRole | async) === false"
|
<button
|
||||||
mat-icon-button color="warn" matTooltip="{{'ACTIONS.DELETE' | translate}}" (click)="deleteKey(key)">
|
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>
|
<i class="las la-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</cnsl-table-actions>
|
</cnsl-table-actions>
|
||||||
@ -60,13 +82,16 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||||
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns;">
|
<tr class="highlight" mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<cnsl-paginator #paginator class="paginator" [timestamp]="keyResult?.details?.viewTimestamp"
|
<cnsl-paginator
|
||||||
[length]="keyResult?.details?.totalResult || 0" [pageSize]="20" [pageSizeOptions]="[10, 20, 50, 100]"
|
#paginator
|
||||||
(page)="changePage()"></cnsl-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>
|
</cnsl-refresh-table>
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { MachineKeysComponent } from './machine-keys.component';
|
import { MachineKeysComponent } from './machine-keys.component';
|
||||||
|
|
||||||
describe('MachineKeysComponent', () => {
|
describe('MachineKeysComponent', () => {
|
||||||
let component: MachineKeysComponent;
|
let component: MachineKeysComponent;
|
||||||
let fixture: ComponentFixture<MachineKeysComponent>;
|
let fixture: ComponentFixture<MachineKeysComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [MachineKeysComponent],
|
declarations: [MachineKeysComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(MachineKeysComponent);
|
fixture = TestBed.createComponent(MachineKeysComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -9,14 +9,12 @@ describe('MembersTableComponent', () => {
|
|||||||
let component: MembersTableComponent;
|
let component: MembersTableComponent;
|
||||||
let fixture: ComponentFixture<MembersTableComponent>;
|
let fixture: ComponentFixture<MembersTableComponent>;
|
||||||
|
|
||||||
beforeEach(
|
beforeEach(waitForAsync(() => {
|
||||||
waitForAsync(() => {
|
TestBed.configureTestingModule({
|
||||||
TestBed.configureTestingModule({
|
declarations: [MembersTableComponent],
|
||||||
declarations: [MembersTableComponent],
|
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
|
||||||
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
|
}).compileComponents();
|
||||||
}).compileComponents();
|
}));
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(MembersTableComponent);
|
fixture = TestBed.createComponent(MembersTableComponent);
|
||||||
|
@ -9,14 +9,12 @@ describe('MembershipsTableComponent', () => {
|
|||||||
let component: MembershipsTableComponent;
|
let component: MembershipsTableComponent;
|
||||||
let fixture: ComponentFixture<MembershipsTableComponent>;
|
let fixture: ComponentFixture<MembershipsTableComponent>;
|
||||||
|
|
||||||
beforeEach(
|
beforeEach(waitForAsync(() => {
|
||||||
waitForAsync(() => {
|
TestBed.configureTestingModule({
|
||||||
TestBed.configureTestingModule({
|
declarations: [MembershipsTableComponent],
|
||||||
declarations: [MembershipsTableComponent],
|
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
|
||||||
imports: [NoopAnimationsModule, MatSortModule, MatTableModule],
|
}).compileComponents();
|
||||||
}).compileComponents();
|
}));
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(MembershipsTableComponent);
|
fixture = TestBed.createComponent(MembershipsTableComponent);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div class="meta-wrapper">
|
<div class="meta-wrapper">
|
||||||
<div class="main-content" [ngClass]="{'hidden': (hidden)}">
|
<div class="main-content" [ngClass]="{ hidden: hidden }">
|
||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta" [ngClass]="{'hidden': hidden}">
|
<div class="meta" [ngClass]="{ hidden: hidden }">
|
||||||
<ng-content class="meta-content" select="[metainfo]"></ng-content>
|
<ng-content class="meta-content" select="[metainfo]"></ng-content>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { MetaLayoutComponent } from './meta-layout.component';
|
import { MetaLayoutComponent } from './meta-layout.component';
|
||||||
|
|
||||||
describe('MetaLayoutComponent', () => {
|
describe('MetaLayoutComponent', () => {
|
||||||
let component: MetaLayoutComponent;
|
let component: MetaLayoutComponent;
|
||||||
let fixture: ComponentFixture<MetaLayoutComponent>;
|
let fixture: ComponentFixture<MetaLayoutComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [MetaLayoutComponent],
|
declarations: [MetaLayoutComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(MetaLayoutComponent);
|
fixture = TestBed.createComponent(MetaLayoutComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -9,14 +9,13 @@ import { map } from 'rxjs/operators';
|
|||||||
styleUrls: ['./meta-layout.component.scss'],
|
styleUrls: ['./meta-layout.component.scss'],
|
||||||
})
|
})
|
||||||
export class MetaLayoutComponent {
|
export class MetaLayoutComponent {
|
||||||
|
|
||||||
constructor(private breakpointObserver: BreakpointObserver) {
|
constructor(private breakpointObserver: BreakpointObserver) {
|
||||||
this.isSmallScreen$.subscribe(small => this.hidden = small);
|
this.isSmallScreen$.subscribe((small) => (this.hidden = small));
|
||||||
}
|
}
|
||||||
public hidden: boolean = false;
|
public hidden: boolean = false;
|
||||||
public isSmallScreen$: Observable<boolean> = this.breakpointObserver
|
public isSmallScreen$: Observable<boolean> = this.breakpointObserver.observe('(max-width: 1000px)').pipe(
|
||||||
.observe('(max-width: 1000px)')
|
map((result) => {
|
||||||
.pipe(map(result => {
|
|
||||||
return result.matches;
|
return result.matches;
|
||||||
}));
|
}),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -5,15 +5,9 @@ import { MatButtonModule } from '@angular/material/button';
|
|||||||
|
|
||||||
import { MetaLayoutComponent } from './meta-layout.component';
|
import { MetaLayoutComponent } from './meta-layout.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [MetaLayoutComponent],
|
declarations: [MetaLayoutComponent],
|
||||||
imports: [
|
imports: [CommonModule, MatButtonModule, LayoutModule],
|
||||||
CommonModule,
|
exports: [MetaLayoutComponent],
|
||||||
MatButtonModule,
|
|
||||||
LayoutModule,
|
|
||||||
],
|
|
||||||
exports: [MetaLayoutComponent],
|
|
||||||
})
|
})
|
||||||
export class MetaLayoutModule { }
|
export class MetaLayoutModule {}
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
.title-row {
|
.title-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin: .5rem 0;
|
margin: 0.5rem 0;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
letter-spacing: .05em;
|
letter-spacing: 0.05em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@ -28,13 +28,13 @@
|
|||||||
|
|
||||||
.meta-row {
|
.meta-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: .5rem;
|
margin-bottom: 0.5rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.first {
|
.first {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin-right: .5rem;
|
margin-right: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fill-space {
|
.fill-space {
|
||||||
|
@ -6,13 +6,11 @@ describe('NameDialogComponent', () => {
|
|||||||
let component: NameDialogComponent;
|
let component: NameDialogComponent;
|
||||||
let fixture: ComponentFixture<NameDialogComponent>;
|
let fixture: ComponentFixture<NameDialogComponent>;
|
||||||
|
|
||||||
beforeEach(
|
beforeEach(waitForAsync(() => {
|
||||||
waitForAsync(() => {
|
TestBed.configureTestingModule({
|
||||||
TestBed.configureTestingModule({
|
declarations: [NameDialogComponent],
|
||||||
declarations: [NameDialogComponent],
|
}).compileComponents();
|
||||||
}).compileComponents();
|
}));
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(NameDialogComponent);
|
fixture = TestBed.createComponent(NameDialogComponent);
|
||||||
|
@ -8,8 +8,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|||||||
})
|
})
|
||||||
export class NameDialogComponent {
|
export class NameDialogComponent {
|
||||||
public name: string = '';
|
public name: string = '';
|
||||||
constructor(public dialogRef: MatDialogRef<NameDialogComponent>,
|
constructor(public dialogRef: MatDialogRef<NameDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: any) {
|
||||||
@Inject(MAT_DIALOG_DATA) public data: any) {
|
|
||||||
this.name = data.name ?? '';
|
this.name = data.name ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,19 +9,8 @@ import { InputModule } from '../input/input.module';
|
|||||||
import { NameDialogComponent } from './name-dialog.component';
|
import { NameDialogComponent } from './name-dialog.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [NameDialogComponent],
|
||||||
NameDialogComponent,
|
imports: [CommonModule, MatDialogModule, MatButtonModule, TranslateModule, InputModule, FormsModule],
|
||||||
],
|
exports: [NameDialogComponent],
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
MatDialogModule,
|
|
||||||
MatButtonModule,
|
|
||||||
TranslateModule,
|
|
||||||
InputModule,
|
|
||||||
FormsModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
NameDialogComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class NameDialogModule { }
|
export class NameDialogModule {}
|
||||||
|
@ -8,9 +8,8 @@ describe('NavToggleComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ NavToggleComponent ]
|
declarations: [NavToggleComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
|
|
||||||
fixture = TestBed.createComponent(NavToggleComponent);
|
fixture = TestBed.createComponent(NavToggleComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
@ -9,8 +9,7 @@ describe('NavComponent', () => {
|
|||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [NavComponent],
|
declarations: [NavComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -42,6 +42,8 @@
|
|||||||
|
|
||||||
.show-all {
|
.show-all {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
color: mat.get-color-from-palette($foreground, text);
|
||||||
|
border-top: 1px solid map-get($foreground, divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-wrapper {
|
.org-wrapper {
|
||||||
|
@ -6,13 +6,11 @@ describe('OrgContextComponent', () => {
|
|||||||
let component: OrgContextComponent;
|
let component: OrgContextComponent;
|
||||||
let fixture: ComponentFixture<OrgContextComponent>;
|
let fixture: ComponentFixture<OrgContextComponent>;
|
||||||
|
|
||||||
beforeEach(
|
beforeEach(waitForAsync(() => {
|
||||||
waitForAsync(() => {
|
TestBed.configureTestingModule({
|
||||||
TestBed.configureTestingModule({
|
declarations: [OrgContextComponent],
|
||||||
declarations: [OrgContextComponent],
|
}).compileComponents();
|
||||||
}).compileComponents();
|
}));
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(OrgContextComponent);
|
fixture = TestBed.createComponent(OrgContextComponent);
|
||||||
|
@ -49,10 +49,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stylelint-disable */
|
|
||||||
::ng-deep .paginator-select.mat-select {
|
::ng-deep .paginator-select.mat-select {
|
||||||
min-width: 60px;
|
min-width: 60px;
|
||||||
height: 36px !important;
|
height: 36px !important;
|
||||||
padding-top: 8px !important;
|
padding-top: 8px !important;
|
||||||
}
|
}
|
||||||
/* stylelint-enable */
|
|
||||||
|
@ -8,9 +8,8 @@ describe('PaginatorComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ PaginatorComponent ],
|
declarations: [PaginatorComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -10,22 +10,18 @@ import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/
|
|||||||
import { FormFieldModule } from '../form-field/form-field.module';
|
import { FormFieldModule } from '../form-field/form-field.module';
|
||||||
import { PaginatorComponent } from './paginator.component';
|
import { PaginatorComponent } from './paginator.component';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [PaginatorComponent],
|
declarations: [PaginatorComponent],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
TimestampToDatePipeModule,
|
TimestampToDatePipeModule,
|
||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
MatSelectModule,
|
MatSelectModule,
|
||||||
LocalizedDatePipeModule,
|
LocalizedDatePipeModule,
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [PaginatorComponent],
|
||||||
PaginatorComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class PaginatorModule { }
|
export class PaginatorModule {}
|
||||||
|
@ -3,23 +3,22 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
|||||||
import { PasswordComplexityViewComponent } from './password-complexity-view.component';
|
import { PasswordComplexityViewComponent } from './password-complexity-view.component';
|
||||||
|
|
||||||
describe('PasswordComplexityViewComponent', () => {
|
describe('PasswordComplexityViewComponent', () => {
|
||||||
let component: PasswordComplexityViewComponent;
|
let component: PasswordComplexityViewComponent;
|
||||||
let fixture: ComponentFixture<PasswordComplexityViewComponent>;
|
let fixture: ComponentFixture<PasswordComplexityViewComponent>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [PasswordComplexityViewComponent],
|
declarations: [PasswordComplexityViewComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
}));
|
||||||
}));
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(PasswordComplexityViewComponent);
|
fixture = TestBed.createComponent(PasswordComplexityViewComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create', () => {
|
it('should create', () => {
|
||||||
expect(component).toBeTruthy();
|
expect(component).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -6,17 +6,9 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
|
|
||||||
import { PasswordComplexityViewComponent } from './password-complexity-view.component';
|
import { PasswordComplexityViewComponent } from './password-complexity-view.component';
|
||||||
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [PasswordComplexityViewComponent],
|
declarations: [PasswordComplexityViewComponent],
|
||||||
imports: [
|
imports: [CommonModule, MatProgressSpinnerModule, TranslateModule, FormsModule],
|
||||||
CommonModule,
|
exports: [PasswordComplexityViewComponent],
|
||||||
MatProgressSpinnerModule,
|
|
||||||
TranslateModule,
|
|
||||||
FormsModule,
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
PasswordComplexityViewComponent,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class PasswordComplexityViewModule { }
|
export class PasswordComplexityViewModule {}
|
||||||
|
@ -8,9 +8,8 @@ describe('PersonalAccessTokensComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ PersonalAccessTokensComponent ]
|
declarations: [PersonalAccessTokensComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -2,9 +2,9 @@ import { Component, Injector, Input, OnDestroy, OnInit, Type } from '@angular/co
|
|||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import { Subscription } from 'rxjs';
|
import { Subscription } from 'rxjs';
|
||||||
import {
|
import {
|
||||||
AddCustomDomainPolicyRequest,
|
AddCustomDomainPolicyRequest,
|
||||||
GetCustomOrgIAMPolicyResponse,
|
GetCustomOrgIAMPolicyResponse,
|
||||||
UpdateDomainPolicyRequest,
|
UpdateDomainPolicyRequest,
|
||||||
} from 'src/app/proto/generated/zitadel/admin_pb';
|
} from 'src/app/proto/generated/zitadel/admin_pb';
|
||||||
import { GetOrgIAMPolicyResponse } from 'src/app/proto/generated/zitadel/management_pb';
|
import { GetOrgIAMPolicyResponse } from 'src/app/proto/generated/zitadel/management_pb';
|
||||||
import { Org } from 'src/app/proto/generated/zitadel/org_pb';
|
import { Org } from 'src/app/proto/generated/zitadel/org_pb';
|
||||||
|
@ -8,9 +8,8 @@ describe('GeneralSettingsComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
declarations: [ GeneralSettingsComponent ]
|
declarations: [GeneralSettingsComponent],
|
||||||
})
|
}).compileComponents();
|
||||||
.compileComponents();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
@ -6,16 +6,16 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|||||||
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
import { PolicyComponentServiceType } from 'src/app/modules/policies/policy-component-types.enum';
|
||||||
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component';
|
||||||
import {
|
import {
|
||||||
AddMultiFactorToLoginPolicyRequest as AdminAddMultiFactorToLoginPolicyRequest,
|
AddMultiFactorToLoginPolicyRequest as AdminAddMultiFactorToLoginPolicyRequest,
|
||||||
AddSecondFactorToLoginPolicyRequest as AdminAddSecondFactorToLoginPolicyRequest,
|
AddSecondFactorToLoginPolicyRequest as AdminAddSecondFactorToLoginPolicyRequest,
|
||||||
RemoveMultiFactorFromLoginPolicyRequest as AdminRemoveMultiFactorFromLoginPolicyRequest,
|
RemoveMultiFactorFromLoginPolicyRequest as AdminRemoveMultiFactorFromLoginPolicyRequest,
|
||||||
RemoveSecondFactorFromLoginPolicyRequest as AdminRemoveSecondFactorFromLoginPolicyRequest,
|
RemoveSecondFactorFromLoginPolicyRequest as AdminRemoveSecondFactorFromLoginPolicyRequest,
|
||||||
} from 'src/app/proto/generated/zitadel/admin_pb';
|
} from 'src/app/proto/generated/zitadel/admin_pb';
|
||||||
import {
|
import {
|
||||||
AddMultiFactorToLoginPolicyRequest as MgmtAddMultiFactorToLoginPolicyRequest,
|
AddMultiFactorToLoginPolicyRequest as MgmtAddMultiFactorToLoginPolicyRequest,
|
||||||
AddSecondFactorToLoginPolicyRequest as MgmtAddSecondFactorToLoginPolicyRequest,
|
AddSecondFactorToLoginPolicyRequest as MgmtAddSecondFactorToLoginPolicyRequest,
|
||||||
RemoveMultiFactorFromLoginPolicyRequest as MgmtRemoveMultiFactorFromLoginPolicyRequest,
|
RemoveMultiFactorFromLoginPolicyRequest as MgmtRemoveMultiFactorFromLoginPolicyRequest,
|
||||||
RemoveSecondFactorFromLoginPolicyRequest as MgmtRemoveSecondFactorFromLoginPolicyRequest,
|
RemoveSecondFactorFromLoginPolicyRequest as MgmtRemoveSecondFactorFromLoginPolicyRequest,
|
||||||
} from 'src/app/proto/generated/zitadel/management_pb';
|
} from 'src/app/proto/generated/zitadel/management_pb';
|
||||||
import { MultiFactorType, SecondFactorType } from 'src/app/proto/generated/zitadel/policy_pb';
|
import { MultiFactorType, SecondFactorType } from 'src/app/proto/generated/zitadel/policy_pb';
|
||||||
import { AdminService } from 'src/app/services/admin.service';
|
import { AdminService } from 'src/app/services/admin.service';
|
||||||
|
@ -4,17 +4,17 @@ import { RouterModule, Routes } from '@angular/router';
|
|||||||
import { LoginPolicyComponent } from './login-policy.component';
|
import { LoginPolicyComponent } from './login-policy.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: LoginPolicyComponent,
|
component: LoginPolicyComponent,
|
||||||
data: {
|
data: {
|
||||||
animation: 'DetailPage',
|
animation: 'DetailPage',
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forChild(routes)],
|
imports: [RouterModule.forChild(routes)],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
export class LoginPolicyRoutingModule { }
|
export class LoginPolicyRoutingModule {}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user