Skip to content

Commit 4f1f989

Browse files
authored
Merge pull request #684 from intersystems/issue-660
Fix Studio warningCallback issue
2 parents ea587ed + a42df14 commit 4f1f989

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [2.9.1] - Unreleased
99

1010
### Fixed
11+
- Fixed not showing warnings on Studio (#660)
1112
- Fixed business processes and rules not being added to source control automatically (#676)
1213
- Embedded Git commits settings when cloning empty repo to avert any issues
1314

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ webui.parseGitResponse = function(data) {
146146
};
147147
}
148148

149-
webui.processGitResponse = function(data, command, callback) {
149+
webui.processGitResponse = function(data, command, callback, warningCallback) {
150150
var result = webui.parseGitResponse(data);
151151
var rcode = result.rcode;
152152
var output = result.output;
@@ -158,7 +158,7 @@ webui.processGitResponse = function(data, command, callback) {
158158
}
159159
// Return code is 0 but there is stderr output: this is a warning message
160160
if (message.length > 0) {
161-
if(warningCallback) {
161+
if (warningCallback) {
162162
warningCallback(message);
163163
} else {
164164
webui.showWarning(message);
@@ -185,7 +185,7 @@ webui.processGitResponse = function(data, command, callback) {
185185
}
186186
}
187187

188-
webui.git_command = function(command, callback) {
188+
webui.git_command = function(command, callback, warningCallback) {
189189
$.ajax({
190190
url: "git-command",
191191
type: "POST",
@@ -194,7 +194,7 @@ webui.git_command = function(command, callback) {
194194
command: command
195195
}),
196196
success: function(data) {
197-
webui.processGitResponse(data, command, callback);
197+
webui.processGitResponse(data, command, callback, warningCallback);
198198
},
199199
error: function(data) {
200200
var trimmedData = data.replace(/(\r\n)/gm, "\n");

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ webui.parseGitResponse = function(data) {
146146
};
147147
}
148148

149-
webui.processGitResponse = function(data, command, callback) {
149+
webui.processGitResponse = function(data, command, callback, warningCallback) {
150150
var result = webui.parseGitResponse(data);
151151
var rcode = result.rcode;
152152
var output = result.output;
@@ -158,7 +158,7 @@ webui.processGitResponse = function(data, command, callback) {
158158
}
159159
// Return code is 0 but there is stderr output: this is a warning message
160160
if (message.length > 0) {
161-
if(warningCallback) {
161+
if (warningCallback) {
162162
warningCallback(message);
163163
} else {
164164
webui.showWarning(message);
@@ -185,7 +185,7 @@ webui.processGitResponse = function(data, command, callback) {
185185
}
186186
}
187187

188-
webui.git_command = function(command, callback) {
188+
webui.git_command = function(command, callback, warningCallback) {
189189
$.ajax({
190190
url: "git-command",
191191
type: "POST",
@@ -194,7 +194,7 @@ webui.git_command = function(command, callback) {
194194
command: command
195195
}),
196196
success: function(data) {
197-
webui.processGitResponse(data, command, callback);
197+
webui.processGitResponse(data, command, callback, warningCallback);
198198
},
199199
error: function(data) {
200200
var trimmedData = data.replace(/(\r\n)/gm, "\n");

0 commit comments

Comments
 (0)