QA
Dieser Commit ist enthalten in:
Ursprung
bf306fb369
Commit
a85629f43c
3 geänderte Dateien mit 106 neuen und 107 gelöschten Zeilen
|
@ -27,12 +27,10 @@ class DumpController extends Msd_Controller_Action
|
|||
{
|
||||
$dump = new Msd_Dump();
|
||||
$dump->prepareDumpProcess();
|
||||
$this->view->dumpData = new StdClass();
|
||||
$this->view->dumpData->nrOfDatabasesToBackup =
|
||||
count($dump->dbsToBackup);
|
||||
$this->view->dumpData->databasesToBackup =
|
||||
implode(', ', array_keys($dump->dbsToBackup));
|
||||
$this->view->dumpData->sumTotal = $dump->sumTotal;
|
||||
$this->view->dumpData = new StdClass();
|
||||
$this->view->dumpData->nrOfDatabasesToBackup = count($dump->dbsToBackup);
|
||||
$this->view->dumpData->databasesToBackup = implode(', ', array_keys($dump->dbsToBackup));
|
||||
$this->view->dumpData->sumTotal = $dump->sumTotal;
|
||||
//TODO get comment from config profile
|
||||
$this->view->dumpData->comment = '';
|
||||
}
|
||||
|
@ -44,8 +42,8 @@ class DumpController extends Msd_Controller_Action
|
|||
*/
|
||||
public function startDumpAction()
|
||||
{
|
||||
$taskList = Msd_TaskManager::getInstance('backupTasks');
|
||||
$tasks = $taskList->getTasks();
|
||||
$taskList = Msd_TaskManager::getInstance('backupTasks');
|
||||
$tasks = $taskList->getTasks();
|
||||
$this->view->sessionId = Zend_Session::getId();
|
||||
}
|
||||
|
||||
|
@ -59,11 +57,10 @@ class DumpController extends Msd_Controller_Action
|
|||
Zend_Layout::getMvcInstance()->disableLayout();
|
||||
Zend_Controller_Front::getInstance()->setParam('noViewRenderer', true);
|
||||
$taskList = Msd_TaskManager::getInstance('backupTasks');
|
||||
$tasks = $taskList->getTasks();
|
||||
$ret = array(
|
||||
$tasks = $taskList->getTasks();
|
||||
$ret = array(
|
||||
'backup_in_progress' => false,
|
||||
'config_file' => $this->view->dynamicConfig->getParam('configFile')
|
||||
|
||||
'config_file' => $this->view->dynamicConfig->getParam('configFile')
|
||||
);
|
||||
echo json_encode($ret);
|
||||
}
|
||||
|
|
|
@ -20,9 +20,11 @@ class Msd_View_Helper_GetIcon extends Zend_View_Helper_Abstract
|
|||
/**
|
||||
* Get html-img-tag for icon image
|
||||
*
|
||||
* @param string $name
|
||||
* @param string $title
|
||||
* @param int $size
|
||||
* @throws Msd_Exception
|
||||
*
|
||||
* @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
|
||||
*/
|
||||
|
@ -32,7 +34,7 @@ class Msd_View_Helper_GetIcon extends Zend_View_Helper_Abstract
|
|||
if (!$baseUrl) {
|
||||
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
|
||||
}
|
||||
$icons = self::_getIconFilenames();
|
||||
$icons = $this->_getIconFilenames();
|
||||
if (!isset($icons[$name])) {
|
||||
throw new Msd_Exception(
|
||||
'GetIcon: unknown icon \'' . $name . '\' requested'
|
||||
|
|
|
@ -1,113 +1,113 @@
|
|||
<?php
|
||||
$d = $this->parent->dumpData;
|
||||
$sumTotal = $this->parent->dumpData->sumTotal;
|
||||
$this->lang = $this->parent->lang;
|
||||
$d = $this->parent->dumpData;
|
||||
$sumTotal = $this->parent->dumpData->sumTotal;
|
||||
$this->lang = $this->parent->lang;
|
||||
$this->config = $this->parent->config;
|
||||
?>
|
||||
<div id="dumpsettings">
|
||||
<h3><?php echo $this->lang->L_FM_DUMPSETTINGS;?></h3>
|
||||
<table class="bdr floatLeft" summary="Dump settings">
|
||||
<tr class="row-even">
|
||||
<td class="small"><?php echo $this->lang->L_CONFIG_HEADLINE?></td>
|
||||
<td class="small right"><?php echo $this->dynamicConfig->getParam('configFile')?></td>
|
||||
</tr>
|
||||
<tr class="dbrow">
|
||||
<td class="small"><?php echo $this->lang->L_DBS?>:</td>
|
||||
<td class="small right">
|
||||
<?php echo $d->databasesToBackup?> (<?php echo $d->nrOfDatabasesToBackup?>)
|
||||
</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>
|
||||
<h3><?php echo $this->lang->L_FM_DUMPSETTINGS;?></h3>
|
||||
<table class="bdr floatLeft" summary="Dump settings">
|
||||
<tr class="row-even">
|
||||
<td class="small"><?php echo $this->lang->L_CONFIG_HEADLINE?></td>
|
||||
<td class="small right"><?php echo $this->config->getParam('general.title')?></td>
|
||||
</tr>
|
||||
<tr class="dbrow">
|
||||
<td class="small"><?php echo $this->lang->L_DBS?>:</td>
|
||||
<td class="small right">
|
||||
<?php echo $d->databasesToBackup?> (<?php echo $d->nrOfDatabasesToBackup?>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td class="small"><?php echo $this->lang->L_TABLES;?>:</td>
|
||||
<?php
|
||||
<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 class="row-odd">
|
||||
<td class="small"><?php echo $this->lang->L_TABLES;?>:</td>
|
||||
<?php
|
||||
$tablesTotal = 0;
|
||||
foreach ($keys as $tableType) {
|
||||
echo '<td class="small right">'
|
||||
.$this->numberFormat($details[$tableType]['tablesTotal'])
|
||||
.'</td>';
|
||||
. $this->numberFormat($details[$tableType]['tablesTotal'])
|
||||
. '</td>';
|
||||
$tablesTotal += $details[$tableType]['tablesTotal'];
|
||||
}
|
||||
?>
|
||||
<td class="small right">
|
||||
<?php echo $this->numberFormat($tablesTotal);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td class="small"><?php echo $this->lang->L_RECORDS;?>:</td>
|
||||
<?php
|
||||
?>
|
||||
<td class="small right">
|
||||
<?php echo $this->numberFormat($tablesTotal);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-even">
|
||||
<td class="small"><?php echo $this->lang->L_RECORDS;?>:</td>
|
||||
<?php
|
||||
$recordsTotal = 0;
|
||||
foreach ($keys as $tableType) {
|
||||
echo '<td class="small right">'
|
||||
.$this->numberFormat($details[$tableType]['recordsTotal'])
|
||||
.'</td>';
|
||||
. $this->numberFormat($details[$tableType]['recordsTotal'])
|
||||
. '</td>';
|
||||
$recordsTotal += $details[$tableType]['recordsTotal'];
|
||||
}
|
||||
?>
|
||||
<td class="small right">
|
||||
<?php echo $this->numberFormat($recordsTotal);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td class="small"><?php echo $this->lang->L_DATASIZE;?>:</td>
|
||||
<?php
|
||||
?>
|
||||
<td class="small right">
|
||||
<?php echo $this->numberFormat($recordsTotal);?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-odd">
|
||||
<td class="small"><?php echo $this->lang->L_DATASIZE;?>:</td>
|
||||
<?php
|
||||
$datasizeTotal = 0;
|
||||
foreach ($keys as $tableType) {
|
||||
echo '<td class="small right">'
|
||||
.$this->byteOutput($details[$tableType]['datasizeTotal'])
|
||||
.'</td>';
|
||||
. $this->byteOutput($details[$tableType]['datasizeTotal'])
|
||||
. '</td>';
|
||||
$datasizeTotal += $details[$tableType]['datasizeTotal'];
|
||||
}
|
||||
?>
|
||||
<td class="small right">
|
||||
<?php echo $this->byteOutput($datasizeTotal);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
?>
|
||||
<td class="small right">
|
||||
<?php echo $this->byteOutput($datasizeTotal);?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
|
Laden …
In neuem Issue referenzieren