feat: console feature api (#1480)

This commit is contained in:
Max Peintner
2021-03-27 09:37:57 +01:00
committed by GitHub
parent c0b37924c8
commit 0a058a821e
70 changed files with 831 additions and 132 deletions
@@ -273,7 +273,6 @@ export class AppCreateComponent implements OnInit, OnDestroy {
private async getData({ projectid }: Params): Promise<void> {
this.projectId = projectid;
console.log(this.projectId);
this.oidcAppRequest.projectId = projectid;
this.apiAppRequest.projectId = projectid;
}
@@ -39,13 +39,13 @@
<form *ngIf="app && editState" [formGroup]="appNameForm">
<div class="name-content">
<mat-button-toggle-group formControlName="state" class="toggle" (change)="changeState($event)">
<mat-button-toggle [value]="AppState.APPSTATE_INACTIVE"
<mat-button-toggle [value]="AppState.APP_STATE_INACTIVE"
matTooltip="{{ 'ACTIONS.DEACTIVATE' | translate}}">
{{'APP.PAGES.DETAIL.STATE.'+AppState.APPSTATE_INACTIVE | translate}}
{{'APP.PAGES.DETAIL.STATE.'+AppState.APP_STATE_INACTIVE | translate}}
</mat-button-toggle>
<mat-button-toggle [value]="AppState.APPSTATE_ACTIVE"
matTooltip="{{ 'ACTIONS.REACTIVATE' | translate}}">
{{'APP.PAGES.DETAIL.STATE.'+AppState.APPSTATE_ACTIVE | translate}}
{{'APP.PAGES.DETAIL.STATE.'+AppState.APP_STATE_ACTIVE | translate}}
</mat-button-toggle>
</mat-button-toggle-group>
@@ -211,7 +211,6 @@ export class AppDetailComponent implements OnInit, OnDestroy {
this.mgmtService.getAppByID(projectid, id).then(app => {
if (app.app) {
this.app = app.app;
console.log(this.app);
this.appNameForm.patchValue(this.app);
if (this.app.oidcConfig) {
@@ -301,7 +300,6 @@ export class AppDetailComponent implements OnInit, OnDestroy {
const snackRef = this.snackbar.open(message, action, { duration: 5000, verticalPosition: 'top' });
snackRef.onAction().subscribe(() => {
console.log(this.app);
if (this.app.oidcConfig) {
this.saveOIDCApp();
} else if (this.app.apiConfig) {
@@ -29,7 +29,7 @@
<div class="meta-details">
<div class="meta-row">
<span class="first">{{'RESOURCEID' | translate}}:</span>
<span *ngIf="projectId" class="second">{{ projectId }}</span>
<span *ngIf="projectId" class="second">{{ project?.grantId }}</span>
</div>
<div class="meta-row">
<span class="first">{{'PROJECT.STATE.TITLE' | translate}}:</span>
@@ -91,7 +91,6 @@ export class GrantedProjectListComponent implements OnInit, OnDestroy {
this.loadingSubject.next(true);
this.mgmtService.listGrantedProjects(limit, offset).then(resp => {
this.grantedProjectList = resp.resultList;
console.log(this.grantedProjectList);
if (resp.details?.totalResult) {
this.totalResult = resp.details.totalResult;
}
@@ -27,13 +27,11 @@ export class ApplicationGridComponent implements OnInit {
public loadApps(): void {
from(this.mgmtService.listApps(this.projectId, 100, 0)).pipe(
map(resp => {
console.log(resp.resultList);
return resp.resultList;
}),
// catchError(() => of([])),
finalize(() => this.loadingSubject.next(false)),
).subscribe((apps) => {
console.log(apps);
this.appsSubject.next(apps as App.AsObject[]);
});
}
@@ -109,7 +109,6 @@ export class OwnedProjectListComponent implements OnInit, OnDestroy {
private async getData(limit?: number, offset?: number): Promise<void> {
this.loadingSubject.next(true);
this.mgmtService.listProjects(limit, offset).then(resp => {
console.log(resp.resultList);
this.ownedProjectList = resp.resultList;
if (resp.details?.totalResult) {
this.totalResult = resp.details.totalResult;