fix(console): refactoring (#197)

* return error from changes

* project member context, org-policies, state

* project type seperation

* chore(deps): bump grpc from 1.24.2 to 1.24.3 in /console (#183)

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

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

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

* chore(deps): bump google-proto-files from 1.1.2 to 2.1.0 in /console (#176)

Bumps [google-proto-files](https://github.com/googleapis/nodejs-proto-files) from 1.1.2 to 2.1.0.
- [Release notes](https://github.com/googleapis/nodejs-proto-files/releases)
- [Changelog](https://github.com/googleapis/nodejs-proto-files/blob/master/CHANGELOG.md)
- [Commits](https://github.com/googleapis/nodejs-proto-files/compare/v1.1.2...v2.1.0)

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

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

* chore(deps-dev): bump karma-coverage-istanbul-reporter in /console (#169)

Bumps [karma-coverage-istanbul-reporter](https://github.com/mattlewis92/karma-coverage-istanbul-reporter) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/releases)
- [Changelog](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v3.0.2...v3.0.3)

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

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

* update packages

* update deps

* lint

* replace assets

* add key, creationdate for roles

* project grant members

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Max Peintner
2020-06-10 12:59:12 +02:00
committed by GitHub
co-authored by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent e0fb19b4e9
commit 2d369fbcd3
51 changed files with 1051 additions and 1376 deletions
@@ -13,22 +13,20 @@
<div class="container">
<div matTooltip="{{'ORG.PAGES.SELECTORGTOOLTIP' | translate}}" class="item card"
*ngFor="let org of orgList; index as i" (click)="selectOrg(org, $event)"
[ngClass]="{ selected: selection.isSelected(org) }">
[ngClass]="{ selected: selection.isSelected(org),active: activeOrg?.id === org?.id }">
<!-- <mat-icon matTooltip="select org" (click)="selection.toggle(org)" class="selection-icon">
check_circle</mat-icon> -->
<div class="text-part">
<span *ngIf="org?.changeDate" class="top">last modified on
<!-- <span *ngIf="org?.changeDate" class="top">last modified on
{{
dateFromTimestamp(org.changeDate) | date: 'EEE dd. MMM, HH:mm'
}}</span>
}}</span> -->
<span class="description">{{org.id}}</span>
<span class="name" *ngIf="org.name">{{ org.name }}</span>
<span class="name" *ngIf="!org.name">No Name</span>
<span class="description">{{org.id}}</span>
<span class="fill-space"></span>
<div class="icons">
<div class="current" *ngIf="activeOrg?.id === org?.id">
<span>{{'ORG.PAGES.ACTIVE' | translate}}</span></div>
</div>
</div>
<button [matMenuTriggerFor]="editMenu" class="edit-button" mat-icon-button>
@@ -37,12 +35,12 @@
<mat-menu #editMenu="matMenu">
<ng-template matMenuContent>
<button (click)="selectOrg(org)" mat-menu-item>
<button (click)="routeToOrg(org)" mat-menu-item>
{{'ACTIONS.VIEW' | translate}}
</button>
<button (click)="selection.toggle(org)" mat-menu-item>
<!-- <button (click)="selection.toggle(org)" mat-menu-item>
{{'ACTIONS.INFO' | translate}}
</button>
</button> -->
</ng-template>
</mat-menu>
</div>
@@ -52,6 +52,10 @@ h1 {
box-sizing: border-box;
}
&.active {
border-color: #db4c69;
}
.selection-icon {
opacity: 0;
position: absolute;
@@ -88,6 +92,7 @@ h1 {
.description {
font-size: 0.8rem;
margin-top: .5rem;
}
.created {
@@ -120,6 +125,7 @@ h1 {
.current {
height: 10px;
font-size: 14px;
width: 10px;
border-radius: 50%;
background-color: rgb(144,212,210);
@@ -42,10 +42,14 @@ export class OrgGridComponent {
public selectOrg(item: Org.AsObject, event?: any): void {
if (event && !event.target.classList.contains('mat-icon')) {
this.authService.setActiveOrg(item);
this.router.navigate(['/orgs', item.id]);
this.routeToOrg(item);
}
}
public routeToOrg(item: Org.AsObject): void {
this.router.navigate(['/orgs', item.id]);
}
public dateFromTimestamp(date: Timestamp.AsObject): any {
const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000);
return ts;
@@ -31,6 +31,7 @@ export class OrgMembersDataSource extends DataSource<OrgMember.AsObject> {
catchError(() => of([])),
finalize(() => this.loadingSubject.next(false)),
).subscribe(members => {
console.log(members);
this.membersSubject.next(members);
});
}
@@ -3,7 +3,7 @@
<p class="top-desc">{{'ORG.POLICY.DESCRIPTION' | translate}}</p>
<div class="row-lyt">
<div class="p-item card">
<!-- <div class="p-item card">
<div class="avatar">
<mat-icon svgIcon="mdi_lock_reset"></mat-icon>
</div>
@@ -38,7 +38,7 @@
<button [disabled]="!agePolicy" [routerLink]="[ 'policy', PolicyComponentType.AGE ]"
mat-raised-button>{{'ORG.POLICY.BTN_EDIT' | translate}}</button>
</div>
</div>
</div> -->
<div class="p-item card">
<div class="avatar">
<mat-icon svgIcon="mdi_textbox_password"></mat-icon>
@@ -70,7 +70,7 @@
mat-raised-button>{{'ORG.POLICY.BTN_EDIT' | translate}}</button>
</div>
</div>
<div class="p-item card">
<!-- <div class="p-item card">
<div class="avatar">
<mat-icon svgIcon="mdi_lock_question"></mat-icon>
</div>
@@ -98,5 +98,5 @@
<button [disabled]="!lockoutPolicy" [routerLink]="[ 'policy', PolicyComponentType.LOCKOUT ]"
mat-raised-button>{{'ORG.POLICY.BTN_EDIT' | translate}}</button>
</div>
</div>
</div> -->
</div>
@@ -32,8 +32,8 @@ export class PolicyGridComponent implements OnInit {
}
private getData(): void {
this.orgService.GetPasswordLockoutPolicy().then(data => this.lockoutPolicy = data.toObject()).catch(error => { });
this.orgService.GetPasswordAgePolicy().then(data => this.agePolicy = data.toObject()).catch(error => { });
// this.orgService.GetPasswordLockoutPolicy().then(data => this.lockoutPolicy = data.toObject()).catch(error => { });
// this.orgService.GetPasswordAgePolicy().then(data => this.agePolicy = data.toObject()).catch(error => { });
this.orgService.GetPasswordComplexityPolicy().then(data => this.complexityPolicy = data.toObject())
.catch(error => { });
}