From a2224982e7619b15e3542c17be2617a7a7ae0cd7 Mon Sep 17 00:00:00 2001 From: Elijah Tamarchenko Date: Mon, 13 Jan 2025 11:25:58 -0500 Subject: [PATCH 1/2] Fix Studio warningCallback issue --- git-webui/release/share/git-webui/webui/js/git-webui.js | 8 ++++---- git-webui/src/share/git-webui/webui/js/git-webui.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/git-webui/release/share/git-webui/webui/js/git-webui.js b/git-webui/release/share/git-webui/webui/js/git-webui.js index 7c321035..03447419 100644 --- a/git-webui/release/share/git-webui/webui/js/git-webui.js +++ b/git-webui/release/share/git-webui/webui/js/git-webui.js @@ -146,7 +146,7 @@ webui.parseGitResponse = function(data) { }; } -webui.processGitResponse = function(data, command, callback) { +webui.processGitResponse = function(data, command, callback, warningCallback) { var result = webui.parseGitResponse(data); var rcode = result.rcode; var output = result.output; @@ -158,7 +158,7 @@ webui.processGitResponse = function(data, command, callback) { } // Return code is 0 but there is stderr output: this is a warning message if (message.length > 0) { - if(warningCallback) { + if (warningCallback) { warningCallback(message); } else { webui.showWarning(message); @@ -185,7 +185,7 @@ webui.processGitResponse = function(data, command, callback) { } } -webui.git_command = function(command, callback) { +webui.git_command = function(command, callback, warningCallback) { $.ajax({ url: "git-command", type: "POST", @@ -194,7 +194,7 @@ webui.git_command = function(command, callback) { command: command }), success: function(data) { - webui.processGitResponse(data, command, callback); + webui.processGitResponse(data, command, callback, warningCallback); }, error: function(data) { var trimmedData = data.replace(/(\r\n)/gm, "\n"); diff --git a/git-webui/src/share/git-webui/webui/js/git-webui.js b/git-webui/src/share/git-webui/webui/js/git-webui.js index 7c321035..03447419 100644 --- a/git-webui/src/share/git-webui/webui/js/git-webui.js +++ b/git-webui/src/share/git-webui/webui/js/git-webui.js @@ -146,7 +146,7 @@ webui.parseGitResponse = function(data) { }; } -webui.processGitResponse = function(data, command, callback) { +webui.processGitResponse = function(data, command, callback, warningCallback) { var result = webui.parseGitResponse(data); var rcode = result.rcode; var output = result.output; @@ -158,7 +158,7 @@ webui.processGitResponse = function(data, command, callback) { } // Return code is 0 but there is stderr output: this is a warning message if (message.length > 0) { - if(warningCallback) { + if (warningCallback) { warningCallback(message); } else { webui.showWarning(message); @@ -185,7 +185,7 @@ webui.processGitResponse = function(data, command, callback) { } } -webui.git_command = function(command, callback) { +webui.git_command = function(command, callback, warningCallback) { $.ajax({ url: "git-command", type: "POST", @@ -194,7 +194,7 @@ webui.git_command = function(command, callback) { command: command }), success: function(data) { - webui.processGitResponse(data, command, callback); + webui.processGitResponse(data, command, callback, warningCallback); }, error: function(data) { var trimmedData = data.replace(/(\r\n)/gm, "\n"); From fe469f4b1861b9909c658331c37986b80545c6ae Mon Sep 17 00:00:00 2001 From: Elijah Tamarchenko Date: Mon, 13 Jan 2025 11:29:51 -0500 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 5 +++++ module.xml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94231c17..00320235 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.9.1] - Unreleased + +### Fixed +- Fixed not showing warnings on Studio (#660) + ## [2.9.0] - 2025-01-09 ### Added diff --git a/module.xml b/module.xml index 7702e998..d34cbb56 100644 --- a/module.xml +++ b/module.xml @@ -3,7 +3,7 @@ git-source-control - 2.9.0 + 2.9.1 Server-side source control extension for use of Git on InterSystems platforms git source control studio vscode module