Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added
- Import of decomposed production items now has a brief timeout in case another deploy is in progress (#949)
- Change context menu now lists IPM packages from all Git-enabled namespaces, prefixed with the namespace name (#952)

### Fixed
- Changes to % routines mapped to the current namespace may now be added to source control and committed (#944)
Expand Down
29 changes: 20 additions & 9 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -2807,18 +2807,28 @@ ClassMethod GetContexts(onlyNamespaces As %Boolean) As %DynamicArray

set name = ""

// Using embedded for backwards compatability
// Using embedded instead of ExecDirectNoPriv() for backwards compatability
if '(onlyNamespaces) {
&sql(DECLARE C1 CURSOR FOR SELECT name into :name from %Library.RoutineMgr_StudioOpenDialog('*.ZPM'))
&sql(OPEN C1)
throw:SQLCODE<0 ##class(%Exception.SQL).CreateFromSQLCODE(SQLCODE, %msg)
&sql(FETCH C1)
while(SQLCODE = 0) {
set package = name
do contexts.%Push(package)
&sql(FETCH C1)
new $namespace
set ptr = 0
while $listnext(namespaces,ptr,ns) {
if '($FIND(ns,"^^")) {
try {
set $NAMESPACE = ns
&sql(OPEN C1)
throw:SQLCODE<0 ##class(%Exception.SQL).CreateFromSQLCODE(SQLCODE, %msg)
&sql(FETCH C1)
while (SQLCODE = 0) {
do contexts.%Push(ns_":"_name)
&sql(FETCH C1)
}
&sql(CLOSE C1)
} catch e {
// skip inaccessible namespaces
}
}
}
&sql(CLOSE C1)
}

return contexts
Expand Down Expand Up @@ -3391,3 +3401,4 @@ ClassMethod IsSchemaStandard(pName As %String = "") As %Boolean [ Internal ]
}

}

6 changes: 4 additions & 2 deletions git-webui/release/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ webui.SideBarView = function(mainView, noEventHandlers) {
var args = window.location.href.split("webuidriver.csp/")[1].split("/");
var context = args[0];
if (args[1] && (args[1].indexOf(".ZPM") != -1)) {
context = args[1];
context = args[0] + ":" + args[1];
}
return context;
}
Expand All @@ -710,7 +710,9 @@ webui.SideBarView = function(mainView, noEventHandlers) {
var urlParts = window.location.href.split("webuidriver.csp/");
var args = urlParts[1].split("/");
if (context.indexOf(".ZPM") != -1) {
args[1] = context;
var parts = context.split(":");
args[0] = parts[0];
args[1] = parts[1];
} else {
args[0] = context;
args[1] = "";
Expand Down
6 changes: 4 additions & 2 deletions git-webui/src/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ webui.SideBarView = function(mainView, noEventHandlers) {
var args = window.location.href.split("webuidriver.csp/")[1].split("/");
var context = args[0];
if (args[1] && (args[1].indexOf(".ZPM") != -1)) {
context = args[1];
context = args[0] + ":" + args[1];
}
return context;
}
Expand All @@ -710,7 +710,9 @@ webui.SideBarView = function(mainView, noEventHandlers) {
var urlParts = window.location.href.split("webuidriver.csp/");
var args = urlParts[1].split("/");
if (context.indexOf(".ZPM") != -1) {
args[1] = context;
var parts = context.split(":");
args[0] = parts[0];
args[1] = parts[1];
} else {
args[0] = context;
args[1] = "";
Expand Down
Loading