X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=otf-frontend%2Fclient%2Fsrc%2Fapp%2Flayout%2Fmanage-group%2Fmanage-group-roles%2Fmanage-group-roles.component.pug;fp=otf-frontend%2Fclient%2Fsrc%2Fapp%2Flayout%2Fmanage-group%2Fmanage-group-roles%2Fmanage-group-roles.component.pug;h=d4de15a6f76cc0943df5cb7503550d226c91d582;hb=14f6f95c84a4a1fa8774190db4a03fd0214ec55f;hp=0000000000000000000000000000000000000000;hpb=f49bd1efeaaddd4891c1f329b18d8cfb28b3e75b;p=it%2Fotf.git diff --git a/otf-frontend/client/src/app/layout/manage-group/manage-group-roles/manage-group-roles.component.pug b/otf-frontend/client/src/app/layout/manage-group/manage-group-roles/manage-group-roles.component.pug new file mode 100644 index 0000000..d4de15a --- /dev/null +++ b/otf-frontend/client/src/app/layout/manage-group/manage-group-roles/manage-group-roles.component.pug @@ -0,0 +1,96 @@ +//- Copyright (c) 2019 AT&T Intellectual Property. # +//- # +//- Licensed under the Apache License, Version 2.0 (the "License"); # +//- you may not use this file except in compliance with the License. # +//- You may obtain a copy of the License at # +//- # +//- http://www.apache.org/licenses/LICENSE-2.0 # +//- # +//- Unless required by applicable law or agreed to in writing, software # +//- distributed under the License is distributed on an "AS IS" BASIS, # +//- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +//- See the License for the specific language governing permissions and # +//- limitations under the License. # +//- ############################################################################# + + +div([@routerTransition]) + .card-md-12 + .pull-left + app-page-header([heading]="'Custom Role Management'") + h5 {{ groupName }} + + + + .pull-right + button(mat-raised-button color="primary", (click)="update()") Update All Rows + + .card-md-12.mt-3 + + div(style="width: 100%", [hidden]="!loading") + mat-spinner(style="margin: auto", color="primary") + table(mat-table, [dataSource]="dataSource", style="width: 100%", [hidden]="loading") + + ng-container(matColumnDef="roleName") + th(mat-header-cell, *matHeaderCellDef) Role Name + td(mat-cell, *matCellDef="let element") {{ element.roleName }} + + ng-container(matColumnDef="read") + th(mat-header-cell, *matHeaderCellDef) Read + td(mat-cell, *matCellDef="let element") + mat-checkbox([(ngModel)]="element.readPermission", [disabled]="true") + + + + + ng-container(matColumnDef="write") + th(mat-header-cell, *matHeaderCellDef) Write + td(mat-cell, *matCellDef="let element") + mat-checkbox([(ngModel)]="element.writePermission", [disabled]="(element.roleName == 'admin')") + + ng-container(matColumnDef="execute") + th(mat-header-cell, *matHeaderCellDef) Execute + td(mat-cell, *matCellDef="let element") + mat-checkbox([(ngModel)]="element.executePermission", [disabled]="(element.roleName == 'admin')") + + ng-container(matColumnDef="delete") + th(mat-header-cell, *matHeaderCellDef) Delete + td(mat-cell, *matCellDef="let element") + mat-checkbox([(ngModel)]="element.deletePermission", [disabled]="(element.roleName == 'admin')") + + ng-container(matColumnDef="management") + th(mat-header-cell, *matHeaderCellDef) Management + td(mat-cell, *matCellDef="let element") + mat-checkbox([(ngModel)]="element.managementPermission", [disabled]="true") + + ng-container(matColumnDef="actions") + th(mat-header-cell, *matHeaderCellDef) Actions + td(mat-cell, *matCellDef="let element") + button(color="warn", matTooltip="Delete Role Permissions", mat-icon-button, (click)="deleteRole(element)", [disabled]="((element.roleName == 'admin') || (element.roleName == 'user') || (element.roleName == 'developer'))") + mat-icon delete_forever + button(color="primary", matTooltip="Save Role Permissions", mat-icon-button, (click)="update()", [disabled]="(element.roleName == 'admin')") + mat-icon save + + + + + tr(mat-header-row *matHeaderRowDef="displayedColumns") + tr(mat-row *matRowDef="let row; columns: displayedColumns;") + + + + + + div(style="width: 100%;height:50px") + + .card-md-12 + .row + .col-sm-4 + h3 Add New Role + .row + .col-sm-4 + mat-form-field + input(matInput [(ngModel)]="roleName", id="roleName", name="roleName", placeholder="Role Name", required) + button(mat-raised-button color="primary", (click)="create()", style="margin-left:20px;", [disabled]="!roleName") Add Role + +