You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/04/02 16:53:41 UTC
git commit: AMBARI-5315. Jobs UI - Jobs without link to job details
page (alexantonenko)
Repository: ambari
Updated Branches:
refs/heads/trunk aae007837 -> 8faae789e
AMBARI-5315. Jobs UI - Jobs without link to job details page (alexantonenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8faae789
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8faae789
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8faae789
Branch: refs/heads/trunk
Commit: 8faae789ecefd5cb222ae2f113a926f8566d23b5
Parents: aae0078
Author: Alex Antonenko <hi...@gmail.com>
Authored: Wed Apr 2 17:51:49 2014 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Wed Apr 2 17:51:49 2014 +0300
----------------------------------------------------------------------
.../app/controllers/main/jobs_controller.js | 3 +++
ambari-web/app/styles/apps.less | 7 ++++++
ambari-web/app/views/main/jobs_view.js | 23 ++++++++++----------
3 files changed, 21 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8faae789/ambari-web/app/controllers/main/jobs_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/jobs_controller.js b/ambari-web/app/controllers/main/jobs_controller.js
index ac6aa22..1769468 100644
--- a/ambari-web/app/controllers/main/jobs_controller.js
+++ b/ambari-web/app/controllers/main/jobs_controller.js
@@ -47,6 +47,7 @@ App.MainJobsController = Em.Controller.extend({
}.observes('content.length', 'content.@each.id', 'content.@each.startTime', 'content.@each.endTime', 'sortProperties', 'sortAscending'),
contentAndSortUpdater: function() {
+ this.set('sortingDone', false);
var content = this.get('content');
var sortedContent = content.toArray();
var sortProperty = this.get('sortProperty');
@@ -83,6 +84,7 @@ App.MainJobsController = Em.Controller.extend({
}
}
sortedContent.length = 0;
+ this.set('sortingDone', true);
},
navIDs: {
@@ -101,6 +103,7 @@ App.MainJobsController = Em.Controller.extend({
sortingColumn: null,
sortProperty: 'id',
sortAscending: true,
+ sortingDone: true,
sortingColumnObserver: function () {
if(this.get('sortingColumn')){
http://git-wip-us.apache.org/repos/asf/ambari/blob/8faae789/ambari-web/app/styles/apps.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/apps.less b/ambari-web/app/styles/apps.less
index d89b05f..5da24e9 100644
--- a/ambari-web/app/styles/apps.less
+++ b/ambari-web/app/styles/apps.less
@@ -392,6 +392,13 @@
#jobs-table {
+ .is-not-link{
+ pointer-events: none;
+ cursor: default;
+ color: #000000;
+ text-decoration: none;
+ }
+
.apply-btn {
font-size: 12px;
padding: 0px 8px;
http://git-wip-us.apache.org/repos/asf/ambari/blob/8faae789/ambari-web/app/views/main/jobs_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/jobs_view.js b/ambari-web/app/views/main/jobs_view.js
index c0c0595..7e42e0d 100644
--- a/ambari-web/app/views/main/jobs_view.js
+++ b/ambari-web/app/views/main/jobs_view.js
@@ -160,8 +160,6 @@ App.MainJobsView = App.TableView.extend({
this.set('disabled', false);
}
}.observes('parentView.hasBackLinks'),
- attributeBindings: ['disabled'],
- disabled: false,
change: function () {
this.get('controller').set('navIDs.nextID', '');
this.get('parentView').saveDisplayLength();
@@ -243,19 +241,20 @@ App.MainJobsView = App.TableView.extend({
jobNameView: Em.View.extend({
classNames: ['job-link'],
+ tagName: 'a',
+ classNameBindings: ['isLink'],
+ attributeBindings: ['rel', 'job.queryText:data-original-title', 'href'],
rel: 'tooltip',
href: '#',
- template: Ember.Handlebars.compile('{{job.name}}'),
- attributeBindings: function () {
- var attributes = ['rel', 'job.queryText:data-original-title'];
+ isLink: 'is-not-link',
+ isLinkObserver: function () {
if (this.get('job.hasTezDag')) {
- attributes.push('href');
- };
- return attributes;
- }.property('job.hasTezDag'),
- tagName: function () {
- return this.get('job.hasTezDag') ? 'a' : 'span';
- }.property('job.hasTezDag'),
+ this.set('isLink', "");
+ }else{
+ this.set('isLink', "is-not-link");
+ }
+ }.observes('controller.sortingDone'),
+ template: Ember.Handlebars.compile('{{job.name}}'),
click: function(event) {
if (this.get('job.hasTezDag')) {
App.router.transitionTo('main.jobs.jobDetails', this.get('job'));