Commit bbebaba0 authored by Jonathon Duerig's avatar Jonathon Duerig

Add support in the loader for GENI Desktop peculiarities. Other bugfixes.

parent 4116e6e2
......@@ -7,7 +7,7 @@
<link rel="stylesheet" style="text/css" href="flack.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
</head>
<body>
......@@ -35,6 +35,7 @@
<script type="text/plain" id="sa-urn-parameter">urn:publicid:IDN+geni:gpo:portal+authority+sa</script>
<script type="text/plain" id="ch-url-parameter">https://ch.geni.net/PGCH</script>
<script type="text/plain" id="slice-urn-parameter"></script>
<script type="text/plain" id="client-passphrase-parameter"></script>
<script type="text/plain" id="client-key-parameter"></script>
<script type="text/plain" id="client-cert-parameter"></script>
<script type="text/plain" id="server-cert-parameter"></script>
......
......@@ -7,7 +7,7 @@
<link rel="stylesheet" style="text/css" href="flack.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.0.3.min.js"></script>
</head>
<body>
......
var isPortal = false;
var isDesktopPg = false;
var basePath = '';
(function () {
......@@ -54,8 +55,13 @@ var basePath = '';
{
isPortal = true;
}
if (params['desktoppg'] && params['desktoppg'] === '1')
{
isDesktopPg = true;
}
var sourceName = params['source'];
var basePath = sourceOptions['stable'];
basePath = sourceOptions['stable'];
if (sourceOptionList.indexOf(sourceName) !== -1)
{
basePath = sourceOptions[sourceName];
......
......@@ -4,17 +4,52 @@
var swfVersionStr = "11.1.0";
// To use express install, set to playerProductInstall.swf, otherwise the empty string.
var xiSwfUrlStr = "playerProductInstall.swf";
var saUrlTag = document.getElementById('sa-url-parameter');
var saUrnTag = document.getElementById('sa-urn-parameter');
var flashvars = {};
if (isPortal)
{
flashvars.skipstartup = '1';
flashvars.bundlepreset = '1';
flashvars.keycertpreset = '1';
flashvars.loadallmanagerswithoutasking = '1';
flashvars.saurl = encodeURIComponent(document.getElementById('sa-url-parameter').innerText);
flashvars.saurn = encodeURIComponent(document.getElementById('sa-urn-parameter').innerText);
flashvars.churl = encodeURIComponent(document.getElementById('ch-url-parameter').innerText);
flashvars.sliceurn = encodeURIComponent(document.getElementById('slice-urn-parameter').innerText);
var chUrlTag = document.getElementById('ch-url-parameter');
var sliceUrnTag = document.getElementById('slice-urn-parameter');
if (saUrlTag && saUrnTag && chUrlTag && sliceUrnTag)
{
flashvars.skipstartup = '1';
flashvars.bundlepreset = '1';
flashvars.keycertpreset = '1';
flashvars.loadallmanagerswithoutasking = '1';
flashvars.saurl = encodeURIComponent(saUrlTag.innerText);
flashvars.saurn = encodeURIComponent(saUrnTag.innerText);
flashvars.churl = encodeURIComponent(chUrlTag.innerText);
flashvars.sliceurn = encodeURIComponent(sliceUrnTag.innerText);
}
else
{
alert('ERROR: Could not find saurl/saurn/churl/sliceurn tags');
}
}
if (window.isDesktopPg)
{
var clientKeyTag = document.getElementById('client-key-parameter');
var clientCertTag = document.getElementById('client-cert-parameter');
var clientPassphraseTag = document.getElementById('client-passphrase-parameter');
if (clientKeyTag && clientCertTag && clientPassphraseTag && saUrlTag &&
saUrnTag)
{
flashvars.skipstartup = '1';
flashvars.keycert = encodeURIComponent(clientKeyTag.innerText + '\n' + clientCertTag.innerText);
flashvars.keypassphrase = encodeURIComponent(clientPassphraseTag.innerText);
flashvars.loadallmanagerswithoutasking = '0';
flashvars.saurl = encodeURIComponent(saUrlTag.innerText);
flashvars.saurn = encodeURIComponent(saUrnTag.innerText);
}
else
{
alert('ERROR: Could not find clientkey/clientcert/clientphrase/saurl/saurn parameters');
}
}
var params = {};
params.quality = "high";
......@@ -34,7 +69,7 @@ var swfVersionStr = "11.1.0";
// JavaScript enabled so display the flashContent div in case it is not replaced with a swf object.
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
swfobject.embedSWF(
basePath + 'forge/SocketPool.swf', 'socketPool',
'SocketPool.swf', 'socketPool',
'0', '0',
'9.0.0', false,
{}, {allowscriptaccess: 'always'}, {});
......@@ -66,11 +101,22 @@ function init(new_flash_id)
{
try
{
var serverCertTag = document.getElementById('server-cert-parameter');
var clientKeyTag = document.getElementById('client-key-parameter');
var clientCertTag = document.getElementById('client-cert-parameter');
if (isPortal)
{
setServerCert(document.getElementById('server-cert-parameter').innerHTML);
setClientKey(document.getElementById('client-key-parameter').innerHTML);
setClientCert(document.getElementById('client-cert-parameter').innerHTML);
if (serverCertTag && clientKeyTag && clientCertTag)
{
setServerCert(serverCertTag.innerText);
setClientKey(clientKeyTag.innerText);
setClientCert(clientCertTag.innerText);
}
else
{
alert('ERROR: Could not fetch server-cert/client-key/client-cert parameters for the portal');
}
}
flash_id = new_flash_id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment