Skip to content

Commit cc9681a

Browse files
author
mreishman
committed
added git type, fixed bug with poll error dispaly
1 parent 147ca2e commit cc9681a

File tree

5 files changed

+91
-56
lines changed

5 files changed

+91
-56
lines changed

core/html/changelog.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11
<ul>
2+
<li>
3+
Version 3.4.3
4+
<ul>
5+
<li>
6+
Features
7+
<ul>
8+
<li>
9+
Added option for custom git url
10+
</li>
11+
</ul>
12+
</li>
13+
<li>
14+
Bug Fixes
15+
<ul>
16+
<li>
17+
Fixed issue with errors not displaying correctly when poll fails.
18+
</li>
19+
</ul>
20+
</li>
21+
</ul>
22+
</li>
223
<li>
324
Version 3.4.2
425
<ul>
@@ -355,7 +376,7 @@
355376
Bug Fixes
356377
<ul>
357378
<li>
358-
Fixed bug with new git branch logic
379+
Fixed bug with new git branch logic
359380
</li>
360381
</ul>
361382
</li>
@@ -709,7 +730,7 @@
709730
Features
710731
<ul>
711732
<li>
712-
New settings page for watch list / main settings.
733+
New settings page for watch list / main settings.
713734
</li>
714735
<li>
715736
Tabbed groups for servers
@@ -780,7 +801,7 @@
780801
Added link to log-hog on watch servers (if installed)
781802
</li>
782803
<li>
783-
Changes BG color of servers on master branch.
804+
Changes BG color of servers on master branch.
784805
</li>
785806
<li>
786807
Auto-refresh / Pause auto refresh

core/js/main.js

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ function getToday()
189189
if(dd<10)
190190
{
191191
dd='0'+dd
192-
}
192+
}
193193

194194
if(mm<10)
195195
{
196196
mm='0'+mm
197-
}
197+
}
198198
return mm+'/'+dd+'/'+yyyy;
199199
}
200200

@@ -221,7 +221,7 @@ function tryHTTPForPollRequest(count, name = null)
221221
if (dateForEnd >= today)
222222
{
223223
doPollLogic = false;
224-
}
224+
}
225225
}
226226
if(doPollLogic)
227227
{
@@ -365,9 +365,9 @@ function tryHttpActuallyPollLogic(count, name)
365365
}
366366

367367

368-
function tryHTTPSForPollRequest(_data, _innerData)
368+
function tryHTTPSForPollRequest(data2, _innerData)
369369
{
370-
var urlForSend = _data.urlForSend;
370+
var urlForSend = data2.urlForSend;
371371
urlForSend = urlForSend.replace("http","https");
372372
var data = _innerData;
373373
(function(_data){
@@ -384,7 +384,7 @@ function tryHTTPSForPollRequest(_data, _innerData)
384384
pollFailure(xhr.status, error, _data);
385385
}
386386
});
387-
}(data));
387+
}(data2));
388388
}
389389

390390
function showPopupWithMessage(type, message)
@@ -879,6 +879,10 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
879879
{
880880
baseRepoUrl = "gitlab.com";
881881
}
882+
if("customGit" in dataInner && customGit !== "")
883+
{
884+
baseRepoUrl = dataInner["customGit"];
885+
}
882886
}
883887
$("#"+noSpaceName+"BranchHistory").html(generateBranchHistory(dataInner, repoName, baseRepoUrl));
884888
var dataBranchForFile = '<span id="'+noSpaceName+'";">';
@@ -911,7 +915,7 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
911915
{
912916
if(checkForIssueInCommit == "true")
913917
{
914-
for(var i = 0, len = dataBranchForFileStats.length; i < len; i++)
918+
for(var i = 0, len = dataBranchForFileStats.length; i < len; i++)
915919
{
916920
if((dataBranchForFileStats[i] == "#") && (!isNaN(dataBranchForFileStats[i+1])) && (dataBranchForFileStats[i-1] != "&"))
917921
{
@@ -939,7 +943,7 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
939943
}
940944
//loop through filters, if match -> get number, add to title if != link
941945

942-
946+
943947
//num for start
944948
if(checkForIssueStartsWithNum == "true")
945949
{
@@ -960,13 +964,13 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
960964
}
961965
}
962966

963-
967+
964968
//num for end
965969
if(checkForIssueEndsWithNum == "true")
966970
{
967971
var numForEnd = "";
968972
var countForEndLoop = branchName.length - 1;
969-
973+
970974
while(!isNaN(branchName.charAt(countForEndLoop)) && countForEndLoop != 0)
971975
{
972976
numForEnd += branchName.charAt(countForEndLoop);
@@ -1011,19 +1015,19 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
10111015
}
10121016
dataBranchForFile += '</span>';
10131017
var nameForBackground = "innerFirstDevBox"+noSpaceName;
1014-
dataToFilterBy = dataInner['branch'];
1018+
dataToFilterBy = dataInner['branch'];
10151019
if(branchColorFilter == "authorName")
10161020
{
10171021
dataToFilterByArray = dataBranchForFileStats.split("<br>");
10181022
dataToFilterByArray = dataToFilterByArray[0].split("</b>");
1019-
dataToFilterBy = $.trim(dataToFilterByArray[1]);
1023+
dataToFilterBy = $.trim(dataToFilterByArray[1]);
10201024

10211025
}
10221026
else if(branchColorFilter == "committerName")
10231027
{
10241028
dataToFilterByArray = dataBranchForFileStats.split("<br>");
10251029
dataToFilterByArray = dataToFilterByArray[0].split("</b>");
1026-
dataToFilterBy = $.trim(dataToFilterByArray[1]);
1030+
dataToFilterBy = $.trim(dataToFilterByArray[1]);
10271031
}
10281032
var setFadeBool = false;
10291033
var urlHit = "";
@@ -1075,7 +1079,7 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
10751079
arrayOfWatchFilters[noSpaceName]["branchList"] = branchList;
10761080
arrayOfWatchFilters[noSpaceName]["urlHit"] = urlHit;
10771081
}
1078-
1082+
10791083
filterBGColor(dataToFilterBy, nameForBackground, 1);
10801084
arrayOfWatchFilters[noSpaceName]["backgroundColor"] = document.getElementById(nameForBackground).style.backgroundColor;
10811085
//custom message stuff
@@ -1090,11 +1094,11 @@ function pollSuccessInner(dataInner, dataInnerPass, dataInnerPassMaster)
10901094

10911095
if(dd<10) {
10921096
dd='0'+dd
1093-
}
1097+
}
10941098

10951099
if(mm<10) {
10961100
mm='0'+mm
1097-
}
1101+
}
10981102

10991103
today = mm+'/'+dd+'/'+yyyy;
11001104

@@ -1320,7 +1324,7 @@ function refreshAction(all = -1, status = 'outer')
13201324
}
13211325

13221326
function endRefreshAction()
1323-
{
1327+
{
13241328
if(isPaused())
13251329
{
13261330
document.title = "Git Status | Paused";
@@ -1559,7 +1563,7 @@ function dropdownShow(nameOfElem)
15591563
}
15601564

15611565
window.onclick = function(event) {
1562-
if (!event.target.matches('.expandMenu'))
1566+
if (!event.target.matches('.expandMenu'))
15631567
{
15641568
$('.dropdown-content').hide();
15651569
$('.dropdown-content').css('margin-top',"0px");
@@ -1619,7 +1623,7 @@ function installUpdates()
16191623
type: "POST",
16201624
complete: function(data)
16211625
{
1622-
//set thing to check for updated files.
1626+
//set thing to check for updated files.
16231627
timeoutVar = setInterval(function(){verifyChange();},3000);
16241628
}
16251629
});
@@ -2306,7 +2310,7 @@ function commitStuffSuccess(data)
23062310
currentNumberMinus++;
23072311
currentNumberPlus++;
23082312
}
2309-
2313+
23102314
}
23112315
htmlForCommit += "</table>";
23122316
$("#spanForMainDiff").html(htmlForCommit);

core/php/configStatic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?php
33

44
$configStatic = array(
5-
'version' => '3.4.2',
5+
'version' => '3.4.3',
66
'lastCheck' => '12-14-2018',
77
'newestVersion' => '3.3.4',
88
'versionList' => array(

core/php/templateFiles/watchList.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
</select>
3838
<br>
3939
<span class="leftSpacingserverNames" > Branch List:</span> <input disabled="true" class='inputWidth300' type='text' value='Compare branches list example: master , develop'>
40+
<br>
41+
<span class="leftSpacingserverNames" > Custom Git:</span> <input disabled="true" class='inputWidth300' type='text' value='Custom url for git. Empty = default'>
42+
4043
</li>
4144
<?php
4245

@@ -46,23 +49,25 @@
4649
"Folder" => "Folder",
4750
"Website" => "Website",
4851
"githubRepo" => "Git Repo",
52+
"branchList" => "Branch List",
53+
"gitType" => "Git Type",
54+
"customGit" => "Custom Git",
4955
"groupInfo" => "Group Info",
5056
"urlHit" => "URL Hit",
51-
"gitType" => "Git Type",
52-
"Archive" => "Archive",
53-
"branchList" => "Branch List"
57+
"Archive" => "Archive"
5458
);
5559

5660
$defaultArray = array(
5761
'WebsiteBase' => '',
5862
'Folder' => '',
5963
'Website' => '',
6064
'githubRepo' => '',
65+
'branchList' => 'master',
66+
'gitType' => 'github',
67+
'customGit' => '',
6168
'groupInfo' => '',
6269
'urlHit' => '',
63-
'gitType' => 'github',
64-
'branchList' => 'master',
65-
"Archive" => 'false'
70+
'Archive' => 'false'
6671
);
6772

6873
elseif($pollType === "2"): ?>
@@ -124,7 +129,7 @@
124129
if(!in_array($key2, $arrayOfKeys))
125130
{
126131
array_push($arrayOfKeys, $key2);
127-
}
132+
}
128133
?>
129134
<?php
130135
if($key2 === "gitType"):
@@ -149,13 +154,13 @@
149154
<input class='inputWidth300' type='text' name='watchListItem<?php echo $i; ?>-<?php echo $j; ?>' value='<?php if(isset($item[$key2])){ echo $item[$key2]; }?>'>
150155
<?php endif;
151156
endif;
152-
endforeach;
157+
endforeach;
153158
if($numCount < $j)
154159
{
155160
$numCount = $j;
156161
}
157162
?>
158-
<br> <input style="display: none" type="text" name="watchListItem<?php echo $i;?>-0" value='<?php echo $j;?>'>
163+
<br> <input style="display: none" type="text" name="watchListItem<?php echo $i;?>-0" value='<?php echo $j;?>'>
159164
<span class="leftSpacingserverNames" ></span>
160165
<?php if($type !== "external"): ?>
161166
<a class="mainLinkClass" onclick="deleteRowFunction(<?php echo $i; ?>, true);">Remove</a>

0 commit comments

Comments
 (0)