| 6770 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' wAddPkgReplica.asp
|
|
|
5 |
'
|
|
|
6 |
'=====================================================
|
|
|
7 |
%>
|
|
|
8 |
<%
|
|
|
9 |
Option explicit
|
|
|
10 |
Response.Expires = 0
|
|
|
11 |
%>
|
|
|
12 |
<!--#include file="common/conf.asp"-->
|
|
|
13 |
<!--#include file="common/globals.asp"-->
|
|
|
14 |
<!--#include file="common/formating.asp"-->
|
|
|
15 |
<!--#include file="common/qstr.asp"-->
|
|
|
16 |
<!--#include file="common/common_subs.asp"-->
|
|
|
17 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
<%
|
|
|
21 |
'------------ ACCESS CONTROL ------------------
|
|
|
22 |
%>
|
|
|
23 |
<!--#include file="_access_control_login.asp"-->
|
|
|
24 |
<!--#include file="_access_control_general.asp"-->
|
|
|
25 |
<%
|
|
|
26 |
'------------ VARIABLE DEFINITION -------------
|
|
|
27 |
Dim rsQry
|
|
|
28 |
Dim sMessage
|
|
|
29 |
Dim Query_String
|
|
|
30 |
|
| 6775 |
dpurdie |
31 |
Dim server_id,server_name,display_name, active, mode, description
|
| 6774 |
dpurdie |
32 |
Dim activeChecked
|
| 6770 |
dpurdie |
33 |
|
|
|
34 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
35 |
'------------ VARIABLE INIT -------------------
|
|
|
36 |
sMessage = NULL
|
|
|
37 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
|
|
38 |
'------------ CONDITIONS ----------------------
|
|
|
39 |
'----------------------------------------------
|
|
|
40 |
%>
|
|
|
41 |
<%
|
|
|
42 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
43 |
|
|
|
44 |
If CBool(Request("action")) Then
|
|
|
45 |
|
|
|
46 |
Dim displayName
|
|
|
47 |
If displayName = "" Then
|
|
|
48 |
displayName = Request("server_name")
|
|
|
49 |
End If
|
|
|
50 |
|
|
|
51 |
If Request("server_id") <> "" Then
|
|
|
52 |
|
|
|
53 |
OraDatabase.Parameters.Add "SERVER_ID", Request("server_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
54 |
OraDatabase.Parameters.Add "DISPLAY_NAME", displayName, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
55 |
OraDatabase.Parameters.Add "server_name", Request("server_name"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
56 |
OraDatabase.Parameters.Add "DESCRIPTION", Request("description"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
57 |
OraDatabase.Parameters.Add "ACTIVE", Request("active"), ORAPARM_INPUT, ORATYPE_CHAR
|
| 6775 |
dpurdie |
58 |
OraDatabase.Parameters.Add "MODE", Request("mode"), ORAPARM_INPUT, ORATYPE_CHAR
|
| 6770 |
dpurdie |
59 |
|
|
|
60 |
objEH.ErrorRedirect = FALSE
|
|
|
61 |
objEH.TryORA ( OraSession )
|
|
|
62 |
On Error Resume Next
|
|
|
63 |
|
|
|
64 |
OraDatabase.ExecuteSQL _
|
| 6775 |
dpurdie |
65 |
"BEGIN PK_BLATAPI.UPDATE_PKG_REPLICA(:server_id, :DISPLAY_NAME, :server_name, :DESCRIPTION, :ACTIVE, :MODE); END;"
|
| 6770 |
dpurdie |
66 |
|
|
|
67 |
objEH.CatchORA ( OraSession )
|
|
|
68 |
|
|
|
69 |
OraDatabase.Parameters.Remove "SERVER_ID"
|
|
|
70 |
OraDatabase.Parameters.Remove "DISPLAY_NAME"
|
|
|
71 |
OraDatabase.Parameters.Remove "SERVER_NAME"
|
|
|
72 |
OraDatabase.Parameters.Remove "DESCRIPTION"
|
|
|
73 |
OraDatabase.Parameters.Remove "ACTIVE"
|
| 6775 |
dpurdie |
74 |
OraDatabase.Parameters.Remove "MODE"
|
| 6770 |
dpurdie |
75 |
|
|
|
76 |
If objEH.Finally Then
|
|
|
77 |
Call OpenInParentWindow ("admin_blat_machines.asp?server_id="&Request("server_id"))
|
|
|
78 |
Call CloseWindow()
|
|
|
79 |
End If
|
|
|
80 |
|
|
|
81 |
rsQry.Close
|
|
|
82 |
Set rsQry = nothing
|
|
|
83 |
|
|
|
84 |
Else
|
|
|
85 |
OraDatabase.Parameters.Add "DISPLAY_NAME", displayName, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
86 |
OraDatabase.Parameters.Add "SERVER_NAME", Request("server_name"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
87 |
OraDatabase.Parameters.Add "DESCRIPTION", Request("description"), ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
88 |
OraDatabase.Parameters.Add "ACTIVE", Request("active"), ORAPARM_INPUT, ORATYPE_CHAR
|
| 6775 |
dpurdie |
89 |
OraDatabase.Parameters.Add "MODE", Request("mode"), ORAPARM_INPUT, ORATYPE_CHAR
|
| 6770 |
dpurdie |
90 |
|
|
|
91 |
objEH.ErrorRedirect = FALSE
|
|
|
92 |
objEH.TryORA ( OraSession )
|
|
|
93 |
On Error Resume Next
|
|
|
94 |
|
| 6775 |
dpurdie |
95 |
OraDatabase.ExecuteSQL "BEGIN PK_BLATAPI.ADD_PKG_REPLICA(:DISPLAY_NAME, :SERVER_NAME, :DESCRIPTION, :ACTIVE, :MODE); END;"
|
| 6770 |
dpurdie |
96 |
|
|
|
97 |
objEH.CatchORA ( OraSession )
|
|
|
98 |
|
|
|
99 |
OraDatabase.Parameters.Remove "DISPLAY_NAME"
|
|
|
100 |
OraDatabase.Parameters.Remove "SERVER_NAME"
|
|
|
101 |
OraDatabase.Parameters.Remove "DESCRIPTION"
|
|
|
102 |
OraDatabase.Parameters.Remove "ACTIVE"
|
| 6775 |
dpurdie |
103 |
OraDatabase.Parameters.Remove "MODE"
|
| 6770 |
dpurdie |
104 |
|
|
|
105 |
If objEH.Finally Then
|
|
|
106 |
Call OpenInParentWindow ("admin_blat_machines.asp?server_id="&Request("server_id"))
|
|
|
107 |
Call CloseWindow()
|
|
|
108 |
End If
|
|
|
109 |
|
|
|
110 |
rsQry.Close
|
|
|
111 |
Set rsQry = nothing
|
|
|
112 |
|
|
|
113 |
End If
|
|
|
114 |
|
|
|
115 |
End If
|
|
|
116 |
|
| 6774 |
dpurdie |
117 |
'----------------------------------------------
|
|
|
118 |
' Generate HTML to show/display the Replicate mode Compo Box
|
|
|
119 |
Sub GenReplicateModeCombo(cMode)
|
| 6770 |
dpurdie |
120 |
|
| 6775 |
dpurdie |
121 |
Response.Write "<select class = 'form_item' name=mode>"
|
| 6774 |
dpurdie |
122 |
|
|
|
123 |
Response.Write "<option value = 'N' " & IIF(cmode = "N", "selected", "" ) &" >Normal</option>"
|
|
|
124 |
Response.Write "<option value = 'P' " & IIF(cmode = "P", "selected", "" ) &" >All Projects</option>"
|
|
|
125 |
Response.Write "<option value = 'E' " & IIF(cmode = "E", "selected", "" ) &" >Entire Archive</option>"
|
|
|
126 |
|
|
|
127 |
Response.Write "</select>"
|
|
|
128 |
End Sub
|
| 6770 |
dpurdie |
129 |
'----------------------------------------------
|
|
|
130 |
%>
|
|
|
131 |
<html>
|
|
|
132 |
<head>
|
|
|
133 |
<title>Release Manager</title>
|
|
|
134 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
135 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
136 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
137 |
<link href="images/release_manager_style.css?ver=<%=VixVerNum%>" rel="stylesheet" type="text/css">
|
|
|
138 |
<script language="JavaScript" src="scripts/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
139 |
</head>
|
|
|
140 |
<body leftmargin="0" topmargin="0" onLoad="self.focus();FormName.display_name.focus();">
|
|
|
141 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
|
|
142 |
<tr>
|
|
|
143 |
<td class="body_txt">
|
|
|
144 |
Add a new Package Replication servers or edit an existing an existing one.
|
|
|
145 |
<p>Note: This target replication server and local replication configuration need to be performed outside of this application.
|
|
|
146 |
This configuration simple provides the Projects and Releases to be replicated.
|
|
|
147 |
</td>
|
|
|
148 |
</tr>
|
|
|
149 |
<%
|
|
|
150 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
|
|
151 |
objFormComponent.FormName = "FormName"
|
|
|
152 |
objFormComponent.FormClass = "form_tight"
|
|
|
153 |
objFormComponent.Action = ScriptName
|
|
|
154 |
objFormComponent.OnSubmit = "ShowProgress();"
|
|
|
155 |
Call objFormComponent.FormStart()
|
|
|
156 |
%>
|
|
|
157 |
<tr>
|
|
|
158 |
<td class="form_field_bg" >
|
|
|
159 |
<!-- NEW PRODUCT ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
160 |
<%Call Messenger ( sMessage , 3, "100%" )%>
|
|
|
161 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
162 |
<!--#include file="messages/_msg_inline.asp"-->
|
|
|
163 |
<br>
|
|
|
164 |
<%
|
|
|
165 |
If Request("server_id") <> "" Then
|
|
|
166 |
%>
|
|
|
167 |
<input type="hidden" name="server_id" value="<%=Request("server_id")%>">
|
|
|
168 |
<%
|
|
|
169 |
Dim rsTemp
|
|
|
170 |
|
| 6775 |
dpurdie |
171 |
Query_String = "select blat_id, blat_server_name, blat_display_name,blat_enable,blat_mode, blat_description from BLAT_SERVERS where blat_id = " & Request("server_id")
|
| 6770 |
dpurdie |
172 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
|
|
173 |
|
|
|
174 |
server_name = rsTemp("blat_server_name")
|
|
|
175 |
display_name = rsTemp("blat_display_name")
|
|
|
176 |
active = rsTemp("blat_enable")
|
| 6775 |
dpurdie |
177 |
mode = rsTemp("blat_mode")
|
| 6770 |
dpurdie |
178 |
description = rsTemp("blat_description")
|
|
|
179 |
|
|
|
180 |
activeChecked = ""
|
|
|
181 |
if active = "Y" Then activeChecked = "checked"
|
|
|
182 |
|
|
|
183 |
rsTemp.Close()
|
|
|
184 |
Set rsTemp = Nothing
|
|
|
185 |
Else
|
|
|
186 |
activeChecked = "checked"
|
| 6775 |
dpurdie |
187 |
mode = "N"
|
| 6770 |
dpurdie |
188 |
End If%>
|
|
|
189 |
|
|
|
190 |
<table width="50%" border="0">
|
|
|
191 |
<tr>
|
|
|
192 |
<td><span class="body_txt">Server Name</span></td>
|
|
|
193 |
<td>
|
|
|
194 |
<input name="server_name" type="text" class="body_txt" value="<%=server_name%>" size=60 maxlength=100>
|
|
|
195 |
</td>
|
|
|
196 |
</tr>
|
|
|
197 |
<tr>
|
|
|
198 |
<td><span class="body_txt nowrap">Display Name</span></td>
|
|
|
199 |
<td>
|
|
|
200 |
<input name="display_name" type="text" class="body_txt" value="<%=display_name%>" size=20 maxlength=20>
|
|
|
201 |
</td>
|
|
|
202 |
</tr>
|
|
|
203 |
<tr>
|
|
|
204 |
<td><span class="body_txt nowrap">Enabled</span></td>
|
|
|
205 |
<td>
|
|
|
206 |
<input type="checkbox" name="active" value="Y" <%=activeChecked%>>
|
|
|
207 |
<span class="body_txt">Enable replication to this machine</span>
|
|
|
208 |
</td>
|
|
|
209 |
</tr>
|
|
|
210 |
<tr>
|
| 6774 |
dpurdie |
211 |
<td><span class="body_txt nowrap">Replication Mode</span></td>
|
| 6770 |
dpurdie |
212 |
<td>
|
| 6775 |
dpurdie |
213 |
<%Call GenReplicateModeCombo(mode) %>
|
| 6770 |
dpurdie |
214 |
</td>
|
|
|
215 |
</tr>
|
|
|
216 |
<tr>
|
|
|
217 |
<td><span class="body_txt nowrap">Description</span></td>
|
|
|
218 |
<td>
|
|
|
219 |
<textarea name="Description" cols=50 rows=5 class='body_txt'><%=Description%></textarea>
|
|
|
220 |
</td>
|
|
|
221 |
</tr>
|
|
|
222 |
</table>
|
|
|
223 |
</td>
|
|
|
224 |
</tr>
|
|
|
225 |
<tr>
|
|
|
226 |
<td>
|
|
|
227 |
<table class="full_table">
|
|
|
228 |
<tr>
|
|
|
229 |
<td><%=ProgressBar()%></td>
|
|
|
230 |
<td align="right">
|
|
|
231 |
<input name="btn" type="submit" class="form_btn" value="Add/Update">
|
|
|
232 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onclick="parent.closeIFrame();">
|
|
|
233 |
</td>
|
|
|
234 |
</tr>
|
|
|
235 |
</table>
|
|
|
236 |
</td>
|
|
|
237 |
</tr>
|
|
|
238 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
239 |
<input type="hidden" name="action" value="true">
|
|
|
240 |
<%
|
|
|
241 |
Call objFormComponent.FormEnd()
|
|
|
242 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
|
|
243 |
%>
|
|
|
244 |
</table>
|
|
|
245 |
</body>
|
|
|
246 |
</html>
|
|
|
247 |
<%
|
|
|
248 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
249 |
Set objFormCollector = Nothing
|
|
|
250 |
'----------------------------------------------
|
|
|
251 |
Call Destroy_All_Objects
|
|
|
252 |
%>
|
|
|
253 |
|
|
|
254 |
|