Change the Message under the Progress Bar
static public changeProgressBarMessage ( $msg = " " ) : nothing | ||
$msg | message under the bar (default ' ') | |
return | nothing |
Html::createProgressBar(__('Work in progress...')); echo "</td></tr>\n"; echo "</table>"; if (!isset($_GET['offset'])) { // First run $offset = $rulecollection->replayRulesOnExistingDB(0, $max, array(), $_POST); $manufacturer = isset($_POST["manufacturer"]) ? $_POST["manufacturer"] : 0; } else { // Next run $offset = $rulecollection->replayRulesOnExistingDB($_GET['offset'], $max, array(), $_GET); $manufacturer = $_GET["manufacturer"]; // global start for stat $start = $_GET["start"]; } if ($offset < 0) { // Work ended $end = explode(" ", microtime()); $duree = round($end[0] + $end[1] - $start); Html::changeProgressBarMessage(sprintf(__('Task completed in %s'), Html::timestampToString($duree))); echo "<a href='" . $_SERVER['PHP_SELF'] . "'>" . __('Back') . "</a>"; } else { // Need more work Html::redirect($_SERVER['PHP_SELF'] . "?start={$start}&replay_rule=1&offset={$offset}&manufacturer=" . "{$manufacturer}"); } Html::footer(true); exit; } } Html::header(Rule::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], 'admin', $rulecollection->menu_type, $rulecollection->menu_option); $rulecollection->display(); Html::footer();
if (!isset($_GET['offset'])) { // First run $offset = $rulecollection->replayRulesOnExistingDB(0, $max, array(), $_POST); $manufacturer = isset($_POST["manufacturer"]) ? $_POST["manufacturer"] : 0; } else { // Next run $offset = $rulecollection->replayRulesOnExistingDB($_GET['offset'], $max, array(), $_GET); $manufacturer = $_GET["manufacturer"]; // global start for stat $start = $_GET["start"]; } if ($offset < 0) { // Work ended $end = explode(" ", microtime()); $duree = round($end[0] + $end[1] - $start); Html::changeProgressBarMessage(__('Task completed.') . " (" . Html::timestampToString($duree) . ")"); echo "<a href='" . $_SERVER['PHP_SELF'] . "'>" . __('Back') . "</a>"; } else { // Need more work Html::redirect($_SERVER['PHP_SELF'] . "?start={$start}&replay_rule=1&offset={$offset}&manufacturer=" . "{$manufacturer}"); } Html::footer(TRUE); exit; } } } Html::header(_n('Rule', 'Rules', 2), $_SERVER['PHP_SELF'], "admin", $rulecollection->menu_type, $rulecollection->menu_option); $tabs = array(); if ($rulecollection->showInheritedTab()) { $tabs[0] = array('title' => __('Rules applied', 'fusioninventory') . ' : ' . Dropdown::getDropdownName('glpi_entities', $_SESSION['glpiactive_entity']), 'url' => $CFG_GLPI['root_doc'] . "/plugins/fusioninventory/ajax/rules.tabs.php", 'params' => "target=" . $_SERVER['PHP_SELF'] . "&glpi_tab=1&inherited=1&itemtype=" . get_class($rulecollection)); }