Skip to content

Commit 016318a

Browse files
committed
Added only namespaces flag for WebUI
1 parent 975ce77 commit 016318a

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
152152
do discardsInBranch.%ToJSON(%data)
153153
set handled = 1
154154
} elseif (pathStart = "contexts") {
155-
set contexts = ##class(SourceControl.Git.Utils).GetContexts(1)
155+
set onlyNamespaces = %request.Data("onlyNamespaces", 1)
156+
set contexts = ##class(SourceControl.Git.Utils).GetContexts(onlyNamespaces)
156157
do contexts.%ToJSON(%data)
157158
set handled = 1
158159
}

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@ webui.SideBarView = function(mainView, noEventHandlers) {
614614
});
615615
};
616616

617-
self.changeContextGet = function() {
618-
$.get("contexts", function(contextList) {
617+
self.changeContextGet = function(onlyNamespaces) {
618+
$.get("contexts", { "onlyNamespaces": onlyNamespaces }, function(contextList) {
619619
var contexts = JSON.parse(contextList);
620620
self.changeContext(contexts);
621621
});
@@ -1050,7 +1050,9 @@ webui.SideBarView = function(mainView, noEventHandlers) {
10501050
$(".btn-add", self.element).click(self.createNewLocalBranch);
10511051
$('.btn-prune-remote-branches', self.element).click(self.pruneRemoteBranches);
10521052
$("#sidebar-settings", self.element).click(self.goToSettingsPage);
1053-
$("#sidebar-context", self.element).click(self.changeContextGet);
1053+
$("#sidebar-context", self.element).click(function() {
1054+
self.changeContextGet(0);
1055+
});
10541056
$("#sidebar-home", self.element).click(self.goToHomePage);
10551057
}
10561058

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@ webui.SideBarView = function(mainView, noEventHandlers) {
614614
});
615615
};
616616

617-
self.changeContextGet = function() {
618-
$.get("contexts", function(contextList) {
617+
self.changeContextGet = function(onlyNamespaces) {
618+
$.get("contexts", { "onlyNamespaces": onlyNamespaces }, function(contextList) {
619619
var contexts = JSON.parse(contextList);
620620
self.changeContext(contexts);
621621
});
@@ -1050,7 +1050,9 @@ webui.SideBarView = function(mainView, noEventHandlers) {
10501050
$(".btn-add", self.element).click(self.createNewLocalBranch);
10511051
$('.btn-prune-remote-branches', self.element).click(self.pruneRemoteBranches);
10521052
$("#sidebar-settings", self.element).click(self.goToSettingsPage);
1053-
$("#sidebar-context", self.element).click(self.changeContextGet);
1053+
$("#sidebar-context", self.element).click(function() {
1054+
self.changeContextGet(0);
1055+
});
10541056
$("#sidebar-home", self.element).click(self.goToHomePage);
10551057
}
10561058

0 commit comments

Comments
 (0)