瀏覽代碼

AMBARI-4582. Jobs: convert the top-level Jobs table to use the same style as Hosts table (alexantonenko)

Alex Antonenko 11 年之前
父節點
當前提交
e20cd88855

File diff suppressed because it is too large
+ 120 - 9
ambari-web/app/styles/apps.less


+ 6 - 6
ambari-web/app/templates/main/jobs.hbs

@@ -28,10 +28,10 @@
       </div>
     </div>
 
-    <table class="table table-bordered table-striped">
+    <table id="jobs-table" class="table table-bordered table-striped">
         <thead>
 
-        {{#view view.sortView contentBinding="view.filteredContent"}}
+        {{#view view.sortView classNames="label-row" contentBinding="view.filteredContent"}}
             {{view view.parentView.idSort}}
             {{view view.parentView.userSort}}
             {{view view.parentView.startTimeSort}}
@@ -39,11 +39,11 @@
             {{view view.parentView.durationSort}}
         {{/view}}
 
-        <tr class="first">
+        <tr id="filter-row" class="first">
             <th>{{view view.jobsIdFilterView}}</th>
             <th>{{view view.userFilterView}}</th>
-            <th>{{view view.startTimeFilterView}}</th>
-            <th>{{view view.endTimeFilterView}}</th>
+            <th class="start-time">{{view view.startTimeFilterView}}</th>
+            <th></th>
             <th></th>
         </tr>
         </thead>
@@ -55,7 +55,7 @@
         {{else}}
           {{#each job in view.pageContent}}
             <tr>
-              <td>
+              <td class="id">
                 <a title="{{unbound job.name}}" href="#" {{action "showJobDetails" job}}>{{unbound job.name}}</a>
               </td>
               <td>

+ 34 - 0
ambari-web/app/templates/main/jobs/user_filter.hbs

@@ -0,0 +1,34 @@
+{{!
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+}}
+<button class="btn single-btn-group filter-btn" {{action "clickFilterButton" target="view"}}>
+  {{t common.user}} <i class="icon-filter"></i>
+</button>
+<ul class="dropdown-menu filter-components">
+  <li id="title-bar">{{t apps.filters.filterComponents}}
+      <a class="close" {{action "closeFilter" target="view"}}>X</a>
+  </li>
+  {{#each user in view.users}}
+      <li>
+          <label class="checkbox">{{view Ember.Checkbox checkedBinding="user.checked"}} {{user.name}}</label>
+      </li>
+  {{/each}}
+
+    <li id="button-bar">
+        <button class="btn btn-inverse" {{action "applyFilter" target="view"}}>{{t common.apply}}</button>
+    </li>
+</ul>

+ 1 - 14
ambari-web/app/views/main/jobs_view.js

@@ -111,7 +111,7 @@ App.MainJobsView = App.TableView.extend({
      * Base methods was implemented in <code>filters.componentFieldView</code>
      */
     filterView: filters.componentFieldView.extend({
-      templateName:require('templates/main/apps/user_filter'),
+      templateName:require('templates/main/jobs/user_filter'),
 
       usersBinding: 'controller.users',
 
@@ -163,19 +163,6 @@ App.MainJobsView = App.TableView.extend({
     }
   }),
 
-  /**
-   * Filter-field for End Time.
-   * Based on <code>filters</code> library
-   */
-  endTimeFilterView: filters.createSelectView({
-    fieldType: 'input-medium',
-    column: 3,
-    content: ['Any'],
-    onChangeValue: function () {
-      this.get('parentView').updateFilter(this.get('column'), this.get('value'), 'date');
-    }
-  }),
-
   /**
    * associations between content (jobs list) property and column index
    */

Some files were not shown because too many files changed in this diff