mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- incl. taking Hibernate libs from 3.1 and adding missing file from earlier merge 13321: Fix ETHREEOH-1407: System error occur during "Undo Selected" action if no items are selected 13322: ETHREEOH-1206: Throwing Alfresco Exception on OnUpdateProperties behaviour resets Encoding field to Big (first entry) 13326: (RECORD ONLY) Removed 'dev' from version label. 13330: Fix ETHREEOH-1408: Incorrect button name at "Manage Task: Submitted" page 13337: Fix for ETHREEOH-1409 and further fix for ETHREEOH-1408 13338: Removed svn:mergeinfo 13346: Make startup bat script check JAVA can be found. 13351: ETHREEOH-1386 validate ASR and FSR hostname. 13359: ETHREEOH-1435: Share doesn't extract document metadata correctly 13360: Fix ETHREEOH-821: SDK dependencies 13369: Fixed distribute-sdk target for when it's run locally 13382: ETHREEOH-1437: Container creation induces an unexpected permission allocation in Share 13391: Shutdown backstop continues if logging throws errors. 13394: Fix ETHREEOH-1457 - MT coci issue with bootstrap (eg. data dictionary) content 13400: Activate JAWS-223: Adobe LC Hibernate Dialect Loading 13401: Support for JAWS-215, mysql and oracle 13413: Fix ETHREEOH-1458 - MT delete->archive ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.1:r 13321-13322,13326-13327,13330,13337-13339,13341-13347,13351,13354-13355,13358-13363, 13365,13367,13369,13382,13385-13392,13394,13400-13403,13405-13406,13413 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13617 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
244 lines
6.9 KiB
JavaScript
244 lines
6.9 KiB
JavaScript
Alfresco.DeploymentMonitor = function(ids, pollingFreq, failedMsg, successMsg)
|
|
{
|
|
this.ids = ids;
|
|
this.url = getContextPath() + "/ajax/invoke/DeploymentProgressBean.getStatus?ids=" + this.ids;
|
|
this.pollingFreq = pollingFreq;
|
|
this.failedMsg = failedMsg;
|
|
this.successMsg = successMsg;
|
|
}
|
|
|
|
Alfresco.DeploymentMonitor.prototype =
|
|
{
|
|
ids: null,
|
|
url: null,
|
|
pollingFreq: 5,
|
|
failedMsg: null,
|
|
successMsg: null,
|
|
|
|
retrieveDeploymentStatus: function()
|
|
{
|
|
YAHOO.util.Connect.asyncRequest('GET', this.url,
|
|
{
|
|
success: this.processResults,
|
|
failure: this.handleError,
|
|
scope: this
|
|
},
|
|
null);
|
|
},
|
|
|
|
processResults: function(ajaxResponse)
|
|
{
|
|
var xml = ajaxResponse.responseXML.documentElement;
|
|
var statuses = xml.getElementsByTagName('target-server');
|
|
var noInProgress = statuses.length;
|
|
if (noInProgress > 0)
|
|
{
|
|
for (var x = 0; x < noInProgress; x++)
|
|
{
|
|
var target = statuses[x];
|
|
var id = target.getAttribute('id');
|
|
var finished = target.getAttribute('finished');
|
|
var url = target.getAttribute('url');
|
|
var reason = target.getAttribute('reason');
|
|
if (finished == 'true')
|
|
{
|
|
var successful = target.getAttribute('successful');
|
|
var icon = document.getElementById(id + '_icon');
|
|
if (icon != null)
|
|
{
|
|
var image = (successful == 'true') ? 'successful' : 'failed';
|
|
icon.src = '/alfresco/images/icons/deploy_' + image + '.gif';
|
|
}
|
|
|
|
var statusElem = document.getElementById(id + '_status');
|
|
if (statusElem != null)
|
|
{
|
|
var msg = (successful == 'true') ? this.successMsg : this.failedMsg;
|
|
statusElem.innerHTML = msg;
|
|
}
|
|
|
|
var msgElem = document.getElementById(id + '_msg');
|
|
if (msgElem != null)
|
|
{
|
|
if (successful == 'true')
|
|
{
|
|
if (url != null && url.length > 0)
|
|
{
|
|
msgElem.innerHTML = "<a target='new' href='" + url + "'>" + url + "</a>";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (reason != null && reason.length > 0)
|
|
{
|
|
msgElem.innerHTML = "<span style='color: #e00028'>" + reason + "</span>";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// there are still outstanding deployments, refresh in a few seconds
|
|
setTimeout('Alfresco.monitor.retrieveDeploymentStatus()', this.pollingFreq);
|
|
}
|
|
},
|
|
|
|
handleError: function(ajaxResponse)
|
|
{
|
|
handleErrorYahoo(ajaxResponse.status + ' ' + ajaxResponse.statusText);
|
|
}
|
|
}
|
|
|
|
var deployActionButtonPressed = false;
|
|
|
|
Alfresco.checkDeployConfigPage = function()
|
|
{
|
|
// make sure the relevant fields are visible for current deploy type
|
|
Alfresco.deployServerTypeChanged();
|
|
|
|
// make sure add/edit button is disabled if no host has been supplied
|
|
Alfresco.checkDeployConfigButtonState();
|
|
|
|
var button = document.getElementById('wizard:wizard-body:deployActionButton');
|
|
if (button != null)
|
|
{
|
|
document.getElementById("wizard").onsubmit = Alfresco.validateDeployConfig;
|
|
button.onclick = function() {deployActionButtonPressed = true; clear_wizard();}
|
|
document.getElementById('wizard:wizard-body:deployServerHost').focus();
|
|
}
|
|
|
|
// if a scroll to id has been set, scroll there
|
|
if (window.SCROLL_TO_SERVER_CONFIG_ID)
|
|
{
|
|
Alfresco.scrollToEditServer(SCROLL_TO_SERVER_CONFIG_ID);
|
|
}
|
|
}
|
|
|
|
Alfresco.checkDeployConfigButtonState = function()
|
|
{
|
|
var host = document.getElementById('wizard:wizard-body:deployServerHost');
|
|
var button = document.getElementById('wizard:wizard-body:deployActionButton');
|
|
|
|
if (button != null)
|
|
{
|
|
if (host != null && host.value.length == 0)
|
|
{
|
|
button.disabled = true;
|
|
}
|
|
else
|
|
{
|
|
button.disabled = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
Alfresco.validateDeployConfig = function()
|
|
{
|
|
if (deployActionButtonPressed)
|
|
{
|
|
deployActionButtonPressed = false;
|
|
|
|
var valid = true;
|
|
var port = document.getElementById('wizard:wizard-body:deployServerPort');
|
|
var localhost = document.getElementById('wizard:wizard-body:deployServerHost');
|
|
|
|
if (port != null && port.value.length > 0)
|
|
{
|
|
if (isNaN(port.value))
|
|
{
|
|
alert(MSG_PORT_MUST_BE_NUMBER);
|
|
port.focus();
|
|
valid = false;
|
|
}
|
|
}
|
|
|
|
if (localhost != null && localhost.value.length > 0)
|
|
{
|
|
if(!localhost.value.test(/^[A-Za-z0-9][A-Za-z0-9\.\-]*$/))
|
|
{
|
|
alert(MSG_HOST_WRONG_FORMAT);
|
|
localhost.focus();
|
|
valid = false;
|
|
}
|
|
}
|
|
|
|
return valid;
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
Alfresco.deployServerTypeChanged = function()
|
|
{
|
|
var typeDropDown = document.getElementById('wizard:wizard-body:deployServerType');
|
|
if (typeDropDown != null)
|
|
{
|
|
var selectedType = typeDropDown.options[typeDropDown.selectedIndex].value;
|
|
|
|
// show or hide the label
|
|
var autoDeployLabel = document.getElementById('autoDeployLabel');
|
|
if (autoDeployLabel != null)
|
|
{
|
|
if (selectedType == "test")
|
|
{
|
|
autoDeployLabel.style.display = "none";
|
|
}
|
|
else
|
|
{
|
|
autoDeployLabel.style.display = "inline";
|
|
}
|
|
}
|
|
|
|
// show or hide the checkbox
|
|
var autoDeployCheckbox = document.getElementById('wizard:wizard-body:autoDeployCheckbox');
|
|
if (autoDeployCheckbox != null)
|
|
{
|
|
if (selectedType == "test")
|
|
{
|
|
autoDeployCheckbox.style.display = "none";
|
|
}
|
|
else
|
|
{
|
|
autoDeployCheckbox.style.display = "inline";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
Alfresco.scrollToEditServer = function(serverId)
|
|
{
|
|
var serverForm = document.getElementById(serverId);
|
|
if (serverForm != null)
|
|
{
|
|
var yPos = serverForm.offsetTop;
|
|
window.scrollTo(0, yPos);
|
|
}
|
|
}
|
|
|
|
Alfresco.toggleDeploymentDetails = function(icon, server)
|
|
{
|
|
var currentState = icon.className;
|
|
var detailsDiv = document.getElementById(server + '-deployment-details');
|
|
if (currentState == 'collapsed')
|
|
{
|
|
icon.src = getContextPath() + '/images/icons/expanded.gif';
|
|
icon.className = 'expanded';
|
|
if (detailsDiv != null)
|
|
{
|
|
detailsDiv.style.display = 'block';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
icon.src = getContextPath() + '/images/icons/collapsed.gif';
|
|
icon.className = 'collapsed';
|
|
if (detailsDiv != null)
|
|
{
|
|
detailsDiv.style.display = 'none';
|
|
}
|
|
}
|
|
}
|
|
|