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()
1313{
1414 If %request .Get (" method" ) = " preview" {
1515 Set branchName = ##class (SourceControl.Git.Utils ).GetCurrentBranch ()
16+ Write !," Current namespace: " ,$NAMESPACE
1617 Write !," Current branch: " ,branchName
1718 Do ##class (SourceControl.Git.Utils ).RunGitWithArgs (.errStream , .outStream , " fetch" )
1819 Kill errStream , outStream
Original file line number Diff line number Diff line change 99<link rel="stylesheet" type="text/css" href="css/git-webui.css" />
1010</head>
1111<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>
1223<pre id="preview" style="white-space: pre-wrap;">
1324</pre>
1425<button id="execute" onclick="execute()" disabled="true">Pull and Load Changes</button>
@@ -45,6 +56,13 @@ function execute() {
4556 }
4657}
4758
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+
4866preview();
4967</script>
5068</body>
You can’t perform that action at this time.
0 commit comments