Skip to content

Commit 65e025b

Browse files
committed
Merge branch 'master' into production
2 parents f9dc79a + 70ca49d commit 65e025b

File tree

41 files changed

+572
-107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+572
-107
lines changed

apps/admin-gui/src/app/shared/side-menu/side-menu-item.service.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -994,20 +994,20 @@ export class SideMenuItemService {
994994
this.apiRequest.dontHandleErrorForNext();
995995
this.attributesManager
996996
.getGroupAttributeByName(group.id, Urns.GROUP_DEF_EXPIRATION_RULES)
997-
.subscribe(
998-
() => {
999-
settingsChildrenLinks.push({
997+
.subscribe({
998+
next: () => {
999+
settingsChildrenLinks.unshift({
10001000
label: 'MENU_ITEMS.GROUP.EXPIRATION',
10011001
url: [`/organizations/${group.voId}/groups/${group.id}/settings/expiration`],
10021002
activatedRegex: '/organizations/\\d+/groups/\\d+/settings/expiration$',
10031003
});
10041004
},
1005-
(error: RPCError) => {
1005+
error: (error: RPCError) => {
10061006
if (error.name !== 'PrivilegeException') {
10071007
this.notificator.showRPCError(error);
10081008
}
1009-
}
1010-
);
1009+
},
1010+
});
10111011

10121012
//SettingsManagers
10131013
if (this.routePolicyService.canNavigate('groups-settings-managers', group)) {

apps/admin-gui/src/app/vos/components/notification-list/notification-list.component.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,17 @@
5252
{{'VO_DETAIL.SETTINGS.NOTIFICATIONS.TABLE_APPLICATION_TYPE' | translate}}
5353
</th>
5454
<td *matCellDef="let applicationMail" mat-cell>
55-
<div *ngIf="applicationMail.appType === 'INITIAL'; else extension">
55+
<div
56+
*ngIf="applicationMail.appType === 'INITIAL'; else extension"
57+
class="d-flex align-items-center">
5658
<mat-icon matTooltip="Initial" matTooltipPosition="above">arrow_right_alt</mat-icon>
5759
{{'VO_DETAIL.SETTINGS.NOTIFICATIONS.TABLE_APPLICATION_TYPE_INITIAL' | translate}}
5860
</div>
5961
<ng-template #extension>
60-
<mat-icon matTooltip="Extension" matTooltipPosition="above">cached</mat-icon>
61-
{{'VO_DETAIL.SETTINGS.NOTIFICATIONS.TABLE_APPLICATION_TYPE_EXTENSION' | translate}}
62+
<div class="d-flex align-items-center">
63+
<mat-icon matTooltip="Extension" matTooltipPosition="above">cached</mat-icon>
64+
{{'VO_DETAIL.SETTINGS.NOTIFICATIONS.TABLE_APPLICATION_TYPE_EXTENSION' | translate}}
65+
</div>
6266
</ng-template>
6367
</td>
6468
</ng-container>

apps/admin-gui/src/app/vos/pages/group-detail-page/group-subgroups/group-subgroups.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ <h1 class="page-subtitle">{{'GROUP_DETAIL.SUBGROUPS.TITLE' | translate}}</h1>
5353
[groups]="groups"
5454
(moveGroup)="onMoveGroup($event)"
5555
(refreshTable)="refreshTable()"
56+
[displayedColumns]="['nameWithId', 'description', 'menu']"
5657
[hideCheckbox]="!deleteAuth"
5758
[filterValue]="filterValue"
5859
[selection]="selected">

apps/admin-gui/src/app/vos/pages/member-detail-page/member-groups/member-groups.component.html

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,45 @@ <h1 class="page-subtitle">{{'MEMBER_DETAIL.GROUPS.TITLE' | translate}}</h1>
2525
(filter)="applyFilter($event)"
2626
[placeholder]="'SHARED_LIB.PERUN.COMPONENTS.RESOURCES_LIST.TABLE_SEARCH'">
2727
</perun-web-apps-debounce-filter>
28+
<label class="slide-label" (click)="labelToggle()">
29+
{{'MEMBER_DETAIL.GROUPS.TREE_VIEW' | translate}}
30+
</label>
31+
<mat-slide-toggle #toggle (change)="selection.clear()" [(ngModel)]="showGroupList" class="me-1">
32+
</mat-slide-toggle>
33+
<label class="slide-label" (click)="labelToggle()">
34+
{{'MEMBER_DETAIL.GROUPS.LIST_VIEW' | translate}}
35+
</label>
2836
<ng-template #spinner>
2937
<perun-web-apps-loading-table></perun-web-apps-loading-table>
3038
</ng-template>
3139
<div class="position-relative">
32-
<perun-web-apps-groups-list
33-
*perunWebAppsLoader="loading; indicator: spinner"
34-
(refreshTable)="refreshTable()"
35-
[displayedColumns]="['select', 'id', 'name', 'description', 'expiration', 'groupStatus']"
36-
[memberId]="memberId"
37-
[disableRouting]="!routeAuth"
38-
[groups]="groups"
39-
[filter]="filterValue"
40-
[memberGroupStatus]="member?.groupStatus"
41-
[selection]="selection"
42-
[tableId]="tableId">
43-
</perun-web-apps-groups-list>
40+
<div *ngIf="!showGroupList">
41+
<perun-web-apps-groups-tree
42+
*perunWebAppsLoader="loading; indicator: spinner"
43+
(refreshTable)="refreshTable()"
44+
(changeExpiration)="changeExpiration($event)"
45+
[expandAll]="filtering"
46+
[disableRouting]="!routeAuth"
47+
[groups]="groups"
48+
[selection]="selection"
49+
[filterValue]="filterValue"
50+
[displayedColumns]="['nameWithId', 'description', 'expiration', 'status']"
51+
theme="member-theme">
52+
</perun-web-apps-groups-tree>
53+
</div>
54+
<div [hidden]="!showGroupList">
55+
<perun-web-apps-groups-list
56+
#list
57+
*perunWebAppsLoader="loading; indicator: spinner"
58+
(refreshTable)="refreshTable()"
59+
[displayedColumns]="['select', 'id', 'name', 'description', 'expiration', 'groupStatus']"
60+
[memberId]="memberId"
61+
[disableRouting]="!routeAuth"
62+
[groups]="groups"
63+
[filter]="filterValue"
64+
[memberGroupStatus]="member?.groupStatus"
65+
[selection]="selection"
66+
[tableId]="tableId">
67+
</perun-web-apps-groups-list>
68+
</div>
4469
</div>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.slide-label {
2+
display: inline;
3+
cursor: pointer;
4+
}

apps/admin-gui/src/app/vos/pages/member-detail-page/member-groups/member-groups.component.ts

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, HostBinding, OnInit } from '@angular/core';
1+
import { Component, HostBinding, OnInit, ViewChild } from '@angular/core';
22
import { ActivatedRoute } from '@angular/router';
33
import {
44
Group,
@@ -17,6 +17,9 @@ import { GuiAuthResolver } from '@perun-web-apps/perun/services';
1717
import { Urns } from '@perun-web-apps/perun/urns';
1818
import { Observable } from 'rxjs';
1919
import { map, startWith } from 'rxjs/operators';
20+
import { MatSlideToggle } from '@angular/material/slide-toggle';
21+
import { GroupsListComponent } from '@perun-web-apps/perun/components';
22+
import { GroupWithStatus } from '@perun-web-apps/perun/models';
2023

2124
@Component({
2225
selector: 'app-member-groups',
@@ -28,14 +31,18 @@ export class MemberGroupsComponent implements OnInit {
2831

2932
// used for router animation
3033
@HostBinding('class.router-component') true;
34+
@ViewChild('toggle', { static: true }) toggle: MatSlideToggle;
35+
@ViewChild('list') private list: GroupsListComponent;
3136

3237
groups: Group[] = [];
3338
memberId: number;
3439
member: Member;
3540
allGroups: Group[];
3641
loading: boolean;
3742
filterValue = '';
43+
filtering = false;
3844
tableId = TABLE_MEMBER_DETAIL_GROUPS;
45+
showGroupList = false;
3946
selection = new SelectionModel<Group>(true, []);
4047
addAuth: boolean;
4148
routeAuth: boolean;
@@ -67,6 +74,16 @@ export class MemberGroupsComponent implements OnInit {
6774
this.groupsService.getAllGroups(this.member.voId).subscribe((allGroups) => {
6875
this.allGroups = allGroups;
6976
this.refreshTable();
77+
if (localStorage.getItem('preferedValue') === 'list') {
78+
this.toggle.toggle();
79+
this.showGroupList = true;
80+
}
81+
82+
this.toggle.change.subscribe(() => {
83+
const value = this.toggle.checked ? 'list' : 'tree';
84+
localStorage.setItem('preferedValue', value);
85+
this.refreshTable();
86+
});
7087
});
7188
});
7289
});
@@ -80,15 +97,19 @@ export class MemberGroupsComponent implements OnInit {
8097
Urns.MEMBER_GROUP_STATUS,
8198
Urns.MEMBER_GROUP_STATUS_INDIRECT,
8299
])
83-
.subscribe(
84-
(groups) => {
100+
.subscribe({
101+
next: (groups) => {
85102
this.selection.clear();
86103
this.groups = groups;
87104
this.setAuthRights();
88105
this.loading = false;
89106
},
90-
() => (this.loading = false)
91-
);
107+
error: () => (this.loading = false),
108+
});
109+
}
110+
111+
changeExpiration(group: GroupWithStatus): void {
112+
this.list.changeExpiration(group);
92113
}
93114

94115
setAuthRights(): void {
@@ -148,5 +169,11 @@ export class MemberGroupsComponent implements OnInit {
148169

149170
applyFilter(filterValue: string): void {
150171
this.filterValue = filterValue;
172+
this.filtering = filterValue !== '';
173+
}
174+
175+
labelToggle(): void {
176+
this.showGroupList = !this.showGroupList;
177+
this.refreshTable();
151178
}
152179
}

apps/admin-gui/src/app/vos/pages/vo-detail-page/vo-groups/vo-groups.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ <h1 class="page-subtitle">{{'VO_DETAIL.GROUPS.TITLE' | translate}}</h1>
4242
*perunWebAppsLoader="loading$ | async; indicator: spinner"
4343
(moveGroup)="onMoveGroup($event)"
4444
(refreshTable)="refresh()"
45+
[displayedColumns]="['nameWithId', 'description', 'menu']"
4546
[expandAll]="filtering"
4647
[disableRouting]="!routeAuth"
4748
[groups]="groups"

apps/admin-gui/src/assets/i18n/en.json

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,9 @@
832832
"TITLE": "Member groups",
833833
"ADD": "Add",
834834
"REMOVE": "Remove",
835-
"REMOVE_PERMISSION_HINT": "You don't have permission to remove some of the selected groups."
835+
"REMOVE_PERMISSION_HINT": "You don't have permission to remove some of the selected groups.",
836+
"LIST_VIEW": "List view",
837+
"TREE_VIEW": "Tree view"
836838
},
837839
"APPLICATIONS": {
838840
"TITLE": "Application",
@@ -3104,10 +3106,22 @@
31043106
"USER_DONT_EXIST": {
31053107
"TITLE": "The requested user (by Id or external identity) doesn't exist."
31063108
},
3109+
"USER_NOT_ALLOWED": {
3110+
"TITLE": "Access not allowed",
3111+
"MESSAGE": "Service accounts are not allowed to access this application.",
3112+
"REDIRECT": "Redirect to login page"
3113+
},
31073114
"TABLE_OPTIONS": {
31083115
"EXPORT_TO_FILE": "Export to file",
3109-
"ALL_DATA": "All data",
3116+
"EXPORT_TITLE": "Export table",
3117+
"BUTTON_EXPORT": "Export",
3118+
"BUTTON_CLOSE": "Close",
3119+
"SELECT_FORMAT": "Select format",
3120+
"EXPORT_OPTIONS": "Export options",
31103121
"DISPLAYED_DATA": "Displayed data",
3122+
"ALL_DATA": "All data",
3123+
"ERROR_FORMAT":"Export format is not selected",
3124+
"ERROR_OPTION": "Export option is not selected",
31113125
"EXPORT_LOADING": "Exporting data...",
31123126
"MORE": "More"
31133127
},
@@ -3161,6 +3175,15 @@
31613175
"FIELD_EMPTY": "This field cannot be empty",
31623176
"SUCCESS": "Password has been changed successfully,"
31633177
},
3178+
"RESET_PASSWORD_DIALOG": {
3179+
"LOGIN": "Login",
3180+
"NAMESPACE": "Namespace",
3181+
"TITLE": "Reset password",
3182+
"CANCEL": "Cancel",
3183+
"CHANGE": "Confirm",
3184+
"FIELD_EMPTY": "This field cannot be empty",
3185+
"SUCCESS": "Password has been reset successfully,"
3186+
},
31643187
"PASSWORD_FORM_FIELD": {
31653188
"PASSWORD": "Password",
31663189
"PASSWORD_AGAIN": "Confirm password",

apps/consolidator/src/assets/i18n/en.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
"REMOVE": "Remove",
7777
"SUCCESS": "User account successfully removed"
7878
}
79+
},
80+
"USER_NOT_ALLOWED": {
81+
"TITLE": "Access not allowed",
82+
"MESSAGE": "Service accounts are not allowed to access this application.",
83+
"REDIRECT": "Redirect to login page"
7984
}
8085
},
8186
"CONSOLIDATOR": {

apps/linker/src/assets/i18n/en.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"FOCUS_ON_MFA_DIALOG": {
3636
"MODAL": "Modal window is opened.",
3737
"MODAL_WARNING": "Please check your browser settings if no modal window is open."
38+
},
39+
"USER_NOT_ALLOWED": {
40+
"TITLE": "Access not allowed",
41+
"MESSAGE": "Service accounts are not allowed to access this application.",
42+
"REDIRECT": "Redirect to login page"
3843
}
3944
}
4045
},

apps/password-reset/src/assets/i18n/cs.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
"USER_DONT_EXIST": {
3939
"TITLE": "Požadovaný uživatel (dle ID nebo externí identity) neexistuje."
4040
},
41+
"USER_NOT_ALLOWED": {
42+
"TITLE": "Přístup není povolen",
43+
"MESSAGE": "Servisní účty (Service account) nemají povolen přístup k této aplikaci.",
44+
"REDIRECT": "Přesměrovaní na přihlášení"
45+
},
4146
"SESSION_EXPIRATION": {
4247
"TITLE": "Platnost přihlášení vypršela",
4348
"DESCRIPTION": "Byli jste automaticky odhlášeni. Pro pokračování se znovu přihlaste.",

apps/password-reset/src/assets/i18n/en.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
"USER_DONT_EXIST": {
3939
"TITLE": "Requested user (by ID or external identity) doesn't exist."
4040
},
41+
"USER_NOT_ALLOWED": {
42+
"TITLE": "Access not allowed",
43+
"MESSAGE": "Service accounts are not allowed to access this application.",
44+
"REDIRECT": "Redirect to login page"
45+
},
4146
"SESSION_EXPIRATION": {
4247
"TITLE": "Session expiration",
4348
"DESCRIPTION": "Your session has expired. Please sign in to continue.",

apps/publications/src/assets/i18n/en.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,24 @@
356356
"USER_DONT_EXIST": {
357357
"TITLE": "Requested user (by ID or external identity) doesn't exist."
358358
},
359+
"USER_NOT_ALLOWED": {
360+
"TITLE": "Access not allowed",
361+
"MESSAGE": "Service accounts are not allowed to access this application.",
362+
"REDIRECT": "Redirect to login page"
363+
},
359364
"TABLE_OPTIONS": {
360365
"EXPORT_TO_FILE": "Export to file",
361-
"ALL_DATA": "All data",
366+
"EXPORT_TITLE": "Export table",
367+
"BUTTON_EXPORT": "Export",
368+
"BUTTON_CLOSE": "Close",
369+
"SELECT_FORMAT": "Select format",
370+
"EXPORT_OPTIONS": "Export options",
362371
"DISPLAYED_DATA": "Displayed data",
363-
"EXPORT_LOADING": "Exporting data..."
372+
"ALL_DATA": "All data",
373+
"ERROR_FORMAT":"Export format is not selected",
374+
"ERROR_OPTION": "Export option is not selected",
375+
"EXPORT_LOADING": "Exporting data...",
376+
"MORE": "More"
364377
},
365378
"NOTIFICATOR": {
366379
"NOTIFICATION": {

0 commit comments

Comments
 (0)