Files
gtav-src/tools_ng/bin/CruiseControl/WebDashboard/templates/CodeProjectGrid.vm
T
2025-09-29 00:52:08 +02:00

307 lines
10 KiB
Plaintext
Executable File

<form ID="RefreshForm" method="post">
<table width="100%">
<tr>
<td align="left"><input type="submit" align="left" name="Refresh" value="Refresh Status" /></td>
</tr>
</table>
</form>
#if ($forceBuildMessage.Length > 0)
<P><span id="StatusLabel"><b><font color="#4A3C8C">$forceBuildMessage</font></b></span></P>
#end
#set ($imgfolder = "http://intranet.rockstarnorth.com/images/people/")
#set ($imgdir = "/ccnet/images/")
#set ($imagewidth = 24)
#set ($imageheight = 32)
#set ($allowstopstart = false)
#if (!$currDate)
#set ($currDate = "XXX")
#end
#if (!$tomorrowDate)
#set ($tomorrowDate = "XXX")
#end
#if (!$yesterdayDate)
#set ($yesterdayDate = "XXX")
#end
#set ($ProjectOKCounter = 0)
#set ($ProjectNOKCounter = 0)
#set ($category="Core Code")
#foreach ($projectGridRow in $projectGrid)
#if ($projectGridRow.Category == $category)
#if ($projectGridRow.BuildStatus == "Success")
#set ($ProjectOKCounter = $ProjectOKCounter + 1)
#else
#set ($ProjectNOKCounter = $ProjectNOKCounter + 1)
#end
#end
#end
#set ($ProjectCounter = $ProjectOKCounter + $ProjectNOKCounter)
#set ($updateTime = "$currTime")
#if ($ProjectNOKCounter > 0)
<img src="${imgdir}unhappy.jpg" alt="$ProjectNOKCounter builds are broken, fix to make 'build smiley' happy again."/>
<tr>
<td align="Left">
<b><font color="Red">$ProjectNOKCounter/$ProjectCounter builds are bad @ $updateTime</font></b>
</td>
</tr>
#else
<img src="${imgdir}happy.jpg" alt="All builds are good, 'build smiley' is happy again."/>
<tr>
<td align="Left">
<b>
<font color="Green">$ProjectOKCounter/$ProjectCounter builds are ok @ $updateTime</font>
</b>
</td>
</tr>
#end
#if ($projectGrid.Length > 0)
<table cellspacing="0" cellpadding="3" rules="rows" bordercolor="#333399" border="1" id="StatusGrid" bgcolor="White" width="100%">
<tr bgcolor="#333399" class="ProjectGridHeader">
<td align="Center">
<b>Action</b>
</td>
<td>
<a href="$projectNameSortLink"><b>Project Name</b></a>
</td>
<td align="Center">
<b>
Last<br/>CL
</b>
</td>
<td align="Center">
<b>Msgs</b>
</td>
<td align="Center">
<a href="$buildStatusSortLink"><b>Last<br/>Status</b></a>
</td>
<td align="Center">
<b>Process</b>
</td>
<td align="Center">
<b>Activity</b>
</td>
#if ($wholeFarm)
<td align="Center">
<a href="$serverNameSortLink">
<b>Server</b>
</a>
</td>
#end
<td align="Center">
<a href="$lastBuildDateSortLink">
<b>Last<br/>Build</b>
</a>
</td>
<td align="Center">
<a href="$lastBuildDateSortLink">
<b>Next<br/>Build</b>
</a>
</td>
<td align="Center">
<b>Est. Time<br/>Remaining</b>
</td>
<td align="Center">
<b>Last<br/>Duration</b>
</td>
</tr>
#foreach ($projectGridRow in $projectGrid)
#if ($projectGridRow.Category == $category)
#set ($currDuration = $currDateTime.Subtract($projectGridRow.StartTime) )
#set ($remaining = $projectGridRow.TotalIntegrationTime.Subtract($currDuration) )
#set ($tr_bgcolour = "Ivory")
<tr bgcolor="$tr_bgcolour">
<td align="Center">
<form method="post" style="margin-bottom:0px;">
<input type="hidden" name="projectName" value="$projectGridRow.Name" />
<input type="hidden" name="serverName" value="$projectGridRow.ServerName" />
<font color="Black">
<input type="submit" name="$projectGridRow.ForceAbortBuildButtonName" value="$projectGridRow.ForceAbortBuildButtonValue"/>
#if ($allowstopstart)
<input type="submit" name="$projectGridRow.StartStopButtonName" value="$projectGridRow.StartStopButtonValue"/>
#end
</font>
</form>
</td>
<td align="Left">
<font color="Black">
<a href="$projectGridRow.Url">$projectGridRow.Name</a>
</font>
</td>
<td align="Center">
<!-- Super Hack - sorry! - one day in the distant future this will break. -->
#if ($projectGridRow.LastChangelist.Length > 6)
<a href="http://rsgedip4d2:8080/@md=d&cd=//&c=0Td@/${projectGridRow.LastChangelist}?ac=10">
$projectGridRow.LastChangelist
</a>
#else
<a href="http://rsgsanp4web.rockstar.t2.corp:8080/@md=d&cd=//&c=7FM@/${projectGridRow.LastChangelist}?ac=10">
$projectGridRow.LastChangelist
</a>
#end
</td>
<td align="Center">
<font color="Blue">
#set ($msg = $projectGridRow.CurrentMessage)
#if ($msg.Length > 0)
#set ($msg = $msg.Replace("Breakers :","").Trim())
#set ($msg = $msg.Replace(".","_").Trim())
#set ($localBreakerJpg = "${imgdir}${msg}.jpg")
#set ($breakerJpg = "${imgfolder}${msg}.jpg")
#set ($numBreakers = $msg.Length - $msg.Replace(",", "").Length + 1)
#if ($numBreakers > 3)
#set ($breakerJpg = "${imgdir}4breakers.jpg")
#end
#if ($numBreakers == 2)
#set ($breakerJpg = "${imgdir}2breakers.jpg")
#end
#if ($numBreakers == 3)
#set ($breakerJpg = "${imgdir}3breakers.jpg")
#end
#set ($premsg = "The culprits")
#if ($numBreakers == 1)
#set ($premsg = "The culprit")
#end
<a href="#" onclick="alert('$projectGridRow.Name\r\n\r\n $projectGridRow.CurrentMessage\r\n'); return false;">
<img style="border:0; padding:0; margin:0;" src="${localBreakerJpg}" onerror="this.onerror=null;this.src='${breakerJpg}';" width="$imagewidth" height="$imageheight" alt="${premsg} : ${msg}"/>
</a>
#end
</font>
</td>
<td align="Center">
<font color="$projectGridRow.BuildStatusHtmlColor">
<b>$projectGridRow.BuildStatus</b>
</font>
</td>
<td align="Center">
#if ($projectGridRow.Status != "Running")
<b>
<font color="Grey">$projectGridRow.Status</font>
</b>
#else
<font color="Black">$projectGridRow.Status</font>
#end
</td>
<td align="Center">
#if ($projectGridRow.Activity == "Building")
#if ($projectGridRow.BuildStatus != "Success")
<b><font color="Darkorange">$projectGridRow.Activity</font></b>
#else
<b><font color="Black">$projectGridRow.Activity</font>
</b>
#end
#else
<font color="Black">$projectGridRow.Activity</font>
#end
</td>
#if ($wholeFarm)
<td align="Centre">
$projectGridRow.ServerName
</td>
#end
<td align="Right">
#set ($len = $projectGridRow.LastBuildDate.Length - 3)
#set ($formattedDate = $projectGridRow.LastBuildDate.Remove($len,3).Replace($currDate,"") )
#set ($formattedDate = $formattedDate.Replace($tomorrowDate,"tomorrow") )
#set ($formattedDate = $formattedDate.Replace($yesterdayDate,"yesterday") )
<font color="Black">$formattedDate</font>
</td>
<td align="Right">
#set ($len = $projectGridRow.LastBuildDate.Length - 3)
#set ($formattedDate = $projectGridRow.NextBuildTime.Remove($len,3).Replace($currDate,""))
#set ($formattedDate = $formattedDate.Replace($tomorrowDate,"tomorrow") )
#set ($formattedDate = $formattedDate.Replace($yesterdayDate,"yesterday") )
<font color="Black">$formattedDate</font>
</td>
<td align="Right">
#if ($projectGridRow.Activity == "Building")
#if ($remaining.Hours != 0)
#if ($remaining.TotalSeconds<0)
<font color="Red">$remaining.Hours Hrs $remaining.Minutes Mins $remaining.Seconds Secs</font>
#else
<font color="Black">$remaining.Hours Hrs $remaining.Minutes Mins $remaining.Seconds Secs</font>
#end
#else
#if ($remaining.Minutes != 0)
#if ($remaining.TotalSeconds<0)
<font color="Red">$remaining.Minutes Mins $remaining.Seconds Secs</font>
#else
<font color="Black">$remaining.Minutes Mins $remaining.Seconds Secs</font>
#end
#else
#if ($remaining.TotalSeconds<0)
<font color="Red">$remaining.Seconds Secs</font>
#else
<font color="Black">$remaining.Seconds Secs</font>
#end
#end
#end
#end
</td>
<td align="Right">
#if ($projectGridRow.TotalIntegrationTime.Hours > 0)
<font color="Black">$projectGridRow.TotalIntegrationTime.Hours Hrs $projectGridRow.TotalIntegrationTime.Minutes Mins $projectGridRow.TotalIntegrationTime.Seconds Secs</font>
#else
#if ($projectGridRow.TotalIntegrationTime.Minutes > 0)
<font color="Black">$projectGridRow.TotalIntegrationTime.Minutes Mins $projectGridRow.TotalIntegrationTime.Seconds Secs</font>
#else
<font color="Black">$projectGridRow.TotalIntegrationTime.Seconds Secs</font>
#end
#end
</td>
</tr>
#end
#end
#if ($ProjectCounter == 0)
#set ($OKPercent = 50)
#set ($NOKPercent = 0)
#else
#set ($OKPercent = 50 * $ProjectOKCounter / $ProjectCounter)
#set ($NOKPercent = 50 - $OKPercent)
#end
#set ($OKPercentToolTip = $OKPercent * 2)
<tr>
<td COLSPAN="9">
<table cellspacing="0" cellpadding="0" border="0" width="100%" >
<tr height=5 title="Percentage of successfull builds : $OKPercentToolTip%">
<td width=$OKPercent% bgcolor="#33CC00"> </td>
<td width=$NOKPercent% bgcolor="#FF0000"></td>
<td width=$NOKPercent% bgcolor="#FF0000"></td>
<td width=$OKPercent% bgcolor="#33CC00"> </td>
</tr>
</table>
</td>
</tr>
</table>
#end