airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 14/28: AIRAVATA-2876 Delete inputs
Date Tue, 11 Sep 2018 17:12:02 GMT
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 b476f8c44eb5cde1e6e1a68bb3e571d89592ed2b
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Tue Sep 4 21:40:26 2018 -0400

    AIRAVATA-2876 Delete inputs
---
 django_airavata/apps/admin/package-lock.json              | 15 +++++++++++----
 django_airavata/apps/admin/package.json                   |  2 +-
 .../applications/ApplicationInputFieldEditor.vue          | 12 +++++++++++-
 .../applications/ApplicationInterfaceEditor.vue           |  5 ++++-
 .../apps/admin/static/django_airavata_admin/src/main.js   |  4 +++-
 5 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/django_airavata/apps/admin/package-lock.json b/django_airavata/apps/admin/package-lock.json
index 8719a05..43b0092 100644
--- a/django_airavata/apps/admin/package-lock.json
+++ b/django_airavata/apps/admin/package-lock.json
@@ -1526,14 +1526,16 @@
       "integrity": "sha512-rDFIzgXcof0jDyjNosjv4Sno77X4KuPeFxG2XZZv1/Kc8DRVGVADdoQyyOVDwPqL36DDmtCQbrpMCqvpPLJQ0w=="
     },
     "bootstrap-vue": {
-      "version": "1.5.1",
-      "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-1.5.1.tgz",
-      "integrity": "sha512-bkob7vTHA5VZN6U0Wj34Yj+6jNtqAtc6MwcsLdBz78fcy8Ju5tlYUYMDUefQ0rQH7hhdtFDn9GuDiqhUPmE1sA==",
+      "version": "2.0.0-rc.11",
+      "resolved": "https://registry.npmjs.org/bootstrap-vue/-/bootstrap-vue-2.0.0-rc.11.tgz",
+      "integrity": "sha512-LxR+oL8yKr1DVoWUWTX+XhiT0xaTMH6142u2VSFDm4tewTH8HIrzN2YIl7HLZrw2DIuE9bRMIdWJqqn3aQe7Hw==",
       "requires": {
+        "bootstrap": "^4.1.1",
+        "lodash.get": "^4.4.2",
         "lodash.startcase": "^4.4.0",
         "opencollective": "^1.0.3",
         "popper.js": "^1.12.9",
-        "vue-functional-data-merge": "^2.0.3"
+        "vue-functional-data-merge": "^2.0.5"
       }
     },
     "brace-expansion": {
@@ -14563,6 +14565,11 @@
       "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
       "dev": true
     },
+    "lodash.get": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+      "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
+    },
     "lodash.memoize": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
diff --git a/django_airavata/apps/admin/package.json b/django_airavata/apps/admin/package.json
index ad5b6f7..42b83ad 100644
--- a/django_airavata/apps/admin/package.json
+++ b/django_airavata/apps/admin/package.json
@@ -12,7 +12,7 @@
   },
   "dependencies": {
     "bootstrap": "^4.0.0",
-    "bootstrap-vue": "^1.5.1",
+    "bootstrap-vue": "^2.0.0-rc.11",
     "django-airavata-api": "file:../api",
     "django-airavata-common-ui": "file:../../static/common",
     "moment": "^2.22.2",
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
index 65cd2a8..1694345 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInputFieldEditor.vue
@@ -1,5 +1,12 @@
 <template>
-  <b-card header="Input Field">
+  <b-card>
+    <div class="d-flex align-items-center" slot="header">
+      <div class="mr-auto">Input Field: {{ data.name }}</div>
+      <b-link class="text-secondary" @click="deleteApplicationInput">
+        <i class="fa fa-trash"></i>
+        <span class="sr-only">Delete</span>
+      </b-link>
+    </div>
     <b-form-group label="Name" :label-for="id+'-name'">
       <b-form-input :id="id+'-name'" type="text" v-model="data.name" ref="nameInput" required></b-form-input>
     </b-form-group>
@@ -81,6 +88,9 @@ export default {
     doFocus() {
       this.$refs.nameInput.focus();
       this.$el.scrollIntoView();
+    },
+    deleteApplicationInput() {
+      this.$emit("delete");
     }
   },
   mounted() {
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
index 00af581..c49243e 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/applications/ApplicationInterfaceEditor.vue
@@ -26,7 +26,7 @@
         <h1 class="h5 mb-4">
           Input Fields
         </h1>
-        <application-input-field-editor v-for="(input, index) in data.applicationInputs"
:value="input" :key="index" :id="'app-input-'+index" :focus="index === focusApplicationInputIndex"
@input="updatedInput($event, index)" />
+        <application-input-field-editor v-for="(input, index) in data.applicationInputs"
:value="input" :key="index" :id="'app-input-'+index" :focus="index === focusApplicationInputIndex"
@input="updatedInput($event, index)" @delete="deleteInput($event, index)" />
       </div>
     </div>
     <div class="row">
@@ -89,6 +89,9 @@ export default {
     addApplicationInput() {
       this.data.applicationInputs.push(new models.InputDataObjectType());
       this.focusApplicationInputIndex = this.data.applicationInputs.length - 1;
+    },
+    deleteInput(e, index) {
+      this.data.applicationInputs.splice(index, 1);
     }
   }
 };
diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/main.js b/django_airavata/apps/admin/static/django_airavata_admin/src/main.js
index 92bc6ab..640b5a9 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/main.js
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/main.js
@@ -8,6 +8,8 @@ import Loading from './components/Loading.vue'
 import ComputeResourceDashboard from './components/dashboards/ComputeResourceDashboard'
 import ComputeResourcePreferenceDashboard from './components/dashboards/ComputeResourcePreferenceDashboard'
 import BootstrapVue from 'bootstrap-vue'
+// TODO: load the latest bootstrap css globally
+import 'bootstrap/dist/css/bootstrap.css'
 import 'bootstrap-vue/dist/bootstrap-vue.css'
 
 import { components, errors } from 'django-airavata-common-ui'
@@ -26,7 +28,7 @@ Vue.use(VueRouter);
 
 export function initializeApacheAiravataDashboard(dashboardName) {
   var template = `
-    <div class="vmain"><notifications-display/><Loading/> 
+    <div class="vmain"><notifications-display/><Loading/>
         <transition name="fade">
             <router-view>
             </router-view>


Mime
View raw message