소스 검색

AMBARI-7954. Slider View: UI updates. (akovalenko)

Aleksandr Kovalenko 10 년 전
부모
커밋
405ccff20d

+ 1 - 0
contrib/views/slider/src/main/resources/ui/app/controllers/slider_controller.js

@@ -58,6 +58,7 @@ App.SliderController = Ember.Controller.extend({
       initialValuesToLoad = this.get('initialValuesToLoad'),
       sliderConfigs = App.SliderApp.store.all('sliderConfig'),
       self = this;
+    App.set('label', Em.get(data, 'ViewInstanceInfo.label') || App.get('instance'));
     sliderConfigs.forEach(function (model) {
       var key = model.get('viewConfigName');
       model.set('value', properties[key]);

+ 5 - 0
contrib/views/slider/src/main/resources/ui/app/initialize.js

@@ -64,6 +64,11 @@ App.initializer({
        */
       instance: instanceName,
 
+      /**
+       * @type {string}
+       */
+      label: '',
+
       /**
        * API url for Slider
        * Format:

+ 14 - 0
contrib/views/slider/src/main/resources/ui/app/styles/application.less

@@ -91,6 +91,9 @@ select {
 #slider-apps-table  {
 
   #slider-table {
+    border-bottom: 1px solid #ddd;
+    border-left: 1px solid #ddd;
+    border-right: 1px solid #ddd;
     margin-top: 10px;
     margin-bottom: 10px;
     font-size: 13px\9;
@@ -153,6 +156,7 @@ select {
     }
     thead {
       background: none repeat scroll 0 0 #F8F8F8;
+      border-top: 1px solid #ddd;
     }
   }
   .page-bar {
@@ -256,8 +260,18 @@ select {
 
   .filter-input-width{
     width:68%;
+    font-weight: normal;
   }
   .table {
+
+    thead {
+      tr {
+        th {
+          border-bottom: none;
+        }
+      }
+    }
+
     table-layout: fixed;
     th {
       border-top: none;

+ 0 - 3
contrib/views/slider/src/main/resources/ui/app/styles/application.styl

@@ -16,6 +16,3 @@
  * limitations under the License.
  */
 @import 'nib'
-
-html, body
-  margin 20px

+ 1 - 1
contrib/views/slider/src/main/resources/ui/app/templates/application.hbs

@@ -18,7 +18,7 @@
 
 <div class="slider-header">
   {{#view view.SliderTitleView}}
-    <h1 class="pull-left">{{t slider.apps.title}} - <span class="slider-app-title" {{bs-bind-popover view.popover}}>{{App.instance}}</span></h1>
+    <h3 class="pull-left"><span class="slider-app-title" {{bs-bind-popover view.popover}}>{{App.label}}</span></h3>
     {{#if view.isIndexPage}}
       <div class="box-header pull-right">
         <div class="create-app">

+ 1 - 1
contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs

@@ -18,7 +18,7 @@
 
 <div id="slider-apps-table">
 
-  <table class="datatable table table-bordered table-striped" id="slider-table">
+  <table class="datatable table table-striped" id="slider-table">
     <thead>
     {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
       {{view view.parentView.nameSort}}

+ 1 - 0
contrib/views/slider/src/main/resources/ui/app/translations.js

@@ -22,6 +22,7 @@ Em.I18n.translations = {
   'ok': 'OK',
   'yes': 'Yes',
   'no': 'No',
+  'any': 'Any',
 
   'common' : {
     'add': 'Add',

+ 2 - 2
contrib/views/slider/src/main/resources/ui/app/views/common/filter_view.js

@@ -137,7 +137,7 @@ var wrapperView = Ember.View.extend({
  */
 var textFieldView = Ember.TextField.extend({
   type:'text',
- // placeholder: Em.I18n.t('any'),
+  placeholder: Em.I18n.t('any'),
   valueBinding: "parentView.value"
 });
 
@@ -271,7 +271,7 @@ module.exports = {
       attributeBindings: ['disabled','multiple'],
       disabled: false
     });
-    config.emptyValue = '';//Em.I18n.t('any');
+    config.emptyValue = Em.I18n.t('any');
 
     return wrapperView.extend(config);
   },