airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata-php-gateway git commit: updating the JS files
Date Fri, 24 Jul 2015 19:24:39 GMT
Repository: airavata-php-gateway
Updated Branches:
  refs/heads/0.15-release-branch 9bb22f16a -> fba03f474


updating the JS files


Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/fba03f47
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/fba03f47
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/fba03f47

Branch: refs/heads/0.15-release-branch
Commit: fba03f47464f2583969d0af37744abe462b47949
Parents: 9bb22f1
Author: Supun Nakandala <scnakandala@apache.org>
Authored: Fri Jul 24 15:24:23 2015 -0400
Committer: Supun Nakandala <scnakandala@apache.org>
Committed: Fri Jul 24 15:24:23 2015 -0400

----------------------------------------------------------------------
 app/views/admin/experiment-statistics.blade.php | 11 +++++++++++
 app/views/admin/manage-experiments.blade.php    | 20 ++++++++++++++++++++
 2 files changed, 31 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fba03f47/app/views/admin/experiment-statistics.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/experiment-statistics.blade.php b/app/views/admin/experiment-statistics.blade.php
index d1efbd1..b8ec413 100644
--- a/app/views/admin/experiment-statistics.blade.php
+++ b/app/views/admin/experiment-statistics.blade.php
@@ -198,7 +198,10 @@
     $("#getCreatedExperiments").click(function () {
         //These are coming from manage-experiments.blade.php
         $fromTime = $("#datetimepicker9").find("input").val();
+        $fromTime = convertToUtc($fromTime);
         $toTime = $("#datetimepicker10").find("input").val();
+        $toTime - convertToUtc($toTime);
+
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {
@@ -227,7 +230,9 @@
     $("#getRunningExperiments").click(function () {
         //These are coming from manage-experiments.blade.php
         $fromTime = $("#datetimepicker9").find("input").val();
+        $fromTime = convertToUtc($fromTime);
         $toTime = $("#datetimepicker10").find("input").val();
+        $toTime - convertToUtc($toTime);
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {
@@ -256,7 +261,9 @@
     $("#getCompletedExperiments").click(function () {
         //These are coming from manage-experiments.blade.php
         $fromTime = $("#datetimepicker9").find("input").val();
+        $fromTime = convertToUtc($fromTime);
         $toTime = $("#datetimepicker10").find("input").val();
+        $toTime - convertToUtc($toTime);
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {
@@ -285,7 +292,9 @@
     $("#getCancelledExperiments").click(function () {
         //These are coming from manage-experiments.blade.php
         $fromTime = $("#datetimepicker9").find("input").val();
+        $fromTime = convertToUtc($fromTime);
         $toTime = $("#datetimepicker10").find("input").val();
+        $toTime - convertToUtc($toTime);
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {
@@ -314,7 +323,9 @@
     $("#getFailedExperiments").click(function () {
         //These are coming from manage-experiments.blade.php
         $fromTime = $("#datetimepicker9").find("input").val();
+        $fromTime = convertToUtc($fromTime);
         $toTime = $("#datetimepicker10").find("input").val();
+        $toTime - convertToUtc($toTime);
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {

http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/fba03f47/app/views/admin/manage-experiments.blade.php
----------------------------------------------------------------------
diff --git a/app/views/admin/manage-experiments.blade.php b/app/views/admin/manage-experiments.blade.php
index e516c95..9fa19fa 100644
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@ -372,9 +372,29 @@ to be uncommented when actually in use.
         $('#datetimepicker9').data("DateTimePicker").setMaxDate(e.date);
     });
 
+    function convertToUtc(str) {
+
+        var date = new Date(str);
+        var year = date.getUTCFullYear();
+        var month = date.getUTCMonth()+1;
+        var dd = dategetUTCDate();
+        var hh = date.getUTCHours();
+        var mi = date.getUTCMinutes();
+        var sec = date.getUTCSeconds();
+
+        // 2010-11-12T13:14:15Z
+
+        theDate = year + "-" + (month [1] ? month : "0" + month [0]) + "-" +
+            (dd[1] ? dd : "0" + dd[0]);
+        theTime = (hh[1] ? hh : "0" + hh[0]) + ":" + (mi[1] ? mi : "0" + mi[0]);
+        return [ theDate, theTime ].join("T");
+    }
+
     $("#getStatistics").click(function () {
         $fromTime = $("#datetimepicker9").find("input").val();
+        $fromTime = convertToUtc($fromTime);
         $toTime = $("#datetimepicker10").find("input").val();
+        $toTime - convertToUtc($toTime);
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {


Mime
View raw message