You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sp...@apache.org on 2015/01/14 16:20:54 UTC
ambari git commit: AMBARI-9111: Various cleanup for CS view
Repository: ambari
Updated Branches:
refs/heads/trunk fdc2d7798 -> 7f491baea
AMBARI-9111: Various cleanup for CS view
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7f491bae
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7f491bae
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7f491bae
Branch: refs/heads/trunk
Commit: 7f491baea39b57c2645de0aa216adf0f4324ced9
Parents: fdc2d77
Author: sposetti <co...@yahoo.com>
Authored: Wed Jan 14 10:20:40 2015 -0500
Committer: sposetti <co...@yahoo.com>
Committed: Wed Jan 14 10:20:40 2015 -0500
----------------------------------------------------------------------
.../property-validator-view/docs/index.md | 2 +-
contrib/views/capacity-scheduler/cs-view.jpg | Bin 0 -> 273865 bytes
contrib/views/capacity-scheduler/pom.xml | 2 +-
contrib/views/capacity-scheduler/readme.md | 31 ++-
.../src/main/resources/ui/app/adapters.js | 57 ++++--
.../ui/app/assets/data/capacity-scheduler.json | 90 ---------
.../resources/ui/app/assets/data/privilege.json | 1 +
.../assets/data/scheduler-configuration.json | 16 +-
.../ui/app/components/capacityInput.js | 12 +-
.../ui/app/components/totalCapacity.js | 6 +-
.../main/resources/ui/app/controllers/queue.js | 18 --
.../main/resources/ui/app/controllers/queues.js | 6 +-
.../src/main/resources/ui/app/models/queue.js | 21 +-
.../resources/ui/app/styles/application.less | 197 +++++++++++++++++--
.../ui/app/templates/capacityEditForm.hbs | 27 ++-
.../ui/app/templates/components/capacityBar.hbs | 2 +-
.../app/templates/components/totalCapacity.hbs | 43 ++--
.../app/templates/components/userGroupInput.hbs | 8 +-
.../main/resources/ui/app/templates/queue.hbs | 142 ++++++-------
.../main/resources/ui/app/templates/queues.hbs | 2 +-
.../ui/app/templates/schedulerPanel.hbs | 60 ++++--
.../src/main/resources/ui/config.coffee | 2 +-
.../src/main/resources/view.xml | 15 +-
contrib/views/tez/readme.md | 2 +-
24 files changed, 460 insertions(+), 302 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/ambari-views/examples/property-validator-view/docs/index.md
----------------------------------------------------------------------
diff --git a/ambari-views/examples/property-validator-view/docs/index.md b/ambari-views/examples/property-validator-view/docs/index.md
index ae00c06..09d3224 100644
--- a/ambari-views/examples/property-validator-view/docs/index.md
+++ b/ambari-views/examples/property-validator-view/docs/index.md
@@ -48,7 +48,7 @@ The view can be built as a maven project.
The build will produce the view archive.
- ambari-views/examples/property-view/target/property-validator-view-0.1.0.jar
+ target/property-validator-view-0.1.0.jar
Place the view archive on the Ambari Server and restart to deploy.
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/cs-view.jpg
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/cs-view.jpg b/contrib/views/capacity-scheduler/cs-view.jpg
new file mode 100644
index 0000000..8c345c37
Binary files /dev/null and b/contrib/views/capacity-scheduler/cs-view.jpg differ
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/pom.xml b/contrib/views/capacity-scheduler/pom.xml
index 7b0eb41..c06cfb1 100644
--- a/contrib/views/capacity-scheduler/pom.xml
+++ b/contrib/views/capacity-scheduler/pom.xml
@@ -19,7 +19,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.ambari.view</groupId>
<artifactId>capacity-scheduler</artifactId>
- <version>0.2.0-SNAPSHOT</version>
+ <version>0.3.0-SNAPSHOT</version>
<name>Capacity Scheduler</name>
<parent>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/readme.md
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/readme.md b/contrib/views/capacity-scheduler/readme.md
index 6428d21..adfd2d2 100644
--- a/contrib/views/capacity-scheduler/readme.md
+++ b/contrib/views/capacity-scheduler/readme.md
@@ -35,11 +35,11 @@ The view can be built as a maven project.
The build will produce the view archive.
- target/capacity-scheduler-0.2.0-SNAPSHOT.jar
+ target/capacity-scheduler-0.3.0-SNAPSHOT.jar
Place the view archive on the Ambari Server and restart to deploy.
- cp capacity-scheduler-0.2.0-SNAPSHOT /var/lib/ambari-server/resources/views/
+ cp capacity-scheduler-0.3.0-SNAPSHOT /var/lib/ambari-server/resources/views/
ambari-server restart
Deploying the View
@@ -49,7 +49,7 @@ Use the [Ambari Vagrant](https://cwiki.apache.org/confluence/display/AMBARI/Quic
Deploy the Capacity Scheduler view into Ambari.
- cp capacity-scheduler-0.2.0-SNAPSHOT /var/lib/ambari-server/resources/views/
+ cp capacity-scheduler-0.3.0-SNAPSHOT /var/lib/ambari-server/resources/views/
ambari-server restart
From the Ambari Administration interface, create a view instance.
@@ -65,4 +65,27 @@ From the Ambari Administration interface, create a view instance.
Login to Ambari and browse to the view instance.
- http://c6401.ambari.apache.org:8080/#/main/views/CAPACITY-SCHEDULER/0.2.0/CS_1
+ http://c6401.ambari.apache.org:8080/#/main/views/CAPACITY-SCHEDULER/0.3.0/CS_1
+
+Local Development
+-----
+If you want to perform UI development without having to build and redeploy the view package,
+you can mount the build target output as a symlink to your vagrant instance.
+UI changes will be picked-up with a browser refresh.
+
+After building and deploying the View, delete the view work directory on the Ambari Server.
+
+ cd /var/lib/ambari-server/resources/views/work
+ rm -rf CAPACITY-SCHEDULER\{0.3.0\}/
+
+Create a symlink from the vagrant machine running your Ambari Server to your local machine.
+
+ ln -s /vagrant/ambari/contrib/views/capacity-scheduler/target/classes/ CAPACITY-SCHEDULER\{0.3.0\}
+
+Restart Ambari Server, login and browse to the view.
+
+ ambari-server restart
+ http://c6401.ambari.apache.org:8080/#/main/views/CAPACITY-SCHEDULER/0.3.0/CS_1
+
+If you modify the view UI code on your machine and re-build, the UI will pickup
+the changes on browser refresh.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
index cee4ac1..3c47a90 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/adapters.js
@@ -97,6 +97,8 @@ App.QueueAdapter = DS.Adapter.extend({
findAll: function(store, type) {
var adapter = this;
var uri = _getCapacitySchedulerUri(adapter.clusterName, adapter.tag);
+ if (App.testMode)
+ uri = uri + "/scheduler-configuration.json";
return new Ember.RSVP.Promise(function(resolve, reject) {
adapter.ajax(uri).then(function(data) {
Ember.run(null, resolve, data);
@@ -110,8 +112,11 @@ App.QueueAdapter = DS.Adapter.extend({
getPrivilege:function () {
var uri = _getCapacitySchedulerUri(this.clusterName, this.tag);
+ uri = [uri,'privilege'].join('/');
+ if (App.testMode)
+ uri = uri + ".json";
return new Ember.RSVP.Promise(function(resolve, reject) {
- this.ajax([uri,'privilege'].join('/'),'GET').then(function(data) {
+ this.ajax(uri,'GET').then(function(data) {
Ember.run(null, resolve, data);
}, function(jqXHR) {
jqXHR.then = null;
@@ -238,13 +243,13 @@ App.ApplicationSerializer = DS.RESTSerializer.extend({
prefix = this.PREFIX;
records.forEach(function (record) {
if (record.id == 'scheduler') {
- config[prefix + ".maximum-am-resource-percent"] = record.get('maximum_am_resource_percent');
+ config[prefix + ".maximum-am-resource-percent"] = record.get('maximum_am_resource_percent')/100; // convert back to decimal
config[prefix + ".maximum-applications"] = record.get('maximum_applications');
config[prefix + ".node-locality-delay"] = record.get('node_locality_delay');
+ config[prefix + ".resource-calculator"] = record.get('resource_calculator');
} else {
config[prefix + "." + record.get('path') + ".unfunded.capacity"] = record.get('unfunded_capacity');
config[prefix + "." + record.get('path') + ".acl_administer_queue"] = record.get('acl_administer_queue');
- config[prefix + "." + record.get('path') + ".acl_administer_jobs"] = record.get('acl_administer_jobs');
config[prefix + "." + record.get('path') + ".acl_submit_applications"] = record.get('acl_submit_applications');
config[prefix + "." + record.get('path') + ".minimum-user-limit-percent"] = record.get('minimum_user_limit_percent');
config[prefix + "." + record.get('path') + ".maximum-capacity"] = record.get('maximum_capacity');
@@ -252,6 +257,19 @@ App.ApplicationSerializer = DS.RESTSerializer.extend({
config[prefix + "." + record.get('path') + ".state"] = record.get('state');
config[prefix + "." + record.get('path') + ".capacity"] = record.get('capacity');
config[prefix + "." + record.get('path') + ".queues"] = record.get('queueNames')||'';
+
+ // do not set property if not set
+ var ma = record.get('maximum_applications')||'';
+ if (ma) {
+ config[prefix + "." + record.get('path') + ".maximum-applications"] = ma;
+ }
+
+ // do not set property if not set
+ var marp = record.get('maximum_am_resource_percent')||'';
+ if (marp) {
+ marp = marp/100; // convert back to decimal
+ config[prefix + "." + record.get('path') + ".maximum-am-resource-percent"] = marp;
+ }
};
});
@@ -272,9 +290,10 @@ App.ApplicationSerializer = DS.RESTSerializer.extend({
var scheduler = [{
id:'scheduler',
- maximum_am_resource_percent:props[this.PREFIX + ".maximum-am-resource-percent"],
+ maximum_am_resource_percent:props[this.PREFIX + ".maximum-am-resource-percent"]*100, // convert to percent
maximum_applications:props[this.PREFIX + ".maximum-applications"],
- node_locality_delay:props[this.PREFIX + ".node-locality-delay"]
+ node_locality_delay:props[this.PREFIX + ".node-locality-delay"],
+ resource_calculator:props[this.PREFIX + ".resource-calculator"]
}];
queues = _recurseQueues(null, "root", 0, props, queues, store);
@@ -287,9 +306,10 @@ App.ApplicationSerializer = DS.RESTSerializer.extend({
var scheduler = {
id:'scheduler',
- maximum_am_resource_percent:props[this.PREFIX + ".maximum-am-resource-percent"],
+ maximum_am_resource_percent:props[this.PREFIX + ".maximum-am-resource-percent"]*100, // convert to percent
maximum_applications:props[this.PREFIX + ".maximum-applications"],
- node_locality_delay:props[this.PREFIX + ".node-locality-delay"]
+ node_locality_delay:props[this.PREFIX + ".node-locality-delay"],
+ resource_calculator:props[this.PREFIX + ".resource-calculator"]
};
queues = _recurseQueues(null, "root", 0, props, queues, store);
@@ -304,9 +324,10 @@ App.ApplicationSerializer = DS.RESTSerializer.extend({
var scheduler = {
id:'scheduler',
- maximum_am_resource_percent:props[this.PREFIX + ".maximum-am-resource-percent"],
+ maximum_am_resource_percent:props[this.PREFIX + ".maximum-am-resource-percent"]*100, // convert to percent
maximum_applications:props[this.PREFIX + ".maximum-applications"],
- node_locality_delay:props[this.PREFIX + ".node-locality-delay"]
+ node_locality_delay:props[this.PREFIX + ".node-locality-delay"],
+ resource_calculator:props[this.PREFIX + ".resource-calculator"]
};
queues = _recurseQueues(null, "root", 0, props, queues, store);
@@ -362,15 +383,22 @@ App.ApplicationSerializer = DS.RESTSerializer.extend({
q.id = q.path.dasherize();
q.unfunded_capacity = props[prefix + "." + q.path + ".unfunded.capacity"];
+
+ q.state = props[prefix + "." + q.path + ".state"];
q.acl_administer_queue = props[prefix + "." + q.path + ".acl_administer_queue"];
- q.acl_administer_jobs = props[prefix + "." + q.path + ".acl_administer_jobs"];
q.acl_submit_applications = props[prefix + "." + q.path + ".acl_submit_applications"];
- q.minimum_user_limit_percent = props[prefix + "." + q.path + ".minimum-user-limit-percent"];
+
+ q.capacity = props[prefix + "." + q.path + ".capacity"];
q.maximum_capacity = props[prefix + "." + q.path + ".maximum-capacity"];
+
q.user_limit_factor = props[prefix + "." + q.path + ".user-limit-factor"];
- q.state = props[prefix + "." + q.path + ".state"];
+ q.minimum_user_limit_percent = props[prefix + "." + q.path + ".minimum-user-limit-percent"];
+ q.maximum_applications = props[prefix + "." + q.path + ".maximum-applications"];
+ q.maximum_am_resource_percent = props[prefix + "." + q.path + ".maximum-am-resource-percent"]
+
+ if (q.maximum_am_resource_percent)
+ q.maximum_am_resource_percent = q.maximum_am_resource_percent*100; // convert to percent
- q.capacity = props[prefix + "." + q.path + ".capacity"];
q.queueNames = props[prefix + "." + q.path + ".queues"];
return q;
@@ -410,6 +438,9 @@ function _recurseQueues(parentQueue, queueName, depth, props, queues, store) {
* @return cluster name URI
*/
function _getCapacitySchedulerUri() {
+ if (App.testMode)
+ return "/data";
+
var parts = window.location.pathname.match(/\/[^\/]*/g);
var view = parts[1];
var version = '/versions' + parts[2];
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/capacity-scheduler.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/capacity-scheduler.json b/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/capacity-scheduler.json
deleted file mode 100644
index bee7fa2..0000000
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/capacity-scheduler.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "href" : "http://c6403.ambari.apache.org:8080/api/v1/clusters/MyCluster/configurations?type=capacity-scheduler&tag=version1400218672484",
- "items" : [
- {
- "href" : "http://c6403.ambari.apache.org:8080/api/v1/clusters/MyCluster/configurations?type=capacity-scheduler&tag=version1400218672484",
- "tag" : "version1400218672484",
- "type" : "capacity-scheduler",
- "Config" : {
- "cluster_name" : "MyCluster"
- },
- "properties" : {
- "yarn.scheduler.capacity.maximum-am-resource-percent" : "0.2",
- "yarn.scheduler.capacity.maximum-applications" : "10000",
- "yarn.scheduler.capacity.node-locality-delay" : "40",
- "yarn.scheduler.capacity.root.Engineering.Development.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Engineering.Development.acl_administer_queue" : "*",
- "yarn.scheduler.capacity.root.Engineering.Development.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Engineering.Development.capacity" : "20",
- "yarn.scheduler.capacity.root.Engineering.Development.maximum-capacity" : "100",
- "yarn.scheduler.capacity.root.Engineering.Development.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Engineering.Development.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Engineering.QE.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Engineering.QE.acl_administer_queue" : " ",
- "yarn.scheduler.capacity.root.Engineering.QE.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Engineering.QE.capacity" : "80",
- "yarn.scheduler.capacity.root.Engineering.QE.maximum-capacity" : "90",
- "yarn.scheduler.capacity.root.Engineering.QE.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Engineering.QE.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Engineering.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Engineering.acl_administer_queue" : "user1,user2 group2",
- "yarn.scheduler.capacity.root.Engineering.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Engineering.capacity" : "60",
- "yarn.scheduler.capacity.root.Engineering.maximum-capacity" : "100",
- "yarn.scheduler.capacity.root.Engineering.queues" : "Development,QE",
- "yarn.scheduler.capacity.root.Engineering.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Engineering.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Marketing.Advertising.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Marketing.Advertising.acl_administer_queue" : " ",
- "yarn.scheduler.capacity.root.Marketing.Advertising.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Marketing.Advertising.capacity" : "30",
- "yarn.scheduler.capacity.root.Marketing.Advertising.maximum-capacity" : "40",
- "yarn.scheduler.capacity.root.Marketing.Advertising.state" : "STOPPED",
- "yarn.scheduler.capacity.root.Marketing.Advertising.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Marketing.Sales.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Marketing.Sales.acl_administer_queue" : " group5",
- "yarn.scheduler.capacity.root.Marketing.Sales.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Marketing.Sales.capacity" : "70",
- "yarn.scheduler.capacity.root.Marketing.Sales.maximum-capacity" : "80",
- "yarn.scheduler.capacity.root.Marketing.Sales.minimum-user-limit-percent" : "20",
- "yarn.scheduler.capacity.root.Marketing.Sales.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Marketing.Sales.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Marketing.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Marketing.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Marketing.acl_administer_queue" : " group5",
- "yarn.scheduler.capacity.root.Marketing.capacity" : "10",
- "yarn.scheduler.capacity.root.Marketing.maximum-capacity" : "40",
- "yarn.scheduler.capacity.root.Marketing.queues" : "Sales,Advertising",
- "yarn.scheduler.capacity.root.Marketing.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Marketing.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Support.Services.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Support.Services.acl_administer_queue" : "*",
- "yarn.scheduler.capacity.root.Support.Services.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Support.Services.capacity" : "80",
- "yarn.scheduler.capacity.root.Support.Services.maximum-capacity" : "100",
- "yarn.scheduler.capacity.root.Support.Services.minimum-user-limit-percent" : "20",
- "yarn.scheduler.capacity.root.Support.Services.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Support.Services.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Support.Training.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Support.Training.acl_administer_queue" : "user2",
- "yarn.scheduler.capacity.root.Support.Training.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Support.Training.capacity" : "20",
- "yarn.scheduler.capacity.root.Support.Training.maximum-capacity" : "60",
- "yarn.scheduler.capacity.root.Support.Training.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Support.Training.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Support.acl_administer_jobs" : "*",
- "yarn.scheduler.capacity.root.Support.acl_administer_queue" : " ",
- "yarn.scheduler.capacity.root.Support.acl_submit_applications" : "*",
- "yarn.scheduler.capacity.root.Support.capacity" : "30",
- "yarn.scheduler.capacity.root.Support.maximum-capacity" : "100",
- "yarn.scheduler.capacity.root.Support.queues" : "Training,Services",
- "yarn.scheduler.capacity.root.Support.state" : "RUNNING",
- "yarn.scheduler.capacity.root.Support.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.acl_administer_queue" : "*",
- "yarn.scheduler.capacity.root.capacity" : "100",
- "yarn.scheduler.capacity.root.queues" : "Support,Marketing,Engineering",
- "yarn.scheduler.capacity.root.unfunded.capacity" : "50"
- }
- }
- ]
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/privilege.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/privilege.json b/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/privilege.json
new file mode 100644
index 0000000..f32a580
--- /dev/null
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/privilege.json
@@ -0,0 +1 @@
+true
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/scheduler-configuration.json
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/scheduler-configuration.json b/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/scheduler-configuration.json
index bee7fa2..b3f70ad 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/scheduler-configuration.json
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/assets/data/scheduler-configuration.json
@@ -9,39 +9,34 @@
"cluster_name" : "MyCluster"
},
"properties" : {
- "yarn.scheduler.capacity.maximum-am-resource-percent" : "0.2",
+ "yarn.scheduler.capacity.maximum-am-resource-percent" : "0.35",
"yarn.scheduler.capacity.maximum-applications" : "10000",
"yarn.scheduler.capacity.node-locality-delay" : "40",
- "yarn.scheduler.capacity.root.Engineering.Development.acl_administer_jobs" : "*",
+ "yarn.scheduler.capacity.resource-calculator" : "org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator",
"yarn.scheduler.capacity.root.Engineering.Development.acl_administer_queue" : "*",
"yarn.scheduler.capacity.root.Engineering.Development.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Engineering.Development.capacity" : "20",
"yarn.scheduler.capacity.root.Engineering.Development.maximum-capacity" : "100",
"yarn.scheduler.capacity.root.Engineering.Development.state" : "RUNNING",
"yarn.scheduler.capacity.root.Engineering.Development.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Engineering.QE.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Engineering.QE.acl_administer_queue" : " ",
"yarn.scheduler.capacity.root.Engineering.QE.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Engineering.QE.capacity" : "80",
"yarn.scheduler.capacity.root.Engineering.QE.maximum-capacity" : "90",
"yarn.scheduler.capacity.root.Engineering.QE.state" : "RUNNING",
"yarn.scheduler.capacity.root.Engineering.QE.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Engineering.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Engineering.acl_administer_queue" : "user1,user2 group2",
"yarn.scheduler.capacity.root.Engineering.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Engineering.capacity" : "60",
"yarn.scheduler.capacity.root.Engineering.maximum-capacity" : "100",
"yarn.scheduler.capacity.root.Engineering.queues" : "Development,QE",
- "yarn.scheduler.capacity.root.Engineering.state" : "RUNNING",
"yarn.scheduler.capacity.root.Engineering.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Marketing.Advertising.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Marketing.Advertising.acl_administer_queue" : " ",
"yarn.scheduler.capacity.root.Marketing.Advertising.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Marketing.Advertising.capacity" : "30",
"yarn.scheduler.capacity.root.Marketing.Advertising.maximum-capacity" : "40",
"yarn.scheduler.capacity.root.Marketing.Advertising.state" : "STOPPED",
"yarn.scheduler.capacity.root.Marketing.Advertising.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Marketing.Sales.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Marketing.Sales.acl_administer_queue" : " group5",
"yarn.scheduler.capacity.root.Marketing.Sales.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Marketing.Sales.capacity" : "70",
@@ -49,7 +44,6 @@
"yarn.scheduler.capacity.root.Marketing.Sales.minimum-user-limit-percent" : "20",
"yarn.scheduler.capacity.root.Marketing.Sales.state" : "RUNNING",
"yarn.scheduler.capacity.root.Marketing.Sales.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Marketing.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Marketing.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Marketing.acl_administer_queue" : " group5",
"yarn.scheduler.capacity.root.Marketing.capacity" : "10",
@@ -57,7 +51,6 @@
"yarn.scheduler.capacity.root.Marketing.queues" : "Sales,Advertising",
"yarn.scheduler.capacity.root.Marketing.state" : "RUNNING",
"yarn.scheduler.capacity.root.Marketing.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Support.Services.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Support.Services.acl_administer_queue" : "*",
"yarn.scheduler.capacity.root.Support.Services.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Support.Services.capacity" : "80",
@@ -65,14 +58,15 @@
"yarn.scheduler.capacity.root.Support.Services.minimum-user-limit-percent" : "20",
"yarn.scheduler.capacity.root.Support.Services.state" : "RUNNING",
"yarn.scheduler.capacity.root.Support.Services.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Support.Training.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.Support.Training.acl_administer_queue" : "user2",
"yarn.scheduler.capacity.root.Support.Training.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Support.Training.capacity" : "20",
"yarn.scheduler.capacity.root.Support.Training.maximum-capacity" : "60",
"yarn.scheduler.capacity.root.Support.Training.state" : "RUNNING",
"yarn.scheduler.capacity.root.Support.Training.user-limit-factor" : "1",
- "yarn.scheduler.capacity.root.Support.acl_administer_jobs" : "*",
+ "yarn.scheduler.capacity.root.Support.Training.minimum-user-limit-percent" : "100",
+ "yarn.scheduler.capacity.root.Support.Training.maximum-applications" : "4500",
+ "yarn.scheduler.capacity.root.Support.Training.maximum-am-resource-percent" : ".25",
"yarn.scheduler.capacity.root.Support.acl_administer_queue" : " ",
"yarn.scheduler.capacity.root.Support.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.Support.capacity" : "30",
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
index b46933a..0bf4b85 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/capacityInput.js
@@ -18,6 +18,16 @@
var App = require('app');
+App.InputRangeComponent = Em.TextField.extend({
+ type: 'range',
+
+ action: 'mouseUp',
+
+ mouseUp: function () {
+ var value = this.get('value');
+ this.sendAction('action', value);
+ }
+});
App.FocusInputComponent = Ember.TextField.extend({
becomeFocused: function() {
@@ -86,7 +96,7 @@ App.MaxCapacityInputComponent = App.CapacityInputComponent.extend({
return queue.set('maximum_capacity',capacity);
};
if (max_capacity < capacity && queue.get('isDirty')) {
- queue.get('errors').add('maximum_capacity', 'Maximum capacity must be greater then capacity');
+ queue.get('errors').add('maximum_capacity', 'Maximum must be equal or greater than capacity');
} else {
queue.get('errors').remove('maximum_capacity');
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/totalCapacity.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/totalCapacity.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/totalCapacity.js
index 5e35b30..806cf3b 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/totalCapacity.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/components/totalCapacity.js
@@ -43,8 +43,8 @@ App.TotalCapacityComponent = Ember.Component.extend({
allQueues:[],
allQueuesArranged:[],
- isEdit:false,
-
+ isEdit: true,
+
disableEdit:function () {
this.set('isEdit',false);
}.observes('allQueues'),
@@ -56,7 +56,7 @@ App.TotalCapacityComponent = Ember.Component.extend({
}),
totalCapacity: Ember.computed.sum('leafQueuesCapacity'),
-
+
leafQueues:function () {
return this.allQueuesArranged.filterBy('parentPath',this.get('currentPrPath')).filterBy('isNew',false);
}.property('allQueuesArranged.length','currentPrPath'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
index a0db1f1..1bffbea 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queue.js
@@ -67,12 +67,6 @@ App.QueueController = Ember.ObjectController.extend({
}
},
- toggleEditRA:function () {
- this.toggleProperty('isEditRA');
- },
- toggleEditACL:function () {
- this.toggleProperty('isEditACL');
- },
rollbackProp:function(prop){
attributes = this.content.changedAttributes();
if (attributes.hasOwnProperty(prop)) {
@@ -106,9 +100,6 @@ App.QueueController = Ember.ObjectController.extend({
allQueues:Em.computed.alias('controllers.queues.content'),
allQueuesArranged:Em.computed.alias('controllers.queues.arrangedContent'),
- isEditRA:false,
- isEditACL:false,
-
handleAcl:function (key,value) {
if (value) {
this.set(key,(value == '*')?'*':' ');
@@ -125,15 +116,6 @@ App.QueueController = Ember.ObjectController.extend({
return attributes.hasOwnProperty('acl_administer_queue');
}.property('content.acl_administer_queue'),
- acl_administer_jobs: function (key, value, previousValue) {
- return this.handleAcl('content.acl_administer_jobs',value);
- }.property('content.acl_administer_jobs'),
- aaj_anyone:Ember.computed.equal('acl_administer_jobs', '*'),
- aaj_dirty:function () {
- var attributes = this.content.changedAttributes();
- return attributes.hasOwnProperty('acl_administer_jobs');
- }.property('content.acl_administer_jobs'),
-
acl_submit_applications: function (key, value, previousValue) {
return this.handleAcl('content.acl_submit_applications',value);
}.property('content.acl_submit_applications'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
index cc20706..b03e633 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/controllers/queues.js
@@ -80,9 +80,6 @@ App.QueuesController = Ember.ArrayController.extend({
this.set('hasDeletedQueues',false);
},
- toggleEditScheduler:function () {
- this.toggleProperty('isEditScheduler');
- },
clearAlert:function () {
this.set('alertMessage',null);
}
@@ -98,9 +95,8 @@ App.QueuesController = Ember.ArrayController.extend({
isOperator:false,
isNotOperator:cmp.not('isOperator'),
- isEditScheduler:false,
-
isWaitingPath:false,
+
/**
* check if RM needs refresh
* @type {bool}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js
index 3219660..cf22437 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/models/queue.js
@@ -21,7 +21,8 @@ var App = require('app');
App.Scheduler = DS.Model.extend({
maximum_am_resource_percent: DS.attr('number', { defaultValue: 0 }),
maximum_applications: DS.attr('number', { defaultValue: 0 }),
- node_locality_delay: DS.attr('number', { defaultValue: 0 })
+ node_locality_delay: DS.attr('number', { defaultValue: 0 }),
+ resource_calculator: DS.attr('string', { defaultValue: '' }),
});
/**
@@ -34,29 +35,25 @@ App.Queue = DS.Model.extend({
depth: DS.attr('number'),
path: DS.attr('string'),
- // cs props
-
// queue props
state: DS.attr('string', { defaultValue: 'RUNNING' }),
+ acl_administer_queue: DS.attr('string', { defaultValue: '*' }),
+ acl_submit_applications: DS.attr('string', { defaultValue: '*' }),
capacity: DS.attr('number', { defaultValue: 0 }),
maximum_capacity: DS.attr('number', { defaultValue: 0 }),
unfunded_capacity: DS.attr('number', { defaultValue: 0 }),
-
- acl_administer_queue: DS.attr('string', { defaultValue: '*' }),
- acl_administer_jobs: DS.attr('string', { defaultValue: '*' }),
- acl_submit_applications: DS.attr('string', { defaultValue: '*' }),
-
- minimum_user_limit_percent: DS.attr('number', { defaultValue: 100 }),
+
user_limit_factor: DS.attr('number', { defaultValue: 1 }),
-
+ minimum_user_limit_percent: DS.attr('number', { defaultValue: 100 }),
+ maximum_applications: DS.attr('number', { defaultValue: '' }),
+ maximum_am_resource_percent: DS.attr('number', { defaultValue: '' }),
+
queueNames: DS.attr('string'),
queueNamesArray:function () {
return (this.get('queueNames.length')>0)?this.get('queueNames').split(','):[];
}.property('queueNames'),
-
-
overCapacity:false,
//new queue flag
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
index 8f394b8..df8148e 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/styles/application.less
@@ -16,8 +16,31 @@
* limitations under the License.
*/
+.queue-capacity .peer-toggle {
+ width: 100%;
+ // background: #f7f7f7;
+ //border: 1px solid #e4e4e4;
+ text-align: left;
+ padding: 3px;
+}
+
+a .peer-toggle {
+ color: #555;
+ text-decoration: none;
+ font-size: .8em;
+ }
+
+.row.queue-acl-row {
+ padding-left:15px;
+}
+
+.row .queue-resources {
+ padding-left: 0px;
+ padding-right: 30px;
+}
+
.wrap {
- padding: 15px;
+ padding: 0px;
}
.add-queue {
@@ -29,14 +52,44 @@
}
}
+.input-int {
+ width: 110px;
+}
+
+.input-percent {
+ width: 65px;
+}
+
+.form-horizontal {
+ padding-top: 10px;
+}
+
+.form-horizontal .capacity-edit-form {
+ padding-top: 0px;
+}
+
+.form-horizontal .control-value {
+ padding-top: 0px;
+}
+
+.form-horizontal .form-control-static {
+ padding-top: 5px;
+}
+
.queue-label {
- float: left;
padding-right: 10px;
min-width: 80px;
+ font-weight: bold;
+ font-size: 1.1em;
+ padding-top: 5px;
+}
+
+.control-label.queue-label {
+ padding-top: 7px;
}
.capacity-edit {
- padding-left: 80px;
+ font-weight: normal;
}
.max-capacity-edit {
@@ -62,7 +115,11 @@
.control-label {
font-size: .9em;
}
-
+
+.input-group-addon {
+ padding: 3px;
+}
+
.well-queue {
background-color: #ffffff;
border: 1px solid #e3e3e3;
@@ -70,10 +127,14 @@
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05) inset;
margin-bottom: 20px;
min-height: 20px;
- padding: 19px;
- padding-top: 5px;
+ padding: 15px;
+ padding-top: 0px;
}
+.col-md-8.queue-area {
+ padding-left:0px;
+}
+
.btn {
padding: 6px 10px;
transition: background-color .08s linear 0s;
@@ -250,12 +311,23 @@
}
}
.panel-title {
+ font-weight: 500;
position: relative;
a {
position: absolute;
right: 0;
color: #428bca;
}
+ .total {
+ float: right;
+ width: 400px;
+ .level-total-label {
+ float: left;
+ padding-right: 10px;
+ font-size:.9em;
+ font-weight: normal;
+ }
+ }
}
.panel-body.total{
.progress {
@@ -263,13 +335,22 @@
}
}
.panel-body.queues {
- border-top: 1px solid #dddddd;
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .panel-body {
+ padding-top: 0px;
+ }
+
+ .queues {
+ padding-top: 0px;
}
- .queue-capacity{
- border-bottom: 1px solid #dddddd;
- padding-bottom: 8px;
- padding-top: 8px;
+ .queue-capacity-peer {
+ }
+
+ .queue-capacity {
+ padding-bottom: 4px;
&.active {
.progress {
-webkit-box-shadow: 0px 0px 0px #888888;
@@ -290,6 +371,7 @@
}
.help-block {
display: inline;
+ font-size: .8em;
}
/*input {
width: auto;
@@ -297,6 +379,14 @@
}
}
+.control-label.capacity-edit {
+ width: 75px;
+}
+
+.capacity-input {
+ float: left !important;
+}
+
.queue-heading-row {
h3 {
margin:10px;
@@ -313,3 +403,88 @@
.modal-backdrop.in {
opacity: 0;
}
+
+
+
+input[type=range] {
+ -webkit-appearance: none;
+ width: 100%;
+ margin: 7.3px 0;
+}
+input[type=range]:focus {
+ outline: none;
+}
+input[type=range]::-webkit-slider-runnable-track {
+ width: 100%;
+ height: 2px;
+ cursor: pointer;
+ background: #555;
+ border-radius: 1.3px;
+ border: 0.2px solid #010101;
+}
+input[type=range]::-webkit-slider-thumb {
+ border: 1.8px solid #00001e;
+ height: 15px;
+ width: 20px;
+ border-radius: 15px;
+ background: #ffffff;
+ cursor: pointer;
+ -webkit-appearance: none;
+ margin-top: -7px;
+}
+input[type=range]:focus::-webkit-slider-runnable-track {
+ background: #555;
+}
+input[type=range]::-moz-range-track {
+ width: 100%;
+ height: 2px;
+ cursor: pointer;
+ background: #555;
+ border-radius: 1.3px;
+ border: 0.2px solid #010101;
+}
+input[type=range]::-ms-fill-lower {
+ background: red;
+ border-radius: 10px;
+}
+input[type=range]::-moz-range-thumb {
+ border: 1.8px solid #00001e;
+ height: 15px;
+ width: 20px;
+ border-radius: 15px;
+ background: #ffffff;
+ cursor: pointer;
+}
+input[type=range]::-ms-track {
+ width: 100%;
+ height: 2px;
+ cursor: pointer;
+ background: transparent;
+ border-color: transparent;
+ color: transparent;
+}
+input[type=range]::-ms-fill-lower {
+ background: rgba(42, 100, 149, 0.78);
+ border: 0.2px solid #010101;
+ border-radius: 2.6px;
+}
+input[type=range]::-ms-fill-upper {
+ background: #555;
+ border: 0.2px solid #010101;
+ border-radius: 2.6px;
+}
+input[type=range]::-ms-thumb {
+ border: 1.8px solid #00001e;
+ height: 15px;
+ width: 20px;
+ border-radius: 15px;
+ background: #ffffff;
+ cursor: pointer;
+ height: 11.4px;
+}
+input[type=range]:focus::-ms-fill-lower {
+ background: #555;
+}
+input[type=range]:focus::-ms-fill-upper {
+ background: #555;
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capacityEditForm.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capacityEditForm.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capacityEditForm.hbs
index 51e2bb4..535a18f 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capacityEditForm.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capacityEditForm.hbs
@@ -16,19 +16,30 @@
* limitations under the License.
}}
-<form {{bind-attr class=":form-inline :capacity-edit-form " }} role="form">
+<form {{bind-attr class=":form-horizontal :capacity-edit-form " }} role="form">
<div {{bind-attr class=":form-group" }}>
- <label class="control-label capacity-edit">Capacity: </label>
- {{capacity-input class='input-sm' value=this.capacity totalCapacity=view.totalCapacity queue=this maxVal=100}}
-
- </div>
- <div {{bind-attr class=":form-group this.isValid::has-error" }}>
- <label class="control-label max-capacity-edit">Max. Capacity: </label>
- {{max-capacity-input class='input-sm' value=this.maximum_capacity totalCapacity=view.totalCapacity queue=this maxVal=100}}
+ <label class="col-xs-1 control-label capacity-edit">Capacity: </label>
+ <div class="col-xs-2 capacity-input control-value input-group input-percent">
+{{capacity-input class='input-sm' value=this.capacity totalCapacity=view.totalCapacity queue=this maxVal=100}}
+<span class="input-group-addon">%</span>
+ </div>
+ <div class="col-xs-3 control-value">
+{{input-range min="0" max="100" step="1" value=this.capacity}}
+ </div>
+ <label style="padding-top: 0px" class="col-xs-1 control-label capacity-edit">Max Capacity: </label>
+ <div {{bind-attr class="this.isValid::has-error" }}>
+ <div class="col-xs-2 capacity-input control-value input-group input-percent">
+{{max-capacity-input class='input-sm' value=this.maximum_capacity totalCapacity=view.totalCapacity queue=this maxVal=100}}
+<span class="input-group-addon">%</span>
+ </div>
+ <div class="col-xs-3 control-value">
+{{input-range min="0" max="100" step="1" value=this.maximum_capacity}}
{{#each this.errors.maximum_capacity}}
<span class="help-block">
{{message}}
</span>
{{/each}}
</div>
+ </div>
+ </div>
</form>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/capacityBar.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/capacityBar.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/capacityBar.hbs
index d860cc4..05741f0 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/capacityBar.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/capacityBar.hbs
@@ -17,7 +17,7 @@
}}
<div class="progress progress-labelled" data-label-max="100" data-label-step="25" style="position: relative;">
- <div {{bind-attr style="capacityWidth" class=":progress-bar warn:progress-bar-danger:progress-bar-success"}}>
+ <div {{bind-attr style="capacityWidth" class=":progress-bar warn:progress-bar-danger:progress-bar-success"}}>
<span>
{{capacityValue}}%
</span>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/totalCapacity.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/totalCapacity.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/totalCapacity.hbs
index e00c1cc..6e50328 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/totalCapacity.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/totalCapacity.hbs
@@ -18,35 +18,43 @@
<div class="panel panel-default panel-capacity">
<div class="panel-heading">
- <div class="panel-title">
- <strong>Capacity</strong>
- {{#if isOperator}}
- <a href="#" {{action 'toggleEdit'}} class="text-right">
- {{#if view.isEdit}}
- <div class="edit-link">Hide Edit</div>
- {{else}}
- <div class="edit-link">Show Edit</div>
- {{/if}}
- </a>
- {{/if}}
+ <div class="panel-title">
+ Capacity
+ <div class="total">
+<div class="level-total-label">Level Total</div>
+{{capacity-bar capacityValue=totalCapacity maxCapacityValue=totalCapacity warn=leafQueues.firstObject.overCapacity}}
</div>
+ </div>
</div>
<div class="panel-body total">
-<div class="control-label queue-label">TOTAL</div>
-{{capacity-bar capacityValue=totalCapacity maxCapacityValue=totalCapacity warn=leafQueues.firstObject.overCapacity}}
- </div>
<div class="panel-body queues">
{{#each leafQueues}}
+ {{#if this.isCurrent}}
<div {{bind-attr class=":queue-capacity this.isCurrent:active"}}>
+ <div class="queue-label">{{this.name}}</div>
+ {{render "capacityEditForm" this}}
+ <a href="#" {{action toggleProperty "showPeerQueues"}}>
+ <div class="peer-toggle">
+Show/Hide Peer Level Queues
+ </div>
+ </a>
+ </div>
+ {{/if}}
+ {{/each}}
+{{#if showPeerQueues}}
+ {{#each leafQueues}}
+ {{#unless this.isCurrent}}
+ <div {{bind-attr class=":queue-capacity :queue-capacity-peer"}}>
<p>
- <div class="control-label queue-label">{{this.name}}</div>
+ <div class="queue-label">{{this.name}}</div>
</p>
- {{capacity-bar capacityValue=this.capacity maxCapacityValue=this.maximum_capacity warn=this.overCapacity}}
{{render "capacityEditForm" this}}
</div>
+ {{/unless}}
{{/each}}
+{{/if}}
{{#each newLeafQueues}}
- <div {{bind-attr class=":queue-capacity :new-queue this.isCurrent:active"}} >
+ <div {{bind-attr class=":queue-capacity :queue-capacity-peer :new-queue this.isCurrent:active"}} >
<div class="input-row row" >
<div class="col-md-5">
{{#each this.errors.path}}
@@ -54,7 +62,6 @@
{{/each}}
</div>
</div>
- {{capacity-bar capacityValue=this.capacity maxCapacityValue=this.maximum_capacity warn=this.overCapacity}}
{{render "capacityEditForm" this}}
</div>
{{/each}}
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/userGroupInput.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/userGroupInput.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/userGroupInput.hbs
index fab7ea8..8f0a7d6 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/userGroupInput.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/userGroupInput.hbs
@@ -17,18 +17,14 @@
}}
<div class="user-group-input form-group has-feedback ">
- <div class="col-sm-4 control-label">
- Users:
- </div>
+ <div class="col-sm-4 control-label">Users</div>
<div class="col-sm-8">
{{input keyDown=noSpace disabledBinding="disabled" class="form-control input-sm" value=users placeholder="Comma-separated list of users"}}
<i class="fa fa-user form-control-feedback"></i>
</div>
</div>
<div class="form-group has-feedback user-group-input">
- <div class="col-sm-4 control-label">
- Groups:
- </div>
+ <div class="col-sm-4 control-label">Groups</div>
<div class="col-sm-8">
{{input keyDown=noSpace disabledBinding="disabled" class="form-control input-sm" value=groups placeholder="Comma-separated list of groups"}}
<i class="fa fa-users form-control-feedback"></i>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queue.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queue.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queue.hbs
index caf3dd1..93e069e 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queue.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queue.hbs
@@ -57,16 +57,7 @@
{{#each pathErrors}}
<p class="help-block red">{{this}}</p>
{{/each}}
- <h4 ><small>{{content.path}}</small>
- <div class="btn-group btn-group-xs" data-toggle="buttons" >
- <label {{action 'setState' 'running'}} {{bind-attr class=":btn isRunning:btn-success:btn-default isRunning:active isNotOperator:disabled" }}>
- <input type="radio" name="options"> Running
- </label>
- <label {{action 'setState' 'stopped'}} {{bind-attr class=":btn isRunning:btn-default:btn-danger isRunning::active isNotOperator:disabled" }}>
- <input type="radio" name="options"> Stopped
- </label>
- </div>
- </h4>
+ <h4><small>{{content.path}}</small></h4>
</div>
</div>
<div class="row queue-capacity-row">
@@ -88,24 +79,29 @@
<div class="panel panel-default panel-capacity">
<div class="panel-heading">
<div class="panel-title">
- <strong>Access Control</strong>
- {{#if isOperator}}
- <a href="#" {{action 'toggleEditACL'}} class="text-right">
- {{#if isEditACL}}
- <div class="edit-link">Hide Edit</div>
- {{else}}
- <div class="edit-link">Show Edit</div>
- {{/if}}
- </a>
- {{/if}}
+ Access Control and Status
</div>
</div>
<div class="panel-body">
<form class="form-horizontal form-acl" role="form">
- {{#if isEditACL}}
+ <div class="form-group row">
+ <label class="col-lg-4 col-xs-4 control-label">State</label>
+ <div class="col-lg-6 col-md-6 col-sm-8 col-xs-7 control-value">
+ <div class="btn-group btn-group-xs" data-toggle="buttons" >
+ <label {{action 'setState' 'running'}} {{bind-attr class=":btn isRunning:btn-success:btn-default isRunning:active isNotOperator:disabled" }}>
+ <input type="radio" name="options"> Running
+ </label>
+ <label {{action 'setState' 'stopped'}} {{bind-attr class=":btn isRunning:btn-default:btn-danger isRunning::active isNotOperator:disabled" }}>
+ <input type="radio" name="options"> Stopped
+ </label>
+ </div>
+ </div>
+ </div>
+
+ {{#if isOperator}}
<div class="form-group row">
- <label class="col-lg-4 col-xs-4 control-label">Administer Queue ACL</label>
+ <label class="col-lg-4 col-xs-4 control-label">Administer Queue</label>
<div class="col-lg-6 col-md-6 col-sm-8 col-xs-7 control-value">
<div class="btn-group btn-group-xs" data-toggle="buttons">
{{radio-button label="Anyone" selectionBinding="acl_administer_queue" value="*"}}
@@ -121,24 +117,7 @@
{{/unless}}
<div class="form-group row">
- <label class="col-lg-4 col-xs-4 control-label">Administer Jobs ACL</label>
- <div class="col-lg-6 col-md-6 col-sm-8 col-xs-7 control-value">
- <div class="btn-group btn-group-xs" data-toggle="buttons">
- {{radio-button label="Anyone" selectionBinding="acl_administer_jobs" value="*"}}
- {{radio-button label="Custom" selectionBinding="acl_administer_jobs" value="custom"}}
- </div>
- {{#if aaj_dirty}}
- <a {{action 'rollbackProp' 'acl_administer_jobs'}} href="#"><i class="fa fa-undo"></i></a>
- {{/if}}
- </div>
- </div>
- {{#unless aaj_anyone}}
- {{user-group-input ug=content.acl_administer_jobs disabled=aaj_anyone}}
- {{/unless}}
-
-
- <div class="form-group row">
- <label class="col-lg-4 col-xs-4 control-label">Submit Apps ACL</label>
+ <label class="col-lg-4 col-xs-4 control-label">Submit Applications</label>
<div class="col-lg-6 col-md-6 col-sm-8 col-xs-7 control-value">
<div class="btn-group btn-group-xs" data-toggle="buttons">
{{radio-button label="Anyone" selectionBinding="acl_submit_applications" value="*"}}
@@ -155,7 +134,7 @@
{{else}}
<div class="form-group">
- <label class="col-lg-4 col-xs-4 control-label">Administer Queue ACL</label>
+ <label class="col-lg-4 col-xs-4 control-label">Administer Queue</label>
<div class="col-lg-8 col-xs-8 control-value">
<p class="form-control-static">
{{escapeACL content.acl_administer_queue}}
@@ -164,16 +143,7 @@
</div>
<div class="form-group">
- <label class="col-lg-4 col-xs-4 control-label">Administer Jobs ACL</label>
- <div class="col-lg-8 col-xs-8 control-value">
- <p class="form-control-static">
- {{escapeACL content.acl_administer_jobs}}
- </p>
- </div>
- </div>
-
- <div class="form-group">
- <label class="col-lg-4 col-xs-4 control-label">Submit Apps ACL</label>
+ <label class="col-lg-4 col-xs-4 control-label">Submit Applications</label>
<div class="col-lg-8 col-xs-8 control-value">
<p class="form-control-static">
{{escapeACL content.acl_submit_applications}}
@@ -186,44 +156,74 @@
</div>
</div>
- <div class="col-md-6">
+ <div class="col-md-6 queue-resources">
<div class="panel panel-default panel-capacity">
<div class="panel-heading">
<div class="panel-title">
- <strong>Resource Allocation</strong>
- {{#if isOperator}}
- <a href="#" {{action 'toggleEditRA'}} class="text-right">
- {{#if isEditRA}}
- <div class="edit-link">Hide Edit</div>
- {{else}}
- <div class="edit-link">Show Edit</div>
- {{/if}}
- </a>
- {{/if}}
+ Resources
</div>
</div>
<div class="panel-body">
<form class="form-horizontal" role="form">
<div class="form-group">
- <label class="col-lg-4 col-xs-4 control-label">User Limit Factor</label>
- <div class="col-lg-8 col-xs-8 ">
- {{#if isEditRA}}
- {{int-input value=content.user_limit_factor class="input-sm"}}
+ <label class="col-xs-6 control-label">User Limit Factor</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ {{int-input value=content.user_limit_factor maxlength=10 class="input-sm input-int"}}
{{else}}
+ <div class="col-xs-6">
<p class="form-control-static">{{content.user_limit_factor}}</p>
{{/if}}
</div>
</div>
<div class="form-group">
- <label class="col-lg-4 col-xs-4 control-label">Minimum User Limit</label>
- <div class="col-lg-8 col-xs-8">
- {{#if isEditRA}}
- <div class="input-group">
+ <label class="col-xs-6 control-label">Minimum User Limit</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ <div class="input-group input-percent">
{{int-input value=content.minimum_user_limit_percent class="input-sm" maxVal=100}}
<span class="input-group-addon">%</span>
</div>
{{else}}
- <p class="form-control-static">{{content.minimum_user_limit_percent}} %</p>
+ <div class="col-xs-6">
+ {{#if content.minimum_user_limit_percent}}
+ <p class="form-control-static">{{content.minimum_user_limit_percent}} %</p>
+ {{else}}
+ <p class="form-control-static">-</p>
+ {{/if}}
+ {{/if}}
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-xs-6 control-label">Maximum Applications</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ {{int-input placeholder="Inherited" maxlength=15 value=content.maximum_applications class="input-sm input-int"}}
+ {{else}}
+ <div class="col-xs-6">
+ {{#if content.maximum_applications}}
+ <p class="form-control-static">{{content.maximum_applications}}</p>
+ {{else}}
+ <p class="form-control-static">-</p>
+ {{/if}}
+ {{/if}}
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-xs-6 control-label">Maximum AM Resource</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ <div class="input-group input-percent">
+ {{int-input placeholder="Inherited" value=content.maximum_am_resource_percent class="input-sm" maxVal=100}}
+ <span class="input-group-addon">%</span>
+ </div>
+ {{else}}
+ <div class="col-xs-6">
+ {{#if content.maximum_am_resource_percent}}
+ <p class="form-control-static">{{content.maximum_am_resource_percent}} %</p>
+ {{else}}
+ <p class="form-control-static">-</p>
+ {{/if}}
{{/if}}
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
index 2c00541..f0b80d1 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/queues.hbs
@@ -80,7 +80,7 @@
</div>
{{!-- QUEUE --}}
-<div class="col-md-8">
+<div class="col-md-8 queue-area">
{{outlet}}
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
index 7333006..12ad8a3 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/schedulerPanel.hbs
@@ -19,43 +19,65 @@
<div class="panel panel-default panel-capacity">
<div class="panel-heading">
<div class="panel-title">
- <strong>Scheduler</strong>
- {{#if isOperator}}
- <a href="#" {{action 'toggleEditScheduler'}} class="text-right">
- {{#if isEditScheduler}}
- <div class="edit-link">Hide Edit</div>
- {{else}}
- <div class="edit-link">Show Edit</div>
- {{/if}}
- </a>
- {{/if}}
+ Scheduler
</div>
</div>
<div class="panel-body">
<form class="form-horizontal" role="form">
<div class="form-group">
- <label class="col-xs-4 control-label">Maximum Apps</label>
- <div class="col-xs-8">
- {{#if isEditScheduler}}
- {{int-input value=scheduler.maximum_applications class="input-sm"}}
+ <label class="col-xs-5 control-label">Maximum Applications</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ {{int-input value=scheduler.maximum_applications maxlength=15 class="input-sm input-int"}}
{{else}}
+ <div class="col-xs-6">
<p class="form-control-static">{{scheduler.maximum_applications}}</p>
{{/if}}
</div>
</div>
<div class="form-group">
- <label class="col-xs-4 control-label">Minimum AM Resource</label>
- <div class="col-xs-8">
- {{#if isEditScheduler}}
- <div class="input-group">
+ <label class="col-xs-5 control-label">Maximum AM Resource</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ <div class="input-group input-percent">
{{int-input value=scheduler.maximum_am_resource_percent class="input-sm" maxVal=100}}
<span class="input-group-addon">%</span>
</div>
{{else}}
- <p class="form-control-static">{{scheduler.maximum_am_resource_percent}} %</p>
+ <div class="col-xs-6">
+ {{#if scheduler.maximum_am_resource_percent}}
+ <p class="form-control-static">{{scheduler.maximum_am_resource_percent}} %</p>
+ {{else}}
+ <p class="form-control-static">-</p>
+ {{/if}}
{{/if}}
</div>
</div>
+ <div class="form-group">
+ <label class="col-xs-5 control-label">Node Locality Delay</label>
+ {{#if isOperator}}
+ <div class="col-xs-6 control-value">
+ {{int-input value=scheduler.node_locality_delay maxlength=10 class="input-sm input-int"}}
+ {{else}}
+ <div class="col-xs-6">
+ {{#if scheduler.node_locality_delay}}
+ <p class="form-control-static">{{scheduler.node_locality_delay}} %</p>
+ {{else}}
+ <p class="form-control-static">-</p>
+ {{/if}}
+ {{/if}}
+ </div>
+ </div>
+ {{#if isOperator}}
+ {{#if scheduler.resource_calculator}}
+ <div class="form-group">
+ <label class="col-xs-5 control-label">Calculator</label>
+ <div class="col-xs-12 control-value">
+ {{input value=scheduler.resource_calculator class="input-sm form-control"}}
+ </div>
+ </div>
+ {{/if}}
+ {{/if}}
</form>
</div>
</div>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee b/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
index 2fe3325..3f0e672 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
+++ b/contrib/views/capacity-scheduler/src/main/resources/ui/config.coffee
@@ -66,5 +66,5 @@ exports.config =
overrides:
development:
paths:
- public: '/usr/lib/ambari-server/web/views-debug/CAPACITY-SCHEDULER/0.2.0/CS_1/'
+ public: '/usr/lib/ambari-server/web/views-debug/CAPACITY-SCHEDULER/0.3.0/CS_1/'
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/capacity-scheduler/src/main/resources/view.xml
----------------------------------------------------------------------
diff --git a/contrib/views/capacity-scheduler/src/main/resources/view.xml b/contrib/views/capacity-scheduler/src/main/resources/view.xml
index 6206ccc..49f7e67 100644
--- a/contrib/views/capacity-scheduler/src/main/resources/view.xml
+++ b/contrib/views/capacity-scheduler/src/main/resources/view.xml
@@ -17,23 +17,26 @@
<view>
<name>CAPACITY-SCHEDULER</name>
<label>Capacity Scheduler</label>
- <version>0.2.0</version>
+ <version>0.3.0</version>
<parameter>
<name>ambari.server.url</name>
- <description>Ambari REST API Cluster URL (for example: http://ambari.server:8080/api/v1/clusters/c1)</description>
+ <description>The Ambari REST API cluster resource.</description>
+ <label>Ambari Cluster URL</label>
+ <placeholder>http://ambari.server:8080/api/v1/clusters/MyCluster</placeholder>
<required>true</required>
</parameter>
-
<parameter>
<name>ambari.server.username</name>
- <description>Ambari Cluster Operator username (for example: admin)</description>
+ <description>The Cluster Operator username (for example: admin).</description>
+ <label>Operator Username</label>
+ <placeholder>admin</placeholder>
<required>true</required>
</parameter>
-
<parameter>
<name>ambari.server.password</name>
- <description>Ambari Cluster Operator password (for example: password)</description>
+ <description>The Cluster Operator password (for example: password).</description>
+ <label>Operator Password</label>
<required>true</required>
<masked>true</masked>
</parameter>
http://git-wip-us.apache.org/repos/asf/ambari/blob/7f491bae/contrib/views/tez/readme.md
----------------------------------------------------------------------
diff --git a/contrib/views/tez/readme.md b/contrib/views/tez/readme.md
index 68e3994..1a53a3b 100644
--- a/contrib/views/tez/readme.md
+++ b/contrib/views/tez/readme.md
@@ -23,7 +23,7 @@ This view provides a web interface for TEZ.
Requirements
-----
-- Ambari view 1.3.0
+- Ambari 1.7.0
- TEZ 0.6.0 or above
Build