Skip to content
Snippets Groups Projects
Unverified Commit b020bbf8 authored by Łukasz Łopatowski's avatar Łukasz Łopatowski Committed by GitHub
Browse files

Merge pull request #72 from nmaas-platform/69-settings-menu-layout-imrovements

69 settings menu layout imrovements
parents 4a39c1c0 25e6e051
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,7 @@
<div style="margin-bottom: 10px">
{{ 'APPS_MANAGEMENT.ADD_JSON_TEXTAREA'| translate}}
</div>
<textarea rows="10" cols="100" pInputTextarea [(ngModel)]="jsonText" (keyup)="this.JsonError = false"></textarea>
<textarea rows="10" cols="100" pInputTextarea [(ngModel)]="jsonText" (keyup)="this.JsonError = false; this.error = ''"></textarea>
</div>
<div class="flex flex-row justify-content-center justify-content-center mt-2">
<button *ngIf="jsonText.length >0" pButton class="btn btn-success"
......
......@@ -44,7 +44,11 @@ export class AppAddJsonAppComponent implements OnInit {
},
error => {
console.log(error)
this.error = error.message
if (error.message === null) {
this.JsonError = true;
} else {
this.error = error.message
}
})
} catch (e) {
console.warn('invalid json')
......@@ -68,7 +72,11 @@ export class AppAddJsonAppComponent implements OnInit {
},
error => {
console.log(error)
this.error = error.message
if (error.message === null) {
this.JsonError = true;
} else {
this.error = error.message
}
})
} catch (e) {
console.warn('invalid json')
......
......@@ -14,7 +14,7 @@
<div style="margin-bottom: 10px">
{{ 'APPS_MANAGEMENT.ADD_JSON_TEXTAREA'| translate}}
</div>
<textarea rows="10" cols="100" pInputTextarea [(ngModel)]="jsonText" (keyup)="this.JsonError = false"></textarea>
<textarea rows="10" cols="100" pInputTextarea [(ngModel)]="jsonText" (keyup)="this.JsonError = false; this.error = ''"></textarea>
</div>
<div class="flex flex-row justify-content-center justify-content-center mt-2">
<button *ngIf="jsonText.length >0" pButton class="btn btn-success"
......
......@@ -48,7 +48,11 @@ export class AppAddJsonVersionAppComponent implements OnInit {
},
error => {
console.log(error)
this.error = error.error.message
if (error.message === null) {
this.JsonError = true;
} else {
this.error = error.message
}
})
} catch (e) {
console.warn('invalid json')
......@@ -72,7 +76,11 @@ export class AppAddJsonVersionAppComponent implements OnInit {
},
error => {
console.log(error)
this.error = error.error.message
if (error.message === null) {
this.JsonError = true;
} else {
this.error = error.message
}
})
} catch (e) {
console.warn('invalid json')
......
......@@ -101,6 +101,47 @@
</div>
</div>
<div class="panel panel-default" *ngIf="isInMode(ComponentMode.VIEW) && !authService.hasRole('ROLE_OPERATOR')">
<div class="panel-heading">{{ 'DOMAIN_DETAILS.DOMAIN_USERS' | translate }}</div>
<div class="panel-body">
<table class="table table-hover table-condensed" aria-describedby="Domains details table">
<thead>
<tr>
<th scope="col" *roles="['ROLE_SYSTEM_ADMIN']">{{ 'DOMAIN_DETAILS.ID' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.USER_NAME' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.FIRST_NAME' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.LAST_NAME' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.ROLES' | translate }}</th>
<th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<ng-template ngFor let-user [ngForOf]="domainUsers">
<tr>
<td *ngIf="authService.hasRole('ROLE_SYSTEM_ADMIN')">{{user.id}}</td>
<td>{{user.username}}</td>
<td> {{user.firstname}}</td>
<td> {{user.lastname}}</td>
<td *ngIf="domainId == domainService.getGlobalDomainId()">
<div *ngFor="let role of filterDomainNames(user); last as isLast">
<span *ngIf="!isLast" style="float:left;padding-right: 3px">{{role.role | slice:5}}@{{this.getDomainName(role.domainId)|async}}, </span>
<span *ngIf="isLast" style="float:left">{{role.role | slice:5}}@{{this.getDomainName(role.domainId)|async}}</span>
</div>
</td>
<td *ngIf="domainId != domainService.getGlobalDomainId()">
<span *ngFor="let role of this.getDomainRoleNames(user.roles)">
{{"ENUM.USER_ROLES." + role.role.toUpperCase() | translate}}
</span>
</td>
</tr>
</ng-template>
</tbody>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">{{ 'DOMAIN_DETAILS.APP_STATUS' | translate }}</div>
<div class="panel-body">
......@@ -185,46 +226,7 @@
<div class="panel panel-default" *ngIf="isInMode(ComponentMode.VIEW) && !authService.hasRole('ROLE_OPERATOR')">
<div class="panel-heading">{{ 'DOMAIN_DETAILS.DOMAIN_USERS' | translate }}</div>
<div class="panel-body">
<table class="table table-hover table-condensed" aria-describedby="Domains details table">
<thead>
<tr>
<th scope="col" *roles="['ROLE_SYSTEM_ADMIN']">{{ 'DOMAIN_DETAILS.ID' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.USER_NAME' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.FIRST_NAME' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.LAST_NAME' | translate }}</th>
<th scope="col">{{ 'DOMAIN_DETAILS.ROLES' | translate }}</th>
<th scope="col">&nbsp;</th>
</tr>
</thead>
<tbody>
<ng-template ngFor let-user [ngForOf]="domainUsers">
<tr>
<td *ngIf="authService.hasRole('ROLE_SYSTEM_ADMIN')">{{user.id}}</td>
<td>{{user.username}}</td>
<td> {{user.firstname}}</td>
<td> {{user.lastname}}</td>
<td *ngIf="domainId == domainService.getGlobalDomainId()">
<div *ngFor="let role of filterDomainNames(user); last as isLast">
<span *ngIf="!isLast" style="float:left;padding-right: 3px">{{role.role | slice:5}}@{{this.getDomainName(role.domainId)|async}}, </span>
<span *ngIf="isLast" style="float:left">{{role.role | slice:5}}@{{this.getDomainName(role.domainId)|async}}</span>
</div>
</td>
<td *ngIf="domainId != domainService.getGlobalDomainId()">
<span *ngFor="let role of this.getDomainRoleNames(user.roles)">
{{"ENUM.USER_ROLES." + role.role.toUpperCase() | translate}}
</span>
</td>
</tr>
</ng-template>
</tbody>
</table>
</div>
</div>
<button *ngIf="!isInMode(ComponentMode.VIEW)" type="submit" class="btn btn-default" [disabled]="!domainForm.form.valid">{{ 'DOMAIN_DETAILS.SUBMIT_BUTTON' | translate }}</button>
......
......@@ -5,7 +5,7 @@
<a *roles="['ROLE_SYSTEM_ADMIN']" [routerLink]="['add']" class="btn btn-primary"
role="button">{{'DOMAINS.ADD_BUTTON' | translate}}</a>
</div>
<div class="flex" style="align-content: center; margin-top: 8px;">
<div *roles="['ROLE_SYSTEM_ADMIN']" class="flex" style="align-content: center; margin-top: 8px;">
<span style="align-content: center; margin-right: 5px;"> {{'DOMAINS.NOTACTIVE' | translate}}</span>
<p-checkbox id="showNotActive" [binary]="true" [(ngModel)]=" showNotActive"></p-checkbox>
</div>
......
......@@ -48,7 +48,7 @@
[routerLink]="['/admin/configuration']">{{ 'NAVBAR.SETTINGS' | translate }}</a>
</li>
<li class="dropdown-divider"></li>
<li *roles="['ROLE_SYSTEM_ADMIN']" class="dropdown-divider"></li>
<li *roles="['ROLE_SYSTEM_ADMIN', 'ROLE_TOOL_MANAGER']"><a
[routerLink]="['/admin/apps']">{{ 'NAVBAR.MARKET' | translate }}</a>
</li>
......@@ -65,7 +65,7 @@
[routerLink]="['/admin/languages']">{{'NAVBAR.LANGUAGES' | translate }}</a>
</li>
<li class="dropdown-divider"></li>
<li *roles="['ROLE_SYSTEM_ADMIN']" class="dropdown-divider"></li>
<!-- <li *roles="['ROLE_SYSTEM_ADMIN', 'ROLE_OPERATOR']"><a [routerLink]="['/admin/clusters']">Kubernetes</a>-->
<!-- </li>-->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment