incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1402294 [1/3] - in /incubator/ambari/branches/AMBARI-666: ./ ambari-web/ ambari-web/app/assets/img/jquery-ui-bootstrap/ ambari-web/app/styles/ ambari-web/app/templates/common/ ambari-web/app/templates/main/ ambari-web/app/views/common/ amb...
Date Thu, 25 Oct 2012 19:44:09 GMT
Author: yusaku
Date: Thu Oct 25 19:44:07 2012
New Revision: 1402294

URL: http://svn.apache.org/viewvc?rev=1402294&view=rev
Log:
AMBARI-918. Update styles in Cluster Management. (yusaku)

Added:
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aaaaaa_40x100.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ffffff_1x400.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_ffffff_1x400.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_highlight-soft_75_cccccc_1x100.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_inset-soft_95_fef1ec_1x100.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_222222_256x240.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_454545_256x240.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_888888_256x240.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_cd0a0a_256x240.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_f6cf3b_256x240.png
  (with props)
    incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/jquery-ui-bootstrap/
    incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/jquery-ui-bootstrap/jquery-ui-1.8.16.custom.css
Removed:
    incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/bootstrap-datepicker.js
    incubator/ambari/branches/AMBARI-666/ambari-web/vendor/styles/datepicker.css
Modified:
    incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/apps.hbs
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/time_range.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js
    incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js
    incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee
    incubator/ambari/branches/AMBARI-666/ambari-web/vendor/scripts/jquery-ui-timepicker-addon.js

Modified: incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt (original)
+++ incubator/ambari/branches/AMBARI-666/AMBARI-666-CHANGES.txt Thu Oct 25 19:44:07 2012
@@ -344,6 +344,8 @@ AMBARI-666 branch (unreleased changes)
 
   IMPROVEMENTS
 
+  AMBARI-918. Update styles in Cluster Management. (yusaku)
+
   AMBARI-917. Update layout and flow for App Browser. (yusaku)
 
   AMBARI-888. Add more tests for controller implementation. (hitesh)

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aaaaaa_40x100.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aaaaaa_40x100.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_flat_0_aaaaaa_40x100.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_55_fbf9ee_1x400.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ffffff_1x400.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ffffff_1x400.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_65_ffffff_1x400.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_dadada_1x400.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_e6e6e6_1x400.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_ffffff_1x400.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_ffffff_1x400.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_glass_75_ffffff_1x400.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_highlight-soft_75_cccccc_1x100.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_highlight-soft_75_cccccc_1x100.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_highlight-soft_75_cccccc_1x100.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_inset-soft_95_fef1ec_1x100.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_inset-soft_95_fef1ec_1x100.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-bg_inset-soft_95_fef1ec_1x100.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_222222_256x240.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_222222_256x240.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_222222_256x240.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_2e83ff_256x240.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_454545_256x240.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_454545_256x240.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_454545_256x240.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_888888_256x240.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_888888_256x240.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_888888_256x240.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_cd0a0a_256x240.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_cd0a0a_256x240.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_cd0a0a_256x240.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_f6cf3b_256x240.png
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_f6cf3b_256x240.png?rev=1402294&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/ambari/branches/AMBARI-666/ambari-web/app/assets/img/jquery-ui-bootstrap/ui-icons_f6cf3b_256x240.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/application.less Thu Oct 25
19:44:07 2012
@@ -141,6 +141,7 @@ footer {
   li.span2 {
     padding: 0;
     margin: 0;
+    width: 140px;
   }
 
   margin-bottom: 20px;
@@ -1404,7 +1405,7 @@ ul.inline li {
 
 /* TIME RANGE WIDGET */
 
-/* css for timepicker */
+/* start css for timepicker */
 .ui-timepicker-div .ui-widget-header {
   margin-bottom: 8px;
 }
@@ -1444,6 +1445,23 @@ ul.inline li {
 .ui-timepicker-rtl dl dd {
   margin: 0 65px 10px 10px;
 }
+/* end css for timepicker */
+
+#slider {
+  margin: 10px 0 40px;
+  width: 330px;
+
+  .now-marker {
+    position: absolute;
+    right: -15px;
+    bottom: -23px;
+  }
+  .period-marker {
+    position: absolute;
+    left: -15px;
+    bottom: -23px;
+  }
+}
 
 /* TIME RANGE WIDGET END */
 
@@ -1488,4 +1506,4 @@ ul.inline li {
   display: block;
   width: 105px;
   margin-bottom: 10px;
-}
\ No newline at end of file
+}

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/styles/apps.less Thu Oct 25 19:44:07
2012
@@ -1,37 +1,40 @@
-#apps{
+#apps {
   .search-bar {
-    float:right;
+    float: right;
+    margin-top: -40px;
   }
   .dataTable {
     border: 1px solid silver;
     th {
-      border-top:none;
+      border-top: none;
     }
   }
+  .dataTables_wrapper {
+    margin-top: 10px;
+  }
   #filter_info {
-    float:left;
-    padding-top:10px;
+    padding-top: 10px;
   }
   .page-bar {
     border: 1px solid silver;
-    text-align:right;
+    text-align: right;
     div {
       display: inline-block;
-      margin:0 10px;
+      margin: 0 10px;
     }
     .dataTables_length {
       label {
-        display:inline;
+        display: inline;
       }
       select {
         margin-bottom: 4px;
         margin-top: 4px;
-        width:70px;
+        width: 70px;
       }
     }
     .dataTables_paginate {
       a {
-        padding:0 5px;
+        padding: 0 5px;
       }
     }
   }

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/common/time_range.hbs Thu
Oct 25 19:44:07 2012
@@ -24,4 +24,8 @@
   {{/each}}
   From {{view view.dateFromView}}
   To {{view view.dateToView}}
-</ul>
\ No newline at end of file
+</ul>
+<div id="slider">
+  <sapn class="period-marker">{{view.rangeLabel}}</sapn>
+  <sapn class="now-marker">{{view.nowLabel}}</sapn>
+</div>
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/apps.hbs
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/apps.hbs?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/apps.hbs (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/templates/main/apps.hbs Thu Oct 25
19:44:07 2012
@@ -17,8 +17,10 @@
 -->
 <div id="apps">
     <div id="filter_info" class="row">
-      <div class="span3">Show: <a href="javascript:void(0)">filtered(400)</a>&nbsp;&#124;&nbsp;<a
href="javascript:void(0)">starred(20)</a></div>
-      <div class="span2 offset1"><a href="javascript:void(0)">Clear filters</a>&nbsp;&#124;&nbsp;<a
href="javascript:void(0)">Clear stars</a></div>
+      <div class="span3">Show: <a href="javascript:void(0)">Filtered (400)</a>&nbsp;&#124;&nbsp;<a
href="javascript:void(0)">Starred (20)</a></div>
+      <div class="span2"><a href="javascript:void(0)">Clear filters</a>&nbsp;&#124;&nbsp;<a
href="javascript:void(0)">Clear stars</a></div>
+    </div>
+    <div>
     </div>
     <table class="table table-striped" id="dataTable">
     <thead>

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/time_range.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/time_range.js?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/time_range.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/common/time_range.js Thu Oct
25 19:44:07 2012
@@ -26,21 +26,25 @@ var App = require('app');
  */
 App.TimeRangeWidget = Em.View.extend({
   classNames:['time-range-widget'],
+  templateName:require('templates/common/time_range'),
+  dateFrom: null,
+  dateTo: null,
+
   /**
    * presets
    */
   presets:[
-    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1hour'), value:'1h'}),
-    Em.Object.create({ label:Em.I18n.t('timeRange.presets.12hour'), value:'12h'}),
-    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1day'), value:'1d'}),
-    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1week'), value:'1wk'}),
-    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1month'), value:'1mo'}),
-    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1year'), value:'1yr'})
+    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1hour'), value:'1h', period: 3600000,
step: 300000}),
+    Em.Object.create({ label:Em.I18n.t('timeRange.presets.12hour'), value:'12h', period:
43200000, step: 3600000}),
+    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1day'), value:'1d', period: 86400000,
step: 3600000}),
+    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1week'), value:'1wk', period: 604800000,
step: 86400000}),
+    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1month'), value:'1mo', period:
2592000000, step: 86400000}),
+    Em.Object.create({ label:Em.I18n.t('timeRange.presets.1year'), value:'1yr', period: 31536000000,
step: 2592000000})
   ],
   /**
    * chosen preset value
    */
-  chosenPreset:'1h',
+  chosenPreset: null,
 
   /**
    * return array of chosen presets
@@ -59,9 +63,9 @@ App.TimeRangeWidget = Em.View.extend({
       return this.get('isActive') ? "disabled" : false;
     }.property('isActive'),
     isActive:function () {
-      return this.get('preset.value') == this.get('widget.chosenPreset');
+      return this.get('preset.value') == this.get('widget.chosenPreset.value');
     }.property('widget.chosenPreset'),
-    template:Em.Handlebars.compile('<a {{action activate view.preset.value target="view.widget"
href="true" }}>{{unbound view.preset.label}}</a>')
+    template:Em.Handlebars.compile('<a {{action activate view.preset target="view.widget"
href="true" }}>{{unbound view.preset.label}}</a>')
   }),
 
   /**
@@ -96,11 +100,13 @@ App.TimeRangeWidget = Em.View.extend({
    * @param event
    */
   activate:function (event) {
-    this.set('chosenPreset', event.context);
+    if (event.context == this.get('chosenPreset')) {
+      this.set('chosenPreset', null);
+    } else {
+      this.set('chosenPreset', event.context);
+    }
   },
 
-  templateName:require('templates/common/time_range'),
-
   dateFromView: Ember.TextField.extend({
     elementId: 'timeRangeFrom',
     classNames: 'timeRangeFrom',
@@ -108,7 +114,7 @@ App.TimeRangeWidget = Em.View.extend({
     readonly: true,
     didInsertElement: function() {
       var self = this;
-      $('#timeRangeFrom').datetimepicker({
+      this.$().datetimepicker({
         dateFormat: 'dd/mm/yy',
         timeFormat: 'hh:mm',
         maxDate: new Date(),
@@ -119,8 +125,7 @@ App.TimeRangeWidget = Em.View.extend({
             var testEndDate = new Date(endDateTextBox.val());
             if (testStartDate > testEndDate)
               endDateTextBox.val(dateText);
-          }
-          else {
+          } else {
             endDateTextBox.val(dateText);
           }
           self.set('dateFrom', dateText);
@@ -141,10 +146,10 @@ App.TimeRangeWidget = Em.View.extend({
     readonly: true,
     didInsertElement: function() {
       var self = this;
-      $('#timeRangeTo').datetimepicker({
-        maxDate: new Date(),
+      this.$().datetimepicker({
         dateFormat: 'dd/mm/yy',
         timeFormat: 'hh:mm',
+        maxDate: new Date(),
         onClose:function (dateText, inst) {
           var startDateTextBox = $('#timeRangeFrom');
           if (startDateTextBox.val() != '') {
@@ -152,8 +157,7 @@ App.TimeRangeWidget = Em.View.extend({
             var testEndDate = new Date(dateText);
             if (testStartDate > testEndDate)
               startDateTextBox.val(dateText);
-          }
-          else {
+          } else {
             startDateTextBox.val(dateText);
           }
           self.set('dateTo', dateText);
@@ -165,5 +169,53 @@ App.TimeRangeWidget = Em.View.extend({
       });
       self.set('dateTo', this.get('value'));
     }
-  })
+  }),
+
+  sliderOptions: Ember.Object.extend({
+    end: null,
+    period: null,
+    start: function() {
+      return this.get('end') - this.get('period');
+    }.property('end', 'period')
+  }),
+  nowLabel: null,
+  rangeLabel: null,
+  buildSlider: function() {
+    if (this.get('chosenPreset')) {
+      var sliderOptions = this.sliderOptions.create({
+        end: function() {
+          var endDate = new Date();
+          return endDate.getTime();
+        }.property(),
+        period: this.get('chosenPreset.period'),
+        step: this.get('chosenPreset.step'),
+        countTimeAgo: function(stepValue) {
+          var msAgo = this.get('end') - stepValue;
+          return msAgo.toDaysHoursMinutes();
+        }
+      });
+      this.set('nowLabel', 'Now');
+      this.set('rangeLabel', new Date(sliderOptions.get('start')));
+
+      var self = this;
+      $('#slider').slider({
+        range: "max",
+        min: sliderOptions.get('start'),
+        max: sliderOptions.get('end'),
+        value: sliderOptions.get('start'),
+        step: sliderOptions.get('step'),
+        stop: function(event, ui) {
+          self.set('rangeLabel', new Date(ui.value));
+//          self.set('rangeLabel', sliderOptions.countTimeAgo(ui.value).h);
+        },
+        slide: function(event, ui){
+          self.set('rangeLabel', new Date(ui.value));
+//          self.set('rangeLabel', sliderOptions.countTimeAgo(ui.value).h);
+        }
+      });
+    } else {
+      console.log(this.get('chosenPreset'));
+      $("#slider").slider("destroy");
+    }
+  }.observes('chosenPreset')
 })
\ No newline at end of file

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/host/summary.js Thu Oct
25 19:44:07 2012
@@ -26,7 +26,7 @@ App.MainHostSummaryView = Em.View.extend
   ComponentButtonView: Em.View.extend({
     content: null,
     adjustedIndex: function() {
-      return this.getPath('_parentView.contentIndex') + 1;
+      return this.get('_parentView.contentIndex') + 1;
     }.property(),
     positionButton: function() {
       return (this.get("adjustedIndex")%2 == 0) ? true : false;

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/app/views/main/menu.js Thu Oct 25 19:44:07
2012
@@ -30,8 +30,8 @@ App.MainMenuView = Em.CollectionView.ext
     { label:'Charts', routing:'charts'},
     { label:'Services', routing:'services'},
     { label:'Hosts', routing:'hosts'},
-    { label:'Admin', routing:'admin'},
-    { label:'Apps', routing:'apps'}
+    { label:'Apps', routing:'apps'},
+    { label:'Admin', routing:'admin'}
   ],
 
   /**

Modified: incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee?rev=1402294&r1=1402293&r2=1402294&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-web/config.coffee Thu Oct 25 19:44:07 2012
@@ -61,8 +61,8 @@ exports.config =
       order:
         before: [
           'vendor/styles/bootstrap.css',
-          'vendor/styles/datepicker.css',
-          'vendor/styles/font-awesome.css',
+#          'vendor/styles/datepicker.css'
+          'vendor/styles/font-awesome.css'
           'vendor/styles/font-awesome-ie7.css',
           'vendor/styles/cubism.css',
           'vendor/styles/rickshaw.css'



Mime
View raw message