Repository: ambari Updated Branches: refs/heads/trunk ac731f7b5 -> 79489a8f3
http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf.hbs new file mode 100644 index 0000000..d57b2ba --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf.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. +}} + +<div class="queue-config-container"> + <div class="panel panel-default"> + <div class="panel-body"> + <div class="row"> + <div class="col-sm-7"> + <div class="list-group queue-hierarchy"> + {{queue-hierarchy depth=0 queues=queues}} + </div> + {{#if isOperator}} + {{#if selectedQueue}} + <div class="queue-actions-wrapper"> + <div class="pull-left"> + <button type="button" class="btn btn-primary btn-xs" name="addQueueBtn" {{action "addNewQueue"}}>Add Queue</button> + </div> + <div class="pull-right"> + {{#unless isRootQSelected}} + <button type="button" class="btn btn-danger btn-xs" name="deleteQueueBtn">Delete</button> + {{/unless}} + {{#if isSelectedQRunning}} + <button type="button" class="btn btn-warning btn-xs" name="queueStateBtn">Stop Queue</button> + {{else}} + <button type="button" class="btn btn-primary btn-xs" name="queueStateBtn">Start Queue</button> + {{/if}} + </div> + </div> + {{#if showQueueNameInput}} + <div class="add-newqueuename-wrapper"> + {{input type="text" name="addNewQueueName" class="form-control input-sm new-queue-name" value=newQueueName placeholder="Enter queue name..."}} + <div class="btn-group btn-group-sm pull-right"> + <button type="button" class="btn btn-primary" name="createNewQueueBtn" {{action "createNewQueue"}}>Create</button> + <button type="button" class="btn btn-default" name="cancelNewQueueBtn" {{action "cancelCreateQueue"}}>Cancel</button> + </div> + </div> + {{/if}} + {{/if}} + {{/if}} + </div> + <div class="col-sm-5"> + {{queue-summary queue=selectedQueue allQueues=queues}} + </div> + </div> + <hr> + <div class="row"> + <div class="col-sm-12"> + {{outlet}} + </div> + </div> + </div> + </div> + <div class="btn btn-group-sm col-sm-offset-3"> + <button type="button" class="btn btn-success" name="saveQueuesconfBtn" {{action "showSaveConfigDialog" target="view"}}>Save And Refresh Queues</button> + <button type="button" class="btn btn-danger" name="cancelQueuesconfBtn">Cancel Changes</button> + </div> +</div> + +{{!-- CONFIG NOTE MODAL --}} +<div class="modal fade" id="configNoteModalDialog" tabindex="-1" role="dialog" aria-labelledby="noteConfigModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button> + <h4 class="modal-title" id="noteConfigModalLabel">Notes</h4> + </div> + <div class="modal-body"> + {{textarea class="form-control" rows="3" style="max-width: 100%;" placeholder="What did you change?" value=configNote}} + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + <button {{action 'saveQueuesConfig'}} type="button" class="btn btn-success" data-dismiss="modal">Save Changes</button> + </div> + </div> + </div> +</div> + +{{!-- ALERT --}} +{{#if alertMessage}} + <div class="alert alert-danger"> + <button {{action 'clearAlert'}} type="button" class="close" aria-hidden="true">×</button> + <strong> {{alertMessage.status}} </strong> {{alertMessage.simpleMessage}} + <div> + <small>{{alertMessage.message}}</small> + </div> + <br> + {{#link-to 'capsched.trace' class="alert-link"}}Trace{{/link-to}} + </div> +{{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf/editqueue.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf/editqueue.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf/editqueue.hbs new file mode 100644 index 0000000..c5c910a --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/queuesconf/editqueue.hbs @@ -0,0 +1,47 @@ +{{! +* 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. +}} + +<div class="edit-queue-wrapper"> + + <div class="row edit-queuename-wrapper"> + <div class="col-md-8 col-sm-8"> + <label>Queue Name</label> + {{input type="text" name="queueName" class="form-control input-sm input-queue-name" value=content.name readonly=isRoot}} + {{#if queueDirtyFields.name}} + <div class="btn-group btn-group-xs" > + <a {{action 'rollbackProp' 'name' content}} href="#" class="btn btn-default btn-warning"> + <i class="fa fa-undo"></i> + </a> + </div> + {{/if}} + </div> + </div> + + <div class="queue-capacity-wrapper"> + {{partial "capsched/partials/queueCapacity"}} + </div> + + <div class="queue-acl-wrapper"> + {{partial "capsched/partials/accessControlList"}} + </div> + + <div class="queue-resources-wrapper"> + {{partial "capsched/partials/queueResources"}} + </div> + +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/scheduler.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/scheduler.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/scheduler.hbs new file mode 100644 index 0000000..364bff2 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/capsched/scheduler.hbs @@ -0,0 +1,135 @@ +{{! +* 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. +}} + +<div class="scheduler-panel"> + <div class="panel panel-default"> + <div class="panel-body"> + <div class="row form-group"> + <div class="col-md-4"> + {{tooltip-label + label='Maximum Applications' + class="control-label" + message='For entire cluster, maximum number of applications that can be running or pending at any point of time' + }} + </div> + {{#if isOperator}} + <div class="col-sm-3"> + {{int-input value=scheduler.maximum_applications maxlength=15 class="input-sm input-int input-control"}} + {{#if schedulerDirtyFilelds.maximum_applications}} + <div class="btn-group btn-group-xs"> + <a {{action 'rollbackProp' 'maximum_applications' scheduler}} href="#" class="btn btn-default btn-warning"><i class="fa fa-undo"></i></a> + </div> + {{/if}} + </div> + {{else}} + <div class="col-sm-2"> + <p class="form-control-static">{{scheduler.maximum_applications}}</p> + </div> + {{/if}} + </div> + <div class="row form-group"> + <div class="col-md-4"> + {{tooltip-label + label='Maximum AM Resource' + class="control-label" + message='For entire cluster, maximum percentage of total capacity that can be utilized by application masters at any point in time.' + }} + </div> + {{#if isOperator}} + <div class="col-sm-3"> + <div class="input-group input-resource-percent"> + {{int-input value=scheduler.maximum_am_resource_percent class="input-sm" maxVal=100}} + <span class="input-group-addon">%</span> + </div> + {{#if schedulerDirtyFilelds.maximum_am_resource_percent}} + <div class="btn-group btn-group-xs rollback-resource-percent"> + <a {{action 'rollbackProp' 'maximum_am_resource_percent' scheduler}} href="#" class="btn btn-default btn-warning"><i class="fa fa-undo"></i></a> + </div> + {{/if}} + </div> + {{else}} + <div class="col-sm-2"> + {{#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}} + </div> + {{/if}} + </div> + <div class="row form-group"> + <div class="col-md-4"> + {{tooltip-label + label='Node Locality Delay' + class="control-label" + message='Number of missed scheduling cycles after which the scheduler attempts to schedule rack-local containers.' + }} + </div> + {{#if isOperator}} + <div class="col-sm-3"> + {{int-input value=scheduler.node_locality_delay maxlength=10 class="input-sm input-int input-control"}} + {{#if schedulerDirtyFilelds.node_locality_delay}} + <div class="btn-group btn-group-xs" > + <a {{action 'rollbackProp' 'node_locality_delay' scheduler}} href="#" class="btn btn-default btn-warning"><i class="fa fa-undo"></i></a> + </div> + {{/if}} + </div> + {{else}} + <div class="col-sm-2"> + {{#if scheduler.node_locality_delay}} + <p class="form-control-static">{{scheduler.node_locality_delay}}</p> + {{else}} + <p class="form-control-static">-</p> + {{/if}} + </div> + {{/if}} + </div> + {{#if isOperator}} + <div class="row form-group"> + <div class="col-md-4"> + {{tooltip-label + label='Resource Calculator' + class="control-label" + message='The method by which the scheduler calculates resource capacity across resource types. <br/> Default Resource Calculator allocates resources based on memory alone. <br/> Dominant Resource Calculator allocates resources based on memory, cpu etc.' + }} + </div> + <div class="col-sm-4"> + {{view Ember.Select + class="form-control input-sm resource-calc-control" + content=resourceCalculatorValues + optionLabelPath="content.label" + optionValuePath="content.value" + value=scheduler.resource_calculator + }} + {{#if schedulerDirtyFilelds.resource_calculator}} + <div class="btn-group btn-group-xs"> + <a {{action 'rollbackProp' 'resource_calculator' scheduler}} href="#" class="btn btn-default btn-warning"><i class="fa fa-undo"></i></a> + </div> + {{/if}} + </div> + </div> + {{/if}} + </div> + </div> +</div> +<div class="row"> + <div class="btn btn-group-md col-md-offset-5"> + <button type="button" {{bind-attr class=":btn :btn-default :btn-success isSchedulerDirty::disabled"}} name="saveAdvanced">Save</button> + <button type="button" {{bind-attr class=":btn :btn-default :btn-danger isSchedulerDirty::disabled"}} name="cancelAdvanced" {{action 'rollbackSchedulerProps'}}>Cancel</button> + </div> +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueHierarchy.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueHierarchy.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueHierarchy.hbs new file mode 100644 index 0000000..24f6938 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueHierarchy.hbs @@ -0,0 +1,41 @@ +{{! +* 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. +}} + +{{#each queue in leafQs}} + {{#link-to 'capsched.queuesconf.editqueue' queue class="list-group-item"}} + <div class="col-md-offset-{{unbound queue.depth}} col-sm-offset-{{unbound queue.depth}}"> + {{#unless queue.queues}} + <span> + <i class="fa fa-leaf"></i> + </span> + {{else}} + <span> + <i class="fa fa-th-large"></i> + </span> + {{/unless}} + + {{queue.name}} + + {{#if queue.noCapacity}} + {{warn-badge}} + {{/if}} + + {{queue-badge q=queue class="badge pull-right"}} + </div> + {{/link-to}} + {{queue-hierarchy depth=childDepth parent=queue.path queues=queues}} +{{/each}} http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueMapping.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueMapping.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueMapping.hbs new file mode 100644 index 0000000..759c0f3 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueMapping.hbs @@ -0,0 +1,154 @@ +{{! +* 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. +}} + +<div class="panel panel-default panel-queue-mapping"> + <div class="panel-heading"> + <div class="panel-title"> + Queue Mappings + <a href="#queueMappingsCollapsiblePanel" id="collapseQueueMappingsBtn" data-toggle="collapse" {{bind-attr class=":pull-right isCollapsed:collapsed"}}><i {{bind-attr class=":fa isCollapsed:fa-plus:fa-minus"}}></i></a> + </div> + </div> + <div id="queueMappingsCollapsiblePanel" {{bind-attr class=":panel-collapse :collapse isCollapsed::in"}}> + <div class="panel-body"> + <div class="container-fluid"> + <div class="row"> + <label>User to Queue Mappings (Precedence is from top to botttom)</label> + </div> + <div class="row"> + <ul id="qMappingList" class="list-group"> + {{#each qm in queueMappings}} + <li class="list-group-item">{{queueMappingParser qm}}<span class="pull-right remove-mapping-icon" {{action "removeQueueMapping" qm}}><i class="fa fa-times"></i></span></li> + {{else}} + <label>No queue mappings defined</label> + {{/each}} + </ul> + </div> + + <div class="add-queue-mapping-container"> + <div class="row"> + <div class="btn-group btn-group-sm"> + <button type="button" class="btn btn-default btn-primary" name="button" {{action "showMappingOptions"}}>Add Mapping</button> + </div> + </div> + {{#if isShowing}} + <div class="queue-mapping-options"> + <div class="row"> + <div class="radio"> + <label title="Assign job to queue with same name as user"> + {{view view.radioButton selectionBinding="selectedMapping" name="queueMappingType" value="u:%user:%user"}} + User %user -> queue %user + </label> + </div> + </div> + <div class="row"> + <div class="radio"> + <label title="Assign job to queue with same name as user's primary group"> + {{view view.radioButton selectionBinding="selectedMapping" name="queueMappingType" value="u:%user:%primary_group"}} + User %user -> queue %primary_group + </label> + </div> + </div> + <div class="row"> + <div class="radio"> + <label> + {{view view.radioButton selectionBinding="selectedMapping" name="queueMappingType" value="u:%name:%qname"}} + Assign users to queue + </label> + </div> + {{#if isCustomUserMapping}} + <div class="row"> + <div class="col-md-2"> + <span>Users</span> + </div> + <div class="col-md-10"> + <div class="form-group"> + {{input type="text" class="form-control" value=customUserMappings size="30" placeholder="Comma-separated list of users"}} + </div> + </div> + </div> + <div class="row"> + <div class="col-md-2"> + <span>Queue</span> + </div> + <div class="col-md-5"> + <div class="form-group"> + {{view Ember.Select + class="form-control" + content=leafQueueNames + value=selectedLeafQueueNameForUsers + prompt="Select Queue"}} + </div> + </div> + </div> + {{/if}} + </div> + <div class="row"> + <div class="radio"> + <label> + {{view view.radioButton selectionBinding="selectedMapping" name="queueMappingType" value="g:%name:%qname"}} + Assign groups to queue + </label> + </div> + {{#if isCustomGroupMapping}} + <div class="row"> + <div class="col-md-2"> + <span>Groups</span> + </div> + <div class="col-md-10"> + <div class="form-group"> + {{input type="text" class="form-control" value=customGroupMappings size="30" placeholder="Comma-separated list of groups"}} + </div> + </div> + </div> + <div class="row"> + <div class="col-md-2"> + <span>Queue</span> + </div> + <div class="col-md-5"> + <div class="form-group"> + {{view Ember.Select + class="form-control" + content=leafQueueNames + value=selectedLeafQueueNameForGroups + prompt="Select Queue"}} + </div> + </div> + </div> + {{/if}} + </div> + <div class="row"> + <div class="btn-group btn-group-xs pull-right"> + <button type="button" class="btn btn-default btn-primary" name="button" {{action "addQueueMapping"}}> Add </button> + <button type="button" class="btn btn-default" name="button" {{action "hideMappingOptions"}}>Cancel</button> + </div> + </div> + </div> + {{/if}} + </div> + + <div class="row"> + <div class="checkbox"> + <label> + {{input type="checkbox" name="queueMappingOverride" checked=mappingsOverrideEnable}} + Allow user to override queue mapping + </label> + </div> + </div> + </div> + </div> + </div> +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueSummary.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueSummary.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueSummary.hbs new file mode 100644 index 0000000..b5c3c04 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/components/queueSummary.hbs @@ -0,0 +1,66 @@ +{{! +* 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. +}} + +{{#if queue}} + <div class="queue-summary"> + <div class="panel panel-default"> + <div class="panel-body"> + <div class="row"> + <div class="col-sm-6"> + <label>Name</label> + </div> + <div class="col-sm-4"> + <span>{{queue.name}}</span> + </div> + </div> + <div class="row"> + <div class="col-sm-6"> + <label>Path</label> + </div> + <div class="col-sm-4"> + <span>{{queue.path}}</span> + </div> + </div> + <div class="row"> + <div class="col-sm-6"> + <label>Capacity</label> + </div> + <div class="col-sm-4"> + <span>{{queue.capacity}}%</span> + </div> + </div> + <div class="row"> + <div class="col-sm-6"> + <label>Overall Cluster Capacity</label> + </div> + <div class="col-sm-4"> + <span>{{effectiveCapacity}}%</span> + </div> + </div> + <div class="row"> + <div class="col-sm-6"> + <label>State</label> + </div> + <div class="col-sm-4"> + <span {{bind-attr class="isRunningState:text-success:text-danger"}}>{{queueState}}</span> + </div> + </div> + </div> + </div> + </div> +{{/if}} http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/versionsPanel.hbs ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/versionsPanel.hbs b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/versionsPanel.hbs new file mode 100644 index 0000000..f252005 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/templates/versionsPanel.hbs @@ -0,0 +1,49 @@ +{{! +* 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. +}} + +<div class="panel panel-default"> + <div class="panel-heading"> + <div class="panel-title"> + Versions + </div> + </div> + <div class="panel-body"> + <div id="versions-table-wrap"> + <table class="table table-condensed"> + <tbody> + {{#each sortedTags}} + <tr> + <td> + <span class="label label-info">v{{id}}</span> + {{#if isCurrent}} + <span class="label label-success">Current</span> + {{/if}} + </td> + <td>{{timeAgo changed}}</td> + <td> + <div class="btn-group btn-group-xs btn-block"> + <button type="button" class="btn btn-default btn-xs btn-block" {{action 'loadTagged' tag}}>load</button> + </div> + </td> + </tr> + {{/each}} + </tbody> + </table> + </div> + </div> +</div> http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editQueueCapacity.js ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editQueueCapacity.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editQueueCapacity.js new file mode 100644 index 0000000..2628553 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editQueueCapacity.js @@ -0,0 +1,29 @@ +/** + * 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. + */ + +var App = require('app'); + +App.CapschedPartialsEditQueueCapacityView = Ember.View.extend({ + isQueueCapacityDirty: function() { + return this.get('controller.content').changedAttributes().hasOwnProperty('capacity'); + }.property('controller.content.capacity'), + + isQueueMaximumCapacityDirty: function() { + return this.get('controller.content').changedAttributes().hasOwnProperty('maximum_capacity'); + }.property('controller.content.maximum_capacity') +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editqueue.js ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editqueue.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editqueue.js new file mode 100644 index 0000000..0dde62b --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/editqueue.js @@ -0,0 +1,50 @@ +/** + * 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. + */ + +var App = require('app'); + +App.CapschedQueuesconfEditqueueView = Ember.View.extend({ + isAclPanelCollapsed: true, + isResourcesPanelCollapsed: true, + isCapacityPanelCollapsed: false, + + doExpandCollapsePanel: function() { + var that = this; + this.$('#collapseQueueAclPanelBtn').on('click', function(e) { + Ember.run.next(that, function() { + this.toggleProperty('isAclPanelCollapsed'); + }); + }); + this.$('#collapseResourcesPanelBtn').on('click', function(e) { + Ember.run.next(that, function() { + this.toggleProperty('isResourcesPanelCollapsed'); + }); + }); + this.$('#collapseQueueCapacityPanelBtn').on('click', function(e) { + Ember.run.next(that, function() { + this.toggleProperty('isCapacityPanelCollapsed'); + }); + }); + }.on('didInsertElement'), + + destroyEventListeners: function() { + this.$('#collapseQueueAclPanelBtn').off('click'); + this.$('#collapseResourcesPanelBtn').off('click'); + this.$('#collapseQueueCapacityPanelBtn').off('click'); + }.on('willDestroyElement') +}); http://git-wip-us.apache.org/repos/asf/ambari/blob/79489a8f/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/queuesconf.js ---------------------------------------------------------------------- diff --git a/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/queuesconf.js b/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/queuesconf.js new file mode 100644 index 0000000..7cb71a7 --- /dev/null +++ b/contrib/views/capacity-scheduler/src/main/resources/ui/app/views/queuesconf.js @@ -0,0 +1,27 @@ +/** + * 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. + */ + +var App = require('app'); + +App.CapschedQueuesconfView = Ember.View.extend({ + actions: { + showSaveConfigDialog: function() { + this.$('#configNoteModalDialog').modal('show'); + } + } +});
