Skip to content

Commit

Permalink
deleted unnecessary stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Ardhi Putra Pratama authored and Ardhi Putra Pratama committed Apr 22, 2013
1 parent 4b429e6 commit 47e02d6
Show file tree
Hide file tree
Showing 17 changed files with 238 additions and 170 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## The "document root" of the PBSWeb-Lite installation,
## all PHP scripts will be installed into this directory.
INSTALLDIR = /var/www/lite/v2
INSTALLDIR = /var/www/html/lite/v2

## username that runs apache server.
HTTPUSER = apache
Expand Down
12 changes: 6 additions & 6 deletions constant.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
*/
?>
<?php
$TITLE_UPLOAD = "Unggah Berkas/Project";
$TITLE_INDEX = "Halaman Login";
$TITLE_MAINMENU = "Menu Utama";
$TITLE_SCRIPTGEN = "Buat Script Torque";
$TITLE_UPLOAD = "Upload File/Project";
$TITLE_INDEX = "Login to Torqace";
$TITLE_MAINMENU = "Main Menu";
$TITLE_SCRIPTGEN = "Generate Torque Script";
$TITLE_SCRIPTVIEW = "Script Review Torque";
$TITLE_VIEWDIR = "Lihat Berkas/Project";
$TITLE_QSTAT = "Status Queue";
$TITLE_VIEWDIR = "View File/Project";
$TITLE_QSTAT = "Queue Status";
?>
14 changes: 4 additions & 10 deletions dirview.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
// A simple file manager used to manage the files under ~/pbsweb
//
include_once ("config.php");
include_once 'constant.php';

session_name($PBSWEBNAME);
session_set_cookie_params($PBSWEBEXPTIME, $PBSWEBPATH);
Expand Down Expand Up @@ -73,7 +74,7 @@
<title>Lihat Berkas</title>
</head>
<body bgcolor="white">
<h1><img src="<?php echo $PBSWEBHEADERLOGO; ?>" border="0" height="102" width="92" alt="PBS Logo">Lihat Berkas </h1>
<h1><img src="<?php echo $PBSWEBHEADERLOGO; ?>" border="0" height="102" width="92" alt="PBS Logo"><?php echo $TITLE_VIEWDIR; ?></h1>

<?php /* Put standard navigation menu */
include ("navbar.php");
Expand Down Expand Up @@ -170,7 +171,7 @@
print("&nbsp;&nbsp;<a href=\"filedel.php?host=$host&filename=$fullname\">Delete</a>&nbsp;&nbsp;");
print("</td>");
print("<td align=\"center\">");
if ($first == "d") {
if ($first == "d" && substr($fullname, 0, 1) == "/") {
print("&nbsp;&nbsp;<a href=\"scriptcreate.php?directory=$fullname&host=$host\">Generate Script</a>&nbsp;&nbsp;");
}
print("</td>");
Expand All @@ -184,14 +185,7 @@
include ("navbar.php");
?>
<hr>
<p>
Send questions and comments to
<?php
echo "<a href=\"mailto:" . $PBSWEBMAIL . "\">";
echo $PBSWEBMAIL . "</a>\n";
?>
You can find <a href='help.html'>help here </a>.
</p>
<?php include_once 'footer.php'; ?>
<!-- $Id: dirview.php,v 1.8 2004/03/18 21:04:19 platin Exp $ -->
</body>
</html>
7 changes: 1 addition & 6 deletions filedel.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,7 @@
?>

<hr>
<p>Send questions and comments to
<?php
echo "<a href=\"mailto:" . $PBSWEBMAIL . "\">";
echo $PBSWEBMAIL . "</a>\n";
?>
You can find <a href='help.html'>help here </a>.</p>
<? include_once("footer.php"); ?>
<script language="JavaScript">
location.replace("<?php print("dirview.php?host=$host&dir=$dirup"); ?> ");
</script>
Expand Down
9 changes: 8 additions & 1 deletion filedownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@
<HEAD>
<!-- Let JavaScript do the automatic location change for us -->
<!-- <META http-equiv="Refresh" content="0; URL=/"> -->
<script type="application/javascript">
var el = document.getElementById('dl');
el.onclick = close();
function close() {
self.close();
}
</script>
</HEAD>
<BODY>
<CENTER>
Expand All @@ -112,7 +119,7 @@
<SCRIPT language="JavaScript">
location.replace("<?php print($filelink); ?>");
</SCRIPT>
<A href="<?php print($filelink); ?>">Click here to download manually</A>
<A href="<?php print($filelink); ?>" id="dl">Click here to download manually</A>
</CENTER>
</BODY>
</HTML>
9 changes: 5 additions & 4 deletions fileview.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php /*
PBSWeb-Lite: A Simple Web-based Interface to PBS
Torqace : Torque Interface
Copyright (C) 2003, 2004 Yuan-Chung Cheng
Copyright (C) 2013, Ardhi Putra Pratama
Torqace is based on the PBSWeb-Lite code written by Yuan-Chung Cheng.
PBSWeb-Lite is based on the PBSWeb code written by Paul Lu et al.
See History for more detailes.
See History for more details.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -74,7 +75,7 @@

if (substr($type, 0, 4) == 'text') {
print("<pre>\n$fileview_result\n</pre>");
} else print("<pre>\nBerkas bukan berupa teks\n</pre>");
} else print("<pre>\nFile type is not text\n</pre>");

?>

Expand Down
4 changes: 2 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
?>

<p>
Kirim pertanyaan dan komentar ke
Send questions and comments to
<?php
include_once("config.php");
echo "<a href=\"mailto:" . $PBSWEBMAIL . "\">";
echo $PBSWEBMAIL . "</a>\n";
?>
Dapatkan bantuan <a href='help/index.html'>disini </a>.
You can find <a href='help/index.html'>help here </a>.
</p>
14 changes: 14 additions & 0 deletions help/help-arrInput.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>html-make</title>
<meta name="author" content="Ardhi Putra Pratama" />
</head>
<body>
Disini cara aturan pembuatan array input
</body>
</html>

7 changes: 1 addition & 6 deletions jobstatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@
include ("navbar.php");
?>
<hr>
<p>Send questions and comments to
<?php
echo "<a href=\"mailto:" . $PBSWEBMAIL . "\">";
echo $PBSWEBMAIL . "</a>\n";
?>
You can find <a href='help.html'>help here </a>.</p>
<? include_once("footer.php"); ?>
<!-- $Id: jobstatus.php,v 1.12 2004/03/18 21:04:19 platin Exp $ -->
</body>
</html>
36 changes: 18 additions & 18 deletions licence.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?php
/*
<?php /*
PBSWeb-Lite: A Simple Web-based Interface to PBS
Torqace : Torque Interface
Copyright (C) 2003, 2004 Yuan-Chung Cheng
Copyright (C) 2013, Ardhi Putra Pratama
PBSWeb-Lite is based on the PBSWeb code written by Paul Lu et al.
See History for more detailes.
Torqace is based on the PBSWeb-Lite code written by Yuan-Chung Cheng.
PBSWeb-Lite is based on the PBSWeb code written by Paul Lu et al.
See History for more details.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
*/
?>
/*

Expand Down
2 changes: 1 addition & 1 deletion navbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<a href="upload.php"><?php echo $TITLE_UPLOAD; ?></a> || <!--
<a href="dirselect.php?action=compile">Compile Uploaded Files</a> ||
<a href="dirselect.php?action=script">Script Creation and Submission</a> ||
<a href="qstat.php">PBS Queue Information</a> ||
-->
<a href="qstat.php"><?php echo $TITLE_QSTAT; ?></a> ||
<a href="dirview.php"><?php echo $TITLE_VIEWDIR; ?></a> || <!-- <a href="index.html">Login</a> ||
-->
<a href="logout.php">Logout</a>
Expand Down
5 changes: 5 additions & 0 deletions pbsutils.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ function pbsutils_collect(&$jobinfo, $databank) {
$script_str = str_replace("\\\"", "\"", $script_str);
$jobinfo['script'] = $script_str;
}

if (isset($databank['tipefile'])) {
$jobinfo['type'] = $databank['tipefile'];
}

}

// parse qstat (lihat stat jobs) supaya ke array untuk reformatting
Expand Down
15 changes: 5 additions & 10 deletions qdel.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php /*
PBSWeb-Lite: A Simple Web-based Interface to PBS
Torqace : Torque Interface
Copyright (C) 2003, 2004 Yuan-Chung Cheng
Copyright (C) 2013, Ardhi Putra Pratama
Torqace is based on the PBSWeb-Lite code written by Yuan-Chung Cheng.
PBSWeb-Lite is based on the PBSWeb code written by Paul Lu et al.
See History for more detailes.
See History for more details.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -94,13 +95,7 @@
<a href="qstat.php">Back to Queue Status</a>
</p>
<hr>
<p>
Send questions and comments to
<?php
echo "<a href=\"mailto:" . $PBSWEBMAIL . "\">";
echo $PBSWEBMAIL . "</a>\n";
?> You can find <a href='help.html'>help here </a>.
</p>
<? include_once("footer.php"); ?>
<!-- $Id: qdel.php,v 1.9 2004/03/18 21:04:19 platin Exp $ -->
</body>
</html>
66 changes: 33 additions & 33 deletions qstat.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

if (!isset($PBSWEBHOSTLIST[$host]["qstat"]) || $PBSWEBHOSTLIST[$host]["qstat"] == "") {
error_page("Gagal membuka qstat");
error_page("Failed retrieving qstat command");
exit();
} else {
$qstat_cmd = $PBSWEBHOSTLIST[$host]["qstat"];
Expand Down Expand Up @@ -98,21 +98,21 @@
$qstatB = `ssh -l $username $host '$qstat_cmd -B; exit' 2>&1`;
$qstatQ = `ssh -l $username $host '$qstat_cmd -Q; exit' 2>&1`;
?>
<h2>Queue yang sedang/baru berjalan</h2>
<h2>Current/Running Job Queue</h2>
<!-- 20010510 Chris added links to job id and for deletion. -->
<table width=90% border=1>
<?php
$stringarray = explode("\n", $qstat);
if (sizeof($stringarray) - 1 <= 0) print("Tidak ada Queue yang dapat dilihat\n");
if (sizeof($stringarray) - 1 <= 0) print("Queue is empty \n");
else {
?>
<tr>
<th>ID Job</th>
<th>Nama Job</th>
<th>User yang menjalankan</th>
<th>Waktu yang dipakai</th>
<th>Job ID</th>
<th>Job name</th>
<th>Run as</th>
<th>Running time</th>
<th>Status</th>
<th>Queue yang dipakai</th>
<th>In queue</th>
<!--<th>Action</th> -->
</tr>
<?php
Expand All @@ -131,9 +131,9 @@
if ($j == 0)
print("<a href=\"jobstatus.php?jobid=$jobid&host=$host\">$line_array[$j]</a></td>");
elseif ($j == 4) {
if ($line_array[$j] == "C") print("Selesai</td>");
elseif ($line_array[$j] == "R") print("Sedang Berjalan</td>");
elseif ($line_array[$j] == "Q") print("Mengantri</td>");
if ($line_array[$j] == "C") print("Completed</td>");
elseif ($line_array[$j] == "R") print("Running</td>");
elseif ($line_array[$j] == "Q") print("Queued</td>");
}
elseif ($j==6 && $username == $line_array[2]) {
//print("<a href=\"qdel.php?jobid=$jobid&host=$host\">Delete</a></td>");
Expand All @@ -146,21 +146,21 @@
?>
</table>

<h2>Status Queue</h2>
<h2>Queue Status</h2>
<table border="1">
<tr>
<th>Nama Queue</th>
<th>Jumlah Max Job</th>
<th>Jumlah Job dalam Queue</th>
<th>Queue name</th>
<th>Max Job that may be run concurrently</th>
<th>Job in Queue</th>
<th>Status (Enable/Disable)</th>
<th>Status (Started/Stopped)</th>
<th>Jumlah Job yang mengantri</th>
<th>Jumlah Job yang berjalan</th>
<th>Jumlah Job yang ditahan (hold)</th>
<th>Jumlah Job yang menunggu waktu untuk dijalankan</th>
<th>Jumlah Job yang sedang dipindahkan</th>
<th>Jumlah Job yang menunggu untuk keluar dari queue</th>
<th>Tipe Queue (Execution/Routing)</th>
<th>Queued job</th>
<th>Running Job</th>
<th>Held Job</th>
<th>Waiting for execution Job</th>
<th>Moving Job</th>
<th>Exiting Job</th>
<th>Queue Type (Execution/Routing)</th>
</tr>
<tr>
<?php
Expand All @@ -175,19 +175,19 @@
print("<td align=\"center\">" . $valueQ . "</td>");
}
?> </tr></table>
<h2>Status Host</h2>
<h2>Host Status</h2>
<table border="1">
<tr>
<th>Nama Host</th>
<th>Jumlah Max Job</th>
<th>Jumlah Job dalam Host</th>
<th>Jumlah Job yang mengantri</th>
<th>Jumlah Job yang berjalan</th>
<th>Jumlah Job yang ditahan (hold)</th>
<th>Jumlah Job yang menunggu waktu untuk dijalankan</th>
<th>Jumlah Job yang sedang dipindahkan</th>
<th>Jumlah Job yang menunggu untuk keluar dari host</th>
<th>Status Host</th>
<th>Host name</th>
<th>Max Job that can run concurrently</th>
<th>Total Job</th>
<th>Queued job</th>
<th>Running Job</th>
<th>Held Job</th>
<th>Waiting for execution Job</th>
<th>Moving Job</th>
<th>Exiting Job</th>
<th>Host Status</th>
</tr>
<tr>
<?php
Expand Down
Loading

0 comments on commit 47e02d6

Please sign in to comment.