@@ -11,6 +11,7 @@ var EventEmitter = require('events').EventEmitter;
11
11
// Setup the Environment
12
12
env . ST2_API = env . ST2_API || 'http://localhost:9101' ;
13
13
env . ST2_ROUTE = env . ST2_ROUTE || null ;
14
+ env . ST2_WEBUI_URL = env . ST2_WEBUI_URL || null ;
14
15
15
16
// Optional authentication info
16
17
env . ST2_AUTH_USERNAME = env . ST2_AUTH_USERNAME || null ;
@@ -121,6 +122,7 @@ StackStormApi.prototype.getAliases = function () {
121
122
} ;
122
123
123
124
StackStormApi . prototype . sendAck = function ( msg , res ) {
125
+ res . execution . web_url = env . ST2_WEBUI_URL ;
124
126
var history_url = utils . getExecutionHistoryUrl ( res . execution ) ;
125
127
var history = history_url ? util . format ( ' (details available at %s)' , history_url ) : '' ;
126
128
@@ -141,11 +143,11 @@ StackStormApi.prototype.sendAck = function (msg, res) {
141
143
} ;
142
144
143
145
// TODO: decouple the msg object from stackstorm api, this should use an event emitter
144
- StackStormApi . prototype . executeCommand = function ( msg , alias_name , format_string , command , addressee ) {
146
+ StackStormApi . prototype . executeCommand = function ( msg , alias_name , command_format_string , command , addressee ) {
145
147
var self = this ;
146
148
var payload = {
147
149
'name' : alias_name ,
148
- 'format' : format_string ,
150
+ 'format' : command_format_string ,
149
151
'command' : command ,
150
152
'user' : addressee . name ,
151
153
'source_channel' : addressee . room ,
@@ -169,7 +171,7 @@ StackStormApi.prototype.executeCommand = function (msg, alias_name, format_strin
169
171
}
170
172
self . emit ( 'st2.execution_error' , {
171
173
name : alias_name ,
172
- format_string : format_string ,
174
+ format_string : command_format_string ,
173
175
message : message ,
174
176
addressee : addressee ,
175
177
command : command
0 commit comments