4315 |
23 Jan 17 |
nicklas |
1 |
<%@ page |
4315 |
23 Jan 17 |
nicklas |
2 |
pageEncoding="UTF-8" |
4315 |
23 Jan 17 |
nicklas |
3 |
session="false" |
4315 |
23 Jan 17 |
nicklas |
4 |
import="net.sf.basedb.core.Application" |
4315 |
23 Jan 17 |
nicklas |
5 |
import="net.sf.basedb.core.DbControl" |
4315 |
23 Jan 17 |
nicklas |
6 |
import="net.sf.basedb.core.SessionControl" |
4315 |
23 Jan 17 |
nicklas |
7 |
import="net.sf.basedb.core.Permission" |
4315 |
23 Jan 17 |
nicklas |
8 |
import="net.sf.basedb.core.PermissionDeniedException" |
4315 |
23 Jan 17 |
nicklas |
9 |
import="net.sf.basedb.clients.web.Base" |
4315 |
23 Jan 17 |
nicklas |
10 |
import="net.sf.basedb.clients.web.util.HTML" |
4315 |
23 Jan 17 |
nicklas |
11 |
import="net.sf.basedb.clients.web.extensions.ExtensionsControl" |
4315 |
23 Jan 17 |
nicklas |
12 |
import="net.sf.basedb.util.Values" |
4315 |
23 Jan 17 |
nicklas |
13 |
%> |
4315 |
23 Jan 17 |
nicklas |
14 |
<%@ taglib prefix="base" uri="/WEB-INF/base.tld" %> |
4315 |
23 Jan 17 |
nicklas |
15 |
<%@ taglib prefix="p" uri="/WEB-INF/path.tld" %> |
4315 |
23 Jan 17 |
nicklas |
16 |
<%@ taglib prefix="tbl" uri="/WEB-INF/table.tld" %> |
4315 |
23 Jan 17 |
nicklas |
17 |
<% |
4315 |
23 Jan 17 |
nicklas |
18 |
final SessionControl sc = Base.getExistingSessionControl(request, true); |
4315 |
23 Jan 17 |
nicklas |
19 |
final String ID = sc.getId(); |
4315 |
23 Jan 17 |
nicklas |
20 |
final String hostId = request.getParameter("hostId"); |
4315 |
23 Jan 17 |
nicklas |
21 |
DbControl dc = null; |
4315 |
23 Jan 17 |
nicklas |
22 |
try |
4315 |
23 Jan 17 |
nicklas |
23 |
{ |
4315 |
23 Jan 17 |
nicklas |
24 |
dc = sc.newDbControl(); |
4315 |
23 Jan 17 |
nicklas |
25 |
if (!ExtensionsControl.get(dc).hasPermission(Permission.WRITE)) |
4315 |
23 Jan 17 |
nicklas |
26 |
{ |
4315 |
23 Jan 17 |
nicklas |
27 |
throw new PermissionDeniedException("You are not allowed to manage Open Grid Clusters."); |
4315 |
23 Jan 17 |
nicklas |
28 |
} |
4315 |
23 Jan 17 |
nicklas |
29 |
%> |
4315 |
23 Jan 17 |
nicklas |
30 |
<base:page type="default" > |
4315 |
23 Jan 17 |
nicklas |
31 |
<base:head |
4315 |
23 Jan 17 |
nicklas |
32 |
scripts="~view-host.js" |
4315 |
23 Jan 17 |
nicklas |
33 |
styles="path.css,table.css,toolbar.css"> |
4315 |
23 Jan 17 |
nicklas |
34 |
<style> |
4315 |
23 Jan 17 |
nicklas |
35 |
/* div for displaying output from ssh commands */ |
4315 |
23 Jan 17 |
nicklas |
36 |
.ssh-out |
4315 |
23 Jan 17 |
nicklas |
37 |
{ |
4315 |
23 Jan 17 |
nicklas |
38 |
font-family: monospace, Courier New; |
4315 |
23 Jan 17 |
nicklas |
39 |
white-space: pre; |
4315 |
23 Jan 17 |
nicklas |
40 |
overflow: auto; |
4315 |
23 Jan 17 |
nicklas |
41 |
} |
4315 |
23 Jan 17 |
nicklas |
42 |
|
4315 |
23 Jan 17 |
nicklas |
43 |
/* output from stderr is displayed in red */ |
4315 |
23 Jan 17 |
nicklas |
44 |
.ssh-out .stderr |
4315 |
23 Jan 17 |
nicklas |
45 |
{ |
4315 |
23 Jan 17 |
nicklas |
46 |
color: #CC0000; |
4315 |
23 Jan 17 |
nicklas |
47 |
} |
4315 |
23 Jan 17 |
nicklas |
48 |
</style> |
4315 |
23 Jan 17 |
nicklas |
49 |
</base:head> |
4315 |
23 Jan 17 |
nicklas |
50 |
<base:body> |
4315 |
23 Jan 17 |
nicklas |
51 |
|
5986 |
10 Jul 20 |
nicklas |
52 |
<p:path><p:pathelement title="Job scheduler clusters" |
4315 |
23 Jan 17 |
nicklas |
53 |
href="<%="list-clusters.jsp?ID="+ID%>" |
4315 |
23 Jan 17 |
nicklas |
54 |
/><p:pathelement title="<%=hostId%>" |
4315 |
23 Jan 17 |
nicklas |
55 |
/></p:path> |
4315 |
23 Jan 17 |
nicklas |
56 |
|
4315 |
23 Jan 17 |
nicklas |
57 |
<div id="page-data" class="datacontainer" |
4315 |
23 Jan 17 |
nicklas |
58 |
data-host-id="<%=HTML.encodeTags(hostId)%>" |
4315 |
23 Jan 17 |
nicklas |
59 |
></div> |
4315 |
23 Jan 17 |
nicklas |
60 |
|
4315 |
23 Jan 17 |
nicklas |
61 |
<div class="content"> |
4315 |
23 Jan 17 |
nicklas |
62 |
<table class="fullform topborder"> |
4315 |
23 Jan 17 |
nicklas |
63 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
64 |
<th>Name</th> |
4315 |
23 Jan 17 |
nicklas |
65 |
<td id="host-name"></td> |
4315 |
23 Jan 17 |
nicklas |
66 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
67 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
68 |
<th>Connection info</th> |
4315 |
23 Jan 17 |
nicklas |
69 |
<td></td> |
4315 |
23 Jan 17 |
nicklas |
70 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
71 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
72 |
<th class="subprompt">Address</th> |
4315 |
23 Jan 17 |
nicklas |
73 |
<td id="host-address"></td> |
4315 |
23 Jan 17 |
nicklas |
74 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
75 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
76 |
<th class="subprompt">User</th> |
4315 |
23 Jan 17 |
nicklas |
77 |
<td id="username"></td> |
4315 |
23 Jan 17 |
nicklas |
78 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
79 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
80 |
<th class="subprompt">SSH fingerprint</th> |
4315 |
23 Jan 17 |
nicklas |
81 |
<td id="fingerprint"></td> |
4315 |
23 Jan 17 |
nicklas |
82 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
83 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
84 |
<th>System info</th> |
5986 |
10 Jul 20 |
nicklas |
85 |
<td id="ogs-type"></td> |
4315 |
23 Jan 17 |
nicklas |
86 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
87 |
<tr> |
5986 |
10 Jul 20 |
nicklas |
88 |
<th class="subprompt">Version</th> |
4315 |
23 Jan 17 |
nicklas |
89 |
<td id="ogs-info-cmd" class="ssh-out"></td> |
4315 |
23 Jan 17 |
nicklas |
90 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
91 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
92 |
<th class="subprompt"></th> |
4315 |
23 Jan 17 |
nicklas |
93 |
<td id="ogs-info-result" class="ssh-out"></td> |
4315 |
23 Jan 17 |
nicklas |
94 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
95 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
96 |
<th class="subprompt">Operating system</th> |
4315 |
23 Jan 17 |
nicklas |
97 |
<td id="cluster-info-cmd" class="ssh-out"></td> |
4315 |
23 Jan 17 |
nicklas |
98 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
99 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
100 |
<th class="subprompt"></th> |
4315 |
23 Jan 17 |
nicklas |
101 |
<td id="cluster-info-result" class="ssh-out"></td> |
4315 |
23 Jan 17 |
nicklas |
102 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
103 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
104 |
<th class="subprompt">Time difference</th> |
4315 |
23 Jan 17 |
nicklas |
105 |
<td id="time-cmd" class="ssh-out"></td> |
4315 |
23 Jan 17 |
nicklas |
106 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
107 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
108 |
<th class="subprompt"></th> |
4315 |
23 Jan 17 |
nicklas |
109 |
<td id="time-diff" class="ssh-out"></td> |
4315 |
23 Jan 17 |
nicklas |
110 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
111 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
112 |
<th>Job agent</th> |
4315 |
23 Jan 17 |
nicklas |
113 |
<td id="job-agent"></td> |
4315 |
23 Jan 17 |
nicklas |
114 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
115 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
116 |
<th>Folders</th> |
4315 |
23 Jan 17 |
nicklas |
117 |
<td></td> |
4315 |
23 Jan 17 |
nicklas |
118 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
119 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
120 |
<th class="subprompt">Job folder</th> |
4315 |
23 Jan 17 |
nicklas |
121 |
<td id="job-folder"></td> |
4315 |
23 Jan 17 |
nicklas |
122 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
123 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
124 |
<th class="subprompt">Tmp folder</th> |
4315 |
23 Jan 17 |
nicklas |
125 |
<td id="tmp-folder"></td> |
4315 |
23 Jan 17 |
nicklas |
126 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
127 |
<tr> |
4315 |
23 Jan 17 |
nicklas |
128 |
<th class="subprompt">Debug folder</th> |
4315 |
23 Jan 17 |
nicklas |
129 |
<td id="tmp-folder-debug"></td> |
4315 |
23 Jan 17 |
nicklas |
130 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
131 |
<tr class="align-top"> |
4315 |
23 Jan 17 |
nicklas |
132 |
<th>Nodes</th> |
4315 |
23 Jan 17 |
nicklas |
133 |
<td id="nodes"></td> |
4315 |
23 Jan 17 |
nicklas |
134 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
135 |
|
4315 |
23 Jan 17 |
nicklas |
136 |
<tr class="dynamic"> |
4315 |
23 Jan 17 |
nicklas |
137 |
<th></th> |
4315 |
23 Jan 17 |
nicklas |
138 |
<td></td> |
4315 |
23 Jan 17 |
nicklas |
139 |
</tr> |
4315 |
23 Jan 17 |
nicklas |
140 |
</table> |
4315 |
23 Jan 17 |
nicklas |
141 |
</div> |
4315 |
23 Jan 17 |
nicklas |
142 |
|
4315 |
23 Jan 17 |
nicklas |
143 |
</base:body> |
4315 |
23 Jan 17 |
nicklas |
144 |
</base:page> |
4315 |
23 Jan 17 |
nicklas |
145 |
<% |
4315 |
23 Jan 17 |
nicklas |
146 |
} |
4315 |
23 Jan 17 |
nicklas |
147 |
finally |
4315 |
23 Jan 17 |
nicklas |
148 |
{ |
4315 |
23 Jan 17 |
nicklas |
149 |
if (dc != null) dc.close(); |
4315 |
23 Jan 17 |
nicklas |
150 |
} |
4315 |
23 Jan 17 |
nicklas |
151 |
%> |