Skip to content

Commit 750a731

Browse files
committed
added gpuDesc
1 parent b023c98 commit 750a731

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

pbsmon/src/main/webapp/WEB-INF/tags/resource.tag

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
<th>RAM</th>
1414
<td><c:out value='${resource.memory}'/></td>
1515
</tr>
16+
<c:if test="${not empty resource.gpuDesc}">
17+
<tr>
18+
<th>GPU</th>
19+
<td><c:out value='${resource.gpuDesc}'/></td>
20+
</tr>
21+
</c:if>
1622
<tr>
1723
<th>disk</th>
1824
<td><f:message key="${resource.diskKey}"/></td>

perun_machines/src/main/java/cz/cesnet/meta/perun/api/VypocetniZdroj.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ public class VypocetniZdroj implements Serializable {
1414
private String photo;
1515
private String thumbnail;
1616
private String cpuDesc;
17+
private String gpuDesc;
1718
private String memory;
1819

1920
private Stroj stroj;
@@ -96,6 +97,7 @@ public String toString() {
9697
", photo='" + photo + '\'' +
9798
", thumbnail='" + thumbnail + '\'' +
9899
", cpuDesc='" + cpuDesc + '\'' +
100+
", gpuDesc='" + gpuDesc + '\'' +
99101
", memory='" + memory + '\'' +
100102
", voNames=" + voNames +
101103
'}';
@@ -139,6 +141,14 @@ public void setCpuDesc(String cpuDesc) {
139141
this.cpuDesc = cpuDesc;
140142
}
141143

144+
public String getGpuDesc() {
145+
return gpuDesc;
146+
}
147+
148+
public void setGpuDesc(String gpuDesc) {
149+
this.gpuDesc = gpuDesc;
150+
}
151+
142152
public String getMemory() {
143153
return memory;
144154
}

perun_machines/src/main/java/cz/cesnet/meta/perun/impl/PerunJsonImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ private static String getString(JSONObject jsonObject, String key) {
9191
JSONValue value = jsonObject.get(key);
9292
if (value == null || value.isNull()) return "";
9393
if (value.isString()) {
94-
JSONString jsonString = (JSONString) value;
95-
return jsonString.getValue();
94+
return ((JSONString) value).getValue();
9695
}
9796
throw new RuntimeException("value for key " + key + " must be string, it is " + value);
9897
}
@@ -170,6 +169,7 @@ private VypocetniZdroj nactiVypocetniZdroj(Map<String, Map<String, String>> text
170169
zdroj.setPhoto(getString(jzdroj, "photo"));
171170
zdroj.setThumbnail(getString(jzdroj, "thumbnail"));
172171
zdroj.setCpuDesc(getString(jzdroj, "cpudesc"));
172+
zdroj.setGpuDesc(getString(jzdroj, "gpudesc"));
173173
zdroj.setMemory(getString(jzdroj, "memory"));
174174
nactiTexty("resource " + zid, texty, jzdroj, zdroj.getDiskKey(), "disk");
175175
nactiTexty("resource " + zid, texty, jzdroj, zdroj.getNetworkKey(), "network");

0 commit comments

Comments
 (0)