This is an automated email from the ASF dual-hosted git repository. dgnatyshyn pushed a commit to branch DLAB-1618 in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
commit 0d89077b8d6e80b9ae310e99b1e27dcae035257e Author: Dmytro Gnatyshyn <[email protected]> AuthorDate: Thu Mar 12 11:40:24 2020 +0200 [DLAB-1618]: Adjusted role page according to requirements --- .../management-grid/management-grid.component.html | 3 ++- .../app/administration/roles/roles.component.ts | 11 +++++++--- .../computational-resources-list.component.scss | 25 +++++++++++----------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html index 1f6c55e..631e7ae 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html +++ b/services/self-service/src/main/resources/webapp/src/app/administration/management/management-grid/management-grid.component.html @@ -77,7 +77,8 @@ <span [hidden]="filtering && filterForm.statuses.length > 0 && !collapsedFilterRow">more_vert</span> </i> </button> </th> - <td mat-cell *matCellDef="let element" class="ani status" ngClass="{{element.status || ''}}">{{ element.status }} + <td mat-cell *matCellDef="let element" class="ani status" > + <span ngClass="{{element.status || ''}}">{{ element.status }}</span> </td> </ng-container> diff --git a/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts b/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts index dd584dd..00d24cf 100644 --- a/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts +++ b/services/self-service/src/main/resources/webapp/src/app/administration/roles/roles.component.ts @@ -130,7 +130,7 @@ export class RolesComponent implements OnInit { } else if (action === 'update') { const currGroupSource = this.startedGroups.filter(cur => cur.group === item.group)[0]; let deletedUsers = currGroupSource.users.filter(user => { - if (item.users.includes(user)) { + if (item.users && item.users.includes(user)) { return false; } return true; @@ -172,7 +172,7 @@ export class RolesComponent implements OnInit { case 'update': this.rolesService.updateGroup($event.value).subscribe(res => { this.toastr.success(`Group data is updated successfully!`, 'Success!'); - this.getGroupsData(); + // this.getGroupsData(); }, () => this.toastr.error('Failed group data updating!', 'Oops!')); break; @@ -203,7 +203,12 @@ export class RolesComponent implements OnInit { } public updateGroupData(groups) { - this.groupsData = groups.map(v => v).sort((a, b) => (a.group > b.group) ? 1 : ((b.group > a.group) ? -1 : 0)); + this.groupsData = groups.map(v => { + if (!v.users) { + v.users = []; + } + return v; + }).sort((a, b) => (a.group > b.group) ? 1 : ((b.group > a.group) ? -1 : 0)); this.groupsData.forEach(item => { item.selected_roles = item.roles.map(role => ({role: role.description, type: role.type})); }); diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss index 9314137..a4b825e 100644 --- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss +++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/computational-resources-list/computational-resources-list.component.scss @@ -110,20 +110,21 @@ } } @media screen and (max-width: 1520px) { - .source { - - .resource-wrap { - - .resource-name { - width: 45%; - } + .resources, + managment { + .source { + .resource-wrap { + .resource-name { + width: 45%; + } - .resource-status { - width: 40%; - } + .resource-status { + width: 40%; + } - .resource-actions { - width: 15%; + .resource-actions { + width: 15%; + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
