From 1a5ff13e0d7fa3dc39c885bfb2311c644c5290df Mon Sep 17 00:00:00 2001
From: RIHTARSIC Joze <joze.rihtarsic@ext.ec.europa.eu>
Date: Thu, 15 Jun 2023 08:44:40 +0200
Subject: [PATCH] UI enhancement:  resource and subresource document fields
 more compact

---
 smp-angular/src/app/app.module.ts             |  2 +
 .../smp-titled-label.component.css            | 24 +++++
 .../smp-titled-label.component.ts             | 18 ++++
 .../user-profile-panel.component.html         |  2 +-
 .../user-profile-panel.component.ts           |  8 +-
 .../resource-dialog.component.html            |  1 -
 .../resource-document-panel.component.html    | 77 +++++++--------
 .../resource-document-panel.component.scss    |  2 +-
 .../resource-document-panel.component.ts      |  2 +-
 .../subresource-document-panel.component.html | 96 ++++++++-----------
 .../subresource-document-panel.component.ts   |  2 +-
 .../subresource-panel.component.ts            |  3 +-
 .../src/app/security/security.service.ts      |  3 -
 .../admin-users/admin-user.component.ts       | 16 ++--
 .../sidenav/nav-tree/nav-tree.component.scss  |  4 +-
 .../sidenav/navigation-model.service.ts       |  4 -
 16 files changed, 137 insertions(+), 127 deletions(-)
 create mode 100644 smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.css
 create mode 100644 smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.ts

diff --git a/smp-angular/src/app/app.module.ts b/smp-angular/src/app/app.module.ts
index bc2b620b7..bf46efcb2 100644
--- a/smp-angular/src/app/app.module.ts
+++ b/smp-angular/src/app/app.module.ts
@@ -143,6 +143,7 @@ import {SubresourceDocumentWizardComponent} from "./edit/edit-resources/subresou
 import {SmpWarningPanelComponent} from "./common/components/smp-warning-panel/smp-warning-panel.component";
 import {ManageMembersDialogComponent} from "./common/dialogs/manage-members-dialog/manage-members-dialog.component";
 import {HttpErrorHandlerService} from "./common/error/http-error-handler.service";
+import {SmpTitledLabelComponent} from "./common/components/smp-titled-label/smp-titled-label.component";
 
 
 @NgModule({
@@ -217,6 +218,7 @@ import {HttpErrorHandlerService} from "./common/error/http-error-handler.service
     SidenavComponent,
     SmpFieldErrorComponent,
     SmpLabelComponent,
+    SmpTitledLabelComponent,
     SmpWarningPanelComponent,
     SpacerComponent,
     SpinnerComponent,
diff --git a/smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.css b/smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.css
new file mode 100644
index 000000000..16a35feaf
--- /dev/null
+++ b/smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.css
@@ -0,0 +1,24 @@
+.smp-titled-label {
+  display:flex;
+  flex-direction: row;
+  margin: 0.2em  0.5em;
+  align-items: center;
+}
+
+.smp-tl-title {
+  display:flex;
+  flex-direction: row;
+  font-size: 0.75em;
+  gap:0.5em;
+  align-items: center;
+  min-width: 160px;
+}
+
+.smp-tl-value {
+  border-bottom: gray solid 1px;
+  padding: 0.1em 0.5em;
+  margin: 0  0.3em;
+  color:darkgray;
+  flex-grow: 1;
+  min-height: 1.5em;
+}
diff --git a/smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.ts b/smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.ts
new file mode 100644
index 000000000..79ce5d678
--- /dev/null
+++ b/smp-angular/src/app/common/components/smp-titled-label/smp-titled-label.component.ts
@@ -0,0 +1,18 @@
+import { Component, Input } from '@angular/core';
+
+@Component({
+  selector: 'smp-titled-label',
+  styleUrls: ['./smp-titled-label.component.css'],
+  template: '<div class="smp-titled-label">' +
+    '  <div class="smp-tl-title " >' +
+    '     <mat-icon *ngIf="icon">{{icon}}</mat-icon>' +
+    '    <span>{{title}}</span>' +
+    '  </div>' +
+    '  <div class="smp-tl-value">{{value}}</div>' +
+    '</div>'
+})
+export class SmpTitledLabelComponent {
+  @Input() title:string;
+  @Input() icon:string;
+  @Input() value:string;
+}
diff --git a/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.html b/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.html
index 4a524c2ed..d297b5e16 100644
--- a/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.html
+++ b/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.html
@@ -191,7 +191,7 @@
       </div>
       <mat-toolbar class ="mat-elevation-z2">
         <mat-toolbar-row  class="smp-toolbar-row">
-          <button mat-flat-button color="primary" id="changePassword_id"
+          <button mat-flat-button color="primary" id="changePassword_id" [disabled]="isNewUser"
                   (click)="changeCurrentUserPassword()">
             <span>Set/change password</span>
           </button>
diff --git a/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.ts b/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.ts
index b6056865a..1d522754d 100644
--- a/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.ts
+++ b/smp-angular/src/app/common/panels/user-settings-panel/user-profile-panel.component.ts
@@ -146,13 +146,13 @@ export class UserProfilePanelComponent {
     if (!value) {
       this.userCredentialForm.controls['passwordUpdatedOn'].setValue(null);
       this.userCredentialForm.controls['passwordExpireOn'].setValue(null);
-      this.userCredentialForm.controls['sequentialLoginFailureCount'].setValue(null);
+      this.userCredentialForm.controls['sequentialLoginFailureCount'].setValue(0);
       this.userCredentialForm.controls['lastFailedLoginAttempt'].setValue(null);
       this.userCredentialForm.controls['suspendedUtil'].setValue(null);
     } else {
       this.userCredentialForm.controls['passwordUpdatedOn'].setValue(value.passwordUpdatedOn);
       this.userCredentialForm.controls['passwordExpireOn'].setValue(value.passwordExpireOn);
-      this.userCredentialForm.controls['sequentialLoginFailureCount'].setValue(value.sequentialLoginFailureCount);
+      this.userCredentialForm.controls['sequentialLoginFailureCount'].setValue(!(value.sequentialLoginFailureCount)?"---":value.sequentialLoginFailureCount);
       this.userCredentialForm.controls['lastFailedLoginAttempt'].setValue(value.lastFailedLoginAttempt);
       this.userCredentialForm.controls['suspendedUtil'].setValue(value.suspendedUtil);
     }
@@ -166,9 +166,9 @@ export class UserProfilePanelComponent {
   }
 
   onResetButtonClicked() {
-    if (this.isNewUser) {
+    /*if (this.isNewUser) {
       this.onDiscardNew.emit();
-    }
+    }*/
     this.userForm.reset(this._managedUserData);
     if (this.isUserDataLoggedInUserData) {
       this.themeService.persistTheme(this._managedUserData.smpTheme);
diff --git a/smp-angular/src/app/edit/edit-group/group-resource-panel/resource-dialog/resource-dialog.component.html b/smp-angular/src/app/edit/edit-group/group-resource-panel/resource-dialog/resource-dialog.component.html
index 87bd91024..eccb64d26 100644
--- a/smp-angular/src/app/edit/edit-group/group-resource-panel/resource-dialog/resource-dialog.component.html
+++ b/smp-angular/src/app/edit/edit-group/group-resource-panel/resource-dialog/resource-dialog.component.html
@@ -65,7 +65,6 @@
           {{visibility.key}}
         </mat-option>
       </mat-select>
-      <mat-hint>Choose resource visibility</mat-hint>
     </mat-form-field>
   </form>
 </mat-dialog-content>
diff --git a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html
index 3c8c6ea56..ee73c632a 100644
--- a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html
+++ b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.html
@@ -1,7 +1,8 @@
 <div id="resource-document-panel">
 
-  <mat-toolbar class="mat-elevation-z2" style="flex-grow: 0">
-    <mat-toolbar-row class="smp-toolbar-row">
+  <mat-toolbar class="mat-elevation-z2" style="min-height: 50px !important;">
+    <mat-toolbar-row class="smp-toolbar-row" style="justify-content: space-between;min-height: 50px !important;">
+
       <button id="validateResource_id" mat-raised-button
               color="primary"
               matTooltip="Validate resource"
@@ -29,50 +30,18 @@
         <mat-icon>code_block</mat-icon>
         <span>Document wizard</span>
       </button>
-    </mat-toolbar-row>
-  </mat-toolbar>
-  <div [formGroup]="resourceForm" style="width: 100%; display: flex; flex-direction: row; ">
-    <mat-form-field style="width: 100%">
-      <mat-label>Resource scheme</mat-label>
-      <input id="identifierScheme_id" type="text" matInput
-             formControlName="identifierScheme"
-      >
-    </mat-form-field>
-    <mat-form-field style="width: 100%">
-      <mat-label>Resource identifier</mat-label>
-      <input id="identifierValue_id" type="text" matInput #identifierValue
-             formControlName="identifierValue"
-             required auto-focus-directive>
-    </mat-form-field>
-  </div>
-  <div [formGroup]="documentForm" style="width: 100%; display: flex; flex-direction: column; flex:1; gap:0.5em ">
-    <div style="width: 100%; display: flex; flex-direction: row; flex:0; gap:0.5em">
-      <mat-form-field style="flex:2">
-        <mat-label>Document name</mat-label>
-        <input id="documentName_id" type="text" matInput
-               formControlName="name"
-        >
-      </mat-form-field>
-      <mat-form-field style="flex:1">
-        <mat-label>Document mimeType</mat-label>
-        <input id="documentMimeType_id" type="text" matInput
-               formControlName="mimeType"
-        >
-      </mat-form-field>
-      <mat-form-field style="width:200px">
-        <mat-label>Current document version</mat-label>
-        <input id="current_version_id" type="text" matInput
-               formControlName="currentResourceVersion"
-               required auto-focus-directive>
-      </mat-form-field>
-      <mat-form-field style="width:200px">
-        <mat-label>Document versions</mat-label>
-        <mat-select placeholder="All document version"
+      <span style="flex: 1 1 auto;"></span>
+
+      <div [formGroup]="documentForm"
+           style="float: right;  vertical-align:middle;display: flex;align-items: center;justify-content: center; gap:0.4em;padding-right: 10px">
+        <span style="font-size: 0.8em">Show version:</span>
+        <mat-select style="width: 100px; border-bottom: gray solid 1px"
+                    placeholder="All document version"
                     matTooltip="Select version to display."
                     formControlName="payloadVersion"
                     id="document version_id"
                     (selectionChange)="onSelectionDocumentVersionChanged()"
-                    >
+        >
           <mat-option *ngFor="let version of getDocumentVersions"
                       [value]="version"
           >
@@ -80,9 +49,29 @@
           </mat-option>
 
         </mat-select>
-      </mat-form-field>
+      </div>
+    </mat-toolbar-row>
+  </mat-toolbar>
+  <div class="panel">
+
+    <div style="display: flex;flex-direction: row;width: 100%">
+      <smp-titled-label style="flex-grow: 1" title="Resource identifier:"
+                        value="{{resource?.identifierValue}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Resource scheme:"
+                        value="{{resource?.identifierScheme}}"></smp-titled-label>
     </div>
-    <div style="display:block; overflow: auto;flex: 2;align-self: stretch; flex-direction: column;background-color: #FCFCFCBB; border: ridge 3px #b0bec5"
+    <div style="display: flex;flex-direction: row;width: 100%">
+      <smp-titled-label style="flex-grow: 1" title="Document name:" value="{{_document?.name}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Document mimeType:"
+                        value="{{_document?.mimeType}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Current document version:"
+                        value="{{_document?.currentResourceVersion}}"></smp-titled-label>
+    </div>
+  </div>
+
+  <div [formGroup]="documentForm" style="width: 100%; display: flex; flex-direction: column; flex:1; gap:0.5em ">
+    <div
+      style="display:block; overflow: auto;flex: 2;align-self: stretch; flex-direction: column;background-color: #FCFCFCBB; border: ridge 3px #b0bec5"
       (click)="onEditPanelClick()"
     >
       <ngx-codemirror #codemirror
diff --git a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.scss b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.scss
index b422b79b3..629dfc616 100644
--- a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.scss
+++ b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.scss
@@ -2,7 +2,7 @@
   display: flex;
   height: 100%;
   flex-direction: column;
-  gap:0.5em;
+
 }
 
 .CodeMirror {
diff --git a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts
index ceebfd4ad..a91b1c640 100644
--- a/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts
+++ b/smp-angular/src/app/edit/edit-resources/resource-document-panel/resource-document-panel.component.ts
@@ -24,7 +24,7 @@ export class ResourceDocumentPanelComponent implements AfterViewInit, BeforeLeav
   title: string = "Resources";
   private _resource: ResourceRo;
 
-  private _document: DocumentRo;
+  _document: DocumentRo;
   @Input() private group: GroupRo;
   @Input() domain: DomainRo;
   @Input() domainResourceDefs: ResourceDefinitionRo[];
diff --git a/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.html b/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.html
index 6d21c307d..d302ec3c8 100644
--- a/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.html
+++ b/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.html
@@ -1,7 +1,7 @@
 <div id="resource-document-panel">
 
-  <mat-toolbar class="mat-elevation-z2" style="flex-grow: 0">
-    <mat-toolbar-row class="smp-toolbar-row">
+  <mat-toolbar class="mat-elevation-z2" style="min-height: 50px !important;">
+    <mat-toolbar-row class="smp-toolbar-row" style="justify-content: space-between;min-height: 50px !important;">
       <button id="validateResource_id" mat-raised-button
               color="primary"
               [disabled]="emptyDocument"
@@ -28,64 +28,18 @@
         <mat-icon>code_block</mat-icon>
         <span>Document wizard</span>
       </button>
-    </mat-toolbar-row>
-  </mat-toolbar>
-  <div [formGroup]="resourceForm" style="width: 100%; display: flex; flex-direction: row; ">
-    <mat-form-field style="width: 100%">
-      <mat-label>Resource scheme</mat-label>
-      <input id="identifierScheme_id" type="text" matInput
-             formControlName="identifierScheme"
-      >
-    </mat-form-field>
-    <mat-form-field style="width: 100%">
-      <mat-label>Resource identifier</mat-label>
-      <input id="identifierValue_id" type="text" matInput
-             formControlName="identifierValue"
-             required auto-focus-directive>
-    </mat-form-field>
-  </div>
-  <div [formGroup]="subresourceForm" style="width: 100%; display: flex; flex-direction: row; ">
-    <mat-form-field style="width: 100%">
-      <mat-label>Subresource scheme</mat-label>
-      <input id="subresourceidentifierScheme_id" type="text" matInput
-             formControlName="identifierScheme"
-      >
-    </mat-form-field>
-    <mat-form-field style="width: 100%">
-      <mat-label>Subresource identifier</mat-label>
-      <input id="SubresourcedentifierValue_id" type="text" matInput
-             formControlName="identifierValue"
-             required auto-focus-directive>
-    </mat-form-field>
-  </div>
-  <div [formGroup]="documentForm" style="width: 100%; display: flex; flex-direction: column; flex:1; gap:0.5em ">
-    <div style="width: 100%; display: flex; flex-direction: row; flex:0; gap:0.5em">
-      <mat-form-field style="flex:2">
-        <mat-label>Document name</mat-label>
-        <input id="documentName_id" type="text" matInput
-               formControlName="name"
-        >
-      </mat-form-field>
-      <mat-form-field style="flex:1">
-        <mat-label>Document mimeType</mat-label>
-        <input id="documentMimeType_id" type="text" matInput
-               formControlName="mimeType"
-        >
-      </mat-form-field>
-      <mat-form-field style="width:200px">
-        <mat-label>Current document version</mat-label>
-        <input id="current_version_id" type="text" matInput
-               formControlName="currentResourceVersion"
-               required auto-focus-directive>
-      </mat-form-field>
-      <mat-form-field style="width:200px">
-        <mat-label>Document versions</mat-label>
-        <mat-select placeholder="All document version"
+      <span style="flex: 1 1 auto;"></span>
+
+      <div [formGroup]="documentForm"
+           style="float: right;  vertical-align:middle;display: flex;align-items: center;justify-content: center; gap:0.4em;padding-right: 10px">
+        <span style="font-size: 0.8em">Show version:</span>
+        <mat-select style="width: 100px; border-bottom: gray solid 1px"
+                    placeholder="All document version"
                     matTooltip="Select version to display."
                     formControlName="payloadVersion"
                     id="document version_id"
                     (selectionChange)="onSelectionDocumentVersionChanged()"
-                    >
+        >
           <mat-option *ngFor="let version of getDocumentVersions"
                       [value]="version"
           >
@@ -93,9 +47,35 @@
           </mat-option>
 
         </mat-select>
-      </mat-form-field>
+      </div>
+    </mat-toolbar-row>
+  </mat-toolbar>
+  <div class="panel">
+
+    <div style="display: flex;flex-direction: row;width: 100%">
+      <smp-titled-label style="flex-grow: 1" title="Resource identifier:"
+                        value="{{resource?.identifierValue}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Resource scheme:"
+                        value="{{resource?.identifierScheme}}"></smp-titled-label>
+    </div>
+    <div style="display: flex;flex-direction: row;width: 100%">
+      <smp-titled-label style="flex-grow: 1" title="Subresource identifier:"
+                        value="{{subresource?.identifierValue}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Subresource scheme:"
+                        value="{{subresource?.identifierScheme}}"></smp-titled-label>
     </div>
-    <div style="display:block; overflow: auto;flex: 2;align-self: stretch; flex-direction: column;background-color: #FCFCFCBB; border: ridge 3px #b0bec5"
+    <div style="display: flex;flex-direction: row;width: 100%">
+      <smp-titled-label style="flex-grow: 1" title="Document name:" value="{{_document?.name}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Document mimeType:"
+                        value="{{_document?.mimeType}}"></smp-titled-label>
+      <smp-titled-label style="flex-grow: 1" title="Current document version:"
+                        value="{{_document?.currentResourceVersion}}"></smp-titled-label>
+    </div>
+  </div>
+
+  <div [formGroup]="documentForm" style="width: 100%; display: flex; flex-direction: column; flex:1; gap:0.5em ">
+    <div
+      style="display:block; overflow: auto;flex: 2;align-self: stretch; flex-direction: column;background-color: #FCFCFCBB; border: ridge 3px #b0bec5"
       (click)="onEditPanelClick()"
     >
       <ngx-codemirror #codemirror
diff --git a/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.ts b/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.ts
index 58483b4ba..fd17488e3 100644
--- a/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.ts
+++ b/smp-angular/src/app/edit/edit-resources/subresource-document-panel/subresource-document-panel.component.ts
@@ -32,7 +32,7 @@ export class SubresourceDocumentPanelComponent implements AfterViewInit, BeforeL
   private _resource: ResourceRo;
   private _subresource: SubresourceRo;
 
-  private _document: DocumentRo;
+  _document: DocumentRo;
   @Input() private group: GroupRo;
   @Input() domain: DomainRo;
   @Input() domainResourceDefs: ResourceDefinitionRo[];
diff --git a/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts b/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts
index f88c787b6..3b6ab5c65 100644
--- a/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts
+++ b/smp-angular/src/app/edit/edit-resources/subresource-panel/subresource-panel.component.ts
@@ -116,7 +116,7 @@ export class SubresourcePanelComponent implements AfterViewInit, OnInit, BeforeL
         subresourceDefs: subResDef,
         subresource: this.createSubresource(subResDef),
 
-        formTitle: "Create Subresourcedialog"
+        formTitle: "Create Subresource Dialog"
       }
     }).afterClosed().subscribe(value => {
       this.refresh();
@@ -204,6 +204,7 @@ export class SubresourcePanelComponent implements AfterViewInit, OnInit, BeforeL
       .subscribe((result: SubresourceRo) => {
           if (result) {
             this.alertService.success("Subresource  [" + this.selected.identifierScheme + "] and identifier: [" + this.selected.identifierValue + "] deleted.");
+            this.selected = null;
           }
         }, (error) => {
           this.alertService.error(error.error?.errorDescription);
diff --git a/smp-angular/src/app/security/security.service.ts b/smp-angular/src/app/security/security.service.ts
index f5f4c0b50..2130d93d4 100644
--- a/smp-angular/src/app/security/security.service.ts
+++ b/smp-angular/src/app/security/security.service.ts
@@ -117,9 +117,6 @@ export class SecurityService {
     return this.isCurrentUserInRole([Authority.SYSTEM_ADMIN]);
   }
 
-
-
-
   isCurrentUserSMPAdmin(): boolean {
     return this.isCurrentUserInRole([Authority.SMP_ADMIN]);
   }
diff --git a/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts b/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts
index 3fbc5629e..15af4cb24 100644
--- a/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts
+++ b/smp-angular/src/app/system-settings/admin-users/admin-user.component.ts
@@ -45,7 +45,6 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard {
               private alertService: AlertMessageService,
               private dialog: MatDialog) {
 
-
   }
 
   ngAfterViewInit() {
@@ -65,7 +64,7 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard {
     this.loadTableData();
   }
 
-  loadTableData() {
+  loadTableData(selectUsername: string = null) {
 
     this.isLoadingResults = true;
 
@@ -78,6 +77,10 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard {
           this.userData = [...result.serviceEntities];
           this.resultsLength = result.count;
           this.isLoadingResults = false;
+
+          if (!!selectUsername) {
+            this.userSelected(this.userData.find(user => user.username === selectUsername));
+          }
         }
       );
   }
@@ -150,8 +153,9 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard {
       if (user) {
         this.selected = null;
         this.managedUserData = null;
-        this.loadTableData();
+        this.loadTableData(user.username);
         this.alertService.success("User [" + user.username + "] updated!");
+
       }
     }, (error) => {
       if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)) {
@@ -167,8 +171,8 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard {
       if (user) {
         this.selected = null;
         this.managedUserData = null;
-        this.loadTableData();
-        this.alertService.success("User [" + user.username + "] created!");
+        this.loadTableData(user.username);
+        this.alertService.success("User [" + user.username + "] has been created!");
       }
     }, (error) => {
       if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)) {
@@ -200,7 +204,7 @@ export class AdminUserComponent implements AfterViewInit, BeforeLeaveGuard {
         this.selected = null;
         this.managedUserData = null;
         this.loadTableData();
-        this.alertService.success("User [" + user.username + "] deleted!");
+        this.alertService.success("User [" + user.username + "] has been deleted!");
       }
     }, (error) => {
       if (this.httpErrorHandlerService.logoutOnInvalidSessionError(error)) {
diff --git a/smp-angular/src/app/window/sidenav/nav-tree/nav-tree.component.scss b/smp-angular/src/app/window/sidenav/nav-tree/nav-tree.component.scss
index 0190f13f2..3e9cfed1e 100644
--- a/smp-angular/src/app/window/sidenav/nav-tree/nav-tree.component.scss
+++ b/smp-angular/src/app/window/sidenav/nav-tree/nav-tree.component.scss
@@ -15,7 +15,7 @@
   list-style-type: none;
   margin: 0 !important;
   padding: 0 !important;
-  padding-left: 1.0em !important;
+  padding-left: 0.5em !important;
 }
 
 /* Draw the bottom menu line */
@@ -26,7 +26,7 @@
 .nav-tree li button {
   min-height: 2.5em !important;
   height: 2.5em;
-  padding-left: 1.0em !important;
+  padding-left: 0.5em !important;
   padding-right: 0 !important;
   margin: 0 !important;
 }
diff --git a/smp-angular/src/app/window/sidenav/navigation-model.service.ts b/smp-angular/src/app/window/sidenav/navigation-model.service.ts
index ec61e088a..3fc4ac5cd 100644
--- a/smp-angular/src/app/window/sidenav/navigation-model.service.ts
+++ b/smp-angular/src/app/window/sidenav/navigation-model.service.ts
@@ -95,10 +95,6 @@ export class NavigationService extends MatTreeNestedDataSource<NavigationNode> {
         this.refreshNavigationTree();
       }
     );
-    securityEventService.onLoginErrorEvent().subscribe(value => {
-        this.refreshNavigationTree();
-      }
-    );
     securityEventService.onLogoutSuccessEvent().subscribe(value => {
         this.refreshNavigationTree();
       }
-- 
GitLab