ui-modules/home/app/views/about/node-management/node-management.template.html (58 lines of code) (raw):

<!-- 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. --> <h3 class="node-management-title">Node Management Panel</h3> <div> <div></div> <ul class="list-group"> <li class="list-group-item"> <span class="badge node-management-badge">{{node.nodeId}}</span> <h4 class="list-group-item-heading">Node ID</h4> </li> <li class="list-group-item"> <span class="badge node-management-badge">{{node.remoteTimestamp | timeAgoFilter}}</span> <h4 class="list-group-item-heading">Last active</h4> </li> <li class="list-group-item"> <span class="badge node-management-badge" ng-style="(vm.newStatus !== node.status) && {'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}"> <div ng-if="!showEditOptions">{{vm.newStatus}}</div> <div ng-if="showEditOptions"> <select class="form-control property-change-box" ng-style="(vm.newStatus !== node.status) && {'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}" ng-options="status for status in statuses" ng-model="vm.newStatus"> </select> </div> </span> <h4 class="list-group-item-heading">Status</h4> <br ng-if="showEditOptions"> <br ng-if="showEditOptions"> <p class="master-change-warning" ng-show="node.status === 'MASTER' && vm.newStatus !== 'MASTER'">Warning! Applying changes will de-mote this node from being Master and a new Master will be elected from other management nodes.</p> <p class="master-change-warning" ng-show="node.status !== 'MASTER' && vm.newStatus === 'MASTER'">Warning! Applying changes will de-mote the current Master and this node will be forcibly made the new Master.</p> </li> <li class="list-group-item" ng-style="showEditOptions && {'min-height': '80px'}"> <span class="badge node-management-badge" ng-style="(vm.newPriority && vm.newPriority !== node.priority) && {'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}"> <div ng-if="!showEditOptions">{{vm.newPriority}}</div> <div ng-if="showEditOptions"> <input class="form-control property-change-box" type="number" ng-model="vm.newPriority" ng-style="(vm.newPriority && vm.newPriority !== node.priority) && {'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}" placeholder="(Can not be blank)"/> </div> </span> <h4 class="list-group-item-heading">Priority</h4> </li> </ul> <div class="node-management-actions"> <button class="btn btn-lg btn-danger btn-default pull-right" style="margin-left: 1em; margin-right: 1em" ng-click="cancelAndQuit()">Cancel</button> <button class="btn btn-lg btn-default pull-right" style="margin-left: 1em;" ng-if="!showEditOptions" ng-click="doShowEditOptions()">Edit</button> <button class="btn btn-lg btn-success btn-default pull-right" style="margin-left: 1em" ng-if="showEditOptions" ng-disabled="(!vm.newPriority && !vm.newStatus) || (vm.newPriority === node.priority && vm.newStatus === node.status)" ng-click="applyChangesAndQuit()">Apply</button> </div> </div>