Commit 6f6183fd authored by jc's avatar jc
Browse files

remove function sendToSlack

parent c2d2bdfe
...@@ -930,40 +930,40 @@ var metExploreViz = function(panel, webSite){ ...@@ -930,40 +930,40 @@ var metExploreViz = function(panel, webSite){
} }
}; };
var urlWebHook = "https://hooks.slack.com/services/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"; //the URL you get on your "incoming web hooks" page. // var urlWebHook = "https://hooks.slack.com/services/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"; //the URL you get on your "incoming web hooks" page.
//
function sendToSlack (s, theUsername, theIconUrl, attachments) { // function sendToSlack (s, theUsername, theIconUrl, attachments) {
var payload = { // var payload = {
text: s // text: s
}; // };
if (theUsername !== undefined) { // if (theUsername !== undefined) {
payload.username = theUsername; // payload.username = theUsername;
} // }
if (theIconUrl !== undefined) { // if (theIconUrl !== undefined) {
payload.icon_url = theIconUrl; // payload.icon_url = theIconUrl;
} // }
//
payload.attachments = [ // payload.attachments = [
{ // {
"title": "MetExploreViz error report", // "title": "MetExploreViz error report",
"text": // "text":
'Date : '+ new Date() + '\n' + // 'Date : '+ new Date() + '\n' +
'Browser : '+ browserName + '\n' + 'Version : '+ fullVersion + '\n' + // 'Browser : '+ browserName + '\n' + 'Version : '+ fullVersion + '\n' +
functionsUsed+ // functionsUsed+
'```\n'+msg+'\n'+url+'\nline n.'+lineNo+' column n.'+columnNo+'\n```' // '```\n'+msg+'\n'+url+'\nline n.'+lineNo+' column n.'+columnNo+'\n```'
} // }
]; // ];
//
xhttp.open("POST", urlWebHook); // xhttp.open("POST", urlWebHook);
xhttp.send(JSON.stringify(payload)); // xhttp.send(JSON.stringify(payload));
} // }
//
sendToSlack('An error occured in MetExploreViz! :warning:', "MetExploreViz Error", "https://metexplore.toulouse.inra.fr/tmp/bug.png"); // sendToSlack('An error occured in MetExploreViz! :warning:', "MetExploreViz Error", "https://metexplore.toulouse.inra.fr/tmp/bug.png");
} }
}; };
_metExploreViz = this; _metExploreViz = this;
// Global variables // Global variables
this.sessions = {}; this.sessions = {};
this.launched = false; this.launched = false;
......
Supports Markdown
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