You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sr...@apache.org on 2014/05/30 10:07:59 UTC
git commit: AMBARI-5928. Create and populate Metrics section of a
slider app - cleanup. (srimanth)
Repository: ambari
Updated Branches:
refs/heads/branch-1.6.0.slider 99ddbefd3 -> 3e0750217
AMBARI-5928. Create and populate Metrics section of a slider app - cleanup. (srimanth)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3e075021
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3e075021
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3e075021
Branch: refs/heads/branch-1.6.0.slider
Commit: 3e0750217964ff6d06cbd6842b0efce79246e9dc
Parents: 99ddbef
Author: Srimanth Gunturi <sg...@hortonworks.com>
Authored: Fri May 30 01:07:11 2014 -0700
Committer: Srimanth Gunturi <sg...@hortonworks.com>
Committed: Fri May 30 01:07:11 2014 -0700
----------------------------------------------------------------------
ambari-web/app/templates/common/about.hbs | 2 +-
contrib/views/slider/pom.xml | 2 +-
.../createAppWizard/step1_controller.js | 2 +-
.../src/main/resources/ui/app/initialize.js | 4 +-
.../resources/ui/app/styles/application.less | 13 +++-
.../resources/ui/app/templates/application.hbs | 2 +-
.../resources/ui/app/templates/slider_apps.hbs | 2 +
.../src/main/resources/ui/app/translations.js | 2 +-
.../views/slider_app/metrics/metric2_view.js | 63 ------------------
.../views/slider_app/metrics/metric3_view.js | 61 -----------------
.../views/slider_app/metrics/metric4_view.js | 54 ---------------
.../app/views/slider_app/metrics/metric_view.js | 70 --------------------
.../ui/app/views/slider_app/summary_view.js | 5 --
.../views/slider/src/main/resources/view.xml | 4 +-
14 files changed, 22 insertions(+), 264 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/ambari-web/app/templates/common/about.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/about.hbs b/ambari-web/app/templates/common/about.hbs
index 59e0622..f0e3beb 100644
--- a/ambari-web/app/templates/common/about.hbs
+++ b/ambari-web/app/templates/common/about.hbs
@@ -24,7 +24,7 @@
<div class="project">Apache Ambari</div>
<br />
{{t app.aboutAmbari.version}}
- {{view.ambariVersion}}
+ 1.6.1 Tech Preview
<br />
<br />
<a href="http://ambari.apache.org/" target="_blank">{{t app.aboutAmbari.getInvolved}}</a>
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/slider/pom.xml b/contrib/views/slider/pom.xml
index a4e2539..23da1df 100644
--- a/contrib/views/slider/pom.xml
+++ b/contrib/views/slider/pom.xml
@@ -13,7 +13,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.ambari.view</groupId>
<artifactId>slider</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>0.1.0-SNAPSHOT</version>
<name>Slider</name>
<parent>
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js
index 9bfe68c..651f860 100644
--- a/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js
+++ b/contrib/views/slider/src/main/resources/ui/app/controllers/createAppWizard/step1_controller.js
@@ -116,7 +116,7 @@ App.CreateAppWizardStep1Controller = Ember.Controller.extend({
var newAppName = this.get('newAppName');
if (newAppName) {
// new App name should consist only of letters, numbers, '-', '_' and first character should be a letter
- if (!/^[A-Za-z][A-Za-z0-9_\-]*$/.test(newAppName)) {
+ if (!/^[a-z][a-z0-9_\-]*$/.test(newAppName)) {
this.set('isNameError', true);
this.set('nameErrorMessage', Em.I18n.t('wizard.step1.nameFormatError'));
return false;
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/initialize.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/initialize.js b/contrib/views/slider/src/main/resources/ui/app/initialize.js
index 6387df9..41460a0 100755
--- a/contrib/views/slider/src/main/resources/ui/app/initialize.js
+++ b/contrib/views/slider/src/main/resources/ui/app/initialize.js
@@ -46,7 +46,7 @@ App.initializer({
* Slider version
* @type {string}
*/
- version: '1.0.0',
+ version: '0.1.0',
/**
* Version of SLIDER_1 resource
@@ -57,7 +57,7 @@ App.initializer({
/**
* @type {string}
*/
- instance: 'SLIDER_1',
+ instance: 'Slider',
/**
* API url for Slider
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/styles/application.less
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/styles/application.less b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
index 173090a..4454787 100644
--- a/contrib/views/slider/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/slider/src/main/resources/ui/app/styles/application.less
@@ -18,6 +18,12 @@
html {
overflow-y: scroll;
+ body {
+ margin-top: 0px;
+ h2 {
+ margin-top: 0px;
+ }
+ }
}
a {
@@ -35,8 +41,11 @@ a {
font-size: 13px\9;
table-layout: fixed;
- th {
- width: 17.5%!important;
+ tr th:nth-last-child(1) {
+ width: 22%!important;
+ }
+ tr th:nth-last-child(2) {
+ width: 22%!important;
}
select {
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
index f4f66d1..581f9b4 100755
--- a/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/application.hbs
@@ -17,7 +17,7 @@
}}
<div>
- <h1>{{t slider.apps.title}}</h1>
+ <h2>{{t slider.apps.title}}</h2>
</div>
{{#if App.viewEnabled}}
{{outlet}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
index bcc4254..f8b45ec 100644
--- a/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
+++ b/contrib/views/slider/src/main/resources/ui/app/templates/slider_apps.hbs
@@ -107,11 +107,13 @@
<div class="items-on-page">
<label>{{t common.show}} {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
</div>
+ {{!--
<div class="info">{{view.paginationInfo}}</div>
<div class="paging_two_button">
{{view view.paginationLeft}}
{{view view.paginationRight}}
</div>
+ --}}
</div>
</div>
{{outlet}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/translations.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/translations.js b/contrib/views/slider/src/main/resources/ui/app/translations.js
index 54f98a9..c8f165c 100644
--- a/contrib/views/slider/src/main/resources/ui/app/translations.js
+++ b/contrib/views/slider/src/main/resources/ui/app/translations.js
@@ -67,7 +67,7 @@ Em.I18n.translations = {
'wizard.step1.header': 'Available Types',
'wizard.step1.description': 'Description',
'wizard.step1.typeDescription': 'Deploys {0} cluster on YARN.',
- 'wizard.step1.nameFormatError': 'App Name should consist only of letters, numbers, \'-\', \'_\' and first character should be a letter.',
+ 'wizard.step1.nameFormatError': 'App Name should consist only of lowercase letters, numbers, \'-\', \'_\', and the first character should be a letter.',
'wizard.step1.nameRepeatError': 'App with entered Name already exists.',
'wizard.step2.name': 'Allocate Resources',
'wizard.step2.header': 'HBase application requires resources to be allocated on the cluster. Provide resource allocation requests for each component of the application below.',
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric2_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric2_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric2_view.js
deleted file mode 100644
index f9a6487..0000000
--- a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric2_view.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.Metric2View = App.ChartView.extend({
- id: "service-metrics-hdfs-jvm-threads",
- title: 'jvm Threads',
- renderer: 'line',
-
- ajaxIndex: 'metrics2',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.jvm) {
- for ( var name in jsonData.metrics.jvm) {
- var displayName;
- var seriesData = jsonData.metrics.jvm[name];
- switch (name) {
- case "threadsBlocked":
- displayName = 'Threads Blocked';
- break;
- case "threadsWaiting":
- displayName = 'Threads Waiting';
- break;
- case "threadsTimedWaiting":
- displayName = 'Threads Timed Waiting';
- break;
- case "threadsRunnable":
- displayName = 'Threads Runnable';
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric3_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric3_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric3_view.js
deleted file mode 100644
index b47d8dc..0000000
--- a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric3_view.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.Metric3View = App.ChartView.extend({
- id: "service-metrics-hdfs-file-operations",
- title: 'File Operations',
- renderer: 'line',
-
- ajaxIndex: 'metrics3',
- yAxisFormatter: App.ChartView.CreateRateFormatter('ops', App.ChartView.DefaultFormatter),
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.namenode) {
- for ( var name in jsonData.metrics.dfs.namenode) {
- var displayName;
- var seriesData = jsonData.metrics.dfs.namenode[name];
- switch (name) {
- case "FileInfoOps":
- displayName = 'File Info Ops';
- break;
- case "DeleteFileOps":
- displayName = 'Delete File Ops';
- break;
- case "CreateFileOps":
- displayName = 'Create File Ops';
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric4_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric4_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric4_view.js
deleted file mode 100644
index 9897a30..0000000
--- a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric4_view.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.Metric4View = App.ChartView.extend({
- id: "service-metrics-hdfs-rpc",
- title: 'RPC',
- yAxisFormatter: App.ChartView.TimeElapsedFormatter,
-
- ajaxIndex: 'metrics4',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- if (jsonData && jsonData.metrics && jsonData.metrics.rpc) {
- for ( var name in jsonData.metrics.rpc) {
- var displayName;
- var seriesData = jsonData.metrics.rpc[name];
- switch (name) {
- case "RpcQueueTime_avg_time":
- displayName = 'RPC Queue Time Avg Time';
- break;
- default:
- break;
- }
- if (seriesData) {
- seriesArray.push(this.transformData(seriesData, displayName));
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric_view.js
deleted file mode 100644
index 5f6c671..0000000
--- a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/metrics/metric_view.js
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * 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.
- */
-
-/**
- * @class
- *
- * This is a view for showing cluster CPU metrics
- *
- * @extends App.ChartView
- * @extends Ember.Object
- * @extends Ember.View
- */
-App.MetricView = App.ChartView.extend({
-
- id: "service-metrics-hdfs-space-utilization",
-
- title: 'Space Utilization',
-
- yAxisFormatter: App.ChartView.BytesFormatter,
-
- renderer: 'line',
-
- ajaxIndex: 'metrics',
-
- transformToSeries: function (jsonData) {
- var seriesArray = [];
- var GB = Math.pow(2, 30);
- if (jsonData && jsonData.metrics && jsonData.metrics.dfs && jsonData.metrics.dfs.FSNamesystem) {
- for ( var name in jsonData.metrics.dfs.FSNamesystem) {
- var displayName;
- var seriesData = jsonData.metrics.dfs.FSNamesystem[name];
- switch (name) {
- case "CapacityRemainingGB":
- displayName = 'Capacity Remaining GB';
- break;
- case "CapacityUsedGB":
- displayName = 'Capacity Used GB';
- break;
- case "CapacityTotalGB":
- displayName = 'Capacity Total GB';
- break;
- default:
- break;
- }
- if (seriesData) {
- var s = this.transformData(seriesData, displayName);
- for (var i = 0; i < s.data.length; i++) {
- s.data[i].y *= GB;
- }
- seriesArray.push(s);
- }
- }
- }
- return seriesArray;
- }
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/ui/app/views/slider_app/summary_view.js
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/summary_view.js b/contrib/views/slider/src/main/resources/ui/app/views/slider_app/summary_view.js
index c1e7363..abebb63 100644
--- a/contrib/views/slider/src/main/resources/ui/app/views/slider_app/summary_view.js
+++ b/contrib/views/slider/src/main/resources/ui/app/views/slider_app/summary_view.js
@@ -20,14 +20,9 @@ App.SliderAppSummaryView = Ember.View.extend({
classNames: ['app_summary'],
- graphsOld: [
- [App.MetricView, App.Metric2View, App.Metric3View, App.Metric4View]
- ],
-
graphs : function() {
var app = this.get('controller.content');
if (app) {
- console.log(">>> Summary view of app ", app);
var supportedMetrics = app.get('supportedMetricNames');
if (supportedMetrics && supportedMetrics.length > 0) {
var graphs = [];
http://git-wip-us.apache.org/repos/asf/ambari/blob/3e075021/contrib/views/slider/src/main/resources/view.xml
----------------------------------------------------------------------
diff --git a/contrib/views/slider/src/main/resources/view.xml b/contrib/views/slider/src/main/resources/view.xml
index 57499ce..6ee929c 100644
--- a/contrib/views/slider/src/main/resources/view.xml
+++ b/contrib/views/slider/src/main/resources/view.xml
@@ -17,9 +17,9 @@ limitations under the License. Kerberos, LDAP, Custom. Binary/Htt
<view>
<name>SLIDER</name>
<label>Slider Apps View</label>
- <version>1.0.0</version>
+ <version>0.1.0</version>
<instance>
- <name>SLIDER_1</name>
+ <name>Slider</name>
</instance>
<resource>
<name>status</name>