You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/06/21 14:25:02 UTC

[airavata-django-portal] 01/02: AIRAVATA-2990 Add close button to experiment tab

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

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

commit 450bd2a1bd4e051a7742ebff9649d0b445d1e8e8
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Jun 21 10:20:07 2019 -0400

    AIRAVATA-2990 Add close button to experiment tab
---
 .../statistics/ExperimentStatisticsContainer.vue          | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
index 1e41f4b..f54a961 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/statistics/ExperimentStatisticsContainer.vue
@@ -280,8 +280,17 @@
         <b-tab
           v-for="experimentDetail in experimentDetails"
           :key="experimentDetail.experimentId"
-          :title="experimentDetail.experimentName"
         >
+          <template slot="title">
+            {{ experimentDetail.experimentName }}
+            <b-link
+              @click="removeExperimentDetails(experimentDetail.experimentId)"
+              class="text-secondary"
+            >
+              <i class="fas fa-times"></i>
+              <span class="sr-only">Close experiment tab</span>
+            </b-link>
+          </template>
           <experiment-details-view :experiment="experimentDetail" />
         </b-tab>
       </b-tabs>
@@ -565,6 +574,10 @@ export default {
       return this.experimentDetails.findIndex(
         e => e.experimentId === experimentId
       );
+    },
+    removeExperimentDetails(experimentId) {
+      const index = this.getExperimentDetailsIndex(experimentId);
+      this.experimentDetails.splice(index, 1);
     }
   }
 };