algairim commented on a change in pull request #228:
URL: https://github.com/apache/brooklyn-ui/pull/228#discussion_r668928273



##########
File path: 
ui-modules/home/app/views/about/node-management/node-management.template.html
##########
@@ -0,0 +1,88 @@
+<!--
+  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">{{vm.node.nodeId}}</span>
+            <h4 class="list-group-item-heading">Node ID</h4>
+        </li>
+
+        <li class="list-group-item">
+            <span class="badge 
node-management-badge">{{vm.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 !== vm.node.status) && 
{'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}">
+                <div ng-if="vm.showEditOptions===false">{{vm.newStatus}}</div>
+                <div ng-if="vm.showEditOptions">
+                    <select class="form-control property-change-box"
+                            ng-style="(vm.newStatus !== vm.node.status) && 
{'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}"
+                            ng-options="status for status in vm.statuses" 
ng-init="vm.newStatus"
+                            ng-model="vm.newStatus">
+                    </select>
+                    <label style="font-size:small">Update status... (current: 
{{vm.node.status}})
+                    </label>
+                </div>
+
+            </span>
+            <h4 class="list-group-item-heading">Status</h4>
+            <br ng-if="vm.showEditOptions">
+            <br ng-if="vm.showEditOptions">
+            <p class="master-change-warning" ng-show="vm.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="vm.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="vm.showEditOptions && 
{'min-height': '80px'}">
+
+            <span class="badge node-management-badge"
+                  ng-style="(vm.newPriority !== vm.node.priority) && 
{'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}">
+                <div 
ng-if="vm.showEditOptions===false">{{vm.newPriority}}</div>

Review comment:
       Change to 'ng-if="!vm.showEditOptions"'

##########
File path: 
ui-modules/home/app/views/about/node-management/node-management.template.html
##########
@@ -0,0 +1,88 @@
+<!--
+  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">{{vm.node.nodeId}}</span>
+            <h4 class="list-group-item-heading">Node ID</h4>
+        </li>
+
+        <li class="list-group-item">
+            <span class="badge 
node-management-badge">{{vm.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 !== vm.node.status) && 
{'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}">
+                <div ng-if="vm.showEditOptions===false">{{vm.newStatus}}</div>
+                <div ng-if="vm.showEditOptions">
+                    <select class="form-control property-change-box"
+                            ng-style="(vm.newStatus !== vm.node.status) && 
{'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}"
+                            ng-options="status for status in vm.statuses" 
ng-init="vm.newStatus"
+                            ng-model="vm.newStatus">
+                    </select>
+                    <label style="font-size:small">Update status... (current: 
{{vm.node.status}})
+                    </label>
+                </div>
+
+            </span>
+            <h4 class="list-group-item-heading">Status</h4>
+            <br ng-if="vm.showEditOptions">
+            <br ng-if="vm.showEditOptions">
+            <p class="master-change-warning" ng-show="vm.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="vm.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="vm.showEditOptions && 
{'min-height': '80px'}">
+
+            <span class="badge node-management-badge"
+                  ng-style="(vm.newPriority !== vm.node.priority) && 
{'background-color' : '#f0ad4e'} || {'background-color' : 'gray'}">
+                <div 
ng-if="vm.showEditOptions===false">{{vm.newPriority}}</div>

Review comment:
       Change to `ng-if="!vm.showEditOptions"`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brooklyn.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to