summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/server.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2016-09-28 12:59:10 +0000
committerramon <ramongomez@us.es>2016-09-28 12:59:10 +0000
commitdf81ab780967b8d36a879f55158b746494be92f4 (patch)
tree6610ce824daa6e804e8386769b97643a291bd1e7 /admin/WebConsole/rest/server.php
parent3b5daf8a01d996b1deb530325363759e6d0e37f6 (diff)
#708: Continuar con la documentación de la API REST con Swagger; modificar la respuesta de la ruta {{{GET /ous/:ouid/images/:imageid/software}}} para normalizar la salida de datos.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5018 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/server.php')
-rw-r--r--admin/WebConsole/rest/server.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/admin/WebConsole/rest/server.php b/admin/WebConsole/rest/server.php
index ab8ce60e..c3789a4f 100644
--- a/admin/WebConsole/rest/server.php
+++ b/admin/WebConsole/rest/server.php
@@ -546,10 +546,12 @@ EOD;
$tmp['usage'] = $rs->campos["uso"];
if ($rs->campos["nombreso"] != null) {
$tmp['os'] = $rs->campos["nombreso"];
- $tmp['imageid'] = $rs->campos["idimagen"];
- $tmp['deploydate'] = $rs->campos["fechadespliegue"];
- // Comprobar si la imagen está actualizada.
- $tmp['updated'] = ($rs->campos["difimagen"]>0 ? "false" : "true");
+ if ($rs->campos["idimagen"] > 0) {
+ $tmp['image']['id'] = $rs->campos["idimagen"];
+ $tmp['image']['deploydate'] = $rs->campos["fechadespliegue"];
+ // Comprobar si la imagen está actualizada.
+ $tmp['image']['updated'] = ($rs->campos["difimagen"]>0 ? "false" : "true");
+ }
}
//$tmp['cachedata'] = $rs->campos["cache"];
}