1
- <span>
1
+ <script type="text/javascript">
2
+ $(function(){
3
+ $('#parameterCheck').dialog({
4
+ autoOpen:false,
5
+ modal:true,
6
+ title:'$translations.Translate("Project Parameters")',
7
+ width:400,
8
+ height:300,
9
+ overlay:{
10
+ opacity:0.5,
11
+ background:'black'
12
+ }
13
+ });
14
+ #if ($wholeFarm)
15
+ var sortList = [[0,0],[1,0]];
16
+ #else
17
+ var sortList = [[0,0]];
18
+ #end
19
+ $('#StatusGrid').initialiseProjectGrid({
20
+ sortList:sortList
21
+ });
22
+ });
23
+ </script>
24
+ <div id="parameterCheck" style="display:none;">
25
+ <div id="parameterEditor">$translations.Translate("Loading parameters, please wait...")</div>
26
+ </div>
27
+ <form id="RefreshForm"
28
+ method="post">
29
+ <table width="100%">
30
+ <tr>
31
+ <td align="right">
32
+ <input type="submit"
33
+ align="right"
34
+ name="Refresh"
35
+ value="$translations.Translate("Refresh status")" />
36
+ </td>
37
+ </tr>
38
+ </table>
39
+ </form>
40
+
41
+ #if ($forceBuildMessage.Length > 0)
42
+ <P>
43
+ <span id="StatusLabel">
44
+ <b>
45
+ <font color="#4A3C8C">$translations.Translate($forceBuildMessage)</font>
46
+ </b>
47
+ </span>
48
+ </P>
49
+ #end
50
+
51
+ <span>
2
52
<div style="margin-bottom: 5px; text-align: right">
3
- <a id="showAll" style="cursor:pointer;color:blue; text-decoration:underline;" onclick="$('.showLink').hide(); $('.hideLink').show(); $('.statusTable').show()">$translations.Translate("Show All")</a>
4
- <a id="hideAll" style="margin-right:25px;cursor:pointer;color:blue; text-decoration:underline;" onclick="$('.showLink').show(); $('.hideLink').hide(); $('.statusTable').hide()">$translations.Translate("Hide All")</a>
53
+ <a id="showAll" style="cursor:pointer;color:blue; text-decoration:underline;" onclick="$('.showLink').hide(); $('.hideLink').show(); $('.statusTable').show()">$translations.Translate("Show All")</a>
54
+ <a id="hideAll" style="margin-right:25px;cursor:pointer;color:blue; text-decoration:underline;" onclick="$('.showLink').show(); $('.hideLink').hide(); $('.statusTable').hide()">$translations.Translate("Hide All")</a>
5
55
</div>
6
56
#set ($categoryId = 0)
7
57
#foreach ($category in $categories)
8
- #set ($categoryId = $categoryId + 1)
9
- <div style="padding: 1px; background: white;"></div>
10
- <div style="padding: 5px; margin-right: 0.5px; background: $category.CategoryColor; color: white;">
11
- <span style="font-size: 150%; font-weight: bold; font-family: verdana,helvetica,arial,san-serif;">$category.Name</span>
12
- <span>
13
- <a id="showGrid$categoryId" class="showLink"
14
- style="color: white; text-decoration: underline; cursor: pointer; #if( $category.Display) display: none; #end"
15
- onclick="$('#showGrid$categoryId').hide(); $('#hideGrid$categoryId').show(); $('#statusGrid$categoryId').show()">$translations.Translate("show")</a>
16
- <a id="hideGrid$categoryId" class="hideLink"
17
- style="color: white; text-decoration: underline; cursor: pointer; #if( !$category.Display) display: none; #end"
18
- onclick="$('#showGrid$categoryId').show(); $('#hideGrid$categoryId').hide(); $('#statusGrid$categoryId').hide()">$translations.Translate("hide")</a>
19
- </span>
20
- </div>
58
+ #set ($categoryId = $categoryId + 1)
59
+ <div style="padding: 1px; background: white;"></div>
60
+ <div style="padding: 5px; margin-right: 0.5px; background: $category.CategoryColor; color: white;">
61
+ <span style="font-size: 150%; font-weight: bold; font-family: verdana,helvetica,arial,san-serif;">$category.Name</span>
62
+ <span>
63
+ <a id="showGrid$categoryId" class="showLink"
64
+ style="color: white; text-decoration: underline; cursor: pointer; #if( $category.Display) display: none; #end"
65
+ onclick="$('#showGrid$categoryId').hide(); $('#hideGrid$categoryId').show(); $('#statusGrid$categoryId').show()">$translations.Translate("show")</a>
66
+ <a id="hideGrid$categoryId" class="hideLink"
67
+ style="color: white; text-decoration: underline; cursor: pointer; #if( !$category.Display) display: none; #end"
68
+ onclick="$('#showGrid$categoryId').show(); $('#hideGrid$categoryId').hide(); $('#statusGrid$categoryId').hide()">$translations.Translate("hide")</a>
69
+ </span>
70
+ </div>
21
71
22
- <table id="statusGrid$categoryId" class="SortableGrid statusTable"
72
+ <table id="statusGrid$categoryId" class="SortableGrid statusTable"
23
73
style="#if( !$category.Display) display: none; #end ">
24
- <thead>
25
- <tr class="ProjectGridHeader">
26
- <th class="left">$translations.Translate("Server")</th>
27
- <th class="left">$translations.Translate("Project Name")</th>
28
- <th>$translations.Translate("Last Build Status")</th>
29
- <th>$translations.Translate("Last Build Time")</th>
30
- <th>$translations.Translate("Next Build Time")</th>
31
- <th>$translations.Translate("Last Build Label")</th>
32
- <th>$translations.Translate("CCNet Status")</th>
33
- <th>$translations.Translate("Activity")</th>
34
- <th class="{sorter:false}">$translations.Translate("Messages")</th>
35
- <th class="{sorter:false}">$translations.Translate("Admin")</th>
36
- </tr>
37
- </thead>
38
- #foreach ($row in $category.Rows)
39
- <tr>
40
- <td>$row.ServerName</td>
41
- <td>
42
- <a href="$row.Url" title="$row.Description">$row.Name</a>
43
- </td>
44
- <td class="$row.BuildStatusHtmlColor">$translations.Translate($row.BuildStatus)</td>
45
- <td>$translations.Translate($row.LastBuildDate)</td>
46
- <td>$translations.Translate($row.NextBuildTime)</td>
47
- <td>$row.LastBuildLabel</td>
48
- <td class="status$row.Status">$translations.Translate($row.Status)</td>
49
- <td class="activity$row.Activity">$translations.Translate($row.Activity.ToString())</td>
50
- <td>
51
- <ul>
52
- #if ($row.Breakers.Length > 0)
53
- <li>$translations.Translate("Breakers : {0}", $row.Breakers)</li>
54
- #end
55
- #if ($row.Fixer.Length > 0)
56
- <li>$row.Fixer</li>
57
- #end
58
- #if ($row.FailingTasks.Length > 0)
59
- <li>$translations.Translate("Failing Tasks : {0}", $row.FailingTasks)</li>
60
- #end
61
- </ul>
62
- </td>
63
- <td>
64
- <form method="post" style="margin-bottom:0px;">
65
- <input type="hidden" name="projectName" value="$row.Name" />
66
- <input type="hidden" name="serverName" value="$row.ServerName" />
67
- <font color="Black">
68
- #if ($row.allowForceBuild)
69
- #if($row.ForceAbortBuildButtonValue == "Force")
70
- <input type="button"
71
- name="$row.ForceAbortBuildButtonName"
72
- value="$translations.Translate($row.ForceAbortBuildButtonValue)"
73
- onclick="checkForParams(this, '$row.ParametersUrl')"/>
74
- #else
75
- <input type="submit"
76
- name="$row.ForceAbortBuildButtonName"
77
- value="$translations.Translate($row.ForceAbortBuildButtonValue)"/>
78
- #end
79
- #end
80
- #if ($row.AllowStartStopBuild)
81
- <input type="submit"
82
- name="$row.StartStopButtonName"
83
- value="$translations.Translate($row.StartStopButtonValue)"/>
84
- #end
85
- </font>
86
- </form>
87
- </td>
88
- </tr>
89
- #end
74
+ <thead>
75
+ <tr class="ProjectGridHeader">
76
+ <th class="left">$translations.Translate("Server")</th>
77
+ <th class="left">$translations.Translate("Project Name")</th>
78
+ <th>$translations.Translate("Last Build Status")</th>
79
+ <th>$translations.Translate("Last Build Time")</th>
80
+ <th>$translations.Translate("Next Build Time")</th>
81
+ <th>$translations.Translate("Last Build Label")</th>
82
+ <th>$translations.Translate("CCNet Status")</th>
83
+ <th>$translations.Translate("Activity")</th>
84
+ <th class="{sorter:false}">$translations.Translate("Messages")</th>
85
+ <th class="{sorter:false}">$translations.Translate("Admin")</th>
86
+ </tr>
87
+ </thead>
88
+ #foreach ($row in $category.Rows)
89
+ <tr>
90
+ <td>$row.ServerName</td>
91
+ <td><a href="$row.Url" title="$row.Description">$row.Name</a></td>
92
+ <td class="$row.BuildStatusHtmlColor">$translations.Translate($row.BuildStatus)</td>
93
+ <td>$translations.Translate($row.LastBuildDate)</td>
94
+ <td>$translations.Translate($row.NextBuildTime)</td>
95
+ <td>$row.LastBuildLabel</td>
96
+ <td class="status$row.Status">$translations.Translate($row.Status)</td>
97
+ <td class="activity$row.Activity">$translations.Translate($row.Activity.ToString())</td>
98
+ <td>
99
+ <ul>
100
+ #if ($row.Breakers.Length > 0)
101
+ <li>$translations.Translate("Breakers : {0}", $row.Breakers)</li>
102
+ #end
103
+ #if ($row.Fixer.Length > 0)
104
+ <li>$row.Fixer</li>
105
+ #end
106
+ #if ($row.FailingTasks.Length > 0)
107
+ <li>$translations.Translate("Failing Tasks : {0}", $row.FailingTasks)</li>
108
+ #end
109
+ </ul>
110
+ </td>
111
+ <td>
112
+ <form method="post" style="margin-bottom:0px;">
113
+ <input type="hidden" name="projectName" value="$row.Name" />
114
+ <input type="hidden" name="serverName" value="$row.ServerName" />
115
+ <font color="Black">
116
+ #if ($row.allowForceBuild)
117
+ #if($row.ForceAbortBuildButtonValue == "Force")
118
+ <input type="button"
119
+ name="$row.ForceAbortBuildButtonName"
120
+ value="$translations.Translate($row.ForceAbortBuildButtonValue)"
121
+ onclick="checkForParams(this, '$row.ParametersUrl')"/>
122
+ #else
123
+ <input type="submit"
124
+ name="$row.ForceAbortBuildButtonName"
125
+ value="$translations.Translate($row.ForceAbortBuildButtonValue)"/>
126
+ #end
127
+ #end
128
+ #if ($row.AllowStartStopBuild)
129
+ <input type="submit"
130
+ name="$row.StartStopButtonName"
131
+ value="$translations.Translate($row.StartStopButtonValue)"/>
132
+ #end
133
+ </font>
134
+ </form>
135
+ </td>
136
+ </tr>
137
+ #end
90
138
</table>
91
- #end
139
+ #end
92
140
</span>
0 commit comments