File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ ClassMethod Run()
13
13
{
14
14
If %request .Get (" method" ) = " preview" {
15
15
Set branchName = ##class (SourceControl.Git.Utils ).GetCurrentBranch ()
16
+ Write !," Current namespace: " ,$NAMESPACE
16
17
Write !," Current branch: " ,branchName
17
18
Do ##class (SourceControl.Git.Utils ).RunGitWithArgs (.errStream , .outStream , " fetch" )
18
19
Kill errStream , outStream
Original file line number Diff line number Diff line change 9
9
<link rel="stylesheet" type="text/css" href="css/git-webui.css" />
10
10
</head>
11
11
<body>
12
+ <pre for="contextSelect" style="padding-top: 2em;white-space: pre-wrap;">Change Context: <select id="newContext" onchange="updateContext()">
13
+ <server>
14
+ set contextList = ##class(SourceControl.Git.Utils).GetContexts(1)
15
+ set iterator = contextList.%GetIterator()
16
+ &html<<option>Select</option>>
17
+ while iterator.%GetNext(.key, .value) {
18
+ &html<<option value=#(value)#>#(value)#</option>>
19
+ }
20
+ </server>
21
+ </select>
22
+ </pre>
12
23
<pre id="preview" style="white-space: pre-wrap;">
13
24
</pre>
14
25
<button id="execute" onclick="execute()" disabled="true">Pull and Load Changes</button>
@@ -45,6 +56,13 @@ function execute() {
45
56
}
46
57
}
47
58
59
+ function updateContext() {
60
+ const contextSelect = document.getElementById('newContext');
61
+ const selectedContext = contextSelect.value;
62
+
63
+ window.location.href = "/isc/studio/usertemplates/gitsourcecontrol/pull.csp?$NAMESPACE=" + selectedContext;
64
+ }
65
+
48
66
preview();
49
67
</script>
50
68
</body>
You can’t perform that action at this time.
0 commit comments