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

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 4fa929083977b9f755b78afb106eaf17a7cd56ba
Author: Marcus Christie <machris...@apache.org>
AuthorDate: Tue May 19 17:18:46 2020 -0400

    AIRAVATA-3323 Add delete confirmation to group resource profile UI
    
    Also some changes for consistency in delete confirmation dialogs.
---
 .../ComputePreference.vue                          | 28 +++++++++++-------
 .../ComputeResourceReservationList.vue             |  9 ++----
 .../GroupComputeResourcePreference.vue             | 26 ++++++++---------
 .../applications/ApplicationDeploymentsList.vue    |  4 +--
 .../applications/ApplicationEditorContainer.vue    |  2 +-
 .../ComputeResourcePreferenceDashboard.vue         | 34 ++++++++++++++++------
 .../gatewayprofile/StoragePreferenceList.vue       |  2 +-
 .../src/components/users/DeleteUserPanel.vue       |  2 +-
 .../experiment/input-editors/FileInputEditor.vue   |  2 +-
 .../components/storage/UserStoragePathViewer.vue   |  2 +-
 10 files changed, 65 insertions(+), 46 deletions(-)

diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
index bea36f0..013370b 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputePreference.vue
@@ -162,15 +162,17 @@
       </div>
     </div>
     <div class="fixed-footer">
-        <b-button variant="primary" @click="save" :disabled="!valid"
-          >Save</b-button
-        >
-        <b-button class="ml-2" variant="danger" @click="remove"
-          >Delete</b-button
-        >
-        <b-button class="ml-2" variant="secondary" @click="cancel"
-          >Cancel</b-button
-        >
+      <b-button variant="primary" @click="save" :disabled="!valid"
+        >Save</b-button
+      >
+      <delete-button class="ml-2" @delete="remove">
+        Are you sure you want to remove the preferences for compute resource
+        <strong>{{ computeResource.hostName }}</strong
+        >?
+      </delete-button>
+      <b-button class="ml-2" variant="secondary" @click="cancel"
+        >Cancel</b-button
+      >
     </div>
   </div>
 </template>
@@ -185,13 +187,15 @@ import { models, services, errors } from 
"django-airavata-api";
 import {
   mixins,
   notifications,
-  errors as uiErrors
+  errors as uiErrors,
+  components
 } from "django-airavata-common-ui";
 
 export default {
   name: "compute-preference",
   components: {
     BatchQueueResourcePolicy,
+    "delete-button": components.DeleteButton,
     "ssh-credential-selector": SSHCredentialSelector,
     ComputeResourceReservationList
   },
@@ -476,7 +480,9 @@ export default {
     },
     addReservation(reservation) {
       this.data.reservations.push(reservation);
-      this.data.reservations.sort((a, b) => a.startTime < b.startTime ? -1 : 
1);
+      this.data.reservations.sort((a, b) =>
+        a.startTime < b.startTime ? -1 : 1
+      );
     },
     deleteReservation(reservation) {
       const reservationIndex = this.data.reservations.findIndex(
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
index 757efb8..b75aa5b 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/ComputeResourceReservationList.vue
@@ -47,11 +47,7 @@
       </b-card>
     </template>
     <template slot="item-list" slot-scope="slotProps">
-      <b-table
-        hover
-        :fields="fields"
-        :items="slotProps.items"
-      >
+      <b-table hover :fields="fields" :items="slotProps.items">
         <template slot="reservationName" slot-scope="data">
           {{ data.value }}
           <b-badge v-if="data.item.isExpired">Expired</b-badge>
@@ -79,7 +75,8 @@
             @delete="deleteReservation(data.item)"
           >
             Are you sure you want to delete reservation
-            {{ data.item.reservationName }}?
+            <strong>{{ data.item.reservationName }}</strong
+            >?
           </delete-link>
         </template>
         <template slot="row-details" slot-scope="row">
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
index 1da5d22..1bb5388 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/GroupComputeResourcePreference.vue
@@ -78,16 +78,13 @@
               Edit
               <i class="fa fa-edit" aria-hidden="true"></i>
             </router-link>
-            <a
-              href="#"
-              class="action-link text-danger"
-              @click.prevent="
-                removeComputePreference(row.item.computeResourceId)
-              "
+            <delete-link
+              class="action-link"
+              @delete="removeComputePreference(row.item.computeResourceId)"
             >
-              Delete
-              <i class="fa fa-trash" aria-hidden="true"></i>
-            </a>
+              Are you sure you want to remove the preferences for compute 
resource
+              <strong>{{ getComputeResourceName(row.item.computeResourceId) 
}}</strong>?
+            </delete-link>
           </template>
         </b-table>
       </template>
@@ -96,13 +93,14 @@
       <b-button variant="primary" @click="saveGroupResourceProfile"
         >Save</b-button
       >
-      <b-button
+      <delete-button
         v-if="id"
         class="ml-2"
-        variant="danger"
-        @click="removeGroupResourceProfile"
-        >Delete</b-button
+        @delete="removeGroupResourceProfile"
       >
+        Are you sure you want to remove Group Resource Profile
+        <strong>{{ data.groupResourceProfileName }}</strong>?
+      </delete-button>
       <b-button class="ml-2" variant="secondary" @click="cancel"
         >Cancel</b-button
       >
@@ -182,6 +180,8 @@ export default {
   },
 
   components: {
+    "delete-button": comps.DeleteButton,
+    "delete-link": comps.DeleteLink,
     "share-button": comps.ShareButton,
     "list-layout": layouts.ListLayout,
     ComputeResourcePolicySummary,
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
index 4fcfbdb..5847ca4 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationDeploymentsList.vue
@@ -17,8 +17,8 @@
               Edit
               <i class="fa fa-edit" aria-hidden="true"></i>
             </router-link>
-            <delete-link v-if="data.item.userHasWriteAccess" 
@delete="removeApplicationDeployment(data.item)">
-              Are you sure you want to remove the {{ 
getComputeResourceName(data.item.computeHostId) }} deployment?
+            <delete-link v-if="data.item.userHasWriteAccess" 
@delete="removeApplicationDeployment(data.item)" class="action-link">
+              Are you sure you want to remove the <strong>{{ 
getComputeResourceName(data.item.computeHostId) }}</strong> deployment?
             </delete-link>
           </template>
         </b-table>
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
index a71bda2..240543f 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationEditorContainer.vue
@@ -33,7 +33,7 @@
           Save
         </b-button>
         <delete-button class="editor-button" v-if="id" :disabled="readonly" 
@delete="deleteApplication">
-          Are you sure you want to delete the {{ appModule ? 
appModule.appModuleName : "" }} application?
+          Are you sure you want to delete the <strong>{{ appModule ? 
appModule.appModuleName : "" }}</strong> application?
         </delete-button>
         <b-button class="editor-button" variant="secondary" @click="cancel">
           Cancel
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
index c72813d..a2c1225 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/dashboards/ComputeResourcePreferenceDashboard.vue
@@ -1,20 +1,35 @@
 <template>
-  <list-layout @add-new-item="newGroupResourcePreference" 
:items="groupResourceProfiles" title="Group Resource Profiles" 
new-item-button-text="New Group Resource Profile">
+  <list-layout
+    @add-new-item="newGroupResourcePreference"
+    :items="groupResourceProfiles"
+    title="Group Resource Profiles"
+    new-item-button-text="New Group Resource Profile"
+  >
     <template slot="item-list" slot-scope="slotProps">
-
       <b-table striped hover :fields="fields" :items="slotProps.items">
         <template slot="updatedTime" slot-scope="data">
-          <human-date :date="data.value"/>
+          <human-date :date="data.value" />
         </template>
         <template slot="action" slot-scope="data">
-          <router-link class="action-link" v-if="data.item.userHasWriteAccess" 
:to="{name: 'group_resource_preference', params: {value: data.item, id: 
data.item.groupResourceProfileId}}">
+          <router-link
+            class="action-link"
+            v-if="data.item.userHasWriteAccess"
+            :to="{
+              name: 'group_resource_preference',
+              params: { value: data.item, id: data.item.groupResourceProfileId 
}
+            }"
+          >
             Edit
             <i class="fa fa-edit" aria-hidden="true"></i>
           </router-link>
-          <a href="#" class="action-link text-danger" 
@click.prevent="removeGroupResourceProfile(data.item)" 
v-if="data.item.userHasWriteAccess">
-            Delete
-            <i class="fa fa-trash" aria-hidden="true"></i>
-          </a>
+          <delete-link
+            v-if="data.item.userHasWriteAccess"
+            class="action-link"
+            @delete="removeGroupResourceProfile(data.item)"
+          >
+            Are you sure you want to delete Group Resource Profile
+            <strong>{{ data.item.groupResourceProfileName }}</strong>?
+          </delete-link>
         </template>
       </b-table>
     </template>
@@ -28,6 +43,7 @@ import { services } from "django-airavata-api";
 export default {
   name: "compute-resource-preference",
   components: {
+    "delete-link": components.DeleteLink,
     "human-date": components.HumanDate,
     "list-layout": layouts.ListLayout
   },
@@ -41,7 +57,7 @@ export default {
         },
         {
           label: "Updated",
-          key: "updatedTime",
+          key: "updatedTime"
         },
         {
           label: "Action",
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
index af2122c..b1480f6 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/gatewayprofile/StoragePreferenceList.vue
@@ -34,7 +34,7 @@
             <i class="fa fa-edit" aria-hidden="true"></i>
           </b-link>
           <delete-link v-if="!readonly" class="action-link" 
@delete="deleteStoragePreference(data.item.storageResourceId)">
-            Are you sure you want to delete the storage preference for {{ 
getStorageResourceName(data.item.storageResourceId) }}?
+            Are you sure you want to delete the storage preference for 
<strong>{{ getStorageResourceName(data.item.storageResourceId) }}</strong>?
           </delete-link>
         </template>
         <template slot="row-details" slot-scope="row">
diff --git 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
index 30fc748..ecb59d8 100644
--- 
a/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
+++ 
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/users/DeleteUserPanel.vue
@@ -4,7 +4,7 @@
       This will remove {{ username }} from the identity service.
     </p>
     <delete-button @delete="deleteUser">
-      Are you sure you want to delete {{ username }}?
+      Are you sure you want to delete <strong>{{ username }}</strong>?
     </delete-button>
   </b-card>
 </template>
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
index 3dcf631..99e8797 100644
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/FileInputEditor.vue
@@ -27,7 +27,7 @@
         class="ml-2"
         @delete="deleteDataProduct"
       >
-        Are you sure you want to delete input file {{ dataProduct.productName 
}}?
+        Are you sure you want to delete input file <strong>{{ 
dataProduct.productName }}</strong>?
       </delete-link>
       <b-link
         v-else
diff --git 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
index 627935f..a1402c7 100644
--- 
a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
+++ 
b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/storage/UserStoragePathViewer.vue
@@ -46,7 +46,7 @@
           v-if="includeDeleteAction"
           @delete="deleteItem(data.item)"
         >
-          Are you sure you want to delete {{ data.item.name }}?
+          Are you sure you want to delete <strong>{{ data.item.name 
}}</strong>?
         </delete-button>
       </template>
     </b-table>

Reply via email to