airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [05/50] [abbrv] airavata-php-gateway git commit: Fixed auto filled time in Experiment Statistics UI to be local.
Date Tue, 09 Feb 2016 15:55:33 GMT
Fixed auto filled time in Experiment Statistics UI to be local.


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/2d92d705
Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/2d92d705
Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/2d92d705

Branch: refs/heads/master
Commit: 2d92d705a3483c8f12b1ee80d66c6dc26b9c6fa2
Parents: 6e6960a
Author: Nipurn Doshi <nipunhere@gmail.com>
Authored: Tue Jan 26 15:36:29 2016 -0500
Committer: Nipurn Doshi <nipunhere@gmail.com>
Committed: Tue Jan 26 15:36:29 2016 -0500

----------------------------------------------------------------------
 app/views/admin/manage-experiments.blade.php | 28 +++++++++++------------
 1 file changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/2d92d705/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 214f161..3bc6d5b 100644
--- a/app/views/admin/manage-experiments.blade.php
+++ b/app/views/admin/manage-experiments.blade.php
@@ -53,14 +53,15 @@
             </div>
 
             <div class="col-md-12">
-                <h4>Or Select dates between which you want to review experiment statistics.</h4>
+                <h4>Select dates between which you want to review experiment statistics.</h4>
             </div>
             <div class='col-md-5'>
                 <div class="form-group">
                     <div class='input-group date' id='datetimepicker9'>
                         <input type='text' class="form-control" placeholder="From Date"
name="from-date"/>
-                                    <span class="input-group-addon"><span class="glyphicon
glyphicon-calendar"></span>
-                                    </span>
+                        <span class="input-group-addon">
+                            <span class="glyphicon glyphicon-calendar"></span>
+                        </span>
                     </div>
                 </div>
             </div>
@@ -68,8 +69,9 @@
                 <div class="form-group">
                     <div class='input-group date' id='datetimepicker10'>
                         <input type='text' class="form-control" placeholder="To Date"
name="to-date"/>
-                                    <span class="input-group-addon"><span class="glyphicon
glyphicon-calendar"></span>
-                                    </span>
+                        <span class="input-group-addon">
+                            <span class="glyphicon glyphicon-calendar"></span>
+                        </span>
                     </div>
                 </div>
             </div>
@@ -395,32 +397,28 @@ to be uncommented when actually in use.
     });
 
     $(".oneDayExp").click( function(){
-        var todayDate = getCurrentDate();
-        var ydayDate = getCurrentDate(1);
+        todayDate = moment().format('MM/DD/YYYY hh:mm A');
+        ydayDate = moment().subtract(1, "days").format('MM/DD/YYYY hh:mm A');
         $("#datetimepicker9").find("input").val( ydayDate);
         $("#datetimepicker10").find("input").val( todayDate);
-        todayDate = moment(todayDate).utc().format('MM/DD/YYYY hh:mm a');
-        ydayDate = moment(ydayDate).utc().format('MM/DD/YYYY hh:mm a');
         var msg = "Experiments statistics from last 24 hours";
         getExperiments( ydayDate, todayDate, msg);
     });
 
     $(".oneWeekExp").click( function(){
-        var todayDate = getCurrentDate();
-        var ydayDate = getCurrentDate(7);
+        todayDate = moment().format('MM/DD/YYYY hh:mm A');
+        ydayDate = moment().subtract(7, "days").format('MM/DD/YYYY hh:mm A');
         $("#datetimepicker9").find("input").val( ydayDate);
         $("#datetimepicker10").find("input").val( todayDate);
-        todayDate = moment(todayDate).utc().format('MM/DD/YYYY hh:mm a');
-        ydayDate = moment(ydayDate).utc().format('MM/DD/YYYY hh:mm a');
         var msg = "Experiments statistics from last week";
         getExperiments( ydayDate, todayDate, msg);
     })
 
     $("#getStatistics").click(function () {
         $fromTime = $("#datetimepicker9").find("input").val();
-        $fromTime = moment($fromTime).utc().format('MM/DD/YYYY hh:mm a');
+        $fromTime = moment($fromTime).format('MM/DD/YYYY hh:mm A');
         $toTime = $("#datetimepicker10").find("input").val();
-        $toTime = moment($toTime).utc().format('MM/DD/YYYY hh:mm a');
+        $toTime = moment($toTime).utc().format('MM/DD/YYYY hh:mm A');
         if ($fromTime == '' || $toTime == '') {
             alert("Please Select Valid Date Inputs!");
         } else {


Mime
View raw message