Subversion Repositories DevTools

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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