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 2022/08/29 21:55:54 UTC

[airavata-django-portal] branch develop updated: AIRAVATA-3654 Parse input value as a float instead of as an int

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


The following commit(s) were added to refs/heads/develop by this push:
     new 3a67830f AIRAVATA-3654 Parse input value as a float instead of as an int
     new bb197c5a Merge branch 'AIRAVATA-3654' into develop
3a67830f is described below

commit 3a67830fa931f1781d4ea2efe8f0a18767feaf6b
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Aug 29 17:55:02 2022 -0400

    AIRAVATA-3654 Parse input value as a float instead of as an int
    
    Fixes bug where default float value was getting floored to an integer.
---
 .../js/components/experiment/input-editors/SliderInputEditor.vue        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SliderInputEditor.vue b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SliderInputEditor.vue
index 6824ad30..72ca46fd 100644
--- a/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SliderInputEditor.vue
+++ b/django_airavata/apps/workspace/static/django_airavata_workspace/js/components/experiment/input-editors/SliderInputEditor.vue
@@ -84,7 +84,7 @@ export default {
     },
     parseValue(value) {
       // Just remove any percentage signs
-      const result = value ? parseInt(value.replaceAll("%", "")) : NaN;
+      const result = value ? parseFloat(value.replaceAll("%", "")) : NaN;
       return !isNaN(result) ? result : this.sliderMin;
     },
     onChange(value) {