airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-django-portal] 02/04: AIRAVATA-2727 Convert batch queue policy max values to integers
Date Thu, 16 Aug 2018 13:19:40 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 065e78d11d45cdbbf8170878741bcbc3886eed66
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Wed Aug 15 12:51:40 2018 -0400

    AIRAVATA-2727 Convert batch queue policy max values to integers
---
 .../admin/group_resource_preferences/BatchQueueResourcePolicy.vue  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
index a40aeb4..9b9c723 100644
--- a/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
+++ b/django_airavata/apps/admin/static/django_airavata_admin/src/components/admin/group_resource_preferences/BatchQueueResourcePolicy.vue
@@ -5,6 +5,7 @@
         <b-form-input id="max-allowed-nodes" type="number"
           v-model="data.maxAllowedNodes" @input="policyUpdated"
           min="1" :max="batchQueue.maxNodes"
+          :formatter="numberFormatter"
           :placeholder="'Max Nodes: ' + batchQueue.maxNodes">
         </b-form-input>
       </b-form-group>
@@ -14,6 +15,7 @@
         <b-form-input id="max-allowed-cores" type="number"
           v-model="data.maxAllowedCores" @input="policyUpdated"
           min="1" :max="batchQueue.maxProcessors"
+          :formatter="numberFormatter"
           :placeholder="'Max Cores: ' + batchQueue.maxProcessors">
         </b-form-input>
       </b-form-group>
@@ -23,6 +25,7 @@
         <b-form-input id="max-allowed-walltime" type="number"
           v-model="data.maxAllowedWalltime" @input="policyUpdated"
           min="1" :max="batchQueue.maxRunTime"
+          :formatter="numberFormatter"
           :placeholder="'Max Wall Time: ' + batchQueue.maxRunTime">
         </b-form-input>
       </b-form-group>
@@ -58,6 +61,10 @@
         } else {
           this.$emit('input', null);
         }
+      },
+      numberFormatter: function(value, event) {
+        const num = parseInt(value);
+        return !isNaN(num) ? num : null;
       }
     }
   }


Mime
View raw message