Skip to content

Commit

Permalink
Simplified Ganymede launch page, got rid of old native applet option
Browse files Browse the repository at this point in the history
  • Loading branch information
jonabbey committed Jul 23, 2014
1 parent 4170a7e commit f7ba9bb
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 210 deletions.
13 changes: 11 additions & 2 deletions scripts/installWeb.in
Expand Up @@ -35,6 +35,7 @@ chdir($rootdir);
"HTMLINSTALL" => "/sample/apache/html/ganymede",
"WEBURL" => "/ganymede",
"XMLPATH" => "/ganymede-client/bin",
"RESPONSIBLEEMAIL" => "example@example.com",
"DOCS" => "yes",
"ANT" => "/usr/bin/ant");

Expand All @@ -43,6 +44,7 @@ chdir($rootdir);
"HTMLINSTALL" => "Where should the web access files be installed?",
"WEBURL" => "What URL path will resolve to the Ganymede web access directory?",
"XMLPATH" => "Where will the Ganymede client binaries be installed?",
"RESPONSIBLEEMAIL" => "Who should receive email about Ganymede at your site?",
"DOCS" => "Do you want the Ganymede documentation installed in this directory as well?",
"ANT" => "Where is Apache Ant installed?");

Expand Down Expand Up @@ -135,6 +137,14 @@ foreach $step (@steps) {
}
}

if ($step eq "RESPONSIBLEEMAIL") {
if ($vars{$step} !~ /@/) {
print "Email address is missing an @\n";
$vars{$step} = $old;
$success = 0;
}
}

if ($step eq "WEBURL" && $vars{"WEBURL"} !~ /^https?:\/\//) {
print "*Please provide a fully qualified URL.\n";
$success = 0;
Expand Down Expand Up @@ -188,8 +198,6 @@ copy_file("webforms/ganymede_splash.png", "$installdir/ganymede_splash.png");
# Customize and copy the client web pages

install_file("webforms/index.html", "$installdir/index.html");
install_file("webforms/client_native.html", "$installdir/client_native.html");
install_file("webforms/console_native.html", "$installdir/console_native.html");
install_file("webforms/ganypass.pl", "$installdir/ganypass.pl");
install_file("webforms/gany_query.pl", "$installdir/gany_query.pl");
install_file("webforms/client.jnlp", "$installdir/client.jnlp");
Expand Down Expand Up @@ -331,6 +339,7 @@ sub install_file{
s/#SERVERHOST/$vars{"SYSTEMNAME"}/g;
s/#REGISTRYPORT/$vars{"REGISTRYPORT"}/g;
s/<#XMLPATH#>/$vars{"XMLPATH"}/g;
s/#RESPONSIBLEEMAIL/$vars{"RESPONSIBLEEMAIL"}/g;
s/<##PERLEXE##>/$perlloc/g;
s/#WEBROOT/$vars{"WEBURL"}/g;
print OUTPUT $_;
Expand Down
15 changes: 0 additions & 15 deletions webforms/client_native.html

This file was deleted.

15 changes: 0 additions & 15 deletions webforms/console_native.html

This file was deleted.

189 changes: 11 additions & 178 deletions webforms/index.html
Expand Up @@ -6,7 +6,6 @@
<title>Ganymede Launcher on #SERVERHOST</title>
</head>
<body bgcolor="#FFFFFF">
<FORM name="FORM">
<center>
<table border=2 cellspacing=2 cellpadding=2 bgcolor="#ccffcc" width="75%">
<tr bgcolor="#ffffff">
Expand All @@ -17,204 +16,38 @@
</center>
</td>
</tr>
<tr bgcolor="#663366">
<td colspan="2">
<font face="Arial, Helvetica" color="ffffcc">
<center>
<b>Please select
<font color="ccffcc"> Client Type </font>
and
<font color="ccffcc"> Java Virtual Machine </font>
</b>
</center>
</font>
</td>
<tr>
<td colspan="2" bgcolor="#663366">&nbsp;</td>
</tr>
<tr>
<td>
<center>
<font face="Arial, Helvetica">
<SELECT NAME="client" onChange="UpdateText()">
<OPTION value="Standard Client" SELECTED>Standard Client
<OPTION value="Admin Console">Admin Console
</SELECT>
<a href="client.jnlp">Ganymede Client</a>&nbsp;&nbsp;&nbsp;<a href="client.jnlp"><img src="ganymede_128.png" align="center"/></a>
</font>
</center>
</font>
</td>
<td>
<font face="Arial, Helvetica">
<INPUT NAME="JVM" TYPE=radio VALUE="WebStart" CHECKED>Java Web Start<br>
<INPUT NAME="JVM" TYPE=radio VALUE="Native">Native
</font>
</td>
</tr>

<tr>
<td colspan="2">
<center>
<font face="Arial, Helvetica">
<INPUT NAME="go" TYPE=button VALUE="Start Ganymede" ONCLICK="login()">
<a href="console.jnlp">Ganymede Admin Console</a>&nbsp;&nbsp;&nbsp;<a href="console.jnlp"><img src="ganymede_admin_128.png" align="center"/></a>
</font>
</center>
</td>

</tr>
<tr>
<td colspan="2" bgcolor="#663366">&nbsp;</td>
</tr>
<tr bgcolor ="#ffffff">
<td colspan="2">
<font face = "Arial, Helvetica">
<b>Notes</b> <p>Most users should use the 'Java Web
Start' option to run the Ganymede clients. Java Web
Start allows your local system to run the Ganymede
applets outside of the context of your web browser.
Java Web Start is also capable of caching the applets
on your system, to improve subsequent startup time.</p>

<p>If Java Web Start does not work for you, the
'Native' option should, at least on any sort of modern
web browser. If that doesn't work, check to make sure
your system has Java 6 or better installed.</p>
</font>
</td>
</tr>
<tr bgcolor ="#ffffff">
<td colspan="2">
<td colspan="2">
<font face = "Arial, Helvetica">
<b>Links</b>
<p>
<table border=0 cellspacing=0 cellpadding=0>
<tr>
<td>
<font face = "Arial, Helvetica">
Java Download:
</font>
</td>
<td>
<font face = "Arial, Helvetica">
<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" target="_blank">Download Java</a>
</font>
</td>
</tr>
<tr>
<td>
<font face = "Arial, Helvetica">
Home:
</font>
</td>
<td>
<font face = "Arial, Helvetica">
<a href="http://www.arlut.utexas.edu/gash2/" target="_blank">Ganymede Home Page</a>
</font>
</td>
</tr>
<tr>
<td>
<font face = "Arial, Helvetica">
Author:
</font>
</td>
<td>
<font face = "Arial, Helvetica">
<a href="mailto:jonabbey@arlut.utexas.edu">jonabbey@arlut.utexas.edu</a>
</font>
</td>
</tr>
<tr>
<td>
<font face = "Arial, Helvetica">
List:
</font>
</td>
<td>
<font face = "Arial, Helvetica">
<a href="mailto:ganymede@arlut.utexas.edu">ganymede@arlut.utexas.edu</a>
</font>
</td>
</tr>
</table>

</td>
<p align="middle">Requires Java 6 or later with Java Web Start.</p>
<p/>
<p align="middle">Questions or comments to: <b><a href="mailto:#RESPONSIBLEEMAIL">#RESPONSIBLEEMAIL</a></b></p>
</font>
</td>
</tr>
</table>

</center>
</FORM>

<SCRIPT LANGUAGE="JavaScript">
<!-- Start script hiding
// Probably ways to optimize/refine this code... haven't done much JavaScript :-)

var clientElt = document.FORM.client;
var goButnElt = document.FORM.go;
var jvmElt = document.FORM.JVM;

// Update the login button with most recent choice
//
function UpdateText() {
var client = "";
client = clientElt.options[clientElt.selectedIndex].value;
goButnElt.value = "Start " + client;
}

// Open a new window and load the appropriate applet html
//
function login() {
var clientSel = "";
var jvmSel = "";

var URLbase = "";
var URLhead = "";
var URLtail = "";
var URL = "";

// Get selected client
clientSel = clientElt.options[clientElt.selectedIndex].value;

if (clientSel == "Standard Client") {
URLhead = "client";
}
else {
if (clientSel == "Admin Console") {
URLhead = "console";
}
}

// Get checked JVM
for (i=0; i < (jvmElt.length); i++) {
if (jvmElt[i].checked) {
jvmSel = jvmElt[i].value;
break;
}
}

if (jvmSel == "Native") {
URLtail = "_native";
URLsuffix = ".html";
}
else if (jvmSel == "WebStart") {
URLtail = "";
URLsuffix = ".jnlp";
}

// Build URL from client and jvm parts
URL = URLbase + URLhead + URLtail + URLsuffix;

// Open pop-up window

if (URLsuffix == ".html") {
remote = window.open(URL, URLhead+URLtail, "width=320,height=380");
if (remote.opener == null) {
remote.opener = window;
}
remote.opener.name = "opener";
} else if (URLsuffix == ".jnlp") {
document.location.href=URL;
}
}
// end script hiding -->
</SCRIPT>

</body>
</html>

0 comments on commit f7ba9bb

Please sign in to comment.