Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

80653: Merged WAT1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud)
      77394: Aikau/Surf - removed client-side error reporting capalities from Repo and moved to Surf (Aikau client-side errors will now show in the Surf logs)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82947 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-09-03 16:16:11 +00:00
parent 1e6ba3e86c
commit 5b59889b1b
3 changed files with 0 additions and 73 deletions

View File

@@ -1,9 +0,0 @@
<webscript>
<shortname>Handles error posting</shortname>
<description>Used to capture and store client-side errors that occur on the Repository</description>
<family>Aikau</family>
<url>/aikau/error-report</url>
<format default="json"></format>
<authentication runas="admin">user</authentication>
<lifecycle>internal</lifecycle>
</webscript>

View File

@@ -1,11 +0,0 @@
<#if success!false == true>
{
"success": "true",
"nodeRef": "${nodeRef!""}"
}
<#else>
{
"success": "false",
"error": "${errorMessage!""?html}"
}
</#if>

View File

@@ -1,53 +0,0 @@
function main() {
var callerName = json.get("callerName");
var messageArgs = json.get("messageArgs");
var userName = json.get("userName");
var location = json.get("location");
// Construct query to find the folder for adding errors...
var errorFolder;
var nodes = search.selectNodes('/app:company_home/cm:ShareErrors');
if (nodes.length == 0)
{
// Create the folder...
nodes = search.selectNodes('/app:company_home');
errorFolder = nodes[0].createNode("ShareErrors", "cm:folder");
}
else
{
// Found the error folder... save a reference to it so we can create the item in it...
errorFolder = nodes[0];
}
// Create the file...
try
{
var item = errorFolder.createNode(null, "cm:content");
if (item == null)
{
// Couldn't create the item for some reason...
status.code = 500;
model.errorMessage = "Could not create error report item";
return false;
}
else
{
item.content = json;
item.mimetype = "application/json";
model.nodeRef = item.nodeRef.toString();
return true;
}
}
catch (e)
{
status.code = 500;
model.errorMessage = "Could not create error report";
return false;
}
// Shouldn't get to here - there should be a return at every code path...
model.errorMessage = "Unexpected error occurred";
status.code = 500;
return false;
}
model.success = main();