Subversion Repositories DevTools

Rev

Rev 7225 | Rev 7286 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7225 Rev 7235
Line 36... Line 36...
36
'------------ VARIABLE INIT -------------------
36
'------------ VARIABLE INIT -------------------
37
sMessage = NULL
37
sMessage = NULL
38
Set objFormCollector = CreateObject("Scripting.Dictionary")
38
Set objFormCollector = CreateObject("Scripting.Dictionary")
39
'------------ CONDITIONS ----------------------
39
'------------ CONDITIONS ----------------------
40
'----------------------------------------------
40
'----------------------------------------------
-
 
41
'--------------------------------------------------------------------------------------------------------------------------
-
 
42
Function GetMachType ()
-
 
43
    Dim rsQry, query
-
 
44
    Dim selectData
-
 
45
 
-
 
46
    OraDatabase.Parameters.Add "BP_ID",                 Request("bp_id"),             ORAPARM_INPUT, ORATYPE_NUMBER
-
 
47
 
-
 
48
    ' Where to get the selection data
-
 
49
    ' If this is a form re-display, then its comming from a Request
-
 
50
    If CBool(Request("action")) Then
-
 
51
    	selectData = "," & Request("machType") & ","
-
 
52
        selectData = Replace(selectData," ","",1,-1)
-
 
53
    Else
-
 
54
        selectData = ""
-
 
55
        query = "SELECT bfc.gbe_id FROM build_platforms_config bfc WHERE  bfc.bp_id = :BP_ID"
-
 
56
        Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
-
 
57
        While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
58
            selectData = selectData & "," & rsQry("GBE_ID") 
-
 
59
           rsQry.MoveNext
-
 
60
        Wend
-
 
61
        rsQry.Close()
-
 
62
        Set rsQry = Nothing
-
 
63
        selectData = selectData & ","
-
 
64
    End If
-
 
65
 
-
 
66
   GetMachType = "<table>"
-
 
67
   query = "SELECT gm.gbe_id,gm.gbe_value FROM gbe_machtype gm ORDER BY gbe_value"
-
 
68
 
-
 
69
   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
-
 
70
   While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
-
 
71
       Dim checkText
-
 
72
	   If InStr(selectData, "," & rsQry("GBE_ID") & ",") > 0 Then
-
 
73
        checkText = "checked"
-
 
74
       else 
-
 
75
        checkText = ""
-
 
76
       End If
-
 
77
       GetMachType = GetMachType & "<tr class=body_txt>"
-
 
78
       GetMachType = GetMachType & "<td> <input type=checkbox name=machType value='"& rsQry("GBE_ID") &"' "& checkText &">" & rsQry("GBE_VALUE") & "</td>"
-
 
79
       GetMachType = GetMachType & "</tr>"
-
 
80
 
-
 
81
       rsQry.MoveNext
-
 
82
   Wend
-
 
83
   rsQry.Close()
-
 
84
   Set rsQry = Nothing
-
 
85
 
-
 
86
   OraDatabase.Parameters.Remove "BP_ID"
-
 
87
   GetMachType = GetMachType & "</table>"
-
 
88
 
-
 
89
End Function
41
%>
90
%>
42
<%
91
<%
43
'------------ RUN BEFORE PAGE RENDER ----------
92
'------------ RUN BEFORE PAGE RENDER ----------
44
 
93
 
45
If CBool(Request("action")) Then
94
If CBool(Request("action")) Then
46
 
95
 
-
 
96
	If Len(Request("name")) <= 0 Then
-
 
97
		sMessage = "Platform name must be specified"
-
 
98
	ElseIf Len(Request("name")) <= 3 Then
-
 
99
		sMessage = "Platform name is too short"
-
 
100
	Else
47
   If Request("bp_id") <> "" Then
101
        If Request("bp_id") <> "" Then
-
 
102
            ' UPDATE an existing entry
48
 
103
 
49
      OraDatabase.Parameters.Add "BP_ID",                 Request("bp_id"),             ORAPARM_INPUT, ORATYPE_NUMBER
104
            OraDatabase.Parameters.Add "BP_ID",                 Request("bp_id"),             ORAPARM_INPUT, ORATYPE_NUMBER
50
      OraDatabase.Parameters.Add "NAME",          		  Request("name"),          	ORAPARM_INPUT, ORATYPE_VARCHAR2
105
            OraDatabase.Parameters.Add "NAME",          		Request("name"),          	  ORAPARM_INPUT, ORATYPE_VARCHAR2
51
      OraDatabase.Parameters.Add "DESCRIPTION",           Request("description"),       ORAPARM_INPUT, ORATYPE_VARCHAR2
106
            OraDatabase.Parameters.Add "DESCRIPTION",           Request("description"),       ORAPARM_INPUT, ORATYPE_VARCHAR2
52
      OraDatabase.Parameters.Add "ACTIVE",                Request("active"),            ORAPARM_INPUT, ORATYPE_CHAR
107
            OraDatabase.Parameters.Add "ACTIVE",                Request("active"),            ORAPARM_INPUT, ORATYPE_CHAR
-
 
108
            OraDatabase.Parameters.Add "MACHTYPE",              Request("machType"),          ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
109
 
-
 
110
            Query_String = "SELECT * FROM BUILD_PLATFORMS WHERE BP_ID <> :BP_ID AND UPPER(BP_NAME) = UPPER(:NAME)"
-
 
111
            Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
-
 
112
            If rsQry.RecordCount = 0 Then
53
 
113
 
54
      objEH.ErrorRedirect = FALSE
114
                objEH.ErrorRedirect = FALSE
55
      objEH.TryORA ( OraSession )
115
                objEH.TryORA ( OraSession )
56
      On Error Resume Next
116
                On Error Resume Next
57
 
117
 
58
      OraDatabase.ExecuteSQL _
118
                OraDatabase.ExecuteSQL _
59
      "BEGIN  PK_BUILDAPI.UPDATE_BUILD_PLATFORM(:BP_ID, :NAME, :DESCRIPTION, :ACTIVE);  END;"
119
                "BEGIN  PK_BUILDAPI.UPDATE_BUILD_PLATFORM(:BP_ID, :NAME, :DESCRIPTION, :ACTIVE, :MACHTYPE);  END;"
60
 
120
 
61
      objEH.CatchORA ( OraSession )
121
                objEH.CatchORA ( OraSession )
62
 
122
 
-
 
123
            Else
-
 
124
                sMessage = "A Platform of that name already exists"
-
 
125
            End If
-
 
126
 
63
      OraDatabase.Parameters.Remove "BP_ID"
127
            OraDatabase.Parameters.Remove "BP_ID"
64
      OraDatabase.Parameters.Remove "NAME"
128
            OraDatabase.Parameters.Remove "NAME"
65
      OraDatabase.Parameters.Remove "DESCRIPTION"
129
            OraDatabase.Parameters.Remove "DESCRIPTION"
66
      OraDatabase.Parameters.Remove "ACTIVE"
130
            OraDatabase.Parameters.Remove "ACTIVE"
-
 
131
            OraDatabase.Parameters.Remove "MACHTYPE"
-
 
132
 
-
 
133
            rsQry.Close
-
 
134
            Set rsQry = nothing
67
 
135
 
-
 
136
            If IsNULL(sMessage) Then
68
      If objEH.Finally Then
137
                If objEH.Finally Then
69
         Call OpenInParentWindow ("admin_build_platforms.asp?bp_id="&Request("bp_id"))
138
                    Call OpenInParentWindow ("admin_build_platforms.asp?bp_id="&Request("bp_id"))
70
         Call CloseWindow()
139
                    Call CloseWindow()
-
 
140
                End If
71
      End If
141
            End If
72
 
142
 
73
      rsQry.Close
143
        Else
74
      Set rsQry = nothing
144
            ' Add A new entry
75
 
-
 
76
   Else
-
 
77
      OraDatabase.Parameters.Add "NAME",          	Request("name"),          ORAPARM_INPUT, ORATYPE_VARCHAR2
145
            OraDatabase.Parameters.Add "NAME",            Request("name"),          ORAPARM_INPUT, ORATYPE_VARCHAR2
78
      OraDatabase.Parameters.Add "DESCRIPTION",     Request("description"),           ORAPARM_INPUT, ORATYPE_VARCHAR2
146
            OraDatabase.Parameters.Add "DESCRIPTION",     Request("description"),   ORAPARM_INPUT, ORATYPE_VARCHAR2
79
      OraDatabase.Parameters.Add "ACTIVE",          Request("active"),                ORAPARM_INPUT, ORATYPE_CHAR
147
            OraDatabase.Parameters.Add "ACTIVE",          Request("active"),        ORAPARM_INPUT, ORATYPE_CHAR
-
 
148
            OraDatabase.Parameters.Add "MACHTYPE",        Request("machType"),      ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
149
 
-
 
150
            Query_String = "SELECT * FROM BUILD_PLATFORMS WHERE UPPER(BP_NAME) = UPPER(:NAME)"
-
 
151
            Set rsQry = OraDatabase.DbCreateDynaset( Query_String, cint(0))
-
 
152
            If rsQry.RecordCount = 0 Then
80
 
153
 
81
      objEH.ErrorRedirect = FALSE
154
                objEH.ErrorRedirect = FALSE
82
      objEH.TryORA ( OraSession )
155
                objEH.TryORA ( OraSession )
83
      On Error Resume Next
156
                On Error Resume Next
84
 
157
 
85
      OraDatabase.ExecuteSQL _
158
                OraDatabase.ExecuteSQL _
86
      "BEGIN  PK_BUILDAPI.ADD_BUILD_PLATFORM(:NAME, :DESCRIPTION, :ACTIVE);  END;"
159
                "BEGIN  PK_BUILDAPI.ADD_BUILD_PLATFORM(:NAME, :DESCRIPTION, :ACTIVE, :MACHTYPE);  END;"
87
 
160
 
88
      objEH.CatchORA ( OraSession )
161
                objEH.CatchORA ( OraSession )
-
 
162
 
-
 
163
            Else
-
 
164
                sMessage = "A Platform of that name already exists"
-
 
165
            End If
89
 
166
 
90
      OraDatabase.Parameters.Remove "NAME"
167
            OraDatabase.Parameters.Remove "NAME"
91
      OraDatabase.Parameters.Remove "DESCRIPTION"
168
            OraDatabase.Parameters.Remove "DESCRIPTION"
92
      OraDatabase.Parameters.Remove "ACTIVE"
169
            OraDatabase.Parameters.Remove "ACTIVE"
-
 
170
            OraDatabase.Parameters.Remove "MACHTYPE"
-
 
171
 
-
 
172
            rsQry.Close
-
 
173
            Set rsQry = nothing
93
 
174
 
-
 
175
            If IsNULL(sMessage) Then
94
      If objEH.Finally Then
176
              If objEH.Finally Then
95
         Call OpenInParentWindow ("admin_build_platforms.asp")
177
            	 Call OpenInParentWindow ("admin_build_platforms.asp")
96
         Call CloseWindow()
178
            	 Call CloseWindow()
97
      End If
179
              End If
98
 
-
 
99
      rsQry.Close
180
            End If
100
      Set rsQry = nothing
181
        End If
101
 
-
 
102
   End If
182
    End If
103
 
-
 
104
End If
183
End If
105
 
-
 
106
 
-
 
107
'----------------------------------------------
184
'----------------------------------------------
108
%>
185
%>
109
<html>
186
<html>
110
<head>
187
<head>
111
<title>Release Manager</title>
188
<title>Release Manager</title>
Line 113... Line 190...
113
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
190
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
114
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
191
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
115
<link href="images/release_manager_style.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css">
192
<link href="images/release_manager_style.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css">
116
<script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script>
193
<script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script>
117
</head>
194
</head>
118
<body leftmargin="0" topmargin="0" onLoad="self.focus();FormName.display_name.focus();">
195
<body leftmargin="0" topmargin="0" onLoad="self.focus();FormName.name.focus();">
119
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
196
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
120
   <tr>
197
   <tr>
121
      <td class="body_txt">
198
      <td class="body_txt">
122
         Add a new Build Platform or edit an existing Build Platform.
199
         Add a new Build Platform or edit an existing Build Platform.
123
      </td>
200
      </td>
Line 136... Line 213...
136
         <%Call Messenger ( sMessage , 3, "100%" )%>
213
         <%Call Messenger ( sMessage , 3, "100%" )%>
137
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
214
         <!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
138
         <!--#include file="messages/_msg_inline.asp"-->
215
         <!--#include file="messages/_msg_inline.asp"-->
139
         <br>
216
         <br>
140
         <%
217
         <%
141
         If Request("bp_id") <> "" Then
218
         If CBool(Request("action")) Then
142
            %>
-
 
143
            <input type="hidden" name="bp_id" value="<%=Request("bp_id")%>">
-
 
144
            <%
-
 
145
            Dim rsTemp
-
 
146
 
219
 
-
 
220
            name            = Request("name")   
147
            Query_String = "select * from build_platforms bp "&_
221
            active          = Request("active")   
148
              " where bp.bp_id = "& Request("bp_id")
222
            description     = Request("description")  
149
              
223
            
-
 
224
         ElseIf Request("bp_id") <> "" Then
-
 
225
            Dim rsTemp
-
 
226
            Query_String = "select * from build_platforms bp where bp.bp_id = "& Request("bp_id")
150
            Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
227
            Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
151
 
228
 
152
            name            =   rsTemp("bp_name")
229
            name            =   rsTemp("bp_name")
153
            active          =   rsTemp("bp_active")
230
            active          =   rsTemp("bp_active")
154
            description     =   rsTemp("bp_description")
231
            description     =   rsTemp("bp_description")
155
 
232
 
156
            activeChecked = ""
-
 
157
            if active = "Y" Then activeChecked = "checked"
-
 
158
 
-
 
159
            rsTemp.Close()
233
            rsTemp.Close()
160
            Set rsTemp = Nothing      
234
            Set rsTemp = Nothing      
161
          Else
235
          Else
162
            activeChecked = "checked"
236
            active = "Y"
163
          End If%>
237
          End If
-
 
238
		  
-
 
239
          activeChecked = ""
-
 
240
          if active = "Y" Then activeChecked = "checked"
-
 
241
 
-
 
242
		  If Request("bp_id") <> "" Then%>
-
 
243
			<input type="hidden" name="bp_id" value="<%=Request("bp_id")%>">
-
 
244
		  <%End If%>
164
         
245
         
165
         <table width="50%" border="0">
246
         <table width="50%" border="0">
166
            <tr>
247
            <tr>
167
               <td><span class="body_txt nowrap">Platform Name</span></td>
248
               <td><span class="body_txt nowrap">Platform Name</span></td>
168
               <td>
249
               <td>
Line 180... Line 261...
180
               <td><span class="body_txt nowrap">Description</span></td>
261
               <td><span class="body_txt nowrap">Description</span></td>
181
               <td>
262
               <td>
182
                  <textarea name="Description" cols=50 rows=5 class='body_txt'><%=Description%></textarea>
263
                  <textarea name="Description" cols=50 rows=5 class='body_txt'><%=Description%></textarea>
183
               </td>
264
               </td>
184
            </tr>
265
            </tr>
-
 
266
			 <tr>
-
 
267
               <td><span class="body_txt nowrap">Supported<br>MachTypes</span></td>
-
 
268
				<td style="border: darkgrey 1px solid;">
-
 
269
				<%=GetMachType()%>
-
 
270
				</td>
-
 
271
			 </tr>
185
         </table>
272
         </table>
186
      </td>
273
      </td>
187
   </tr>
274
   </tr>
188
   <tr>
275
   <tr>
189
      <td>
276
      <td>