| Line 24... |
Line 24... |
| 24 |
'------------ Variable Definition -------------
|
24 |
'------------ Variable Definition -------------
|
| 25 |
Dim parFRrtag_id ' Current Release
|
25 |
Dim parFRrtag_id ' Current Release
|
| 26 |
Dim parFRproj_id ' Selected Project
|
26 |
Dim parFRproj_id ' Selected Project
|
| 27 |
Dim hasDaemons ' Current Release Has daemons configured
|
27 |
Dim hasDaemons ' Current Release Has daemons configured
|
| 28 |
Dim importHasDaemons ' Selected Import has daemons configured
|
28 |
Dim importHasDaemons ' Selected Import has daemons configured
|
| - |
|
29 |
Dim sMessage, sMessageType
|
| 29 |
|
30 |
Dim bCanImport
|
| - |
|
31 |
Dim bReleaseSelected
|
| 30 |
'------------ Constants Declaration -----------
|
32 |
'------------ Constants Declaration -----------
|
| 31 |
'------------ Variable Init -------------------
|
33 |
'------------ Variable Init -------------------
|
| 32 |
parFRrtag_id = QStrPar("FRrtag_id")
|
34 |
parFRrtag_id = QStrPar("FRrtag_id")
|
| 33 |
parFRproj_id = QStrPar("FRproj_id")
|
35 |
parFRproj_id = QStrPar("FRproj_id")
|
| 34 |
|
36 |
sMessage = NULL
|
| - |
|
37 |
sMessageType = 3
|
| - |
|
38 |
bCanImport = TRUE
|
| 35 |
If parFRproj_id = "" Then parFRproj_id = -1
|
39 |
If parFRproj_id = "" Then parFRproj_id = -1
|
| - |
|
40 |
If parFRrtag_id = "" Then parFRrtag_id = -1
|
| 36 |
'----------------------------------------------
|
41 |
'----------------------------------------------
|
| 37 |
%>
|
42 |
%>
|
| 38 |
<%
|
43 |
<%
|
| - |
|
44 |
'------------------------------------------------------------------------------------------------------------------------------------------
|
| - |
|
45 |
'
|
| - |
|
46 |
' Add a line of text to the System Message
|
| - |
|
47 |
'
|
| - |
|
48 |
Sub sMessageAdd(eLevel, text)
|
| - |
|
49 |
If NOT isNull(sMessage) Then
|
| - |
|
50 |
sMessage = sMessage & "<br>"
|
| - |
|
51 |
End If
|
| - |
|
52 |
sMessage = sMessage & text
|
| - |
|
53 |
|
| - |
|
54 |
If eLevel < sMessageType Then
|
| - |
|
55 |
sMessageType = eLevel
|
| - |
|
56 |
End If
|
| - |
|
57 |
End Sub
|
| 39 |
'--------------------------------------------------------------------------------------------------------------------------
|
58 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 40 |
Sub Get_ProjectList ( nProjId )
|
59 |
Sub Get_ProjectList ( nProjId )
|
| 41 |
Dim rsQry,tempLINK
|
60 |
Dim rsQry,tempLINK
|
| 42 |
|
61 |
|
| 43 |
OraDatabase.Parameters.Add "PROJ_ID", nProjId, ORAPARM_INPUT, ORATYPE_NUMBER
|
62 |
OraDatabase.Parameters.Add "PROJ_ID", nProjId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 44 |
|
63 |
|
| 45 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ProjectsCombo.sql"), ORADYN_DEFAULT )
|
64 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ProjectsCombo.sql"), ORADYN_DEFAULT )
|
| 46 |
|
65 |
|
| 47 |
If NOT ((NOT rsQry.BOF) AND (NOT rsQry.EOF) ) Then
|
66 |
If NOT ((NOT rsQry.BOF) AND (NOT rsQry.EOF) ) Then
|
| 48 |
If (nProjId > 0) Then
|
67 |
If (nProjId > 0) Then
|
| 49 |
Err.Raise 8, "Sub Get_ProjectList", "Empty record set returned. nProjId="& nProjId
|
68 |
Response.write "No Projects found"
|
| 50 |
End If
|
69 |
End If
|
| - |
|
70 |
Else
|
| - |
|
71 |
Response.write "<select name='FRproj_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
|
| - |
|
72 |
Response.write "<option value=''>Select Project</option>"
|
| - |
|
73 |
While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
|
| - |
|
74 |
tempLINK = scriptName &"?FRproj_id="& rsQry.Fields("proj_id") & "&"& objPMod.ComposeURL()
|
| - |
|
75 |
Response.write "<option value='"& tempLINK &"'" &rsQry.Fields("SELECTED") &">"& (rsQry.Fields("proj_name")) &"</option>"
|
| - |
|
76 |
rsQry.MoveNext
|
| - |
|
77 |
WEnd
|
| - |
|
78 |
Response.write "</select>"
|
| - |
|
79 |
|
| - |
|
80 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
| - |
|
81 |
rsQry.Close
|
| - |
|
82 |
Set rsQry = Nothing
|
| 51 |
End If
|
83 |
End If
|
| 52 |
|
- |
|
| 53 |
Response.write "<select name='FRproj_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
|
- |
|
| 54 |
Response.write "<option value=''>Select Project</option>"
|
- |
|
| 55 |
While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
|
- |
|
| 56 |
tempLINK = scriptName &"?FRproj_id="& rsQry.Fields("proj_id") & "&"& objPMod.ComposeURL()
|
- |
|
| 57 |
Response.write "<option value='"& tempLINK &"'" &rsQry.Fields("SELECTED") &">"& (rsQry.Fields("proj_name")) &"</option>"
|
- |
|
| 58 |
rsQry.MoveNext
|
- |
|
| 59 |
WEnd
|
- |
|
| 60 |
Response.write "</select>"
|
- |
|
| 61 |
|
- |
|
| 62 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
- |
|
| 63 |
rsQry.Close
|
- |
|
| 64 |
Set rsQry = Nothing
|
- |
|
| 65 |
|
- |
|
| 66 |
End Sub
|
84 |
End Sub
|
| 67 |
|
85 |
|
| 68 |
'--------------------------------------------------------------------------------------------------------------------------
|
86 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 69 |
Sub Get_ReleaseList ( nProjId, nRtagId )
|
87 |
Sub Get_ReleaseList ( nProjId, nRtagId )
|
| 70 |
Dim rsQry,tempLINK
|
88 |
Dim rsQry,tempLINK
|
| Line 72... |
Line 90... |
| 72 |
OraDatabase.Parameters.Add "PROJ_ID", nProjId, ORAPARM_INPUT, ORATYPE_NUMBER
|
90 |
OraDatabase.Parameters.Add "PROJ_ID", nProjId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 73 |
OraDatabase.Parameters.Add "RTAG_ID", nRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
91 |
OraDatabase.Parameters.Add "RTAG_ID", nRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 74 |
|
92 |
|
| 75 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleasesCombo.sql"), ORADYN_DEFAULT )
|
93 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery("ReleasesCombo.sql"), ORADYN_DEFAULT )
|
| 76 |
|
94 |
|
| - |
|
95 |
bReleaseSelected = FALSE
|
| 77 |
If NOT ((NOT rsQry.BOF) AND (NOT rsQry.EOF) ) Then
|
96 |
If NOT ((NOT rsQry.BOF) AND (NOT rsQry.EOF) ) Then
|
| 78 |
If (nProjId > 0) Then
|
97 |
If (nProjId > 0) Then
|
| 79 |
Err.Raise 8, "Sub Get_ReleaseList", "Empty record set returned. nProjId="& nProjId
|
98 |
Response.write "No Releases in this project"
|
| 80 |
End If
|
99 |
End If
|
| 81 |
End If
|
100 |
Else
|
| 82 |
|
- |
|
| 83 |
Response.write "<select name='FRrtag_id' onChange=""MM_jumpMenu('parent',this,0)"" class='form_item'>"
|
101 |
Response.write "<select name='FRrtag_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
|
| 84 |
Response.write "<option value=''>Select Release</option>"
|
102 |
Response.write "<option value=''>Select Release</option>"
|
| 85 |
While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
|
103 |
While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))
|
| 86 |
tempLINK = scriptName & "?FRproj_id="& nProjId &"&FRrtag_id="& rsQry.Fields("rtag_id") & "&"& objPMod.ComposeURL()
|
104 |
tempLINK = scriptName & "?FRproj_id="& nProjId &"&FRrtag_id="& rsQry.Fields("rtag_id") & "&"& objPMod.ComposeURL()
|
| 87 |
Response.write "<option value='"& tempLINK &"'" &rsQry.Fields("SELECTED") &">"& (rsQry.Fields("rtag_name")) &"</option>"
|
105 |
Response.write "<option value='"& tempLINK &"'" &rsQry.Fields("SELECTED") &">"& (rsQry.Fields("rtag_name")) &"</option>"
|
| - |
|
106 |
|
| - |
|
107 |
If rsQry.Fields("SELECTED") <> "" Then
|
| - |
|
108 |
bReleaseSelected = TRUE
|
| - |
|
109 |
End If
|
| 88 |
rsQry.MoveNext
|
110 |
rsQry.MoveNext
|
| 89 |
WEnd
|
111 |
WEnd
|
| 90 |
Response.write "</select>"
|
112 |
Response.write "</select>"
|
| 91 |
|
113 |
|
| 92 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
114 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 93 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
115 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
| 94 |
|
116 |
|
| 95 |
rsQry.Close
|
117 |
rsQry.Close
|
| 96 |
Set rsQry = Nothing
|
118 |
Set rsQry = Nothing
|
| - |
|
119 |
End If
|
| 97 |
End Sub
|
120 |
End Sub
|
| 98 |
|
121 |
|
| 99 |
'--------------------------------------------------------------------------------------------------------------------------
|
122 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 100 |
Function check_for_daemons(nRtagId, DefVal)
|
123 |
Function check_for_daemons(nRtagId, DefVal)
|
| 101 |
Dim sqlStr, rsQry
|
124 |
Dim sqlStr, rsQry
|
| Line 145... |
Line 168... |
| 145 |
OraDatabase.Parameters.Remove "TORTAG_ID"
|
168 |
OraDatabase.Parameters.Remove "TORTAG_ID"
|
| 146 |
OraDatabase.Parameters.Remove "USER_ID"
|
169 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 147 |
|
170 |
|
| 148 |
|
171 |
|
| 149 |
If objEH.Finally Then
|
172 |
If objEH.Finally Then
|
| 150 |
Response.Redirect("build_status.asp?rtag_id="& NDstRtag_id )
|
173 |
OpenInParentWindow("build_status.asp?rtag_id="& NDstRtag_id )
|
| - |
|
174 |
Response.End
|
| 151 |
End If
|
175 |
End If
|
| 152 |
|
176 |
|
| 153 |
Else
|
177 |
Else
|
| 154 |
Response.write "Some mandatory parameters are missing!" & "<br>" 'TODO
|
178 |
Call sMessageAdd( 1, "Internal: Some mandatory parameters are missing!<br>" & QSTR_FullQuery )
|
| - |
|
179 |
parFRproj_id = -1
|
| 155 |
Response.write QSTR_FullQuery
|
180 |
parFRrtag_id = -1
|
| 156 |
End If
|
181 |
End If
|
| 157 |
End Sub
|
182 |
End Sub
|
| 158 |
'--------------------------------------------------------------------------------------------------------------------------
|
183 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 159 |
%>
|
184 |
%>
|
| 160 |
<%
|
185 |
<%
|
| 161 |
'Process submition
|
186 |
'Process submition
|
| 162 |
If CBool(QStrPar("action")) Then
|
187 |
If CBool(QStrPar("action")) Then
|
| 163 |
Call importDaemons(Request.Form("FromRtag_id"),Request("rtag_id"))
|
188 |
Call importDaemons(Request.Form("FromRtag_id"),Request("rtag_id"))
|
| 164 |
Call CloseWindow
|
- |
|
| 165 |
Response.Write "Debug. End of Processing"
|
- |
|
| 166 |
Response.End
|
- |
|
| 167 |
End If
|
189 |
End If
|
| 168 |
|
190 |
|
| 169 |
' Run before render
|
191 |
' Run before render
|
| 170 |
hasDaemons = check_for_daemons(Request("rtag_id"), False)
|
192 |
hasDaemons = check_for_daemons(Request("rtag_id"), False)
|
| 171 |
importHasDaemons = check_for_daemons(parFRrtag_id, True)
|
193 |
importHasDaemons = check_for_daemons(parFRrtag_id, True)
|
| - |
|
194 |
|
| - |
|
195 |
If hasDaemons Then
|
| - |
|
196 |
Call sMessageAdd( 2, "The current release already has build daemons configured. It is not possible to import a daemon configuration into this release.")
|
| - |
|
197 |
bCanImport = FALSE
|
| - |
|
198 |
ElseIf NOT importHasDaemons AND (parFRrtag_id > 0) Then
|
| - |
|
199 |
Call sMessageAdd(2, "No Daemons in this Release to be imported")
|
| - |
|
200 |
bCanImport = FALSE
|
| - |
|
201 |
End If
|
| 172 |
%>
|
202 |
%>
|
| 173 |
<html>
|
203 |
<html>
|
| 174 |
<head>
|
204 |
<head>
|
| 175 |
<title>Release Manager</title>
|
205 |
<title>Release Manager</title>
|
| 176 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
206 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
| Line 179... |
Line 209... |
| 179 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
209 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
| 180 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
210 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
| 181 |
<script language="JavaScript" src="images/common.js"></script>
|
211 |
<script language="JavaScript" src="images/common.js"></script>
|
| 182 |
</head>
|
212 |
</head>
|
| 183 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
213 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
| 184 |
<form name="importrel" method="post" action="<%=scriptName%>">
|
214 |
<form class="form_tight" name="importrel" method="post" action="<%=scriptName%>">
|
| 185 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
215 |
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
| 186 |
<tr>
|
- |
|
| 187 |
<td background="images/lbox_bg_orange.gif" width="1%" height="1%"><img src="images/i_change_group_off.gif" width="22" height="25" hspace="5"></td>
|
- |
|
| 188 |
<td background="images/lbox_bg_blue.gif" nowrap width="50%" class="wform_ttl">Import Daemon Configuration</td>
|
- |
|
| 189 |
<td background="images/lbox_bg_blue.gif" align="right" width="50%">
|
- |
|
| 190 |
<%If (NOT hasDaemons) AND (importHasDaemons) Then %>
|
- |
|
| 191 |
<input type="submit" name="btn" value="Import" class="form_btn_comp" onClick="MM_validateForm('FRproj_id','Project','R','FRrtag_id','Release','R');return document.MM_returnValue">
|
- |
|
| 192 |
<%End If%>
|
- |
|
| 193 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="self.close()">
|
- |
|
| 194 |
</td>
|
- |
|
| 195 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%%" nowrap>
|
- |
|
| 196 |
<img src="images/h_trsp_dot.gif" width="5" height="22"> </td>
|
- |
|
| 197 |
</tr>
|
- |
|
| 198 |
<tr>
|
216 |
<tr>
|
| 199 |
<td height="100%" width="1%"> </td>
|
- |
|
| 200 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
217 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
| - |
|
218 |
<!-- LOCAL MESSAGES ++++++++++++++++++++++++++++++++++++++++++++ -->
|
| - |
|
219 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
| - |
|
220 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| - |
|
221 |
<!--#include file="messages/_msg_inline.asp"-->
|
| 201 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
222 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
| 202 |
<tr>
|
223 |
<tr>
|
| 203 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
- |
|
| 204 |
<td width="1%" nowrap class="form_group" valign="bottom"></td>
|
- |
|
| 205 |
<td width="100%" class="form_txt">
|
224 |
<td width="100%" class="form_txt" colspan="2">
|
| 206 |
<%If hasDaemons Then %>
|
- |
|
| 207 |
<%=enum_imgWarning%>
|
- |
|
| 208 |
The current release already has build daemons configured. It is not possible to import a daemon
|
- |
|
| 209 |
configuration into this release.
|
- |
|
| 210 |
<%End If%>
|
- |
|
| 211 |
</td>
|
225 |
</td>
|
| 212 |
</tr>
|
226 |
</tr>
|
| 213 |
<tr>
|
227 |
<tr>
|
| 214 |
<td width="1%"> </td>
|
- |
|
| 215 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Project</td>
|
228 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Project</td>
|
| 216 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
229 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
| 217 |
<%Call Get_ProjectList ( parFRproj_id )%>
|
230 |
<%Call Get_ProjectList ( parFRproj_id )%>
|
| 218 |
</td>
|
231 |
</td>
|
| 219 |
</tr>
|
232 |
</tr>
|
| 220 |
<tr>
|
233 |
<tr>
|
| 221 |
<td width="1%"> </td>
|
- |
|
| 222 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Release</td>
|
234 |
<td width="1%" nowrap class="form_field" background="images/bg_form_lightbluedark.gif">Release</td>
|
| 223 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
235 |
<td nowrap width="100%" background="images/bg_form_lightbluedark.gif" class="form_txt">
|
| 224 |
<%Call Get_ReleaseList ( parFRproj_id, parFRrtag_id )%>
|
236 |
<%Call Get_ReleaseList ( parFRproj_id, parFRrtag_id )%>
|
| 225 |
<%
|
- |
|
| 226 |
If NOT importHasDaemons Then
|
- |
|
| 227 |
Response.Write enum_imgWarning & " No Daemons in this Release to be imported"
|
- |
|
| 228 |
End If
|
- |
|
| 229 |
%>
|
- |
|
| 230 |
|
- |
|
| 231 |
<input type="hidden" name="rtag_id" value="<%=Request("rtag_id")%>">
|
237 |
<input type="hidden" name="rtag_id" value="<%=Request("rtag_id")%>">
|
| 232 |
<input type="hidden" name="FromRtag_id" value="<%=parFRrtag_id%>">
|
238 |
<input type="hidden" name="FromRtag_id" value="<%=parFRrtag_id%>">
|
| 233 |
<input type="hidden" name="action" value="true">
|
239 |
<input type="hidden" name="action" value="true">
|
| 234 |
</td>
|
240 |
</td>
|
| 235 |
</tr>
|
241 |
</tr>
|
| 236 |
<tr>
|
242 |
<tr>
|
| 237 |
<td width="1%"> </td>
|
- |
|
| 238 |
<td width="1%" nowrap class="form_field"><img src="images/h_trsp_dot.gif" width="100" height="10"></td>
|
- |
|
| 239 |
<td width="100%" class="form_txt">
|
243 |
<td width="100%" class="form_txt" colspan="2">
|
| 240 |
<p>Import the build daemon configuration from another release.
|
244 |
<p>Import the build daemon configuration from another release.
|
| 241 |
</p>
|
245 |
</p>
|
| 242 |
</td>
|
246 |
</td>
|
| 243 |
</tr>
|
247 |
</tr>
|
| 244 |
</table>
|
248 |
</table>
|
| 245 |
</td>
|
249 |
</td>
|
| 246 |
</tr>
|
250 |
</tr>
|
| 247 |
<tr>
|
251 |
<tr>
|
| - |
|
252 |
<td><%=ProgressBar()%></td>
|
| - |
|
253 |
<td align="right">
|
| - |
|
254 |
<%If bCanImport AND bReleaseSelected Then %>
|
| - |
|
255 |
<input type="submit" name="btn" value="Import" class="form_btn_comp" onClick="MM_validateForm('FRproj_id','Project','R','FRrtag_id','Release','R');return document.MM_returnValue">
|
| - |
|
256 |
<%Else%>
|
| 248 |
<td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
257 |
<input type="submit" name="btn" value="Import" class="form_btn_comp_disabled" >
|
| - |
|
258 |
<%End If%>
|
| 249 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
259 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
|
| - |
|
260 |
</td>
|
| 250 |
</tr>
|
261 |
</tr>
|
| 251 |
</table>
|
262 |
</table>
|
| 252 |
</form>
|
263 |
</form>
|
| 253 |
</body>
|
264 |
</body>
|
| 254 |
</html>
|
265 |
</html>
|