You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/10/20 13:53:59 UTC
git commit: AMBARI-7855. YARN App quick link always contains url to
latest app (no matter how many apps are created). (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/branch-1.7.0 3c509fa50 -> 8a2212082
AMBARI-7855. YARN App quick link always contains url to latest app (no matter how many apps are created). (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8a221208
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8a221208
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8a221208
Branch: refs/heads/branch-1.7.0
Commit: 8a221208230bc8a0c6d1a4199860b426c583e59e
Parents: 3c509fa
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Mon Oct 20 14:25:51 2014 +0300
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Mon Oct 20 14:48:00 2014 +0300
----------------------------------------------------------------------
.../main/resources/ui/app/mappers/slider_apps_mapper.js | 12 ++++++------
.../ui/test/unit/mappers/slider_apps_mapper_test.js | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a221208/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
index 4a0323f..2d724eb 100644
--- a/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
+++ b/contrib/views/slider/src/main/resources/ui/app/mappers/slider_apps_mapper.js
@@ -157,9 +157,9 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
*/
parseQuickLinks : function(data) {
var quickLinks = [],
- appId = data.id;
- var yarnAppId = appId;
- var index = appId.lastIndexOf('_');
+ appId = data.id,
+ yarnAppId = appId,
+ index = appId.lastIndexOf('_');
if (index > 0) {
yarnAppId = appId.substring(0, index + 1);
for (var k = (appId.length - index - 1); k < 4; k++) {
@@ -167,8 +167,8 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
}
yarnAppId += appId.substring(index + 1);
}
- var yarnUI = "http://"+window.location.hostname+":8088";
- var viewConfigs = App.SliderApp.store.all('sliderConfig');
+ var yarnUI = "http://"+window.location.hostname+":8088",
+ viewConfigs = App.SliderApp.store.all('sliderConfig');
if (!Em.isNone(viewConfigs)) {
var viewConfig = viewConfigs.findBy('viewConfigName', 'yarn.rm.webapp.url');
if (!Em.isNone(viewConfig)) {
@@ -177,7 +177,7 @@ App.SliderAppsMapper = App.Mapper.createWithMixins(App.RunPeriodically, {
}
quickLinks.push(
Ember.Object.create({
- id: 'YARN application',
+ id: 'YARN application ' + yarnAppId,
label: 'YARN application',
url: yarnUI + '/cluster/app/application_' + yarnAppId
})
http://git-wip-us.apache.org/repos/asf/ambari/blob/8a221208/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js b/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
index e312356..8c02e71 100644
--- a/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
+++ b/contrib/views/slider/src/main/resources/ui/test/unit/mappers/slider_apps_mapper_test.js
@@ -50,5 +50,6 @@ test('App.SliderAppsMapper.parseQuickLinks', function () {
});
equal(mapper.get('result')[0].get('url'), 'http://host/cluster/app/application_1', 'valid YARN application URL formed');
+ equal(mapper.get('result')[0].get('id'), 'YARN application 1', 'model id set correctly');
-});
\ No newline at end of file
+});