| 119 |
ghuddy |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| ADMIN Page |
|
|
|
6 |
'| Archive |
|
|
|
7 |
'| |
|
|
|
8 |
'=====================================================
|
|
|
9 |
%>
|
|
|
10 |
<%
|
|
|
11 |
Option explicit
|
|
|
12 |
' Good idea to set when using redirect
|
|
|
13 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
14 |
Server.ScriptTimeout=600
|
|
|
15 |
%>
|
|
|
16 |
<!--#include file="common/conf.asp"-->
|
|
|
17 |
<!--#include file="common/globals.asp"-->
|
|
|
18 |
<!--#include file="common/formating.asp"-->
|
|
|
19 |
<!--#include file="common/qstr.asp"-->
|
|
|
20 |
<!--#include file="common/common_subs.asp"-->
|
|
|
21 |
<!--#include file="sec/Crypt.asp"-->
|
|
|
22 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
23 |
<!--#include file="_action_buttons.asp"-->
|
|
|
24 |
|
|
|
25 |
<!--#include file="class/classActionButtonControl.asp"-->
|
|
|
26 |
|
|
|
27 |
<%
|
|
|
28 |
'------------ ACCESS CONTROL ------------------
|
|
|
29 |
%>
|
|
|
30 |
<!--#include file="_access_control_general.asp"-->
|
|
|
31 |
<%
|
|
|
32 |
'------------ Variable Definition -------------
|
|
|
33 |
Dim objBtnControl
|
|
|
34 |
'------------ Constants Declaration -----------
|
|
|
35 |
'------------ Variable Init -------------------
|
|
|
36 |
Set objBtnControl = New ActionButtonControl
|
|
|
37 |
'----------------------------------------------
|
|
|
38 |
%>
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
<%
|
|
|
43 |
' Page Access Condition
|
|
|
44 |
If NOT objAccessControl.IsActive("ConfigureBuildService") Then
|
|
|
45 |
Response.Redirect("message.asp?msg=401-9")
|
|
|
46 |
End If
|
|
|
47 |
%>
|
|
|
48 |
<%
|
|
|
49 |
'---------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
50 |
Sub RM2AM ( nRtagId )
|
|
|
51 |
|
|
|
52 |
'On Error Resume Next
|
|
|
53 |
OraDatabase.Parameters.Add "RTAG_ID", nRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
54 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
55 |
|
|
|
56 |
objEH.TryORA ( OraSession )
|
|
|
57 |
|
|
|
58 |
'OraSession.BeginTrans
|
|
|
59 |
OraDatabase.ExecuteSQL _
|
|
|
60 |
"BEGIN PK_ARCHIVE.POPULATE_PACKAGES_TABLE (); END;"
|
|
|
61 |
'OraSession.CommitTrans
|
|
|
62 |
|
|
|
63 |
'OraSession.BeginTrans
|
|
|
64 |
OraDatabase.ExecuteSQL _
|
|
|
65 |
"BEGIN PK_ARCHIVE.POPULATE_ARCHIVE_DATA_TABLE ( :RTAG_ID ); END;"
|
|
|
66 |
'OraSession.CommitTrans
|
|
|
67 |
|
|
|
68 |
'OraSession.BeginTrans
|
|
|
69 |
OraDatabase.ExecuteSQL _
|
|
|
70 |
"BEGIN PK_ARCHIVE.MIGRATE_PV_TO_ARCHIVE_SCHEMA ( :RTAG_ID ); END;"
|
|
|
71 |
'OraSession.CommitTrans
|
|
|
72 |
|
|
|
73 |
'OraSession.BeginTrans
|
|
|
74 |
OraDatabase.ExecuteSQL _
|
|
|
75 |
"BEGIN PK_ARCHIVE.MIGRATE_RTAG_TO_ARCHIVE_SCHEMA ( :RTAG_ID ); END;"
|
|
|
76 |
'OraSession.CommitTrans
|
|
|
77 |
|
|
|
78 |
'OraSession.BeginTrans
|
|
|
79 |
OraDatabase.ExecuteSQL _
|
|
|
80 |
"BEGIN PK_ARCHIVE.CLEAN_UP_ARCHIVE_DATA_TABLE ( :RTAG_ID ); END;"
|
|
|
81 |
'OraSession.CommitTrans
|
|
|
82 |
|
|
|
83 |
'OraSession.BeginTrans
|
|
|
84 |
OraDatabase.ExecuteSQL _
|
|
|
85 |
"BEGIN PK_ARCHIVE.WRITE_ACTION_LOG ( :USER_ID, :RTAG_ID ); END;"
|
|
|
86 |
'OraSession.CommitTrans
|
|
|
87 |
|
|
|
88 |
objEH.CatchORA ( OraSession )
|
|
|
89 |
|
|
|
90 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
91 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
92 |
|
|
|
93 |
End Sub
|
|
|
94 |
'---------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
95 |
Sub AM2RM ( nRtagId )
|
|
|
96 |
|
|
|
97 |
'On Error Resume Next
|
|
|
98 |
OraDatabase.Parameters.Add "RTAG_ID", nRtagId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
99 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
100 |
|
|
|
101 |
objEH.TryORA ( OraSession )
|
|
|
102 |
|
|
|
103 |
'OraSession.BeginTrans
|
|
|
104 |
OraDatabase.ExecuteSQL _
|
|
|
105 |
"BEGIN ARCHIVE_MANAGER.PK_ARCHIVE.RESTORE_AND_FLUSH_RELEASE_DATA ( :RTAG_ID ); END;"
|
|
|
106 |
'OraSession.CommitTrans
|
|
|
107 |
|
|
|
108 |
'OraSession.BeginTrans
|
|
|
109 |
OraDatabase.ExecuteSQL _
|
|
|
110 |
"BEGIN ARCHIVE_MANAGER.PK_ARCHIVE.WRITE_ACTION_LOG ( :USER_ID, :RTAG_ID ); END;"
|
|
|
111 |
'OraSession.CommitTrans
|
|
|
112 |
|
|
|
113 |
objEH.CatchORA ( OraSession )
|
|
|
114 |
|
|
|
115 |
OraDatabase.Parameters.Remove "RTAG_ID"
|
|
|
116 |
OraDatabase.Parameters.Remove "USER_ID"
|
|
|
117 |
|
|
|
118 |
End Sub
|
|
|
119 |
'---------------------------------------------------------------------------------------------------------------------------------------------
|
|
|
120 |
%>
|
|
|
121 |
<%
|
|
|
122 |
If (Request("btn") = "--->") Then
|
|
|
123 |
'Code to Migrate From Release Manager to Archive Manager
|
|
|
124 |
Call RM2AM ( Request("rtagA") )
|
|
|
125 |
If objEH.Finally Then
|
|
|
126 |
Response.Redirect("admin_archive.asp")
|
|
|
127 |
End If
|
|
|
128 |
End If
|
|
|
129 |
|
|
|
130 |
If (Request("btn") = "<---") Then
|
|
|
131 |
'Code to Migrate From Archive Manager to Release Manager
|
|
|
132 |
Call AM2RM ( Request("rtagB") )
|
|
|
133 |
If objEH.Finally Then
|
|
|
134 |
Response.Redirect("admin_archive.asp")
|
|
|
135 |
End If
|
|
|
136 |
End If
|
|
|
137 |
|
|
|
138 |
%>
|
|
|
139 |
<html>
|
|
|
140 |
<head>
|
|
|
141 |
|
|
|
142 |
<title>Archive Administration</title>
|
|
|
143 |
|
|
|
144 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
145 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
146 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
|
|
147 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
|
|
148 |
<script language="JavaScript" src="images/common.js"></script>
|
|
|
149 |
<!-- DROPDOWN MENUS -->
|
|
|
150 |
<!--#include file="_menu_def.asp"-->
|
|
|
151 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
|
|
152 |
</head>
|
|
|
153 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
|
|
|
154 |
<!-- MENU LAYERS -------------------------------------->
|
|
|
155 |
<div id="popmenu" class="menuskin" onMouseover="clearhidemenu();highlightmenu(event,'on')" onMouseout="highlightmenu(event,'off');dynamichide(event)">
|
|
|
156 |
</div>
|
|
|
157 |
<!-- TIPS LAYERS -------------------------------------->
|
|
|
158 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
|
|
159 |
<!-- HEADER -->
|
|
|
160 |
<!--#include file="_header.asp"-->
|
|
|
161 |
<form name="FormName" method="post" action="<%=ScriptName%>">
|
|
|
162 |
<br>
|
|
|
163 |
<table width="100%" border="0" cellspacing="10" cellpadding="0">
|
|
|
164 |
<tr>
|
|
|
165 |
<td align="left" class="body_col"><img src="images/i_rtag_open_mode.gif" border="0" align="absmiddle" width="15" height="13"> Release Manager<hr size="1px" color="Olive" noshade></td>
|
|
|
166 |
<td align="right" class="body_col"><img src="images/i_rtag_archive_mode.gif" border="0" align="absmiddle" width="15" height="13"> Archive Manager<hr size="1px" color="Olive" noshade></td>
|
|
|
167 |
</tr>
|
|
|
168 |
<tr>
|
|
|
169 |
<td align="left">
|
|
|
170 |
|
|
|
171 |
<%
|
|
|
172 |
Dim rsQry
|
|
|
173 |
Set rsQry = OraDatabase.DbCreateDynaset( "select * from "&_
|
|
|
174 |
" release_tags rt, projects prj where rt.official ='A' and prj.proj_id = rt.proj_id and "&_
|
|
|
175 |
" rt.rtag_id not in (select rtag_id from archive_manager.release_tags) order by rt.rtag_id desc", cint(0))
|
|
|
176 |
|
|
|
177 |
If ((rsQry.BOF) AND (rsQry.EOF)) Then%>
|
|
|
178 |
<select name="rtagA" id="rtagA" class="form_item" disabled>
|
|
|
179 |
<option>No releases to be archived</option>
|
|
|
180 |
</select>
|
|
|
181 |
<%Else%>
|
|
|
182 |
<select name="rtagA" id="rtagA" class="form_item">
|
|
|
183 |
<%While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
|
|
|
184 |
<option value="<%=rsQry("rtag_id")%>"><%=rsQry("proj_name")%> - <%=rsQry("rtag_name")%></option>
|
|
|
185 |
<%rsQry.MoveNext
|
|
|
186 |
WEnd%>
|
|
|
187 |
</select>
|
|
|
188 |
<input type="submit" name="btn" value="--->" class="form_btn_comp">
|
|
|
189 |
<%End If
|
|
|
190 |
|
|
|
191 |
rsQry.Close
|
|
|
192 |
Set rsQry = Nothing
|
|
|
193 |
%>
|
|
|
194 |
|
|
|
195 |
</td>
|
|
|
196 |
<td align="right">
|
|
|
197 |
<input type="submit" name="btn" value="<---" class="form_btn_comp">
|
|
|
198 |
<select name="rtagB" id="rtagB" class="form_item">
|
|
|
199 |
<%
|
|
|
200 |
Set rsQry = OraDatabase.DbCreateDynaset( "select * from "&_
|
|
|
201 |
" archive_manager.release_tags rt, projects prj where prj.proj_id = rt.proj_id "&_
|
|
|
202 |
" order by rt.rtag_id desc", cint(0))
|
|
|
203 |
|
|
|
204 |
While ((NOT rsQry.BOF) AND (NOT rsQry.EOF))%>
|
|
|
205 |
<option value="<%=rsQry("rtag_id")%>"><%=rsQry("proj_name")%> - <%=rsQry("rtag_name")%></option>
|
|
|
206 |
<%rsQry.MoveNext
|
|
|
207 |
WEnd
|
|
|
208 |
|
|
|
209 |
rsQry.Close
|
|
|
210 |
Set rsQry = Nothing
|
|
|
211 |
%>
|
|
|
212 |
</select>
|
|
|
213 |
|
|
|
214 |
</td>
|
|
|
215 |
</tr>
|
|
|
216 |
</table>
|
|
|
217 |
</form>
|
|
|
218 |
</body>
|
|
|
219 |
</html>
|
|
|
220 |
<!-- FOOTER -->
|
|
|
221 |
<!--#include file="_footer.asp"-->
|
|
|
222 |
<%
|
|
|
223 |
Call Destroy_All_Objects
|
|
|
224 |
%>
|