Exemple #1
0
 function Bundle($bundle_id)
 {
     $this->db_bundle = bundle_detail($bundle_id);
     if (!$this->db_cmd) {
         # use does not have the good permissions
         return false;
     }
 }
 function Bundle($bundle_id)
 {
     $this->db_bundle = bundle_detail($bundle_id);
     addtoBreadcrumb($this->db_bundle[0]['title']);
     if (!$this->db_cmd) {
         # use does not have the good permissions
         return false;
     }
 }
 $coh = $cmd[3];
 $cmd = $cmd[0];
 if ($history == '') {
     $p = array('tab' => $tab, 'hostname' => $hostname, 'uuid' => $uuid, 'from' => 'msc|logs|viewLogs', 'gid' => $gid);
 } else {
     $p = array('tab' => $tab, 'hostname' => $hostname, 'uuid' => $uuid, 'from' => 'base|computers|groupmsctabs|grouptablogs', 'gid' => $gid);
 }
 ### gathering command components ###
 if (strlen($cmd['bundle_id']) and !strlen($_GET['cmd_id'])) {
     // BUNDLE case
     $p['bundle_id'] = $cmd['bundle_id'];
     if (strlen($_GET['bundle_id'])) {
         $p['cmd_id'] = $cmd['id'];
         $a_cmd[] = $cmd['title'];
     } else {
         $bundle = bundle_detail($cmd['bundle_id']);
         if ($bundle[0] == null) {
             new NotifyWidgetFailure(_T("Can't get bundle for the requested id", "msc"));
         } else {
             $bundle = $bundle[0];
             if (!strlen($bundle['title'])) {
                 $a_cmd[] = sprintf(_T("Bundle #%s", "msc"), $cmd['bundle_id']);
             } else {
                 $a_cmd[] = $bundle['title'];
             }
         }
     }
 } elseif (!strlen($cmd['bundle_id']) and !strlen($gid)) {
     // SINGLE COMMAND case
     $a_cmd[] = $cmd['title'];
     $p['cmd_id'] = $cmd['id'];
Exemple #4
0
    return $ret;
}
if (strlen($cmd_id)) {
    $s = get_command_on_group_status($cmd_id);
    if ($specific_state) {
        // the export doesnot have the same format
        $s = get_command_by_state(1, $cmd_id, $state, $s['total']);
    }
    $title = get_command_on_host_title($cmd_id);
} elseif (strlen($_GET['bundle_id'])) {
    $s = get_command_on_bundle_status($_GET['bundle_id']);
    if ($specific_state) {
        // the export doesnot have the same format
        $s = get_command_by_state(2, $_GET['bundle_id'], $state, $s['total']);
    }
    $bdl = bundle_detail($_GET['bundle_id']);
    if ($bdl[0] == null) {
        $title = '';
    } else {
        $title = $bdl[0]['title'];
    }
}
ob_end_clean();
$filename = "command_status_";
if (strlen($cmd_id)) {
    $filename .= "C" . $cmd_id;
} elseif (strlen($_GET['bundle_id'])) {
    $filename .= "B" . $_GET['bundle_id'];
}
if ($specific_state) {
    $filename .= "_{$state}";