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 2020/04/29 18:51:38 UTC

[airavata-django-portal] branch develop updated (f2b3350 -> 3fc8207)

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

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


    from f2b3350  Merge branch 'AIRAVATA-3320-disallow-editing-grp-when-user-doesn-t-have-at-lea' into develop
     add 5f011bc  AIRAVATA-3276 Automatically add showOptions for managing isRequired
     add edecf49  AIRAVATA-3276 Removing backwards compat
     add d5c3215  Merge branch 'airavata-3243'
     add 9800b7a  AIRAVATA-3281 Capture content type of uploaded file
     add 162fe78  AIRAVATA-3281 Tests for data_products_helper
     add d359854  AIRAVATA-3281 Check if file is text
     add 405f484  Merge branch 'AIRAVATA-3299-bug-unselected-queues-in-grp-is-listed-in-create'
     add 4a0c407  Merge branch 'airavata-3268'
     add eb52ef3  Merge branch 'AIRAVATA-3126--Implement-compute-resource-reservation-addition'
     add 3a05aab  Revert "AIRAVATA-3299 Update list of queues when GRP changes"
     new b18cefc  AIRAVATA-3299 Update list of queues when GRP changes
     new ff78e37  AIRAVATA-3299 Fix bug that was causing default queue values to overwrite user values
     new 3fc8207  Merge branch 'AIRAVATA-3299-bug-unselected-queues-in-grp-is-listed-in-create' into develop

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../js/models/InputDataObjectType.js               |  7 ---
 .../components/experiment/QueueSettingsEditor.vue  | 59 +++++++++++-----------
 2 files changed, 30 insertions(+), 36 deletions(-)


[airavata-django-portal] 02/03: AIRAVATA-3299 Fix bug that was causing default queue values to overwrite user values

Posted by ma...@apache.org.
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 ff78e3781eb4083f6cff15e66c0089336240e5d3
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Apr 29 14:44:19 2020 -0400

    AIRAVATA-3299 Fix bug that was causing default queue values to overwrite user values
---
 .../components/experiment/QueueSettingsEditor.vue  | 59 +++++++++++-----------
 1 file changed, 30 insertions(+), 29 deletions(-)

diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
index 84087f6..0b33609 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
@@ -9,27 +9,23 @@
           >
             <div class="card-body">
               <h5 class="card-title mb-4">
-                Settings for queue
-                {{ localComputationalResourceScheduling.queueName }}
+                Settings for queue {{ data.queueName }}
               </h5>
               <div class="row">
                 <div class="col">
                   <h3 class="h5 mb-0">
-                    {{ localComputationalResourceScheduling.nodeCount }}
+                    {{ data.nodeCount }}
                   </h3>
                   <span class="text-muted text-uppercase">NODE COUNT</span>
                 </div>
                 <div class="col">
                   <h3 class="h5 mb-0">
-                    {{ localComputationalResourceScheduling.totalCPUCount }}
+                    {{ data.totalCPUCount }}
                   </h3>
                   <span class="text-muted text-uppercase">CORE COUNT</span>
                 </div>
                 <div class="col">
-                  <h3 class="h5 mb-0">
-                    {{ localComputationalResourceScheduling.wallTimeLimit }}
-                    minutes
-                  </h3>
+                  <h3 class="h5 mb-0">{{ data.wallTimeLimit }} minutes</h3>
                   <span class="text-muted text-uppercase">TIME LIMIT</span>
                 </div>
               </div>
@@ -181,14 +177,9 @@ export default {
       });
       return queueOptions;
     },
-    localComputationalResourceScheduling() {
-      return this.data;
-    },
     selectedQueueDefault: function() {
       return this.queueDefaults.find(
-        queue =>
-          queue.queueName ===
-          this.localComputationalResourceScheduling.queueName
+        queue => queue.queueName === this.data.queueName
       );
     },
     maxCPUCount: function() {
@@ -252,6 +243,19 @@ export default {
             })
         : [];
     },
+    defaultQueue() {
+      if (this.queueDefaults.length === 0) {
+        return null;
+      }
+      return this.queueDefaults[0];
+    },
+    defaultQueueBatchQueueResourcePolicy() {
+      if (this.defaultQueue) {
+        return this.getBatchQueueResourcePolicy(this.defaultQueue.queueName);
+      } else {
+        return null;
+      }
+    },
     queueDescription() {
       return this.selectedQueueDefault
         ? this.selectedQueueDefault.queueDescription
@@ -262,7 +266,7 @@ export default {
       if (!this.selectedQueueDefault) {
         return {};
       }
-      return this.localComputationalResourceScheduling.validate(
+      return this.data.validate(
         this.selectedQueueDefault,
         this.getBatchQueueResourcePolicy(this.selectedQueueDefault.queueName)
       );
@@ -298,17 +302,10 @@ export default {
       }
       const defaultQueue = this.queueDefaults[0];
 
-      this.localComputationalResourceScheduling.queueName =
-        defaultQueue.queueName;
-      this.localComputationalResourceScheduling.totalCPUCount = this.getDefaultCPUCount(
-        defaultQueue
-      );
-      this.localComputationalResourceScheduling.nodeCount = this.getDefaultNodeCount(
-        defaultQueue
-      );
-      this.localComputationalResourceScheduling.wallTimeLimit = this.getDefaultWalltime(
-        defaultQueue
-      );
+      this.data.queueName = defaultQueue.queueName;
+      this.data.totalCPUCount = this.getDefaultCPUCount(defaultQueue);
+      this.data.nodeCount = this.getDefaultNodeCount(defaultQueue);
+      this.data.wallTimeLimit = this.getDefaultWalltime(defaultQueue);
     },
     isQueueInComputeResourcePolicy: function(queueName) {
       if (!this.computeResourcePolicy) {
@@ -378,11 +375,15 @@ export default {
     appDeploymentId() {
       this.loadAppDeploymentQueues().then(() => this.setDefaultQueue());
     },
-    computeResourcePolicy() {
+    // If the default queue changes, re-set queue defaults
+    defaultQueue() {
       this.setDefaultQueue();
     },
-    batchQueueResourcePolicies() {
-      this.setDefaultQueue();
+    // If batch queue resource policy for the default queue changes, re-set queue defaults
+    defaultQueueBatchQueueResourcePolicy(newValue, oldValue) {
+      if (newValue !== oldValue) {
+        this.setDefaultQueue();
+      }
     }
   },
   mounted: function() {


[airavata-django-portal] 01/03: AIRAVATA-3299 Update list of queues when GRP changes

Posted by ma...@apache.org.
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 b18cefc7cb929f91a011dac6f824d2efe0e600b3
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Apr 23 17:50:13 2020 -0400

    AIRAVATA-3299 Update list of queues when GRP changes
---
 .../components/experiment/QueueSettingsEditor.vue  | 158 ++++++++++++---------
 1 file changed, 89 insertions(+), 69 deletions(-)

diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
index b8af3e9..84087f6 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/QueueSettingsEditor.vue
@@ -1,29 +1,35 @@
 <template>
-
   <div>
     <div class="row">
       <div class="col">
-        <div
-          class="card border-default"
-          :class="{ 'border-danger': !valid }"
-        >
+        <div class="card border-default" :class="{ 'border-danger': !valid }">
           <b-link
             @click="showConfiguration = !showConfiguration"
             class="card-link text-dark"
           >
             <div class="card-body">
-              <h5 class="card-title mb-4">Settings for queue {{ localComputationalResourceScheduling.queueName }}</h5>
+              <h5 class="card-title mb-4">
+                Settings for queue
+                {{ localComputationalResourceScheduling.queueName }}
+              </h5>
               <div class="row">
                 <div class="col">
-                  <h3 class="h5 mb-0">{{ localComputationalResourceScheduling.nodeCount }}</h3>
+                  <h3 class="h5 mb-0">
+                    {{ localComputationalResourceScheduling.nodeCount }}
+                  </h3>
                   <span class="text-muted text-uppercase">NODE COUNT</span>
                 </div>
                 <div class="col">
-                  <h3 class="h5 mb-0">{{ localComputationalResourceScheduling.totalCPUCount }}</h3>
+                  <h3 class="h5 mb-0">
+                    {{ localComputationalResourceScheduling.totalCPUCount }}
+                  </h3>
                   <span class="text-muted text-uppercase">CORE COUNT</span>
                 </div>
                 <div class="col">
-                  <h3 class="h5 mb-0">{{ localComputationalResourceScheduling.wallTimeLimit }} minutes</h3>
+                  <h3 class="h5 mb-0">
+                    {{ localComputationalResourceScheduling.wallTimeLimit }}
+                    minutes
+                  </h3>
                   <span class="text-muted text-uppercase">TIME LIMIT</span>
                 </div>
               </div>
@@ -51,7 +57,7 @@
             >
             </b-form-select>
             <div slot="description">
-              {{ selectedQueueDefault.queueDescription }}
+              {{ queueDescription }}
             </div>
           </b-form-group>
           <b-form-group
@@ -71,10 +77,7 @@
             >
             </b-form-input>
             <div slot="description">
-              <i
-                class="fa fa-info-circle"
-                aria-hidden="true"
-              ></i>
+              <i class="fa fa-info-circle" aria-hidden="true"></i>
               Max Allowed Nodes = {{ maxNodes }}
             </div>
           </b-form-group>
@@ -95,10 +98,7 @@
             >
             </b-form-input>
             <div slot="description">
-              <i
-                class="fa fa-info-circle"
-                aria-hidden="true"
-              ></i>
+              <i class="fa fa-info-circle" aria-hidden="true"></i>
               Max Allowed Cores = {{ maxCPUCount }}
             </div>
           </b-form-group>
@@ -121,10 +121,7 @@
               </b-form-input>
             </b-input-group>
             <div slot="description">
-              <i
-                class="fa fa-info-circle"
-                aria-hidden="true"
-              ></i>
+              <i class="fa fa-info-circle" aria-hidden="true"></i>
               Max Allowed Wall Time = {{ maxWalltime }} minutes
             </div>
           </b-form-group>
@@ -134,11 +131,9 @@
               href="#"
               @click.prevent="showConfiguration = false"
             >
-              <i
-                class="fa fa-times text-secondary"
-                aria-hidden="true"
-              ></i>
-              Hide Settings</a>
+              <i class="fa fa-times text-secondary" aria-hidden="true"></i>
+              Hide Settings</a
+            >
           </div>
         </div>
       </div>
@@ -172,8 +167,8 @@ export default {
   },
   data() {
     return {
-      queueDefaults: [],
-      showConfiguration: false
+      showConfiguration: false,
+      appDeploymentQueues: null
     };
   },
   computed: {
@@ -197,6 +192,9 @@ export default {
       );
     },
     maxCPUCount: function() {
+      if (!this.selectedQueueDefault) {
+        return 0;
+      }
       const batchQueueResourcePolicy = this.getBatchQueueResourcePolicy(
         this.selectedQueueDefault.queueName
       );
@@ -209,6 +207,9 @@ export default {
       return this.selectedQueueDefault.maxProcessors;
     },
     maxNodes: function() {
+      if (!this.selectedQueueDefault) {
+        return 0;
+      }
       const batchQueueResourcePolicy = this.getBatchQueueResourcePolicy(
         this.selectedQueueDefault.queueName
       );
@@ -221,6 +222,9 @@ export default {
       return this.selectedQueueDefault.maxNodes;
     },
     maxWalltime: function() {
+      if (!this.selectedQueueDefault) {
+        return 0;
+      }
       const batchQueueResourcePolicy = this.getBatchQueueResourcePolicy(
         this.selectedQueueDefault.queueName
       );
@@ -232,6 +236,27 @@ export default {
       }
       return this.selectedQueueDefault.maxRunTime;
     },
+    queueDefaults() {
+      return this.appDeploymentQueues
+        ? this.appDeploymentQueues
+            .filter(q => this.isQueueInComputeResourcePolicy(q.queueName))
+            .sort((a, b) => {
+              // Sort default first, then by alphabetically by name
+              if (a.isDefaultQueue) {
+                return -1;
+              } else if (b.isDefaultQueue) {
+                return 1;
+              } else {
+                return a.queueName.localeCompare(b.queueName);
+              }
+            })
+        : [];
+    },
+    queueDescription() {
+      return this.selectedQueueDefault
+        ? this.selectedQueueDefault.queueDescription
+        : null;
+    },
     validation() {
       // Don't run validation if we don't have selectedQueueDefault
       if (!this.selectedQueueDefault) {
@@ -262,41 +287,28 @@ export default {
         this.$emit("valid");
       }
     },
-    loadQueueDefaults: function(updateQueueSettings) {
+    loadAppDeploymentQueues() {
       return services.ApplicationDeploymentService.getQueues({
         lookup: this.appDeploymentId
-      }).then(queueDefaults => {
-        // Sort queue defaults
-        this.queueDefaults = queueDefaults
-          .filter(q => this.isQueueInComputeResourcePolicy(q.queueName))
-          .sort((a, b) => {
-            // Sort default first, then by alphabetically by name
-            if (a.isDefaultQueue) {
-              return -1;
-            } else if (b.isDefaultQueue) {
-              return 1;
-            } else {
-              return a.queueName.localeCompare(b.queueName);
-            }
-          });
-
-        if (updateQueueSettings) {
-          // Find the default queue and apply it's settings
-          const defaultQueue = this.queueDefaults[0];
+      }).then(queueDefaults => (this.appDeploymentQueues = queueDefaults));
+    },
+    setDefaultQueue() {
+      if (this.queueDefaults.length === 0) {
+        return;
+      }
+      const defaultQueue = this.queueDefaults[0];
 
-          this.localComputationalResourceScheduling.queueName =
-            defaultQueue.queueName;
-          this.localComputationalResourceScheduling.totalCPUCount = this.getDefaultCPUCount(
-            defaultQueue
-          );
-          this.localComputationalResourceScheduling.nodeCount = this.getDefaultNodeCount(
-            defaultQueue
-          );
-          this.localComputationalResourceScheduling.wallTimeLimit = this.getDefaultWalltime(
-            defaultQueue
-          );
-        }
-      });
+      this.localComputationalResourceScheduling.queueName =
+        defaultQueue.queueName;
+      this.localComputationalResourceScheduling.totalCPUCount = this.getDefaultCPUCount(
+        defaultQueue
+      );
+      this.localComputationalResourceScheduling.nodeCount = this.getDefaultNodeCount(
+        defaultQueue
+      );
+      this.localComputationalResourceScheduling.wallTimeLimit = this.getDefaultWalltime(
+        defaultQueue
+      );
     },
     isQueueInComputeResourcePolicy: function(queueName) {
       if (!this.computeResourcePolicy) {
@@ -363,19 +375,27 @@ export default {
     }
   },
   watch: {
-    appDeploymentId: function() {
-      this.loadQueueDefaults(true);
+    appDeploymentId() {
+      this.loadAppDeploymentQueues().then(() => this.setDefaultQueue());
+    },
+    computeResourcePolicy() {
+      this.setDefaultQueue();
+    },
+    batchQueueResourcePolicies() {
+      this.setDefaultQueue();
     }
   },
   mounted: function() {
-    // For brand new queue settings (no queueName specified) load the default
-    // queue and its default values and apply them
-    const updateQueueSettings = !this.value.queueName;
-    this.loadQueueDefaults(updateQueueSettings).then(() => this.validate());
+    this.loadAppDeploymentQueues().then(() => {
+      // For brand new queue settings (no queueName specified) load the default
+      // queue and its default values and apply them
+      if (!this.value.queueName) {
+        this.setDefaultQueue();
+      }
+    });
     this.$on("input", () => this.validate());
   }
 };
 </script>
 
-<style>
-</style>
+<style></style>


[airavata-django-portal] 03/03: Merge branch 'AIRAVATA-3299-bug-unselected-queues-in-grp-is-listed-in-create' into develop

Posted by ma...@apache.org.
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 3fc8207a43b579a18c298959accedc8357af61b6
Merge: f2b3350 ff78e37
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Apr 29 14:48:31 2020 -0400

    Merge branch 'AIRAVATA-3299-bug-unselected-queues-in-grp-is-listed-in-create' into develop

 .../js/models/InputDataObjectType.js               |  7 ---
 .../components/experiment/QueueSettingsEditor.vue  | 59 +++++++++++-----------
 2 files changed, 30 insertions(+), 36 deletions(-)