Exemple #1
0
 }
 if (!$vps->exists) {
     $vps = vps_load($veid);
 }
 $vps->info();
 $xtpl->table_add_category(' ');
 $xtpl->table_add_category(' ');
 $xtpl->table_td('ID:');
 $xtpl->table_td($vps->veid);
 $xtpl->table_tr();
 $xtpl->table_td(_("Server") . ':');
 $s = new cluster_node($vps->ve["vps_server"]);
 $xtpl->table_td($s->s["server_name"]);
 $xtpl->table_tr();
 $xtpl->table_td(_("Location") . ':');
 $xtpl->table_td($s->get_location_label());
 $xtpl->table_tr();
 $xtpl->table_td(_("Owner") . ':');
 $xtpl->table_td('<a href="?page=adminm&section=members&action=edit&id=' . $vps->ve['m_id'] . '">' . (isset($vps->ve["m_nick"]) ? $vps->ve["m_nick"] : false) . '</a>');
 $xtpl->table_tr();
 if ($vps->ve["vps_expiration"]) {
     $xtpl->table_td(_("Expiration") . ':');
     $xtpl->table_td(strftime("%Y-%m-%d %H:%M", $vps->ve["vps_expiration"]));
     $xtpl->table_tr();
 }
 if ($vps->deleted) {
     $xtpl->table_td(_("Deleted") . ':');
     $xtpl->table_td(strftime("%Y-%m-%d %H:%M", $vps->ve["vps_deleted"]));
     $xtpl->table_tr();
 }
 $xtpl->table_td(_("Status") . ':');
Exemple #2
0
 $xtpl->table_add_category('<a href="?page=cluster&action=restart_node&id=' . $srv["server_id"] . '"><img src="template/icons/vps_restart.png" title="' . _("Reboot node") . '"/></a>');
 $sql = 'SELECT * FROM servers_status WHERE server_id ="' . $srv["server_id"] . '" ORDER BY id DESC LIMIT 1';
 if ($result = $db->query($sql)) {
     $status = $db->fetch_array($result);
 }
 $xtpl->table_td(_("CPU load:"));
 $xtpl->table_td($status["cpu_load"], false, true, 3);
 $xtpl->table_tr();
 $xtpl->table_td(_("Free RAM:"));
 $xtpl->table_td($status["ram_free_mb"] . ' MB', false, true, 3);
 $xtpl->table_tr();
 $xtpl->table_td(_("Free OpenVZ diskspace:"));
 $xtpl->table_td($status["disk_vz_free_gb"] . ' GB', false, true, 3);
 $xtpl->table_tr();
 $xtpl->table_td(_("Server location:"));
 $xtpl->table_td($node->get_location_label(), false, false, 3);
 $xtpl->table_tr();
 if ($srv["server_availstat"]) {
     $xtpl->table_td(_("Availability:"));
     $xtpl->table_td($srv["server_availstat"], false, true, 3);
     $xtpl->table_tr();
 }
 $sql = 'SELECT COUNT(*) AS count FROM vps WHERE vps_server=' . $db->check($srv["server_id"]);
 $vps_count = 0;
 if ($result = $db->query($sql)) {
     $vps_count = $db->fetch_array($result);
 }
 $xtpl->table_td(_("VPS count:"));
 $xtpl->table_td($vps_count["count"]);
 $xtpl->table_td(_("Free slots:"));
 $vps_free = (int) $srv["server_maxvps"] - (int) $vps_count["count"];