Rev 6873 | Rev 6877 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| ADMIN Build Status Information |'| |'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont store%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><!--#include file="common/_form_window_common.asp"--><!--#include file="common/common_daemon.asp"--><% '------------ ACCESS CONTROL ------------------ %><!--#include file="_access_control_login_optional.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsQryDim query_stringDim styleAlt1Dim styleAlt2Dim styleNowDim param_refreshPeriodDim param_inactivityDim param_refreshEnabledDim bIndefinitelyPausedDim buildStatusDim bShowProblemDaemonSets ' Indicates if problem daemons must be shown during filteringDim bShowDisabledDaemons ' Indicates if a disabled daemon must be shown during filteringDim bShowActiveBuilds ' Indicates if active builds must be shown during filteringDim bShowIdleBuilds ' Indicates if idle builds must be shown during filteringDim bShowPausedBuilds ' Indicates if paused builds must be shown during filtering'------------ Constants Declaration -----------Const Min_Refresh_Time = 10 ' SecondsConst Max_DeltaBuild = 31 ' Days'------------ Variable Init -------------------styleAlt1="class='body_rowg1'"styleAlt2="class='body_rowg2'"styleNow = styleAlt1'----------------------------------------------%><%'------------------------------------------------------------------------------' Populate the buildStatus dictionary' Get all the required data into a hash of hashes' It will make the following processing so much easier'Sub getBuildStatusDim bmsquery_string = "SELECT rc.RCON_ID, " &_" rc.RTAG_ID, " &_" bm.DISPLAY_NAME, " &_" rc.DAEMON_MODE, "&_" rt.RTAG_NAME, " &_" rt.OFFICIAL, " &_" rt.BUILD_AGE, " &_" p.PROJ_ID, " &_" p.PROJ_NAME, " &_" rl.CURRENT_PKG_ID_BEING_BUILT, "&_" rl.CURRENT_RUN_LEVEL, "&_" NVL(rl.PAUSE,0) as PAUSE, " &_" TRUNC (86400*(SYSDATE - rl.KEEP_ALIVE)) as delta," &_" TO_CHAR(rl.LAST_BUILD, 'DD-MON-YYYY') as last_build," &_" TRUNC (SYSDATE - rl.LAST_BUILD) as last_build_days," &_" pkg.PKG_NAME, NVL(ACTIVE, 'U') as ACTIVE" &_" FROM RELEASE_CONFIG rc, RELEASE_TAGS rt, PROJECTS p, RUN_LEVEL rl, BUILD_MACHINE_CONFIG bm, PACKAGES pkg " &_" WHERE rt.RTAG_ID = rc.RTAG_ID " &_" AND rc.bmcon_id is not null" &_" AND rt.PROJ_ID = p.PROJ_ID " &_" AND rt.OFFICIAL in ( 'N', 'R', 'C')" &_" AND rl.RCON_ID(+) = rc.RCON_ID" &_" AND rc.bmcon_id = bm.bmcon_id(+)" &_" AND pkg.PKG_ID(+) = rl.CURRENT_PKG_ID_BEING_BUILT" &_" ORDER BY p.PROJ_NAME, rt.RTAG_NAME, rc.DAEMON_MODE, bm.DISPLAY_NAME, rc.DAEMON_MODE"Set buildStatus = CreateObject("Scripting.Dictionary")Set rsQry = OraDatabase.DbCreateDynaset( query_string, ORADYN_DEFAULT )Do While (NOT rsQry.BOF) AND (NOT rsQry.EOF)Set bms = CreateObject("Scripting.Dictionary")bms.Item("RCON_ID") = rsQry("RCON_ID")bms.Item("RTAG_ID") = rsQry("RTAG_ID")bms.Item("DISPLAY_NAME") = rsQry("DISPLAY_NAME")bms.Item("RTAG_NAME") = rsQry("RTAG_NAME")bms.Item("DAEMON_MODE") = rsQry("DAEMON_MODE")bms.Item("OFFICIAL") = rsQry("OFFICIAL")bms.Item("BUILD_AGE") = NiceInt(rsQry("BUILD_AGE"), 31)bms.Item("PROJ_ID") = rsQry("PROJ_ID")bms.Item("PROJ_NAME") = rsQry("PROJ_NAME")bms.Item("CURRENT_PKG_ID_BEING_BUILT") = rsQry("CURRENT_PKG_ID_BEING_BUILT")bms.Item("CURRENT_RUN_LEVEL") = rsQry("CURRENT_RUN_LEVEL")bms.Item("PAUSE") = CInt(rsQry("PAUSE"))bms.Item("delta") = rsQry("delta")bms.Item("last_build") = rsQry("last_build")bms.Item("last_build_days") = NiceInt(rsQry("last_build_days"), 100)bms.Item("PKG_NAME") = rsQry("PKG_NAME")bms.Item("ACTIVE") = rsQry("ACTIVE")' Calculate some valuesbms.Item("dState") = Classify_Run_Level(bms.Item("CURRENT_RUN_LEVEL"),_bIndefinitelyPaused,_bms.Item("PAUSE"), _bms.Item("delta") ,_bms.Item("CURRENT_PKG_ID_BEING_BUILT"),_bms.Item("ACTIVE"))bms.Item("dStateText") = Get_Run_Level(bms.Item("CURRENT_RUN_LEVEL"),_bIndefinitelyPaused,_bms.Item("PAUSE"),_bms.Item("ACTIVE"))' Kill package name on disabled daemonsIf bms.Item("PAUSE") = 2 Then bms.Item("PKG_NAME") = Null' Add to buildStatus' This is a three level hash (Project,Release, Daemon)Dim ProjRef, RelRef, DRefProjRef = bms.Item("PROJ_NAME")RelRef = bms.Item("RTAG_NAME")DRef = bms.Item("DISPLAY_NAME")If Not buildStatus.Exists(ProjRef) ThenSet buildStatus(ProjRef) = CreateObject("Scripting.Dictionary")Set buildStatus(ProjRef).Item("data") = CreateObject("Scripting.Dictionary")'buildStatus(ProjRef).Item("PROJ_ID") = bms.Item("PROJ_ID")'buildStatus(ProjRef).Item("PROJ_NAME") = bms.Item("PROJ_NAME")End IfIf Not buildStatus(ProjRef).Item("data").Exists(RelRef) ThenSet buildStatus(ProjRef).Item("data").Item(RelRef) = CreateObject("Scripting.Dictionary")Set buildStatus(ProjRef).Item("data").Item(RelRef).Item("data") = CreateObject("Scripting.Dictionary")'buildStatus(ProjRef).Item("data").Item(RelRef).Item("RTAG_NAME") = bms.Item("RTAG_NAME")'buildStatus(ProjRef).Item("data").Item(RelRef).Item("RTAG_ID") = bms.Item("RTAG_ID")End IfSet buildStatus(ProjRef).Item("data").Item(RelRef).Item("data").Item(DRef) = bmsrsQry.MoveNextLooprsQry.Close()Set rsQry = nothing' Iterate over each deamon set and flag some of its characteristics' This could be done inline, as the data is processed from the SQL sourceDim project,release,machineDim eProject,eRelease,eMachineFor Each project in buildStatusSet eProject = buildStatus.Item(project)For Each release in eProject.Item("data")Set eRelease = eProject.Item("data").Item(release)For Each machine in eRelease.Item("data")Set eMachine = eRelease.Item("data").Item(machine)Dim dStatedState = eMachine.Item("dState")If dState = "active" ThenIf bShowActiveBuilds Then eMachine.Item("bRow_displayed") = "ShowActive"ElseIf dState = "idle" ThenIf bShowIdleBuilds Then eMachine.Item("bRow_displayed") = "ShowIdle"ElseIf dState = "paused" ThenIf bShowPausedBuilds Then eMachine.Item("bRow_displayed") = "ShowPaused"ElseIf dState = "disabled" ThenIf bShowDisabledDaemons Then eMachine.Item("bRow_displayed") = "ShowDisabled"ElseIf dState = "problem" ThenIf bShowProblemDaemonSets Then eMachine.Item("bRow_displayed") = "ShowProblem"If bShowProblemDaemonSets Then eRelease.Item("bDisplay_whole_set") = trueElseeRelease.Item("bDisplay_whole_set") = trueeMachine.Item("bRow_displayed") = "ShowUnknownState"End IfIf bShowProblemDaemonSets AND eMachine.Item("BUILD_AGE") > 0 ThenIf (eMachine.Item("last_build_days") > eMachine.Item("BUILD_AGE")) OR (eMachine.Item("last_build_days") > param_inactivity) ThenIf dState = "active" OR dState = "idle" TheneRelease.Item("bDisplay_whole_set") = trueeRelease.Item("bShowAge") = trueeMachine.Item("bRow_displayed") = "ShowInactiveWarning"End IfEnd IfEnd IfIf eMachine.Exists("bRow_displayed") TheneRelease.Item("bDisplay_some") = trueEnd IfNextNextNext' Debug the data structure' Requires common/DictDump.vbs to be included to work'Response.Write "<br>Pretty Dictionary Display<pre>"'Response.Write DICToutput(buildStatus)End Sub'--------------------------------------------------------------------------------------------------------------------------' Toggle row style between the two alternative stylesSub ToggleStyleNowIf styleNow = styleAlt1 ThenstyleNow = styleAlt2ElsestyleNow = styleAlt1End IfEnd Sub'--------------------------------------------------------------------------------------------------------------------------' Convert run level into a meaningful filter state as a string' Will be one of: active, idle, paused, disabled, problem, unknownFunction Classify_Run_Level( nLevel, indefinitePause, astate, nDelta, pkgId, bActive)If bActive = "N" AND astate <> 2 ThenClassify_Run_Level = "problem"ElseIf indefinitePause ThenClassify_Run_Level = "problem"ElseIf astate = 1 Then ' if build daemon pausedClassify_Run_Level = "paused"ElseIf astate = 2 Then ' if build daemon disabledClassify_Run_Level = "disabled"ElseIf Int(nDelta) > Max_Delta ThenClassify_Run_Level = "problem"ElseIf (IsNull(pkgId)) OR (pkgId = "") ThenClassify_Run_Level = "idle"ElseIf astate = 0 Then ' if build daemon enabledIf nLevel = 1 ThenClassify_Run_Level = "problem"ElseIf nLevel = 2 ThenClassify_Run_Level = "paused"ElseIf nLevel = 3 ThenClassify_Run_Level = "active"ElseIf nLevel = 4 ThenClassify_Run_Level = "idle"ElseIf nLevel = 5 ThenClassify_Run_Level = "idle"ElseIf nLevel = 6 ThenClassify_Run_Level = "active"ElseClassify_Run_Level = "unknown"End IfEnd IfEnd Function'--------------------------------------------------------------------------------------------------------------------------' Use this function to determine the state of a specified project checkboxFunction Is_Project_Checked( nProjId )Dim hiddenProjects_arrDim hiddenProjectsDim strhiddenProjects = Request("HideProj")Is_Project_Checked = "checked"hiddenProjects_arr = Split(hiddenProjects, ",")For Each str in hiddenProjects_arrIf str = nProjId ThenIs_Project_Checked = ""Exit ForEnd IfNextEnd Function'--------------------------------------------------------------------------------------------------------------------------' Use this function to set/clear the filter on/off radio button checked state' Format of Filter Param : Filter=[problemBuilds}[,ActiveBuilds]Function Display_Filtered(id)Dim filterDisplay_Filtered = ""filter = Request("Filter")If NOT IsNull(filter) AND filter <> "" ThenIf InStr(filter, id) > 0 ThenDisplay_Filtered = "checked"End IfElseIf id = "OFF" ThenDisplay_Filtered = "checked"End IfEnd IfEnd Function'--------------------------------------------------------------------------------------------------------------------------' Use this function to set/clear a filter option check box with the given ID' If no Filter is present, then assume defaultsFunction Filter_Checked(id)Dim filterFilter_Checked = ""filter = Request("Filter")If IsNull(filter) OR filter = "" Thenfilter="problemBuilds,activeBuilds" ' DefaultsEnd IfIf InStr(filter, id) > 0 ThenFilter_Checked = "checked"End IfEnd Function'--------------------------------------------------------------------------------------------------------------------------' Test to see if a particular filter option is onFunction Filter_Is_On(id)If Filter_Checked(id) = "checked" ThenFilter_Is_On = TrueElseFilter_Is_On = FalseEnd IfEnd Function'--------------------------------------------------------------------------------------------------------------------------%><%'------------ RUN BEFORE PAGE RENDER ----------' Default values for Auto Refresh checkbox and edit input boxparam_refreshEnabled = Falseparam_refreshPeriod = "0"' Read the Refresh parameter which is of the form Refresh=<time-period>,ON|OFFDim param_refreshparam_refresh = Request("Refresh")If param_refresh <> "" ThenDim pr_arrpr_arr = Split(param_refresh,",")param_refreshPeriod = pr_arr(0)' Range check and end-stop the refresh period if necessaryIf NiceInt(param_refreshPeriod, 0) < Min_Refresh_Time Thenparam_refreshPeriod = CStr(Min_Refresh_Time)End If' determine checkbox stateIf UBound(pr_arr) >= 1 ThenIf InStr(UCase(pr_arr(1)), "ON") > 0 Thenparam_refreshEnabled = TrueElseparam_refreshEnabled = FalseEnd IfEnd IfEnd If' Read the Inactivity Periodparam_inactivity = NiceInt( Request("Inactivity"), Max_DeltaBuild)If param_inactivity = 0 Then param_inactivity = Max_DeltaBuild' Get indefinite pause statusbIndefinitelyPaused = Indefinitely_Paused()' Populate display controlsbShowProblemDaemonSets = Filter_Is_On("problemBuilds")bShowActiveBuilds = Filter_Is_On("activeBuilds")bShowDisabledDaemons = Filter_Is_On("disabledDaemons")bShowIdleBuilds = Filter_Is_On("idleBuilds")bShowPausedBuilds = Filter_Is_On("pausedBuilds")'----------------------------------------------%><script language="JavaScript" type="text/javascript"><!--//////////////////////////////////////////////////////////////////////////////////////////////////// This function rebuilds the query string so that it either adds or removes the specified project ID from// the HideProj= part of it, whilst leaving the rest of the string intact. The browser location is then// updated and the server made to re-render the page. This function must be used from the project checkboxes// to show/hide daemon status informaton for specific projects.//////////////////////////////////////////////////////////////////////////////////////////////////function toggle_project( proj_id ){var found = false;var new_url_query_string = '';var new_hp_list = '';// get the full query stringvar url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';// split it into each parametervar qs_arr = url_query_string.split('&');var i_qs_arr;for (i_qs_arr in qs_arr){var qs_str = qs_arr[i_qs_arr];if (qs_str.length > 0){// if we have found the HideProj parameterif (qs_str.indexOf('HideProj') >= 0){// Split the HideProj parameter at the = symbol in order to process the comma seperated list of project IDsvar qs_hp_arr;qs_hp_arr = qs_str.split('=');if (qs_hp_arr.length > 1){// Split the comma seperated list of project IDs, and iterate through each itemvar hp_arr = qs_hp_arr[1].split(',');var i_hp_arr;for (i_hp_arr in hp_arr){var hp_str = hp_arr[i_hp_arr];// If the item matches the specified project ID and the checkbox for that project is uncheckedif (hp_str == proj_id){found = true;}else{// retain this other project ID in the listif (new_hp_list != '')new_hp_list += ',';new_hp_list += hp_str;}}}}else{// feed the existing paramter to the new query stringif (new_url_query_string == '')new_url_query_string += '?';elsenew_url_query_string += '&';new_url_query_string += qs_str}}}// If the specified project ID was not found, then that project is not currently hidden// and must now be hidden, so add its number to the list to hide it on the next server side// page render operationif (!found){if (new_hp_list != '')new_hp_list += ',';new_hp_list += proj_id}// Prepare the new query stringif (new_url_query_string == '')new_url_query_string += '\?';elsenew_url_query_string += '\&';new_url_query_string += 'HideProj=';new_url_query_string += new_hp_list;// reload the page with the new query stringvar url = location.pathname + new_url_query_string;window.location.assign(url);}//////////////////////////////////////////////////////////////////////////////////////////////////// This function rebuilds the query string to either hide all projects, or unhide all projects// fromt he display//////////////////////////////////////////////////////////////////////////////////////////////////function toggle_all_projects(bAll){var new_url_query_string = '';var list_proj_ids = '';// If hiding all, then find all of the project enable/disable checkboxes, get the project ID// values from each one and accumulate them into a comma seperated listif (!bAll){var inputs = document.getElementsByTagName('input');var i;for (i = 0; i < inputs.length; i++){var str = inputs[i].name;if (str.indexOf("DIS_PRJ_") >= 0){str = str.replace("DIS_PRJ_","");if (list_proj_ids != '')list_proj_ids += ',' + str;elselist_proj_ids += str;}}}// get the full query stringvar url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';// split it into each parametervar qs_arr = url_query_string.split('&');var i_qs_arr;for (i_qs_arr in qs_arr){var qs_str = qs_arr[i_qs_arr];if (qs_str.length > 0){// if we have found the HideProj parameterif (qs_str.indexOf('HideProj') >= 0){// do nothing}else{// feed the existing paramter to the new query stringif (new_url_query_string == '')new_url_query_string += '?';elsenew_url_query_string += '&';new_url_query_string += qs_str}}}// Prepare the new query string, only adding the HideProj parameter if the function is being// used to hide all projectsif (!bAll){if (new_url_query_string == '')new_url_query_string += '\?';elsenew_url_query_string += '\&';new_url_query_string += 'HideProj=' + list_proj_ids;}// reload the page with the new query stringvar url = location.pathname + new_url_query_string;window.location.assign(url);}//////////////////////////////////////////////////////////////////////////////////////////////////// This function rebuilds the query string so that it either adds or removes the Refresh parameter//////////////////////////////////////////////////////////////////////////////////////////////////function toggle_refresh(){var new_url_query_string = '';// get the full query stringvar url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';// split it into each parametervar qs_arr = url_query_string.split('&');var i_qs_arr;for (i_qs_arr in qs_arr){var qs_str = qs_arr[i_qs_arr];if (qs_str.length > 0){// if we have found the Refresh parameterif (qs_str.indexOf('Refresh') >= 0){// do nothing}else{// feed the existing paramter to the new query stringif (new_url_query_string == '')new_url_query_string += '?';elsenew_url_query_string += '&';new_url_query_string += qs_str}}}// Prepare the new query stringif (new_url_query_string == '')new_url_query_string += '\?';elsenew_url_query_string += '\&';new_url_query_string += 'Refresh=';if (document.getElementById('refreshPeriod').value < <%=Min_Refresh_Time%>){document.getElementById('refreshPeriod').value = <%=Min_Refresh_Time%>;new_url_query_string += <%=Min_Refresh_Time%>;}elsenew_url_query_string += document.getElementById('refreshPeriod').value;if (document.getElementById('autoRefresh').checked)new_url_query_string += ',ON';elsenew_url_query_string += ',OFF';// reload the page with the new query stringvar url = location.pathname + new_url_query_string;window.location.assign(url);}//////////////////////////////////////////////////////////////////////////////////////////////////// This function rebuilds the query string to Update the Inactivity parameter//////////////////////////////////////////////////////////////////////////////////////////////////function toggle_inactivity(){var new_url_query_string = '';// get the full query stringvar url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';// split it into each parameter, then remove the Inactivity parametervar qs_arr = url_query_string.split('&');var qs_join = '?'var i_qs_arr;for (i_qs_arr in qs_arr){var qs_str = qs_arr[i_qs_arr];if (qs_str.length > 0){if (qs_str.indexOf('Inactivity') < 0){// feed the existing paramter to the new query stringnew_url_query_string += qs_join + qs_strqs_join = '&'}}}var value = document.getElementById('inactivity').value;if (value && (value != <%=Max_DeltaBuild%>)){// Prepare the new query stringnew_url_query_string += qs_join + 'Inactivity=' + value;}// reload the page with the new query stringvar url = location.pathname + new_url_query_string;window.location.assign(url);}//////////////////////////////////////////////////////////////////////////////////////////////////// Rebuild the query string and reload the page based on the current setting of the filter// radio buttons//////////////////////////////////////////////////////////////////////////////////////////////////function update_Display_Filter(){var new_url_query_string = '';// get the full query stringvar url_query_string = '<%=Request.ServerVariables("QUERY_STRING")%>';// split it into each parametervar qs_arr = url_query_string.split('&');var i_qs_arr;for (i_qs_arr in qs_arr){var qs_str = qs_arr[i_qs_arr];if (qs_str.length > 0){// if we have found the Display parameterif (qs_str.indexOf('Filter') >= 0){// do nothing}else{// feed the existing paramter to the new query stringif (new_url_query_string == '')new_url_query_string += '?';elsenew_url_query_string += '&';new_url_query_string += qs_str}}}// Prepare the new query stringvar qJoiner;if (new_url_query_string == '')qJoiner = '\?';elseqJoiner = '\&';var joiner = '';var filterSet = '';var items = new Array ("activeBuilds","disabledDaemons","idleBuilds","pausedBuilds","problemBuilds");for (var item in items){if (document.getElementById(items[item]).checked){filterSet += joiner + items[item];joiner = ',';}}if (filterSet.length > 0){new_url_query_string += qJoiner + 'Filter=' + filterSet;}// reload the page with the new query stringvar url = location.pathname + new_url_query_string;window.location.assign(url);}//--></script><%'------------------------------------------------------------------------------Sub SidePanelContent%><!-- Monitoring Options Selection Box ----><fieldset style="padding:3px"><legend class="body_scol">Display Options</legend><fieldset class="body_rowg"><legend class="body_scol">Auto Refresh</legend><div class=nowrap><input name="autoRefresh" id="autoRefresh" type="checkbox" <%If param_refreshEnabled Then%>checked<%End If%> value="1" onclick='toggle_refresh()'><input class="body_txt" style="width:3em" name="refreshPeriod" id="refreshPeriod" type="input" maxlength="3" value="<%=param_refreshPeriod%>" onchange='toggle_refresh()' > Seconds</div></fieldset><fieldset class="body_rowg"><legend class="body_scol">Filter</legend><div><input name="activeBuilds" id="activeBuilds" type="checkbox" <%=Filter_Checked("activeBuilds")%> value="activeBuilds" onclick='update_Display_Filter()'>Active</div><div><input name="idleBuilds" id="idleBuilds" type="checkbox" <%=Filter_Checked("idleBuilds")%> value="idleBuilds" onclick='update_Display_Filter()'>Idle</div><div><input name="pausedBuilds" id="pausedBuilds" type="checkbox" <%=Filter_Checked("pausedBuilds")%> value="paused" onclick='update_Display_Filter()'>Paused</div><div><input name="disabledDaemons" id="disabledDaemons" type="checkbox" <%=Filter_Checked("disabledDaemons")%> value="disabledDaemons" onclick='update_Display_Filter()'>Disabled</div><div class=nowrap><input name="problemBuilds" id="problemBuilds" type="checkbox" <%=Filter_Checked("problemBuilds")%> value="problemBuilds" onclick='update_Display_Filter()'>Problem Daemon Sets</div></fieldset><fieldset class="body_rowg"><legend class="body_scol">Inactivity</legend><input class="body_txt" style="width:3em" name="inactivity" id="inactivity" type="input" maxlength="3" value="<%=param_inactivity%>" onchange='toggle_inactivity()' > Days</fieldset></fieldset><%End Sub'------------------------------------------------------------------------------Sub DisplayProjectHeader(bProjectHeaderDone, eMachine, strProject_checked)If NOT bProjectHeaderDone Then%><tr><td colspan='8'><img src='images/spacer.gif' width='1' height='5'></td></tr><tr><td colspan='8' background='images/bg_rep_line.gif'><img src='images/spacer.gif' width='1' height='5'></td></tr><tr><td nowrap class="body_rowg"><input name='DIS_PRJ_<%=eMachine("PROJ_ID")%>' id='DIS_PRJ_<%=eMachine("PROJ_ID")%>' type='checkbox' value=1 <%=strProject_checked%> onclick=toggle_project(<%=eMachine("PROJ_ID")%>)><a href='rtree.asp?proj_id=<%=eMachine("PROJ_ID")%>'><%=eMachine("PROJ_NAME")%></td><%End IfEnd Sub'------------------------------------------------------------------------------Sub ShowDaemonStatus%><table width="10" class="embedded_table" style="margin-bottom:10px"><tr><td width="100%"><table width="100%" class="embedded_table"><tr><td nowrap class="form_ttl">BUILD DAEMON STATUS INFORMATION</td></tr><%If bIndefinitelyPaused Then%><tr><td><span class='err_alert'><font size='2'><b>WARNING: Indefinite Pause, Build Daemons are all stopped - please contact an administrator</b></font></span></td></tr><%End If%></table></td></tr><tr><td><table class="rounded_box embedded_table" width="100%" ><tr><td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="100"></td><td bgcolor="#FFFFFF" valign="top"><!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ --><!--#include file="messages/_msg_inline.asp"--><!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --><br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Project<input name="NOPRJ" id="NOPRJ" type="Button" value="All" onclick="toggle_all_projects(1)"><input name="NOPRJ" id="NOPRJ" type="Button" value="None" onclick="toggle_all_projects(0)"></td><!-- Status Table Header --><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Release</td><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Release<br>Mode</td><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Daemon<br>Mode</td><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Daemon<br>Host</td><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Daemon<br>State</td><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Building<br>Package</td><td valign="middle" nowrap background="images/bg_table_col.gif" class="body_col">Last Change<br>Delta (secs)</td></tr><!-- Status Table Body --><%Dim bProject_changed ' Signals a row change due to a different projectDim strProject_checked ' Can be "" or "checked". Determines appearance of project enable checkboxDim bRelease_changed ' signals a row change due to a different releaseDim bReleaseHeaderDone ' indicates whether the release name has been rendered yetDim bProjectHeaderDone ' Project Header doneDim bShowAge ' Display age warningDim bToggleStyle ' Data shown so toggle styleDim bShowReleaseSep ' Show Release Seperator' Iterate over all projects, releases and machines'Dim project,release,machineDim eProject,eRelease,eMachineFor Each project in buildStatus' Start of a new ProjectSet eProject = buildStatus.Item(project)bProjectHeaderDone = falsebProject_changed = truebShowReleaseSep = FalseFor Each release in eProject.Item("data")' Start of a new ReleaseSet eRelease = eProject.Item("data").Item(release)bReleaseHeaderDone = FalsebRelease_changed = truebShowAge = eRelease("bShowAge")If bToggleStyle Then Call ToggleStyleNowbToggleStyle = falseFor Each machine in eRelease.Item("data")' Start of a new MachineSet eMachine = eRelease.Item("data").Item(machine)strProject_checked = Is_Project_Checked(eMachine("PROJ_ID"))' Consider displaying the body of this machine entryIf strProject_checked = "checked" ThenIf eRelease.Exists("bDisplay_whole_set") OR eMachine.Exists("bRow_displayed") ThenbToggleStyle = true' Display Project and Release Header - Once, or a fillerIf NOT bReleaseHeaderDone ThenbReleaseHeaderDone = True' Display Project Header - ONCE. The <tr> is openCall DisplayProjectHeader(bProjectHeaderDone,eMachine, strProject_checked)bProjectHeaderDone = TRUE' Display Release seperator, if this is not the first release in the projectIf bShowReleaseSep Then%><tr><td></td><td colspan='7' background='images/bg_rep_line.gif'><img src='images/spacer.gif' width='1' height='1'></td></tr><tr><td></td><%End If' Display the Release Header, with a marker to show aged releases%><td nowrap <%=styleNow%>><a href='build_status.asp?rtag_id=<%=eMachine("RTAG_ID")%>' title='Last Build:<%=eMachine("last_build")%>'><%=eMachine("RTAG_NAME")%></a><%If bShowAge Then%><img src='images/s_warning.gif' width='14' height='13' border='0' title='No Build in this release since <%=eMachine("last_build")%>. [<%=eMachine("last_build_days")%> Days]' style='vertical-align: bottom;'><%End If%></td><%Else%><td nowrap class="body_rowg"></td><td nowrap <%=styleNow%>></td><%End IfbShowReleaseSep = true%><td nowrap <%=styleNow%>><%=Get_Official(eMachine("OFFICIAL"))%></td><td nowrap <%=styleNow%>><%=Get_Daemon_Mode(eMachine("DAEMON_MODE"))%></td><td nowrap <%=styleNow%>><%=eMachine("DISPLAY_NAME")%></td><td nowrap <%=styleNow%>><%=eMachine("dStateText")%></td><td nowrap <%=styleNow%>><%=eMachine("PKG_NAME")%></td><td nowrap <%=styleNow%>><%=PrettyDelta(eMachine("delta"),eMachine("PAUSE"),eMachine("PKG_NAME") )%></td><%End If%></tr><%End If' End of DisplaybRelease_changed = falsebProject_changed = falseNextNextCall DisplayProjectHeader(bProjectHeaderDone,eMachine, strProject_checked)Next%><tr><td><input type="hidden" name="action" value="true"><%=objPMod.ComposeHiddenTags()%></td></tr></table></td><td background="images/lbox_bgside_white.gif"> </td></tr></table></td></tr></table><%End Sub%><html><head><title>Release Manager</title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><%If param_refreshEnabled AND param_RefreshPeriod <> 0 Then%><META HTTP-EQUIV=REFRESH CONTENT=<%=param_RefreshPeriod%>><%End If%><link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css"><link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css"><script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script><!--#include file="_jquery_includes.asp"--><!-- DROPDOWN MENUS --><!--#include file="_menu_def.asp"--><script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0"><!-- HEADER --><!--#include file="_header.asp"--><% getBuildStatus() %><!-- BODY ----><table class="full_table"><tr><td width="146px" class="bg_panel" valign="top"><%Call SidePanelContent%></td><td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF"><%Call ShowDaemonStatus%></td></tr><tr><td class="bg_panel" valign="bottom" align="center" height="350"><img src="images/img_gears.png" vspace="20" hspace="30"></td></tr></table><!-- FOOTER --><!--#include file="_footer.asp"--></body></html>