1%{--
2  - Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com)
3  -
4  - Licensed under the Apache License, Version 2.0 (the "License");
5  - you may not use this file except in compliance with the License.
6  - You may obtain a copy of the License at
7  -
8  -     http://www.apache.org/licenses/LICENSE-2.0
9  -
10  - Unless required by applicable law or agreed to in writing, software
11  - distributed under the License is distributed on an "AS IS" BASIS,
12  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  - See the License for the specific language governing permissions and
14  - limitations under the License.
15  --}%
16
17<g:if test="${params.declarenone && nodes.size()<1}">
18    <span class="warn note">None</span>
19</g:if>
20<g:set var="max" value="${-1}"/>
21<g:if test="${params.maxShown}">
22    <g:set var="max" value="${params.int('maxShown')}"/>
23</g:if>
24<g:if test="${max>0 && nodes.size()>max}">
25<a href="#embednodeset" class="textbtn textbtn-default " data-toggle="collapse">Show all <g:enc>${nodes.size()}</g:enc> Nodes
26    <i class="auto-caret"></i>
27</a>
28</g:if>
29<span id="embednodeset" class=" ${max > 0 && nodes.size() > max? 'collapse collapse-expandable':''} ansicolor-on matchednodes embed embed_clean">
30        <% def i =0 %>
31        <g:each in="${nodes.keySet().sort{a,b->a.compareTo(b)}}" var="nodename">
32
33            <g:set var="nkey" value="${g.rkey()}"/>
34            <g:set var="nodedata" value="${nodes[nodename]}"/>
35            <g:set var="node" value="${nodedata.node}"/>
36            <g:set var="executions" value="${nodedata.executions}"/>
37            <g:set var="resources" value="${nodedata.resources}"/>
38            <g:set var="resName" value="${node.nodename}"/>
39            <g:set var="resHost" value="${node.hostname}"/>
40            <g:set var="runnable" value="${null == nodeauthrun || nodeauthrun[node.nodename]}"/>
41            <a id="${enc(attr:nkey)}_key"
42                tabindex="0"
43                role="button"
44                  class="${i%2==1?'alternateRow':''} node_entry ${nodedata.islocal?'server':''} node_ident textbtn-default textbtn-plain ${nodeStatusColorCss(node:node)}"
45                  data-toggle="popover"
46                  data-placement="bottom"
47                  data-trigger="focus"
48                  data-popover-content-ref="#${nkey+'_key_tooltip'}"
49                  data-popover-template-class="popover-wide"
50                  style="${nodeStatusColorStyle(node:node)}"
51                  data-node="${enc(attr:node.nodename)}"
52                  data-key="${enc(attr:nkey)}">
53
54                <g:nodeStatusColor node="${node}" icon="true"><g:nodeStatusIcon
55                        node="${node}"
56                ><i class="rdicon node ${runnable?'node-runnable':''} icon-small"></i></g:nodeStatusIcon></g:nodeStatusColor>&nbsp;${node.nodename}
57            </a>
58
59            <g:render template="nodeTooltipView" model="[node:node,key: nkey+'_key',islocal:nodedata.islocal,runnable:runnable, nodefilterLinkId: nodefilterLinkId?:'']"/>
60            <% i++ %>
61        </g:each>
62        <g:javascript>
63            fireWhenReady('embednodeset',function(){
64                _initPopoverContentRef('#embednodeset');
65            });
66
67        </g:javascript>
68</span>
69