hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject hadoop git commit: YARN-6291. Introduce query parameters (sort, filter, etc.) for tables to keep state on refresh/navigation in new YARN UI. Contributed by Gergely Novák.
Date Mon, 24 Apr 2017 07:59:16 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk fda86ef2a -> 561718e05


YARN-6291. Introduce query parameters (sort, filter, etc.) for tables to keep state on refresh/navigation
in new YARN UI. Contributed by Gergely Novák.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/561718e0
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/561718e0
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/561718e0

Branch: refs/heads/trunk
Commit: 561718e05de51c0cb7c17295d7713d52408918eb
Parents: fda86ef
Author: Sunil G <sunilg@apache.org>
Authored: Mon Apr 24 13:28:57 2017 +0530
Committer: Sunil G <sunilg@apache.org>
Committed: Mon Apr 24 13:28:57 2017 +0530

----------------------------------------------------------------------
 .../src/main/webapp/app/controllers/yarn-apps/apps.js     | 10 ++++++++++
 .../src/main/webapp/app/controllers/yarn-apps/services.js | 10 ++++++++++
 .../src/main/webapp/app/controllers/yarn-nodes/table.js   |  8 ++++++++
 .../src/main/webapp/app/templates/yarn-apps/apps.hbs      |  2 +-
 .../src/main/webapp/app/templates/yarn-apps/services.hbs  |  2 +-
 .../src/main/webapp/app/templates/yarn-nodes/table.hbs    |  2 +-
 6 files changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/561718e0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
index 0b0be20..44a7c1c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/apps.js
@@ -16,7 +16,17 @@
  * limitations under the License.
  */
 
+import Ember from 'ember';
+import ColumnDef from 'em-table/utils/column-definition';
+import TableDefinition from 'em-table/utils/table-definition';
 import AppTableController from '../app-table-columns';
 
 export default AppTableController.extend({
+  queryParams: ['searchText', 'sortColumnId', 'sortOrder', 'pageNum', 'rowCount'],
+  tableDefinition: TableDefinition.create(),
+  searchText: Ember.computed.alias('tableDefinition.searchText'),
+  sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'),
+  sortOrder: Ember.computed.alias('tableDefinition.sortOrder'),
+  pageNum: Ember.computed.alias('tableDefinition.pageNum'),
+  rowCount: Ember.computed.alias('tableDefinition.rowCount')
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/561718e0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/services.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/services.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/services.js
index 0b0be20..44a7c1c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/services.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-apps/services.js
@@ -16,7 +16,17 @@
  * limitations under the License.
  */
 
+import Ember from 'ember';
+import ColumnDef from 'em-table/utils/column-definition';
+import TableDefinition from 'em-table/utils/table-definition';
 import AppTableController from '../app-table-columns';
 
 export default AppTableController.extend({
+  queryParams: ['searchText', 'sortColumnId', 'sortOrder', 'pageNum', 'rowCount'],
+  tableDefinition: TableDefinition.create(),
+  searchText: Ember.computed.alias('tableDefinition.searchText'),
+  sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'),
+  sortOrder: Ember.computed.alias('tableDefinition.sortOrder'),
+  pageNum: Ember.computed.alias('tableDefinition.pageNum'),
+  rowCount: Ember.computed.alias('tableDefinition.rowCount')
 });

http://git-wip-us.apache.org/repos/asf/hadoop/blob/561718e0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-nodes/table.js
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-nodes/table.js
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-nodes/table.js
index 3b7b0f6..3fae596 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-nodes/table.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/yarn-nodes/table.js
@@ -19,8 +19,16 @@
 
 import Ember from 'ember';
 import ColumnDef from 'em-table/utils/column-definition';
+import TableDefinition from 'em-table/utils/table-definition';
 
 export default Ember.Controller.extend({
+    queryParams: ['searchText', 'sortColumnId', 'sortOrder', 'pageNum', 'rowCount'],
+    tableDefinition: TableDefinition.create(),
+    searchText: Ember.computed.alias('tableDefinition.searchText'),
+    sortColumnId: Ember.computed.alias('tableDefinition.sortColumnId'),
+    sortOrder: Ember.computed.alias('tableDefinition.sortOrder'),
+    pageNum: Ember.computed.alias('tableDefinition.pageNum'),
+    rowCount: Ember.computed.alias('tableDefinition.rowCount'),
     columns: function() {
         var colums = [];
         colums.push({

http://git-wip-us.apache.org/repos/asf/hadoop/blob/561718e0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/apps.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/apps.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/apps.hbs
index 8c72ce4..f740083 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/apps.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/apps.hbs
@@ -20,7 +20,7 @@
   <h4 align="center">Loading...</h4>
 {{else}}
   {{#if model.apps}}
-    {{em-table columns=columns rows=model.apps}}
+    {{em-table columns=columns rows=model.apps definition=tableDefinition}}
   {{else}}
     <h4 align="center">Could not find any applications from this cluster</h4>
   {{/if}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/561718e0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/services.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/services.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/services.hbs
index 7556908..d56762c 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/services.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-apps/services.hbs
@@ -17,7 +17,7 @@
 --}}
 
 {{#if model.apps}}
-  {{em-table columns=columns rows=model.apps}}
+  {{em-table columns=columns rows=model.apps definition=tableDefinition}}
 {{else}}
   <h4 align="center">Could not find any applications from this cluster</h4>
 {{/if}}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/561718e0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
index 79d721b..6ebcae2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-nodes/table.hbs
@@ -18,7 +18,7 @@
 <div class="row">
   <div class="col-md-12">
     {{#if model.nodes}}
-      {{em-table columns=columns rows=model.nodes}}
+      {{em-table columns=columns rows=model.nodes definition=tableDefinition}}
     {{else}}
       <h4 align="center">No nodes found on this cluster</h4>
     {{/if}}


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message