diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js index 4b741b8..b09b614 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/queue-navigator.js @@ -19,4 +19,12 @@ import Ember from 'ember'; export default Ember.Component.extend({ -}); \ No newline at end of file + actions : { + queueSelected (queueName){ + this.sendAction("queueSelected", queueName); + }, + onMouseOver(queueName){ + this.sendAction("onMouseOver", queueName); + } + } +}); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js index 5e7cfa0..a07fba1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/components/tree-selector.js @@ -128,7 +128,7 @@ export default Ember.Component.extend({ .attr("transform", function(d) { return "translate(" + source.y0 + "," + source.x0 + ")"; }) .on("mouseover", function(d,i){ if (d.queueData.get("name") != this.get("selected")) { - document.location.href = "#/yarn-queues/" + d.queueData.get("name"); + this.sendAction('onMouseOver', d.queueData.get("name")); } Ember.run.later(this, function () { @@ -143,8 +143,8 @@ export default Ember.Component.extend({ }.bind(this)) .on("click", function (d) { - document.location.href = "#/yarn-queue/" + d.queueData.get("name"); - }); + this.sendAction('clicked', d.queueData.get("name")); + }.bind(this)); nodeEnter.append("circle") .attr("r", 1e-6) @@ -190,10 +190,6 @@ export default Ember.Component.extend({ nodeUpdate.select("circle") .attr("r", 30) - .attr("href", - function(d) { - return "#/yarn-queues/" + d.queueData.get("name"); - }) .style("stroke-width", function(d) { if (d.queueData.get("name") == this.get("selected")) { return 7; diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js index 2effb13..9d1ced3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/controllers/application.js @@ -32,7 +32,7 @@ export default Ember.Controller.extend({ if (path == 'yarn-queue') { html = html + ' class="active"'; } - html = html + '>Queues' + + html = html + '>Queues' + '(current)(current) {{/link-to}} {{/link-to}} - {{#link-to 'yarn-queues' 'root' tagName="li"}} - {{#link-to 'yarn-queues' 'root' class="navigation-link"}}Queues + {{#link-to 'yarn-queues' tagName="li"}} + {{#link-to 'yarn-queues' class="navigation-link"}}Queues (current) {{/link-to}} {{/link-to}} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs index d8dd236..f7afdb9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/queue-navigator.hbs @@ -20,7 +20,7 @@
- {{tree-selector model=model parentId="tree-selector-container" selected=selected}} + {{tree-selector model=model parentId="tree-selector-container" selected=selected clicked="queueSelected" onMouseOver="onMouseOver"}}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue-apps.hbs deleted file mode 100644 index d5329f2..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue-apps.hbs +++ /dev/null @@ -1,64 +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. -}} - -{{breadcrumb-bar breadcrumbs=breadcrumbs}} - -
-
- -
-
-
-

Application

-
-
- -
-
-
- -
- -
- -
- {{#if model.apps}} - {{app-table table-id="apps-table" arr=model.apps}} - {{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}} - {{else}} -

Could not find any applications from this cluster

- {{/if}} -
- -
-
- -
-
-{{outlet}} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.hbs deleted file mode 100644 index 11c527c..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queue.hbs +++ /dev/null @@ -1,108 +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. -}} - -{{breadcrumb-bar breadcrumbs=breadcrumbs}} - -
-
- -
-
-
-

Application

-
-
- -
-
-
- -
- -
- -
-
-
- Queue Information -
- {{queue-configuration-table queue=model.selectedQueue}} -
-
- -
-
-
- Queue Capacities -
-
-
- {{bar-chart data=model.selectedQueue.capacitiesBarChartData - title="" - parentId="capacity-bar-chart" - textWidth=170 - ratio=0.55 - maxHeight=350}} -
-
-
- - {{#if model.selectedQueue.hasUserUsages}} -
- {{donut-chart data=model.selectedQueue.userUsagesDonutChartData - title="User Usages" - showLabels=true - parentId="userusage-donut-chart" - type="memory" - ratio=0.6 - maxHeight=350}} -
- {{/if}} - -
-
-
- Running Apps -
-
- {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData - showLabels=true - parentId="numapplications-donut-chart" - ratio=0.6 - maxHeight=350}} -
-
-
- -
-
- -
-
-{{outlet}} diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs index ea9338c..79133f8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues.hbs @@ -19,8 +19,8 @@ {{breadcrumb-bar breadcrumbs=breadcrumbs}}
- {{queue-navigator model=model.queues selected=model.selected}} - + {{queue-navigator model=model.queues selected=model.selected queueSelected="queueSelected" onMouseOver="onMouseOver"}} + {{#if showQueueInfo}}
@@ -63,8 +63,6 @@
- + {{/if}} - -{{outlet}} \ No newline at end of file diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues/yarn-queue-apps.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues/yarn-queue-apps.hbs new file mode 100644 index 0000000..62e8a09 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues/yarn-queue-apps.hbs @@ -0,0 +1,60 @@ +{{! + * 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. +}} +
+
+ +
+
+
+

Application

+
+
+ +
+
+
+ +
+ +
+ +
+ {{#if model.apps}} + {{app-table table-id="apps-table" arr=model.apps}} + {{simple-table table-id="apps-table" bFilter=true colTypes="elapsed-time" colTargets="7"}} + {{else}} +

Could not find any applications from this cluster

+ {{/if}} +
+ +
+
+ +
+
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues/yarn-queue.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues/yarn-queue.hbs new file mode 100644 index 0000000..9ac9931 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-queues/yarn-queue.hbs @@ -0,0 +1,104 @@ +{{! + * 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. +}} +
+
+ +
+
+
+

Application

+
+
+ +
+
+
+ +
+ +
+ +
+
+
+ Queue Information +
+ {{queue-configuration-table queue=model.selectedQueue}} +
+
+ +
+
+
+ Queue Capacities +
+
+
+ {{bar-chart data=model.selectedQueue.capacitiesBarChartData + title="" + parentId="capacity-bar-chart" + textWidth=170 + ratio=0.55 + maxHeight=350}} +
+
+
+ + {{#if model.selectedQueue.hasUserUsages}} +
+ {{donut-chart data=model.selectedQueue.userUsagesDonutChartData + title="User Usages" + showLabels=true + parentId="userusage-donut-chart" + type="memory" + ratio=0.6 + maxHeight=350}} +
+ {{/if}} + +
+
+
+ Running Apps +
+
+ {{donut-chart data=model.selectedQueue.numOfApplicationsDonutChartData + showLabels=true + parentId="numapplications-donut-chart" + ratio=0.6 + maxHeight=350}} +
+
+
+ +
+
+ +
+
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queue-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queue-apps-test.js deleted file mode 100644 index 6738ea0..0000000 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queue-apps-test.js +++ /dev/null @@ -1,29 +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. - */ - -import { moduleFor, test } from 'ember-qunit'; - -moduleFor('route:yarn-queue-apps', 'Unit | Route | yarn queue apps', { - // Specify the other units that are required for this test. - // needs: ['controller:foo'] -}); - -test('it exists', function(assert) { - let route = this.subject(); - assert.ok(route); -}); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queues/yarn-queue-apps-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queues/yarn-queue-apps-test.js new file mode 100644 index 0000000..68eacc8 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queues/yarn-queue-apps-test.js @@ -0,0 +1,28 @@ +/** + * 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. + */ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:yarn-queues/yarn-queue-apps', 'Unit | Route | yarn queues/yarn queue apps', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + let route = this.subject(); + assert.ok(route); +}); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queues/yarn-queue-test.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queues/yarn-queue-test.js new file mode 100644 index 0000000..b53f254 --- /dev/null +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/tests/unit/routes/yarn-queues/yarn-queue-test.js @@ -0,0 +1,28 @@ +/** + * 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. + */ +import { moduleFor, test } from 'ember-qunit'; + +moduleFor('route:yarn-queues/yarn-queue', 'Unit | Route | yarn queues/yarn queue', { + // Specify the other units that are required for this test. + // needs: ['controller:foo'] +}); + +test('it exists', function(assert) { + let route = this.subject(); + assert.ok(route); +});