Subversion Repositories DevTools

Rev

Rev 167 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
161 iaugusti 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
167 brianf 5
'|                   wAddBuildMachine                |
161 iaugusti 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
 
34
Dim display_name
35
Dim machine_hostname
36
Dim gbe_id
37
Dim description
38
 
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
 
47
Set objFormCollector = CreateObject("Scripting.Dictionary")
48
'------------ CONDITIONS ----------------------
49
'----------------------------------------------
50
%>
51
<%
52
'--------------------------------------------------------------------------------------------------------------------------
53
Function GetMachType ( ngbe_id )
54
   Dim rsQry, query
55
 
56
   OraDatabase.Parameters.Add "gbe_id",   ngbe_id,   ORAPARM_INPUT, ORATYPE_NUMBER
57
 
58
   query = GetQuery ("GBE_MACHTYPECombo.sql")
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
   End If
66
 
67
   rsQry.Close()
68
   Set rsQry = Nothing
69
 
70
   OraDatabase.Parameters.Remove "gbe_id"
71
End Function
72
'--------------------------------------------------------------------------------------------------------------------------
73
%>
74
<%
75
'------------ RUN BEFORE PAGE RENDER ----------
76
 
77
If CBool(Request("action")) Then
78
 
79
   If Request("bmcon_id") <> "" Then
80
 
81
      OraDatabase.Parameters.Add "BMCON_ID",              Request("bmcon_id"),              ORAPARM_INPUT, ORATYPE_NUMBER
82
      OraDatabase.Parameters.Add "DISPLAY_NAME",          Request("display_name"),          ORAPARM_INPUT, ORATYPE_VARCHAR2
83
      OraDatabase.Parameters.Add "MACHINE_HOSTNAME",      Request("machine_hostname"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
84
      OraDatabase.Parameters.Add "GBE_ID",                Request("gbe_id"),                ORAPARM_INPUT, ORATYPE_NUMBER
85
      OraDatabase.Parameters.Add "DESCRIPTION",           Request("description"),           ORAPARM_INPUT, ORATYPE_VARCHAR2
86
 
87
      objEH.TryORA ( OraSession )
88
      On Error Resume Next
89
 
90
      OraDatabase.ExecuteSQL _
91
      "BEGIN  PK_BUILDAPI.UPDATE_BUILD_MACHINE(:BMCON_ID, :DISPLAY_NAME, :MACHINE_HOSTNAME, :GBE_ID, :DESCRIPTION);  END;"
92
 
93
      objEH.CatchORA ( OraSession )
94
 
95
      OraDatabase.Parameters.Remove "BMCON_ID"
96
      OraDatabase.Parameters.Remove "DISPLAY_NAME"
97
      OraDatabase.Parameters.Remove "MACHINE_HOSTNAME"
98
      OraDatabase.Parameters.Remove "GBE_ID"
99
      OraDatabase.Parameters.Remove "DESCRIPTION"
100
 
101
      If objEH.Finally Then
102
         Call OpenInParentWindow ("admin_build_machine.asp?bmcon_id="&Request("bmcon_id"))
103
         Call CloseWindow()
104
      End If
105
 
106
      rsQry.Close
107
      Set rsQry = nothing
108
 
109
   Else
110
      OraDatabase.Parameters.Add "DISPLAY_NAME",          Request("display_name"),          ORAPARM_INPUT, ORATYPE_VARCHAR2
111
      OraDatabase.Parameters.Add "MACHINE_HOSTNAME",      Request("machine_hostname"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
112
      OraDatabase.Parameters.Add "GBE_ID",                Request("gbe_id"),                ORAPARM_INPUT, ORATYPE_NUMBER
113
      OraDatabase.Parameters.Add "DESCRIPTION",           Request("description"),           ORAPARM_INPUT, ORATYPE_VARCHAR2
114
 
115
      objEH.TryORA ( OraSession )
116
      On Error Resume Next
117
 
118
      OraDatabase.ExecuteSQL _
119
      "BEGIN  PK_BUILDAPI.ADD_BUILD_MACHINE(:DISPLAY_NAME, :MACHINE_HOSTNAME, :GBE_ID, :DESCRIPTION);  END;"
120
 
121
      objEH.CatchORA ( OraSession )
122
 
123
      OraDatabase.Parameters.Remove "DISPLAY_NAME"
124
      OraDatabase.Parameters.Remove "MACHINE_HOSTNAME"
125
      OraDatabase.Parameters.Remove "GBE_ID"
126
      OraDatabase.Parameters.Remove "DESCRIPTION"
127
 
128
      If objEH.Finally Then
129
         Call OpenInParentWindow ("admin_build_machine.asp?bmcon_id="&Request("bmcon_id"))
130
         Call CloseWindow()
131
      End If
132
 
133
      rsQry.Close
134
      Set rsQry = nothing
135
 
136
   End If
137
 
138
End If
139
 
140
 
141
'----------------------------------------------
142
%>
143
<html>
144
<head>
145
<title>Release Manager</title>
146
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
147
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
148
<link href="images/release_manager_style.css" rel="stylesheet" type="text/css">
149
<script language="JavaScript" src="scripts/common.js"></script>
150
</head>
151
 
152
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.display_name.focus();">
153
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
154
   <tr>
155
      <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 Build Machine</span> <br>
156
         Add a new Build Machine or edit an existing Build Machine.
157
      </td>
158
   </tr>
159
 
160
   <%
161
   '-- FROM START --------------------------------------------------------------------------------------------------------------
162
   objFormComponent.FormName = "FormName"
163
   objFormComponent.Action = ScriptName
164
   objFormComponent.OnSubmit = "ShowProgress();"
165
   Call objFormComponent.FormStart()
166
 
167
   %>
168
   <tr>
169
      <td background="images/bg_login.gif">
170
         <table width="50%"  border="0" cellspacing="0" cellpadding="0">
171
            <tr>
172
               <td><%=ProgressBar()%></td>
173
               <td align="right"><input name="btn" type="submit" class="form_btn" value="Add/Update">
174
                  <input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();">
175
               </td>
176
            </tr>
177
         </table>
178
      </td>
179
   </tr>
180
   <tr>
181
      <td>
182
         <!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
183
         <%Call Messenger ( sMessage , 3, "100%" )%>
184
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
185
         <!--#include file="messages/_msg_inline.asp"-->
186
         <br>
187
         <%
188
         If Request("bmcon_id") <> "" Then
189
            %>
190
            <input type="hidden" name="bmcon_id" value="<%=Request("bmcon_id")%>">
191
            <%
192
            Dim rsTemp
193
 
194
            Query_String = "select * from build_machine_config bm, gbe_machtype gbe "&_
195
              " where bm.bmcon_id = "& Request("bmcon_id") &_
196
              " and gbe.gbe_id = bm.gbe_id"
197
 
198
            Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
199
 
200
            display_name            =   rsTemp("display_name")
201
            machine_hostname        =   rsTemp("machine_hostname")
202
            gbe_id   =   rsTemp("gbe_id")
203
            description = rsTemp("description")
204
 
205
            rsTemp.Close()
206
            Set rsTemp = Nothing      
207
 
208
          End If%>
209
 
210
         <table width="50%" border="0">
211
            <tr>
212
               <td><span class="body_txt">Display Name</span></td>
213
               <td>
214
                  <input name="display_name" type="text" class="body_txt" value="<%=display_name%>" size=24 maxlength=20>
215
               </td>
216
            </tr>
217
            <tr>
218
               <td><span class="body_txt">Machine HostName</span></td>
219
               <td>
220
                  <input name="machine_hostname" type="text" class="body_txt" value="<%=machine_hostname%>" size=60 maxlength=50>
221
               </td>
222
            </tr>
223
            <tr>
224
               <td><span class="body_txt">GBE_MACHTYPE</span></td>
225
               <td><%=objFormComponent.Combo ( "gbe_id", GetMachtype( gbe_id ), FALSE, "size=1 class='body_txt'" )%></td>
226
            </tr>
227
            <tr>
228
               <td><span class="body_txt">Description</span></td>
229
               <td>
230
                  <textarea name="Description" cols=50 rows=5 class='body_txt'><%=Description%></textarea>
231
               </td>
232
            </tr>
233
            <tr>
234
               <td>&nbsp;</td>
235
            </tr>
236
         </table>
237
      </td>
238
   </tr>
239
   <%=objPMod.ComposeHiddenTags()%>
240
   <input type="hidden" name="action" value="true">
241
 
242
   <%
243
   Call objFormComponent.FormEnd()
244
   '-- FROM END ----------------------------------------------------------------------------------------------------------------
245
   %>
246
</table>
247
</body>
248
</html>
249
<%
250
'------------ RUN AFTER PAGE RENDER -----------
251
Set objFormCollector = Nothing
252
'----------------------------------------------
253
Call Destroy_All_Objects
254
%>
255
 
256