From: Davide Franco Date: Tue, 7 Dec 2010 10:46:05 +0000 (+0100) Subject: bacula-web: Removed pools and volumes list from main layout X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=055710823622907641d145df5255e474eabceaf6;p=bacula%2Fbacula bacula-web: Removed pools and volumes list from main layout - New pools.php script - Renammed volumes.tpl to pools.tpl - Modified css attributes for main layout --- diff --git a/gui/bacula-web/index.php b/gui/bacula-web/index.php index 93a130edff..8265f91350 100644 --- a/gui/bacula-web/index.php +++ b/gui/bacula-web/index.php @@ -125,7 +125,7 @@ $smarty->assign('clientes_totales',$nb_clients["nb_client"] ); $smarty->assign( 'total_name_jobs', $dbSql->Get_BackupJob_Names() ); // Get volumes list (volumes.tpl) -$smarty->assign('pools',$dbSql->GetVolumeList() ); +$smarty->assign('pools', $dbSql->GetVolumeList() ); // Last 24 hours completed jobs number (last_run_report.tpl) $completed_jobs = $dbSql->GetLastJobs(); diff --git a/gui/bacula-web/pools.php b/gui/bacula-web/pools.php index 62a2de0c86..2583902662 100644 --- a/gui/bacula-web/pools.php +++ b/gui/bacula-web/pools.php @@ -1,3 +1,26 @@ compile_check = true; + $smarty->debugging = false; + $smarty->force_compile = true; + + $smarty->template_dir = "./templates"; + $smarty->compile_dir = "./templates_c"; + $smarty->config_dir = "./configs"; + + // Get volumes list (pools.tpl) + $smarty->assign('pools',$dbSql->GetVolumeList() ); + + $smarty->display('pools.tpl'); ?> diff --git a/gui/bacula-web/style/default.css b/gui/bacula-web/style/default.css index 85762b5b38..c25bbe0c46 100644 --- a/gui/bacula-web/style/default.css +++ b/gui/bacula-web/style/default.css @@ -74,7 +74,7 @@ a:hover { color: #736F6E } left:10px; width: 500px; border:none; - margin-top: 1em; + margin-top: 0px; background-color: #FFFFFF; } @@ -83,7 +83,7 @@ a:hover { color: #736F6E } left:520px; width: 500px; border: none; - margin-top: 1em; + margin-top: 0px; } #main_center { @@ -91,7 +91,7 @@ a:hover { color: #736F6E } left:10px; width: 900px; /*border: 1px solid red; */ - margin-top: 1em; + margin-top: 0px; } .box { diff --git a/gui/bacula-web/templates/index.tpl b/gui/bacula-web/templates/index.tpl index 40e2681d92..d144e40069 100644 --- a/gui/bacula-web/templates/index.tpl +++ b/gui/bacula-web/templates/index.tpl @@ -43,7 +43,8 @@ - {include file=volumes.tpl} +{* {include file=volumes.tpl}*} + diff --git a/gui/bacula-web/templates/pools.tpl b/gui/bacula-web/templates/pools.tpl new file mode 100644 index 0000000000..75d655215d --- /dev/null +++ b/gui/bacula-web/templates/pools.tpl @@ -0,0 +1,66 @@ + + + +bacula-web + +{literal} + +{/literal} + + + +{popup_init src='./external_packages/js/overlib.js'} +{include file=header.tpl} + + + +
+
+

Pools

+ + + {foreach from=$pools item=pool key=pool_name} + + + + + + + + + + + + {foreach from=$pool item=volume} + + + + + + + + {foreachelse} + + + {/foreach} + + {/foreach} +
+ {$pool_name} +
Name{t}Bytes{/t}{t}Media Type{/t}{t}Expire{/t}{t}Last written{/t}{t}Status{/t}
{$volume.volumename}{$volume.volbytes}{$volume.mediatype}{$volume.expire}{$volume.lastwritten}{$volume.volstatus}
+ No volume in this pool +
+ +
+
+ + + +{include file="footer.tpl"} diff --git a/gui/bacula-web/templates/volumes.tpl b/gui/bacula-web/templates/volumes.tpl deleted file mode 100644 index 3ed7555ba6..0000000000 --- a/gui/bacula-web/templates/volumes.tpl +++ /dev/null @@ -1,41 +0,0 @@ - - -
-

Pools

- - - {foreach from=$pools item=pool key=pool_name} - - - - - - - - - - - - {foreach from=$pool item=volume} - - - - - - - - {foreachelse} - - - {/foreach} - - {/foreach} -
- {$pool_name} -
Name{t}Bytes{/t}{t}Media Type{/t}{t}Expire{/t}{t}Last written{/t}{t}Status{/t}
{$volume.volumename}{$volume.volbytes}{$volume.mediatype}{$volume.expire}{$volume.lastwritten}{$volume.volstatus}
- No volume in this pool -
- -
- -