summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/propiedades
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-10-11 11:06:58 +0000
committerramon <ramongomez@us.es>2017-10-11 11:06:58 +0000
commite3b55857496688ca1ad60df00725798494bca140 (patch)
treed84ed636ae8e8914f91d553bc4d1847cf0ff4119 /admin/WebConsole/propiedades
parent03e01b63c59cbdd3fe92a4c3b229527fcacab07b (diff)
#810: Mostrar info del repositorio basada en peticiĆ³n REST; actualizar datos de respuesta de la ruta REST {{{/repository/images}}}.
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5456 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/propiedades')
-rw-r--r--admin/WebConsole/propiedades/propiedades_repositorios.php43
1 files changed, 26 insertions, 17 deletions
diff --git a/admin/WebConsole/propiedades/propiedades_repositorios.php b/admin/WebConsole/propiedades/propiedades_repositorios.php
index f8bb2314..408ed79c 100644
--- a/admin/WebConsole/propiedades/propiedades_repositorios.php
+++ b/admin/WebConsole/propiedades/propiedades_repositorios.php
@@ -67,19 +67,18 @@ else{
// Si tenemos un apiKey podemos obtener la informaciĆ³n desde el webservice en el repositorio
if($apiKeyRepo != ""){
- $url = "http://".$ip."/opengnsys/rest/index.php/repository/images";
- $headers = array('Authorization: '.$apiKeyRepo);
- $result = callAPI("GET",$url, false, $headers);
- $result = json_decode($result);
+ $repo[0]['url'] = "https://$ip/opengnsys/rest/repository/images";
+ $repo[0]['header'] = array('Authorization: '.$apiKeyRepo);
+ $result = multiRequest($repo);
+ $result = json_decode($result[0]['data']);
+ $repodir=$result->directory;
$totalrepo=$result->disk->total;
- $ocupadorepo=$result->disk->used;
- $librerepo=$result->disk->free;
- $porcentajerepo=$result->disk->percent;
- $repoImages = $result->images;
- $repoWithApi = true;
-
-
- /**/
+ $ocupadorepo=$result->disk->used;
+ $librerepo=$result->disk->free;
+ $porcentajerepo=$result->disk->percent;
+ $repoOus = $result->ous;
+ $repoImages = $result->images;
+ $repoWithApi = true;
}
}
@@ -184,16 +183,26 @@ else{
<?php
// Si tenemos informacion del repositorio remoto, mostramos las imagenes
if($repoWithApi == true && is_array($repoImages)){
- echo "<tr class='tabla_listados_sin'><th colspan='4'>Contenido /opengnsys/images</th></tr>";
+ echo "<tr class='tabla_listados_sin'><th colspan='4'>Contenido $repodir</th></tr>";
echo "<tr><td>File</td><td>Size</td><td>Modified</td><td>Permissions</td></tr>";
foreach($repoImages as $image){
echo "<tr class='tabla_listados_sin'>";
- echo "<td>".$image->file->name."</td>";
- echo "<td>".$image->file->size." bytes</td>";
- echo "<td>".$image->file->modified."</td>";
- echo "<td>".$image->file->permissions."</td>";
+ echo "<td>".$image->name." (".$image->type.")</td>";
+ echo "<td>".$image->size." bytes</td>";
+ echo "<td>".$image->modified."</td>";
+ echo "<td>".$image->mode."</td>";
echo "</tr>";
}
+ foreach($repoOus as $ou) {
+ foreach($ou->images as $image) {
+ echo "<tr class='tabla_listados_sin'>";
+ echo "<td>".$ou->subdir." / ".$image->name." (".$image->type.")</td>";
+ echo "<td>".$image->size." bytes</td>";
+ echo "<td>".$image->modified."</td>";
+ echo "<td>".$image->mode."</td>";
+ echo "</tr>";
+ }
+ }
}
?>
<?php }else { ?>