You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dg...@apache.org on 2020/07/06 14:07:45 UTC

[incubator-dlab] branch develop updated: [DLAB-1917]: Fixed follow link action for AUDIT (#812)

This is an automated email from the ASF dual-hosted git repository.

dgnatyshyn pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 6e39da5  [DLAB-1917]: Fixed follow link action for AUDIT (#812)
6e39da5 is described below

commit 6e39da5cff716710146d2c9881f421a57086adec
Author: Dmytro Gnatyshyn <42...@users.noreply.github.com>
AuthorDate: Mon Jul 6 17:07:37 2020 +0300

    [DLAB-1917]: Fixed follow link action for AUDIT (#812)
    
    [DLAB-1917]: Fixed follow link action for AUDIT
---
 .../src/app/reports/audit/audit-grid/audit-grid.component.ts     | 9 +++++----
 .../computational/cluster-details/cluster-details.component.ts   | 2 +-
 .../exploratory/detail-dialog/detail-dialog.component.ts         | 2 +-
 .../notification-dialog/notification-dialog.component.ts         | 4 ++--
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts b/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
index 8c71bdd..c710b3f 100644
--- a/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/reports/audit/audit-grid/audit-grid.component.ts
@@ -221,16 +221,17 @@ export class AuditGridComponent implements OnInit {
             </mat-list>
             <ng-template #message>
               <div class="message-wrapper">
-                <p *ngIf="data.element.type !== 'COMPUTATIONAL'; else computation">
-                  <span *ngIf="data.element.info === 'Scheduled action.';else notScheduledNotebook">{{data.element.action | titlecase}} by scheduler.</span>
+                <p *ngIf="data.element.type !== 'COMPUTE'; else computation">
+                  <span *ngIf="data.element.info.indexOf('Scheduled') !== -1;else notScheduledNotebook">{{data.element.action | titlecase}} by scheduler.</span>
+
                   <ng-template #notScheduledNotebook>
                     <span>{{data.element.info}}.</span>
                   </ng-template>
                 </p>
                 <ng-template #computation>
-                  <p *ngIf="data.element.info.indexOf('Scheduled') !== -1;else notScheduled"> {{data.element.action | titlecase}} by scheduler, requested for notebook <span class="strong">{{data.element.info.split(' ')[data.element.info.split(' ').length - 1] }}</span></p>
+                  <p *ngIf="data.element.info.indexOf('Scheduled') !== -1;else notScheduled"> {{data.element.action | titlecase}} by scheduler, requested for notebook <span class="strong">{{data.element.info.split(' ')[data.element.info.split(' ').length - 1] }}.</span></p>
                     <ng-template #notScheduled>
-                      <p> {{data.element.action | titlecase}} computational resource <span class="strong">{{data.element.resourceName}}</span>, requested for notebook <span class="strong">{{data.element.info.split(' ')[data.element.info.split(' ').length - 1] }}</span></p>
+                      <p> {{data.element.action | titlecase}} computational resource <span class="strong">{{data.element.resourceName}}</span>, requested for notebook <span class="strong">{{data.element.info.split(' ')[data.element.info.split(' ').length - 1] }}.</span></p>
                     </ng-template>
                 </ng-template>
               </div>
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
index b026fb4..b6d32aa 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/computational/cluster-details/cluster-details.component.ts
@@ -119,6 +119,6 @@ export class DetailComputationalResourcesComponent implements OnInit {
   }
 
   private logAction(name: any, description: string) {
-    this.auditService.sendDataToAudit({resource_name: name, info: `Follow ${description} link`}).subscribe();
+    this.auditService.sendDataToAudit({resource_name: name, info: `Follow ${description} link`, type: 'COMPUTE'}).subscribe();
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
index 0c9d4ad..89a4e29 100644
--- a/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/resources/exploratory/detail-dialog/detail-dialog.component.ts
@@ -161,6 +161,6 @@ export class DetailDialogComponent implements OnInit {
   }
 
   private logAction(name: any, description: string) {
-    this.auditService.sendDataToAudit({resource_name: name, info: `Follow ${description} link`}).subscribe();
+    this.auditService.sendDataToAudit({resource_name: name, info: `Follow ${description} link`, type: 'NOTEBOOK'}).subscribe();
   }
 }
diff --git a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
index 657b47f..43688cf 100644
--- a/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
+++ b/services/self-service/src/main/resources/webapp/src/app/shared/modal-dialog/notification-dialog/notification-dialog.component.ts
@@ -39,8 +39,8 @@ import {Endpoint} from '../../../administration/project/project.component';
             </div>
               <div *ngIf="data.type === 'list'" class="info">
                   <div *ngIf="data.template.notebook.length > 0">
-                      Following notebook server<span *ngIf="data.template.notebook.length>1">s </span>
-                      <span *ngFor="let item of data.template.notebook">
+                      Following notebook server<span *ngIf="data.template.notebook.length>1">s</span>
+                    <span *ngFor="let item of data.template.notebook">&nbsp;
                         <span class="strong">{{ item.exploratory_name }}</span>
                         <span *ngIf="data.template.notebook.length > 1">, </span>
                       </span> will be stopped and all computational resources will be stopped/terminated


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org