/
index.gsp
65 lines (63 loc) · 3.03 KB
/
index.gsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
%{--
- Copyright (c) 2009. Gridshore
-
- Licensed 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.
--}%
<%@ page contentType="text/html;charset=UTF-8" %>
<html>
<head>
<title>Simple GSP page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="layout" content="main"/>
<g:javascript>
function addComment(e,divId) {
$(divId).value = e.responseText;
window.alert($(divId).value);
}
</g:javascript>
</head>
<body>
<div class="nav">
<span class="menuButton"><a class="home" href="${resource(dir: '')}">Home</a></span>
<span class="menuButton"><g:link controller="environment">Environments</g:link></span>
<span class="menuButton"><g:link controller="server">Servers</g:link></span>
<span class="menuButton"><g:link controller="vlan">Vlans</g:link></span>
<span class="menuButton"><g:link controller="search">Search</g:link></span>
</div>
<g:each in="${environments}" var="environment">
<div class="yui-ge environment">
<div class="yui-u first">
<span class="title"><g:link action="show" controller="environment" id="${environment.id}">${environment.name}</g:link>
- (last depoy : ${environment.lastDeploy.format('dd-MMM-yyyy HH:mm')})
<g:each in="${environment.links.sort {a, b -> a.title.compareToIgnoreCase b.title}}" var="link"><a href="${link.url}" title="${link.title}">${link.title}</a> </g:each>
</span>
<g:each in="${environment.servers.sort { a, b -> a.name.compareToIgnoreCase b.name }}" var="server">
<div class="server ${server.status.name.toLowerCase()}">
<g:link action="show" id="${server.id}">${fieldValue(bean: server, field: 'name')}</g:link>
<ul>
<li>${server.function}</li>
<g:each in="${server.networks.sort { a, b -> a.vlan.name.compareToIgnoreCase b.vlan.name }}" status="j" var="network">
<li>${network.vlan} (${network.ipAddress})</li>
</g:each>
</ul>
<g:remoteLink action="comments" params="[id:server.id]" update="comments${environment.id}">comments</g:remoteLink>
</div>
</g:each>
</div>
<div class="yui-u">
<div id="comments${environment.id}" class="comments"></div>
</div>
</div>
</g:each>
</body>
</html>