Skip to content

Commit 5fe6a7c

Browse files
committed
Merge branch 'main' into safeguard-discard
2 parents a3368b2 + f3fd329 commit 5fe6a7c

File tree

12 files changed

+144
-26
lines changed

12 files changed

+144
-26
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
run: |
6464
echo "zpm \"install testcoverage\":1:1" > install-testcoverage
6565
docker exec --interactive $instance iris session $instance -B < install-testcoverage
66+
chmod 777 $GITHUB_WORKSPACE
6667
6768
- name: Build and Test
6869
run: |
@@ -72,7 +73,12 @@ jobs:
7273
echo "do \$System.OBJ.CompilePackage(\"$test_package\",\"ckd\") " > test.script
7374
# Run tests
7475
echo "zpm \"$package test -only $test_flags\":1:1" >> test.script
75-
docker exec --interactive $instance iris session $instance -B < build.script && docker exec --interactive $instance iris session $instance -B < test.script &&bash <(curl -s https://codecov.io/bash)
76+
docker exec --interactive $instance iris session $instance -B < build.script && docker exec --interactive $instance iris session $instance -B < test.script
77+
78+
- name: Upload coverage reports to Codecov with GitHub Action
79+
uses: codecov/[email protected]
80+
env:
81+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7682

7783
- name: Produce CE Artifact
7884
run: |

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111
- Discards safeguarded by discard stash and warning modal (#455)
1212
- Files in uncommitted queue in any namespace warn users when opened except for in VSCode (#370)
13+
- Added link back to IRIS management portal from Settings, Git WebUI pages (#449)
14+
- Added Import all and Import All (Force) to basic mode menu (#498)
1315

1416
### Fixed
1517
- Changed prompts in configure from 0/1 to no/yes (#461)
1618
- Added warnings when user is using incompatible git version (#488)
19+
- Fixed the back button navigation between WebUI and Settings page (#361)
20+
- Basic mode Sync operation now imports items changed on the remote merge branch (#506)
21+
- Fetch diff output uses correct remote branch (#509)
1722

1823
## [2.5.0] - 2024-09-24
1924

cls/SourceControl/Git/Extension.cls

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ Method OnSourceMenuItem(name As %String, ByRef Enabled As %String, ByRef Display
145145
set Enabled = $CASE(name,
146146
"Status": 1,
147147
"GitWebUI" : 1,
148+
"Import": 1,
149+
"ImportForce": 1,
148150
"NewBranch": 1,
149151
"SwitchBranch": 1,
150152
"Sync": 1,

cls/SourceControl/Git/Utils.cls

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ ClassMethod MergeDefaultRemoteBranch(Output alert As %String = "") As %Boolean
441441
do ..RunGitWithArgs(.errStream, .outStream, "fetch", "origin", defaultMergeBranch_":"_defaultMergeBranch)
442442
do ..PrintStreams(errStream, outStream)
443443

444-
do ..RunGitWithArgs(,.outStream, "rev-parse", defaultMergeBranch)
444+
do ..RunGitWithArgs(,.outStream, "rev-parse", "HEAD")
445445
set startSha = outStream.ReadLine()
446446

447447
// Start a transaction so code changes can be rolled back
@@ -535,7 +535,7 @@ ClassMethod Fetch(ByRef diffFiles) As %Status
535535
do ..RunGitCommand("fetch", .errStream, .outStream)
536536
write !, "Fetch done"
537537
kill errStream, outStream
538-
do ..RunGitCommand("diff", .errStream, .outStream, "..origin", "--name-only")
538+
do ..RunGitCommand("diff", .errStream, .outStream, "..origin/"_..GetCurrentBranch(), "--name-only")
539539
set diffFiles = ""
540540
while (outStream.AtEnd = 0) {
541541
set diffFiles = diffFiles_$listbuild(outStream.ReadLine())
@@ -2694,4 +2694,3 @@ ClassMethod BaselineExport(pCommitMessage = "", pPushToRemote = "") As %Status
26942694
}
26952695

26962696
}
2697-

cls/SourceControl/Git/WebUIDriver.cls

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ ClassMethod HandleRequest(pagePath As %String, InternalName As %String = "", Out
2222
set responseJSON = ..GetPackageVersion()
2323
} elseif $extract(pagePath, 6, *) = "git-version" {
2424
set responseJSON = ..GetGitVersion()
25+
} elseif $extract(pagePath,6,*) = "home"{
26+
set responseJSON = {
27+
"url": (..GetHomeURL())
28+
}
2529
} else {
2630
set %response.Status = ##class(%CSP.REST).#HTTP404NOTFOUND
2731
set responseJSON = {"error":("invalid URI: " _ pagePath)}
@@ -394,4 +398,13 @@ ClassMethod GetGitVersion() As %Library.DynamicObject
394398
quit {"version": (version)}
395399
}
396400

401+
ClassMethod GetHomeURL() As %String
402+
{
403+
set prefix = ""
404+
if $IsObject($Get(%request)) {
405+
set prefix = $Piece(%request.Application,%request.AppMatch)
406+
}
407+
quit prefix_"/csp/sys/UtilHome.csp"
408+
}
409+
397410
}

csp/gitprojectsettings.csp

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ body {
4040
#webuiURL {
4141
display: none;
4242
}
43+
#homeURL {
44+
display: none;
45+
}
4346

4447
.custom-switch {
4548
padding: 0.4rem 0.5rem 0 2.75rem;
@@ -73,6 +76,7 @@ body {
7376
set version = ##class(SourceControl.Git.Utils).GetPackageVersion()
7477
set webuiURL = "/isc/studio/usertemplates/gitsourcecontrol/webuidriver.csp/"_namespace_"/?CSPSHARE=1"
7578
set webuiURL = ##class(SourceControl.Git.WebUIDriver).GetURLPrefix(%request, webuiURL)
79+
set homeURL = ##class(SourceControl.Git.WebUIDriver).GetHomeURL()
7680

7781
set settings = ##class(SourceControl.Git.Settings).%New()
7882
if $Data(%request.Data("gitsettings",1)) {
@@ -128,12 +132,17 @@ body {
128132
<input type="hidden" name="gitsettings" value="1" />
129133
<div class="col-sm-12"><br></div>
130134
<div class="row">
131-
<div class="offset-sm-1 col-sm-8">
135+
<div class="offset-sm-1 col-sm-7" id="settingsTitle">
132136
<h1>Git Project Settings</h1>
133137
<h3> Package version: #(version)# </h3>
134138
</div>
135139

136-
<div class="col-sm-2">
140+
<div class="col-sm-4" id="settingsNavBtn">
141+
<button class="btn btn-lg btn-outline-dark" id="goToHome">Home
142+
</button>
143+
<div id="homeURL">
144+
#(homeURL)#
145+
</div>
137146
<button class="btn btn-lg btn-outline-dark" id="goToWebUI">Go to WebUI
138147
</button>
139148
<div id="webuiURL">
@@ -542,6 +551,17 @@ body {
542551
<script src="js/popper.min.js"></script>
543552
<script src="js/bootstrap.min.js"></script>
544553
<script type="text/javascript">
554+
555+
// Removing the home button if not a top-level page
556+
if ((window !== window.parent) || (navigator.userAgent.indexOf('MSIE 7') > -1) || (navigator.userAgent.indexOf(" Code/") > -1)) {
557+
$("#goToHome", self.element).remove();
558+
$("#homeURL", self.element).remove();
559+
$('#settingsTitle').removeClass('col-sm-7');
560+
$('#settingsNavBtn').removeClass('col-sm-4');
561+
$('#settingsTitle').addClass('col-sm-8');
562+
$('#settingsNavBtn').addClass('col-sm-2');
563+
}
564+
545565
function getSocket(urlPostfix) {
546566
var socketURL = window.location.href.replace('http','ws').replace('gitprojectsettings.csp','_zpkg.isc.sc.git.Socket.cls') + "&" + urlPostfix;
547567
return new WebSocket(socketURL);
@@ -633,8 +653,12 @@ $(function()
633653

634654
$(document).on('click', "#goToWebUI", function(e){
635655
e.preventDefault();
636-
console.log($("#webuiURL")[0].innerText);
637-
window.location.replace($("#webuiURL")[0].innerText);
656+
window.location.href = $("#webuiURL")[0].innerText;
657+
})
658+
659+
$(document).on('click', "#goToHome", function(e){
660+
e.preventDefault();
661+
window.location.href = $("#homeURL")[0].innerText;
638662
})
639663
});
640664

git-webui/release/share/git-webui/webui/css/git-webui.css

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ body {
183183
padding-bottom: 100px;
184184
}
185185
#sidebar #sidebar-content > :first-child,
186-
#sidebar #sidebar-content > :nth-last-child(3) {
186+
#sidebar #sidebar-content > :last-child {
187187
border-top: 1px solid #5e5e5e;
188188
}
189189
#sidebar #sidebar-content h4:before {
@@ -230,7 +230,7 @@ body {
230230
}
231231
#sidebar #sidebar-content #sidebar-vscode {
232232
position: absolute;
233-
bottom: 80px;
233+
bottom: 90px;
234234
width: 16.7em;
235235
background-color: #333333;
236236
}
@@ -242,7 +242,7 @@ body {
242242
}
243243
#sidebar #sidebar-content #sidebar-context {
244244
position: absolute;
245-
bottom: 40px;
245+
bottom: 50px;
246246
width: 16.7em;
247247
background-color: #333333;
248248
}
@@ -254,7 +254,19 @@ body {
254254
}
255255
#sidebar #sidebar-content #sidebar-settings {
256256
position: absolute;
257-
bottom: 0px;
257+
bottom: 10px;
258+
width: 16.7em;
259+
background-color: #333333;
260+
}
261+
#sidebar #sidebar-content #sidebar-home h4 {
262+
padding: 0px;
263+
}
264+
#sidebar #sidebar-content #sidebar-home h4:before {
265+
content: url(../img/home.svg);
266+
}
267+
#sidebar #sidebar-content #sidebar-home {
268+
position: absolute;
269+
bottom: 130px;
258270
width: 16.7em;
259271
background-color: #333333;
260272
}
Lines changed: 3 additions & 0 deletions
Loading

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

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ $.get("api/settings", function(settingsURL){
6969
webui.settingsURL = url.url;
7070
});
7171

72+
webui.homeURL = "";
73+
$.get("api/home", function(homeURL){
74+
var url = JSON.parse(homeURL);
75+
webui.homeURL = url.url;
76+
});
77+
7278
webui.showSuccess = function(message) {
7379
var messageBox = $("#message-box");
7480
messageBox.empty();
@@ -913,7 +919,11 @@ webui.SideBarView = function(mainView, noEventHandlers) {
913919
}
914920

915921
self.goToSettingsPage = function() {
916-
window.location.replace(webui.settingsURL);
922+
window.location.href = webui.settingsURL;
923+
}
924+
925+
self.goToHomePage = function() {
926+
window.location.href = webui.homeURL;
917927
}
918928

919929
self.fetchSection = function(section, title, id, gitCommand) {
@@ -989,14 +999,17 @@ webui.SideBarView = function(mainView, noEventHandlers) {
989999
'<section id="sidebar-tags">' +
9901000
'<h4>Tags</h4>' +
9911001
'</section>' +
992-
'<section id="sidebar-vscode">' +
993-
'<h4><a href="vscode-workspace" target="_blank">Code Workspace</a></h4>' +
1002+
'<section id="sidebar-settings">' +
1003+
'<h4>Settings</h4>' +
9941004
'</section>' +
9951005
'<section id="sidebar-context" data-toggle="tooltip" data-placement="right" title="' + self.currentContext + '">' +
9961006
'<h4>Change Context</h4>' +
9971007
'</section>' +
998-
'<section id="sidebar-settings">' +
999-
'<h4>Settings</h4>' +
1008+
'<section id="sidebar-vscode">' +
1009+
'<h4><a href="vscode-workspace" target="_blank">Code Workspace</a></h4>' +
1010+
'</section>' +
1011+
'<section id="sidebar-home">' +
1012+
'<h4>Home</h4>' +
10001013
'</section>' +
10011014
'</div>' +
10021015
'</div>')[0];
@@ -1029,8 +1042,13 @@ webui.SideBarView = function(mainView, noEventHandlers) {
10291042
$('.btn-prune-remote-branches', self.element).click(self.pruneRemoteBranches);
10301043
$("#sidebar-settings", self.element).click(self.goToSettingsPage);
10311044
$("#sidebar-context", self.element).click(self.changeContextGet);
1045+
$("#sidebar-home", self.element).click(self.goToHomePage);
10321046
}
10331047

1048+
// Removing the link to home if not a top-level page
1049+
if ((window !== window.parent) || (navigator.userAgent.indexOf('MSIE 7') > -1) || (navigator.userAgent.indexOf(" Code/") > -1)) {
1050+
$("#sidebar-home", self.element).remove();
1051+
}
10341052

10351053
self.getPackageVersion();
10361054
self.fetchSection($("#sidebar-local-branches", self.element)[0], "Local Branches", "local-branches", "branch --verbose --verbose");

git-webui/src/share/git-webui/webui/css/git-webui.less

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ body {
257257
color: @gray-lighter;
258258
padding-bottom: 100px;
259259

260-
> :first-child, >:nth-last-child(3) {
260+
> :first-child, >:last-child {
261261
border-top: 1px solid darken(@separator-line, 50%);
262262
}
263263

@@ -319,7 +319,7 @@ body {
319319

320320
#sidebar-vscode {
321321
position: absolute;
322-
bottom: 80px;
322+
bottom: 90px;
323323
width: 16.7em;
324324
background-color: rgba(51, 51, 51, 1);
325325
}
@@ -334,7 +334,7 @@ body {
334334

335335
#sidebar-context {
336336
position: absolute;
337-
bottom: 40px;
337+
bottom: 50px;
338338
width: 16.7em;
339339
background-color: rgba(51, 51, 51, 1);
340340
}
@@ -349,7 +349,22 @@ body {
349349

350350
#sidebar-settings {
351351
position: absolute;
352-
bottom: 0px;
352+
bottom: 10px;
353+
width: 16.7em;
354+
background-color: rgba(51, 51, 51, 1);
355+
}
356+
357+
#sidebar-home h4 {
358+
padding: 0px;
359+
}
360+
361+
#sidebar-home h4:before {
362+
content: url(../img/home.svg);
363+
}
364+
365+
#sidebar-home {
366+
position: absolute;
367+
bottom: 130px;
353368
width: 16.7em;
354369
background-color: rgba(51, 51, 51, 1);
355370
}

0 commit comments

Comments
 (0)