1
0
Fork 0
Dieser Commit ist enthalten in:
DSB 2012-11-05 19:30:10 +00:00
Ursprung bf306fb369
Commit a85629f43c
3 geänderte Dateien mit 106 neuen und 107 gelöschten Zeilen

Datei anzeigen

@ -27,12 +27,10 @@ class DumpController extends Msd_Controller_Action
{ {
$dump = new Msd_Dump(); $dump = new Msd_Dump();
$dump->prepareDumpProcess(); $dump->prepareDumpProcess();
$this->view->dumpData = new StdClass(); $this->view->dumpData = new StdClass();
$this->view->dumpData->nrOfDatabasesToBackup = $this->view->dumpData->nrOfDatabasesToBackup = count($dump->dbsToBackup);
count($dump->dbsToBackup); $this->view->dumpData->databasesToBackup = implode(', ', array_keys($dump->dbsToBackup));
$this->view->dumpData->databasesToBackup = $this->view->dumpData->sumTotal = $dump->sumTotal;
implode(', ', array_keys($dump->dbsToBackup));
$this->view->dumpData->sumTotal = $dump->sumTotal;
//TODO get comment from config profile //TODO get comment from config profile
$this->view->dumpData->comment = ''; $this->view->dumpData->comment = '';
} }
@ -44,8 +42,8 @@ class DumpController extends Msd_Controller_Action
*/ */
public function startDumpAction() public function startDumpAction()
{ {
$taskList = Msd_TaskManager::getInstance('backupTasks'); $taskList = Msd_TaskManager::getInstance('backupTasks');
$tasks = $taskList->getTasks(); $tasks = $taskList->getTasks();
$this->view->sessionId = Zend_Session::getId(); $this->view->sessionId = Zend_Session::getId();
} }
@ -59,11 +57,10 @@ class DumpController extends Msd_Controller_Action
Zend_Layout::getMvcInstance()->disableLayout(); Zend_Layout::getMvcInstance()->disableLayout();
Zend_Controller_Front::getInstance()->setParam('noViewRenderer', true); Zend_Controller_Front::getInstance()->setParam('noViewRenderer', true);
$taskList = Msd_TaskManager::getInstance('backupTasks'); $taskList = Msd_TaskManager::getInstance('backupTasks');
$tasks = $taskList->getTasks(); $tasks = $taskList->getTasks();
$ret = array( $ret = array(
'backup_in_progress' => false, 'backup_in_progress' => false,
'config_file' => $this->view->dynamicConfig->getParam('configFile') 'config_file' => $this->view->dynamicConfig->getParam('configFile')
); );
echo json_encode($ret); echo json_encode($ret);
} }

Datei anzeigen

@ -20,9 +20,11 @@ class Msd_View_Helper_GetIcon extends Zend_View_Helper_Abstract
/** /**
* Get html-img-tag for icon image * Get html-img-tag for icon image
* *
* @param string $name * @throws Msd_Exception
* @param string $title *
* @param int $size * @param string $name Icon name
* @param string $title HTML title tag
* @param int $size Size in Pixel (defines the sub folder to load from)
* *
* @return string * @return string
*/ */
@ -32,7 +34,7 @@ class Msd_View_Helper_GetIcon extends Zend_View_Helper_Abstract
if (!$baseUrl) { if (!$baseUrl) {
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl(); $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
} }
$icons = self::_getIconFilenames(); $icons = $this->_getIconFilenames();
if (!isset($icons[$name])) { if (!isset($icons[$name])) {
throw new Msd_Exception( throw new Msd_Exception(
'GetIcon: unknown icon \'' . $name . '\' requested' 'GetIcon: unknown icon \'' . $name . '\' requested'

Datei anzeigen

@ -1,113 +1,113 @@
<?php <?php
$d = $this->parent->dumpData; $d = $this->parent->dumpData;
$sumTotal = $this->parent->dumpData->sumTotal; $sumTotal = $this->parent->dumpData->sumTotal;
$this->lang = $this->parent->lang; $this->lang = $this->parent->lang;
$this->config = $this->parent->config; $this->config = $this->parent->config;
?> ?>
<div id="dumpsettings"> <div id="dumpsettings">
<h3><?php echo $this->lang->L_FM_DUMPSETTINGS;?></h3> <h3><?php echo $this->lang->L_FM_DUMPSETTINGS;?></h3>
<table class="bdr floatLeft" summary="Dump settings"> <table class="bdr floatLeft" summary="Dump settings">
<tr class="row-even"> <tr class="row-even">
<td class="small"><?php echo $this->lang->L_CONFIG_HEADLINE?></td> <td class="small"><?php echo $this->lang->L_CONFIG_HEADLINE?></td>
<td class="small right"><?php echo $this->dynamicConfig->getParam('configFile')?></td> <td class="small right"><?php echo $this->config->getParam('general.title')?></td>
</tr> </tr>
<tr class="dbrow"> <tr class="dbrow">
<td class="small"><?php echo $this->lang->L_DBS?>:</td> <td class="small"><?php echo $this->lang->L_DBS?>:</td>
<td class="small right"> <td class="small right">
<?php echo $d->databasesToBackup?> (<?php echo $d->nrOfDatabasesToBackup?>) <?php echo $d->databasesToBackup?> (<?php echo $d->nrOfDatabasesToBackup?>)
</td> </td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_TABLES?>:</td>
<td class="small right"><?php echo $this->numberFormat($sumTotal['tablesTotal'])?>
</td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_RECORDS?>:</td>
<td class="small right"><?php echo $this->numberFormat($sumTotal['recordsTotal'])?></td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_DATASIZE?>:</td>
<td class="small right"><?php echo $this->byteOutput($sumTotal['datasizeTotal'])?></td>
</tr>
<tr class="row-odd">
<td colspan="2" class="small">
<span class="small right">(<?php echo $this->lang->L_DATASIZE_INFO?>.)</span>
</td>
</tr>
<tr class="dbrow">
<td class="small nowrap"><?php echo $this->lang->L_GZIP?>:</td>
<td class="small right"><?php echo $this->dynamicConfig->getParam('compression') ? $this->lang->L_YES: $this->lang->L_NO; ?></td>
</tr>
<?php
echo $this->partial('dump/multipart.phtml', array('parent' => $this->parent));
echo $this->partial('dump/email.phtml', array('parent' => $this->parent));
echo $this->partial('dump/ftp.phtml', array('parent' => $this->parent));
?>
</table>
<?php
if (!empty($sumTotal['tables'])) {
?>
<table class="bdr floatLeft" style="margin-left:12px;" summary="Info table types and records">
<tr class="thead">
<th><?php echo $this->lang->L_TABLE_TYPE;?></th>
<?php
$details = $sumTotal['tables'];
$keys = array_keys($details);
foreach ($keys as $tableType) {
echo '<th>'.$tableType.'</th>';
}
?>
<th><?php echo $this->lang->L_INFO_SUM;?></th>
</tr> </tr>
<tr class="row-odd"> <tr class="row-odd">
<td class="small"><?php echo $this->lang->L_TABLES;?>:</td> <td class="small"><?php echo $this->lang->L_TABLES?>:</td>
<?php <td class="small right"><?php echo $this->numberFormat($sumTotal['tablesTotal'])?>
</td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_RECORDS?>:</td>
<td class="small right"><?php echo $this->numberFormat($sumTotal['recordsTotal'])?></td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_DATASIZE?>:</td>
<td class="small right"><?php echo $this->byteOutput($sumTotal['datasizeTotal'])?></td>
</tr>
<tr class="row-odd">
<td colspan="2" class="small">
<span class="small right">(<?php echo $this->lang->L_DATASIZE_INFO?>.)</span>
</td>
</tr>
<tr class="dbrow">
<td class="small nowrap"><?php echo $this->lang->L_GZIP?>:</td>
<td class="small right"><?php echo $this->dynamicConfig->getParam('compression') ? $this->lang->L_YES : $this->lang->L_NO; ?></td>
</tr>
<?php
echo $this->partial('dump/multipart.phtml', array('parent' => $this->parent));
echo $this->partial('dump/email.phtml', array('parent' => $this->parent));
echo $this->partial('dump/ftp.phtml', array('parent' => $this->parent));
?>
</table>
<?php
if (!empty($sumTotal['tables'])) {
?>
<table class="bdr floatLeft" style="margin-left:12px;" summary="Info table types and records">
<tr class="thead">
<th><?php echo $this->lang->L_TABLE_TYPE;?></th>
<?php
$details = $sumTotal['tables'];
$keys = array_keys($details);
foreach ($keys as $tableType) {
echo '<th>' . $tableType . '</th>';
}
?>
<th><?php echo $this->lang->L_INFO_SUM;?></th>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_TABLES;?>:</td>
<?php
$tablesTotal = 0; $tablesTotal = 0;
foreach ($keys as $tableType) { foreach ($keys as $tableType) {
echo '<td class="small right">' echo '<td class="small right">'
.$this->numberFormat($details[$tableType]['tablesTotal']) . $this->numberFormat($details[$tableType]['tablesTotal'])
.'</td>'; . '</td>';
$tablesTotal += $details[$tableType]['tablesTotal']; $tablesTotal += $details[$tableType]['tablesTotal'];
} }
?> ?>
<td class="small right"> <td class="small right">
<?php echo $this->numberFormat($tablesTotal);?> <?php echo $this->numberFormat($tablesTotal);?>
</td> </td>
</tr> </tr>
<tr class="row-even"> <tr class="row-even">
<td class="small"><?php echo $this->lang->L_RECORDS;?>:</td> <td class="small"><?php echo $this->lang->L_RECORDS;?>:</td>
<?php <?php
$recordsTotal = 0; $recordsTotal = 0;
foreach ($keys as $tableType) { foreach ($keys as $tableType) {
echo '<td class="small right">' echo '<td class="small right">'
.$this->numberFormat($details[$tableType]['recordsTotal']) . $this->numberFormat($details[$tableType]['recordsTotal'])
.'</td>'; . '</td>';
$recordsTotal += $details[$tableType]['recordsTotal']; $recordsTotal += $details[$tableType]['recordsTotal'];
} }
?> ?>
<td class="small right"> <td class="small right">
<?php echo $this->numberFormat($recordsTotal);?> <?php echo $this->numberFormat($recordsTotal);?>
</td> </td>
</tr> </tr>
<tr class="row-odd"> <tr class="row-odd">
<td class="small"><?php echo $this->lang->L_DATASIZE;?>:</td> <td class="small"><?php echo $this->lang->L_DATASIZE;?>:</td>
<?php <?php
$datasizeTotal = 0; $datasizeTotal = 0;
foreach ($keys as $tableType) { foreach ($keys as $tableType) {
echo '<td class="small right">' echo '<td class="small right">'
.$this->byteOutput($details[$tableType]['datasizeTotal']) . $this->byteOutput($details[$tableType]['datasizeTotal'])
.'</td>'; . '</td>';
$datasizeTotal += $details[$tableType]['datasizeTotal']; $datasizeTotal += $details[$tableType]['datasizeTotal'];
} }
?> ?>
<td class="small right"> <td class="small right">
<?php echo $this->byteOutput($datasizeTotal);?> <?php echo $this->byteOutput($datasizeTotal);?>
</td> </td>
</tr> </tr>
</table> </table>
<?php } ?> <?php } ?>
</div> </div>