Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
119 ghuddy 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          wAddDaemon				 	 |
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
33
Dim	daemon_hostname
34
Dim	gbe_id
35
Dim	daemon_mode
36
Dim gbe_buildfilter
37
'------------ CONSTANTS DECLARATION -----------
38
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
39
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
40
Const LIMG_PRODUCT_PATCH = "<img src='icons/i_patch_small.gif' hspace='2' align='absmiddle'>"
41
'------------ VARIABLE INIT -------------------
42
sMessage = NULL
43
 
44
parRtag_id = Request("rtag_id")
45
 
46
Set objFormCollector = CreateObject("Scripting.Dictionary")
47
'------------ CONDITIONS ----------------------
48
'----------------------------------------------
49
%>
50
<%
51
'--------------------------------------------------------------------------------------------------------------------------
52
Function GetMachType ( ngbe_id )
53
	Dim rsQry, query
54
 
55
	OraDatabase.Parameters.Add "gbe_id",   ngbe_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
56
 
57
	query = GetQuery ("GBE_MACHTYPECombo.sql")
58
 
59
 
60
	Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
61
	If (NOT rsQry.BOF) AND (NOT rsQry.EOF) Then
62
		GetMachType = rsQry.GetRows()
63
	Else
64
		GetMachType = NULL
65
 
66
	End If
67
 
68
	rsQry.Close()
69
	Set rsQry = Nothing
70
 
71
	OraDatabase.Parameters.Remove "gbe_id"
72
End Function
73
'--------------------------------------------------------------------------------------------------------------------------
74
%>
75
<%
76
'------------ RUN BEFORE PAGE RENDER ----------
77
 
78
 
79
If CBool(Request("action")) Then
80
 
81
 
82
 
83
	If Request("rcon_id") <> "" Then
84
 
85
		objEH.Try()
86
 
87
		OraDatabase.Parameters.Add "DAEMON_HOSTNAME",	Request("daemon_hostname"), ORAPARM_INPUT, ORATYPE_VARCHAR2
88
		OraDatabase.Parameters.Add "RCON_ID",			Request("rcon_id"),			ORAPARM_INPUT, ORATYPE_NUMBER
89
		OraDatabase.Parameters.Add "GBE_ID",			Request("gbe_id"), 			ORAPARM_INPUT, ORATYPE_NUMBER
90
		OraDatabase.Parameters.Add "GBE_BUILDFILTER",	Request("gbe_buildfilter"), ORAPARM_INPUT, ORATYPE_VARCHAR2
91
 
92
		OraSession.BeginTrans
93
 
94
		OraDatabase.ExecuteSQL _
95
		"BEGIN  PK_BUILDAPI.UPDATE_DAEMON(:DAEMON_HOSTNAME, :RCON_ID, :GBE_ID, :GBE_BUILDFILTER);  END;"	
96
		OraSession.CommitTrans
97
 
98
		objEH.Catch()
99
		OraDatabase.Parameters.Remove "DAEMON_HOSTNAME"
100
		OraDatabase.Parameters.Remove "RCON_ID"
101
		OraDatabase.Parameters.Remove "GBE_ID"
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
 
113
	Else
114
 
115
		objEH.Try()
116
 
117
		OraDatabase.Parameters.Add "DAEMON_HOSTNAME",	Request("daemon_hostname"), ORAPARM_INPUT, ORATYPE_VARCHAR2
118
		OraDatabase.Parameters.Add "RTAG_ID",			Request("rtag_id"),			ORAPARM_INPUT, ORATYPE_NUMBER
119
		OraDatabase.Parameters.Add "GBE_ID",			Request("gbe_id"), 			ORAPARM_INPUT, ORATYPE_NUMBER
120
		OraDatabase.Parameters.Add "GBE_BUILDFILTER",	Request("gbe_buildfilter"), ORAPARM_INPUT, ORATYPE_VARCHAR2
121
 
122
		OraSession.BeginTrans
123
 
124
		OraDatabase.ExecuteSQL _
125
		"BEGIN  PK_BUILDAPI.ADD_DAEMON(:DAEMON_HOSTNAME, :RTAG_ID, :GBE_ID, :GBE_BUILDFILTER);  END;"	
126
		OraSession.CommitTrans
127
 
128
		objEH.Catch()
129
 
130
		OraDatabase.Parameters.Remove "DAEMON_HOSTNAME"
131
		OraDatabase.Parameters.Remove "RTAG_ID"
132
		OraDatabase.Parameters.Remove "GBE_ID"
133
		OraDatabase.Parameters.Remove "GBE_BUILDFILTER"
134
 
135
		If objEH.Finally Then
136
			Call OpenInParentWindow ("release_config.asp?rtag_id="&parRtag_id)
137
			Call CloseWindow()
138
		End If
139
 
140
		rsQry.Close
141
		Set rsQry = nothing
142
 
143
	End If
144
 
145
End If
146
 
147
 
148
'----------------------------------------------
149
%>
150
<html>
151
<head>
152
<title>Release Manager</title>
153
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
154
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
155
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
156
<script language="JavaScript" src="scripts/common.js"></script>
157
</head>
158
 
159
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.daemon_hostname.focus();">
160
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
161
  <tr>
162
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Add/Update DAEMON</span> <br>
163
    Add a new DAEMON or edit an existing DAEMON.
164
      </td>
165
  </tr>
166
 
167
 
168
<%
169
'-- FROM START --------------------------------------------------------------------------------------------------------------
170
objFormComponent.FormName = "FormName"
171
objFormComponent.Action = ScriptName
172
objFormComponent.OnSubmit = "ShowProgress();"
173
Call objFormComponent.FormStart()
174
 
175
%>  
176
  <tr>
177
    <td background="images/bg_login.gif"><table width="50%"  border="0" cellspacing="0" cellpadding="0">
178
      <tr>
179
        <td><%=ProgressBar()%></td>
180
        <td align="right"><input name="btn" type="submit" class="form_btn" value="Add/Update">
181
          <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td>
182
      </tr>
183
    </table></td>
184
  </tr>
185
  <tr>
186
    <td>
187
<!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->		
188
	<%Call Messenger ( sMessage , 3, "100%" )%>
189
	<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->	
190
	<!--#include file="messages/_msg_inline.asp"-->	
191
<%
192
Query_String = "select * from release_config rc, gbe_machtype gbe "&_
193
			" where rc.rtag_id = "& parRtag_id &" and gbe.gbe_id = rc.gbe_id"
194
Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
195
 
196
RecordCount = rsQry.RecordCount
197
 
198
rsQry.Close()
199
 
200
Set rsQry = Nothing
201
 
202
 
203
%>	
204
<br>
205
<%
206
 
207
If Request("rcon_id") <> "" Then
208
%>
209
<input type="hidden" name="rcon_id" value="<%=Request("rcon_id")%>">
210
<%
211
 
212
Dim rsTemp
213
 
214
Query_String = "SELECT * FROM RELEASE_CONFIG WHERE RCON_ID = "& Request("rcon_id")
215
 
216
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
217
 
218
daemon_mode	=	rsTemp("daemon_mode")
219
 
220
daemon_hostname	=	rsTemp("daemon_hostname")
221
gbe_id	=	rsTemp("gbe_id")
222
gbe_buildfilter = rsTemp("gbe_buildfilter")
223
 
224
rsTemp.Close()
225
Set rsTemp = Nothing
226
 
227
End	If
228
%>
229
<table width="50%" border="0">
230
  <tr>
231
    <td><span class="body_txt">Daemon HostName</span></td>
232
    <td><input name="daemon_hostname" type="text" class="body_txt" value="<%=daemon_hostname%>">
233
	</td>
234
  </tr>
235
  <tr>
236
    <td><span class="body_txt">Daemon Mode</span></td>
237
<%If RecordCount = 0 OR daemon_mode = "M" Then%>
238
    <td><input name="daemon_mode" size="6" type="text" class="form_ivalue" value="MASTER" readonly>
239
<%Else%>
240
	<td><input name="daemon_mode" size="6" type="text" class="form_ivalue" value="SLAVE" readonly>
241
<%End If%>
242
	</td>
243
  </tr>
244
  <tr>
245
    <td><span class="body_txt">GBE_MACHTYPE</span></td>
246
    <td><%=objFormComponent.Combo ( "gbe_id", GetMachtype( gbe_id ), FALSE, "class='body_txt'" )%></td>
247
 
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>   </tr>      
252
  <tr>
253
    <td>&nbsp;</td>
254
    <td>&nbsp;</td>
255
  </tr>  
256
</table>    
257
</td>
258
  </tr>
259
  <%=objPMod.ComposeHiddenTags()%>
260
  <input type="hidden" name="action" value="true">
261
 
262
 
263
<%
264
Call objFormComponent.FormEnd()
265
'-- FROM END ----------------------------------------------------------------------------------------------------------------
266
%>
267
</table>
268
</body>
269
</html>
270
<%
271
'------------ RUN AFTER PAGE RENDER -----------
272
Set objFormCollector = Nothing
273
'----------------------------------------------
274
Call Destroy_All_Objects
275
%>
276
 
277