| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
| 129 |
ghuddy |
5 |
'| wAddDaemon |
|
| 119 |
ghuddy |
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/conf.asp"-->
|
|
|
14 |
<!--#include file="common/globals.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/qstr.asp"-->
|
|
|
17 |
<!--#include file="common/common_subs.asp"-->
|
|
|
18 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
<%
|
|
|
22 |
'------------ ACCESS CONTROL ------------------
|
|
|
23 |
%>
|
|
|
24 |
<!--#include file="_access_control_general.asp"-->
|
|
|
25 |
<!--#include file="_access_control_login.asp"-->
|
|
|
26 |
<%
|
|
|
27 |
'------------ VARIABLE DEFINITION -------------
|
|
|
28 |
Dim rsQry, healthTag, cmdInterface, pkgOwner, isInterface, package, procDesc
|
|
|
29 |
Dim sMessage
|
|
|
30 |
Dim GBE_MACHTYPE
|
|
|
31 |
Dim Query_String
|
|
|
32 |
Dim RecordCount
|
| 129 |
ghuddy |
33 |
Dim daemon_hostname
|
| 161 |
iaugusti |
34 |
Dim bmcon_id
|
| 129 |
ghuddy |
35 |
Dim gbe_id
|
| 161 |
iaugusti |
36 |
Dim gbe_value
|
| 129 |
ghuddy |
37 |
Dim daemon_mode
|
| 119 |
ghuddy |
38 |
Dim gbe_buildfilter
|
|
|
39 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
40 |
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
|
|
|
41 |
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
|
|
|
42 |
Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"
|
|
|
43 |
'------------ VARIABLE INIT -------------------
|
|
|
44 |
sMessage = NULL
|
|
|
45 |
|
|
|
46 |
parRtag_id = Request("rtag_id")
|
|
|
47 |
|
|
|
48 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
49 |
'------------ CONDITIONS ----------------------
|
|
|
50 |
'----------------------------------------------
|
|
|
51 |
%>
|
|
|
52 |
<%
|
|
|
53 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 161 |
iaugusti |
54 |
Function GetMachHost (abmcon_id)
|
| 129 |
ghuddy |
55 |
Dim rsQry, query
|
|
|
56 |
|
| 161 |
iaugusti |
57 |
OraDatabase.Parameters.Add "bmcon_id", abmcon_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 129 |
ghuddy |
58 |
|
| 161 |
iaugusti |
59 |
query = "SELECT bm.bmcon_id,display_name, gbe_value, COALESCE(SUBSTR(description,1,INSTR(description,CHR(10),1,1)),description) as description, DECODE(:bmcon_id, bm.bmcon_id, 'selected', NULL) AS SELECTED" &_
|
|
|
60 |
" FROM build_machine_config bm, gbe_machtype gb WHERE bm.gbe_id = gb.gbe_id order by bm.display_name"
|
| 129 |
ghuddy |
61 |
|
|
|
62 |
Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
|
|
|
63 |
If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
|
| 161 |
iaugusti |
64 |
GetMachHost = rsQry.GetRows()
|
| 129 |
ghuddy |
65 |
Else
|
| 161 |
iaugusti |
66 |
GetMachHost = NULL
|
| 129 |
ghuddy |
67 |
End If
|
|
|
68 |
|
|
|
69 |
rsQry.Close()
|
|
|
70 |
Set rsQry = Nothing
|
|
|
71 |
|
| 161 |
iaugusti |
72 |
OraDatabase.Parameters.Remove "display_name"
|
| 119 |
ghuddy |
73 |
End Function
|
| 161 |
iaugusti |
74 |
|
| 119 |
ghuddy |
75 |
'--------------------------------------------------------------------------------------------------------------------------
|
|
|
76 |
%>
|
|
|
77 |
<%
|
|
|
78 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
If CBool(Request("action")) Then
|
|
|
82 |
|
| 129 |
ghuddy |
83 |
If Request("rcon_id") <> "" Then
|
| 119 |
ghuddy |
84 |
|
| 129 |
ghuddy |
85 |
OraDatabase.Parameters.Add "RCON_ID", Request("rcon_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| 161 |
iaugusti |
86 |
OraDatabase.Parameters.Add "BMCON_ID", Request("bmcon_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
87 |
OraDatabase.Parameters.Add "DAEMON_MODE", Request("daemon_mode"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
88 |
OraDatabase.Parameters.Add "GBE_BUILDFILTER", Request("gbe_buildfilter"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 119 |
ghuddy |
89 |
|
| 129 |
ghuddy |
90 |
objEH.TryORA ( OraSession )
|
|
|
91 |
On Error Resume Next
|
| 119 |
ghuddy |
92 |
|
| 129 |
ghuddy |
93 |
OraDatabase.ExecuteSQL _
|
| 161 |
iaugusti |
94 |
"BEGIN PK_BUILDAPI.UPDATE_DAEMON_CONFIG(:RCON_ID, :BMCON_ID, :DAEMON_MODE, :GBE_BUILDFILTER); END;"
|
| 129 |
ghuddy |
95 |
OraSession.CommitTrans
|
| 119 |
ghuddy |
96 |
|
| 129 |
ghuddy |
97 |
objEH.CatchORA ( OraSession )
|
| 119 |
ghuddy |
98 |
|
| 129 |
ghuddy |
99 |
OraDatabase.Parameters.Remove "RCON_ID"
|
| 161 |
iaugusti |
100 |
OraDatabase.Parameters.Remove "BMCON_ID"
|
|
|
101 |
OraDatabase.Parameters.Remove "DAEMON_MODE"
|
| 129 |
ghuddy |
102 |
OraDatabase.Parameters.Remove "GBE_BUILDFILTER"
|
|
|
103 |
|
|
|
104 |
If objEH.Finally Then
|
|
|
105 |
Call OpenInParentWindow ("release_config.asp?rtag_id="&parRtag_id)
|
|
|
106 |
Call CloseWindow()
|
|
|
107 |
End If
|
|
|
108 |
|
|
|
109 |
rsQry.Close
|
|
|
110 |
Set rsQry = nothing
|
|
|
111 |
|
|
|
112 |
Else
|
|
|
113 |
OraDatabase.Parameters.Add "RTAG_ID", Request("rtag_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| 161 |
iaugusti |
114 |
OraDatabase.Parameters.Add "BMCON_ID", Request("bmcon_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
115 |
OraDatabase.Parameters.Add "DAEMON_MODE", Request("daemon_mode"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
116 |
OraDatabase.Parameters.Add "GBE_BUILDFILTER", Request("gbe_buildfilter"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 129 |
ghuddy |
117 |
|
|
|
118 |
objEH.TryORA ( OraSession )
|
|
|
119 |
On Error Resume Next
|
|
|
120 |
|
|
|
121 |
OraDatabase.ExecuteSQL _
|
| 161 |
iaugusti |
122 |
"BEGIN PK_BUILDAPI.ADD_DAEMON_CONFIG(:RTAG_ID, :BMCON_ID, :DAEMON_MODE, :GBE_BUILDFILTER); END;"
|
| 129 |
ghuddy |
123 |
|
|
|
124 |
objEH.CatchORA ( OraSession )
|
|
|
125 |
|
|
|
126 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
| 161 |
iaugusti |
127 |
OraDatabase.Parameters.Remove "BMCON_ID"
|
|
|
128 |
OraDatabase.Parameters.Remove "DAEMON_MODE"
|
| 129 |
ghuddy |
129 |
OraDatabase.Parameters.Remove "GBE_BUILDFILTER"
|
|
|
130 |
|
|
|
131 |
If objEH.Finally Then
|
|
|
132 |
Call OpenInParentWindow ("release_config.asp?rtag_id="&parRtag_id)
|
|
|
133 |
Call CloseWindow()
|
|
|
134 |
End If
|
|
|
135 |
|
|
|
136 |
rsQry.Close
|
|
|
137 |
Set rsQry = nothing
|
|
|
138 |
|
|
|
139 |
End If
|
|
|
140 |
|
| 119 |
ghuddy |
141 |
End If
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
'----------------------------------------------
|
|
|
145 |
%>
|
|
|
146 |
<html>
|
|
|
147 |
<head>
|
|
|
148 |
<title>Release Manager</title>
|
|
|
149 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
150 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
151 |
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
|
|
|
152 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
153 |
</head>
|
|
|
154 |
|
| 161 |
iaugusti |
155 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.bmcon_id.focus();">
|
| 119 |
ghuddy |
156 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
| 129 |
ghuddy |
157 |
<tr>
|
|
|
158 |
<td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Add/Update DAEMON</span> <br>
|
|
|
159 |
Add a new DAEMON or edit an existing DAEMON.
|
| 119 |
ghuddy |
160 |
</td>
|
| 129 |
ghuddy |
161 |
</tr>
|
| 119 |
ghuddy |
162 |
|
| 129 |
ghuddy |
163 |
<%
|
|
|
164 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
165 |
objFormComponent.FormName = "FormName"
|
|
|
166 |
objFormComponent.Action = ScriptName
|
|
|
167 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
168 |
Call objFormComponent.FormStart()
|
| 119 |
ghuddy |
169 |
|
| 129 |
ghuddy |
170 |
%>
|
|
|
171 |
<tr>
|
|
|
172 |
<td background="images/bg_login.gif">
|
|
|
173 |
<table width="50%" border="0" cellspacing="0" cellpadding="0">
|
|
|
174 |
<tr>
|
|
|
175 |
<td><%=ProgressBar()%></td>
|
|
|
176 |
<td align="right"><input name="btn" type="submit" class="form_btn" value="Add/Update">
|
|
|
177 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
|
|
|
178 |
</td>
|
|
|
179 |
</tr>
|
|
|
180 |
</table>
|
|
|
181 |
</td>
|
|
|
182 |
</tr>
|
|
|
183 |
<tr>
|
|
|
184 |
<td>
|
|
|
185 |
<!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
186 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
|
|
187 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
188 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
189 |
<%
|
|
|
190 |
Query_String = "select * from release_config rc, gbe_machtype gbe "&_
|
|
|
191 |
" where rc.rtag_id = "& parRtag_id &" and gbe.gbe_id = rc.gbe_id"
|
| 119 |
ghuddy |
192 |
|
| 129 |
ghuddy |
193 |
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
194 |
|
| 129 |
ghuddy |
195 |
RecordCount = rsQry.RecordCount
|
| 119 |
ghuddy |
196 |
|
| 129 |
ghuddy |
197 |
rsQry.Close()
|
| 119 |
ghuddy |
198 |
|
| 129 |
ghuddy |
199 |
Set rsQry = Nothing
|
|
|
200 |
%>
|
|
|
201 |
<br>
|
|
|
202 |
<%
|
|
|
203 |
If Request("rcon_id") <> "" Then
|
|
|
204 |
%>
|
|
|
205 |
<input type="hidden" name="rcon_id" value="<%=Request("rcon_id")%>">
|
|
|
206 |
<%
|
|
|
207 |
Dim rsTemp
|
| 119 |
ghuddy |
208 |
|
| 161 |
iaugusti |
209 |
Query_String = "SELECT * FROM RELEASE_CONFIG rc, build_machine_config bm, gbe_machtype gb WHERE rc.rcon_id = "& Request("rcon_id") & " AND rc.daemon_hostname = bm.machine_hostname AND bm.gbe_id = gb.gbe_id"
|
| 119 |
ghuddy |
210 |
|
| 129 |
ghuddy |
211 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 119 |
ghuddy |
212 |
|
| 161 |
iaugusti |
213 |
bmcon_id = rsTemp("bmcon_id")
|
| 129 |
ghuddy |
214 |
daemon_mode = rsTemp("daemon_mode")
|
| 119 |
ghuddy |
215 |
|
| 129 |
ghuddy |
216 |
daemon_hostname = rsTemp("daemon_hostname")
|
|
|
217 |
gbe_id = rsTemp("gbe_id")
|
| 161 |
iaugusti |
218 |
gbe_value = rsTemp("gbe_value")
|
| 129 |
ghuddy |
219 |
gbe_buildfilter = rsTemp("gbe_buildfilter")
|
| 119 |
ghuddy |
220 |
|
| 129 |
ghuddy |
221 |
rsTemp.Close()
|
|
|
222 |
Set rsTemp = Nothing
|
| 161 |
iaugusti |
223 |
else
|
|
|
224 |
If RecordCount = 0 Then
|
|
|
225 |
daemon_mode = "M"
|
|
|
226 |
else
|
|
|
227 |
daemon_mode = "S"
|
|
|
228 |
End If
|
| 129 |
ghuddy |
229 |
End If
|
|
|
230 |
%>
|
|
|
231 |
<table width="50%" border="0">
|
|
|
232 |
<tr>
|
| 161 |
iaugusti |
233 |
<td><span class="body_txt">Daemon Host</span></td>
|
| 129 |
ghuddy |
234 |
<td>
|
| 161 |
iaugusti |
235 |
<%=objFormComponent.Combo_Multi ( "bmcon_id", GetMachHost(bmcon_id), FALSE, "class='body_txt'",3,"20,20,50")%>
|
| 129 |
ghuddy |
236 |
</td>
|
|
|
237 |
</tr>
|
|
|
238 |
<tr>
|
|
|
239 |
<td><span class="body_txt">Daemon Mode</span></td>
|
| 161 |
iaugusti |
240 |
<td>
|
|
|
241 |
<select name="daemon_mode" class='body_txt'>
|
|
|
242 |
<option value=M <%=iif(daemon_mode="M","selected","")%>>MASTER</option>
|
|
|
243 |
<option value=S <%=iif(daemon_mode="S","selected","")%>>SLAVE</option>
|
|
|
244 |
</select>
|
|
|
245 |
</td>
|
| 129 |
ghuddy |
246 |
</tr>
|
|
|
247 |
<tr>
|
|
|
248 |
<tr>
|
|
|
249 |
<td><span class="body_txt">GBE_BUILDFILTER</span></td>
|
|
|
250 |
<td><input name="gbe_buildfilter" type="text" class="body_txt" size="80" value="<%=gbe_buildfilter%>"></td>
|
|
|
251 |
</tr>
|
|
|
252 |
</tr>
|
|
|
253 |
<tr>
|
|
|
254 |
<td> </td>
|
|
|
255 |
<td> </td>
|
|
|
256 |
</tr>
|
|
|
257 |
</table>
|
|
|
258 |
</td>
|
|
|
259 |
</tr>
|
|
|
260 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
261 |
<input type="hidden" name="action" value="true">
|
| 119 |
ghuddy |
262 |
|
| 129 |
ghuddy |
263 |
<%
|
|
|
264 |
Call objFormComponent.FormEnd()
|
|
|
265 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
266 |
%>
|
| 119 |
ghuddy |
267 |
</table>
|
|
|
268 |
</body>
|
|
|
269 |
</html>
|
|
|
270 |
<%
|
|
|
271 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
272 |
Set objFormCollector = Nothing
|
|
|
273 |
'----------------------------------------------
|
|
|
274 |
Call Destroy_All_Objects
|
|
|
275 |
%>
|