| Line 1... |
Line 1... |
| 1 |
<%@LANGUAGE="VBSCRIPT"%>
|
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 2 |
<%
|
2 |
<%
|
| 3 |
Option explicit
|
3 |
Option explicit
|
| 4 |
Response.Expires = 0 ' always load the page, dont store
|
4 |
Response.Expires = 0 ' always load the page, dont store
|
| 5 |
%>
|
5 |
%>
|
| 6 |
<%
|
6 |
<%
|
| 7 |
'=====================================================
|
7 |
'=====================================================
|
| 8 |
' Update a Project's Code Review Base URL and Jira Key
|
8 |
' Update a Project's Code Review Base URL and Jira Key
|
| 9 |
'=====================================================
|
9 |
'=====================================================
|
| 10 |
%>
|
10 |
%>
|
| 11 |
<!--#include file="common/conf.asp"-->
|
11 |
<!--#include file="common/conf.asp"-->
|
| 12 |
<!--#include file="common/globals.asp"-->
|
12 |
<!--#include file="common/globals.asp"-->
|
| 13 |
<!--#include file="common/formating.asp"-->
|
13 |
<!--#include file="common/formating.asp"-->
|
| 14 |
<!--#include file="common/qstr.asp"-->
|
14 |
<!--#include file="common/qstr.asp"-->
|
| 15 |
<!--#include file="common/common_subs.asp"-->
|
15 |
<!--#include file="common/common_subs.asp"-->
|
| 16 |
<!--#include file="common/common_dbedit.asp"-->
|
16 |
<!--#include file="common/common_dbedit.asp"-->
|
| 17 |
<!--#include file="common/_popup_window_common.asp"-->
|
17 |
<!--#include file="common/_popup_window_common.asp"-->
|
| 18 |
<%
|
18 |
<%
|
| 19 |
' Set rfile parameter. This is a return page after Login
|
19 |
' Set rfile parameter. This is a return page after Login
|
| 20 |
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
|
20 |
Call objPMod.StoreParameter ( "rfile", "fixed_issues.asp" )
|
| 21 |
'------------ ACCESS CONTROL ------------------
|
21 |
'------------ ACCESS CONTROL ------------------
|
| 22 |
%>
|
22 |
%>
|
| 23 |
<!--#include file="_access_control_login.asp"-->
|
23 |
<!--#include file="_access_control_login.asp"-->
|
| 24 |
<!--#include file="_access_control_general.asp"-->
|
24 |
<!--#include file="_access_control_general.asp"-->
|
| 25 |
<!--#include file="_access_control_project.asp"-->
|
25 |
<!--#include file="_access_control_project.asp"-->
|
| 26 |
<%
|
26 |
<%
|
| 27 |
'------------ Variable Definition -------------
|
27 |
'------------ Variable Definition -------------
|
| 28 |
Dim parProj_id
|
28 |
Dim parProj_id
|
| 29 |
Dim baseURL
|
29 |
Dim baseURL
|
| 30 |
Dim jiraKey
|
30 |
Dim jiraKey
|
| 31 |
'------------ Constants Declaration -----------
|
31 |
'------------ Constants Declaration -----------
|
| 32 |
'------------ Variable Init -------------------
|
32 |
'------------ Variable Init -------------------
|
| 33 |
parProj_id = Request("proj_id")
|
33 |
parProj_id = Request("proj_id")
|
| 34 |
'----------------------------------------------
|
34 |
'----------------------------------------------
|
| 35 |
%>
|
35 |
%>
|
| 36 |
<%
|
36 |
<%
|
| 37 |
'-----------------------------------------------------------------------------------------------------------------------------
|
37 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 38 |
Sub Get_Project_Config ( NNproj_id, out_base_url, out_jira_key )
|
38 |
Sub Get_Project_Config ( NNproj_id, out_base_url, out_jira_key )
|
| 39 |
Dim rsTemp, Query_String
|
39 |
Dim rsTemp, Query_String
|
| 40 |
|
40 |
|
| 41 |
Query_String = _
|
41 |
Query_String = _
|
| 42 |
" SELECT base_url, jira_key "&_
|
42 |
" SELECT base_url, jira_key "&_
|
| 43 |
" FROM projects pr "&_
|
43 |
" FROM projects pr "&_
|
| 44 |
" WHERE pr.proj_id = "& NNproj_id
|
44 |
" WHERE pr.proj_id = "& NNproj_id
|
| 45 |
|
45 |
|
| 46 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
46 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| 47 |
|
47 |
|
| 48 |
out_base_url = rsTemp("base_url")
|
48 |
out_base_url = rsTemp("base_url")
|
| 49 |
out_jira_key = rsTemp("jira_key")
|
49 |
out_jira_key = rsTemp("jira_key")
|
| 50 |
|
50 |
|
| 51 |
rsTemp.Close()
|
51 |
rsTemp.Close()
|
| 52 |
Set rsTemp = nothing
|
52 |
Set rsTemp = nothing
|
| 53 |
End Sub
|
53 |
End Sub
|
| 54 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
54 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
| 55 |
Sub Update_Project_Config ( nProj_id, sBaseURL, sJiraKey)
|
55 |
Sub Update_Project_Config ( nProj_id, sBaseURL, sJiraKey)
|
| 56 |
|
56 |
|
| 57 |
Dim sTempURL
|
57 |
Dim sTempURL
|
| 58 |
sTempURL = sBaseURL
|
58 |
sTempURL = sBaseURL
|
| 59 |
|
59 |
|
| 60 |
If (sTempURL <> "") and (Right(sTempURL, 1) <> "/") Then sTempURL = sTempURL & "/"
|
60 |
If (sTempURL <> "") and (Right(sTempURL, 1) <> "/") Then sTempURL = sTempURL & "/"
|
| 61 |
|
61 |
|
| 62 |
OraDatabase.Parameters.Add "PROJ_ID", nProj_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
62 |
OraDatabase.Parameters.Add "PROJ_ID", nProj_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 63 |
OraDatabase.Parameters.Add "BASE_URL", sTempURL, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
63 |
OraDatabase.Parameters.Add "BASE_URL", sTempURL, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 64 |
OraDatabase.Parameters.Add "JIRA_KEY", sJiraKey, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
64 |
OraDatabase.Parameters.Add "JIRA_KEY", sJiraKey, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 65 |
|
65 |
|
| 66 |
objEH.TryORA ( OraSession )
|
66 |
objEH.TryORA ( OraSession )
|
| 67 |
On Error Resume Next
|
67 |
On Error Resume Next
|
| 68 |
|
68 |
|
| 69 |
OraDatabase.ExecuteSQL _
|
69 |
OraDatabase.ExecuteSQL _
|
| 70 |
"BEGIN PK_PROJECT.Update_Project_Config ( :PROJ_ID, :BASE_URL, :JIRA_KEY ); END;"
|
70 |
"BEGIN PK_PROJECT.Update_Project_Config ( :PROJ_ID, :BASE_URL, :JIRA_KEY ); END;"
|
| 71 |
|
71 |
|
| 72 |
objEH.CatchORA ( OraSession )
|
72 |
objEH.CatchORA ( OraSession )
|
| 73 |
|
73 |
|
| 74 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
74 |
OraDatabase.Parameters.Remove "PROJ_ID"
|
| 75 |
OraDatabase.Parameters.Remove "BASE_URL"
|
75 |
OraDatabase.Parameters.Remove "BASE_URL"
|
| 76 |
OraDatabase.Parameters.Remove "JIRA_KEY"
|
76 |
OraDatabase.Parameters.Remove "JIRA_KEY"
|
| 77 |
|
77 |
|
| 78 |
End Sub
|
78 |
End Sub
|
| 79 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
79 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
| 80 |
%>
|
80 |
%>
|
| 81 |
<%
|
81 |
<%
|
| 82 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
82 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
| 83 |
Function ValidateURL ( sBaseURL )
|
83 |
Function ValidateURL ( sBaseURL )
|
| 84 |
|
84 |
|
| 85 |
Dim oExp
|
85 |
Dim oExp
|
| 86 |
Set oExp = new RegExp
|
86 |
Set oExp = new RegExp
|
| 87 |
|
87 |
|
| 88 |
oExp.Global = False
|
88 |
oExp.Global = False
|
| 89 |
oExp.Pattern = "(^https?:\/\/[a-z1-9])|(^$)"
|
89 |
oExp.Pattern = "(^https?:\/\/[a-z1-9])|(^$)"
|
| 90 |
|
90 |
|
| 91 |
ValidateURL = oExp.Test(sBaseURL)
|
91 |
ValidateURL = oExp.Test(sBaseURL)
|
| 92 |
End Function
|
92 |
End Function
|
| 93 |
|
93 |
|
| 94 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
94 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
| 95 |
Function ValidateJiraKey ( sJiraKey )
|
95 |
Function ValidateJiraKey ( sJiraKey )
|
| 96 |
|
96 |
|
| 97 |
Dim oExp
|
97 |
Dim oExp
|
| 98 |
Set oExp = new RegExp
|
98 |
Set oExp = new RegExp
|
| 99 |
|
99 |
|
| 100 |
oExp.Global = False
|
100 |
oExp.Global = False
|
| 101 |
oExp.Pattern = "^[A-Za-z0-9]*$"
|
101 |
oExp.Pattern = "^[A-Za-z0-9]*$"
|
| 102 |
|
102 |
|
| 103 |
ValidateJiraKey = oExp.Test(sJiraKey)
|
103 |
ValidateJiraKey = oExp.Test(sJiraKey)
|
| 104 |
End Function
|
104 |
End Function
|
| 105 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
105 |
'-----------------------------------------------------------------------------------------------------------------------------------
|
| 106 |
%>
|
106 |
%>
|
| 107 |
<%
|
107 |
<%
|
| 108 |
'------------ Action Requirements -------------------
|
108 |
'------------ Action Requirements -------------------
|
| 109 |
'Process submition
|
109 |
'Process submition
|
| 110 |
If CBool(Request("action")) AND objAccessControl.UserLogedIn Then
|
110 |
If CBool(Request("action")) AND objAccessControl.UserLogedIn Then
|
| 111 |
If ValidateURL (Request("base_url")) and ValidateJiraKey (Request("jira_key")) Then
|
111 |
If ValidateURL (Request("base_url")) and ValidateJiraKey (Request("jira_key")) Then
|
| 112 |
Call Update_Project_Config ( parProj_id, Request("base_url"), Request("jira_key") )
|
112 |
Call Update_Project_Config ( parProj_id, Request("base_url"), Request("jira_key") )
|
| 113 |
Call OpenInParentWindow ("admin_projects.asp" )
|
113 |
Call OpenInParentWindow ("admin_projects.asp" )
|
| 114 |
Call CloseWindow
|
114 |
Call CloseWindow
|
| 115 |
End If
|
115 |
End If
|
| 116 |
End If
|
116 |
End If
|
| 117 |
|
117 |
|
| 118 |
Call Get_Project_Config ( parProj_id, baseURL, jiraKey )
|
118 |
Call Get_Project_Config ( parProj_id, baseURL, jiraKey )
|
| 119 |
|
119 |
|
| 120 |
%>
|
120 |
%>
|
| 121 |
<html>
|
121 |
<html>
|
| 122 |
<head>
|
122 |
<head>
|
| 123 |
<title>Release Manager</title>
|
123 |
<title>Release Manager</title>
|
| 124 |
<meta http-equiv="Pragma" content="no-cache">
|
124 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
| 125 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
125 |
<meta http-equiv="Pragma" content="no-cache">
|
| 126 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
126 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 127 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
127 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
| 128 |
<script language="JavaScript" src="images/common.js"></script>
|
128 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
| 129 |
<!-- TIPS -->
|
129 |
<script language="JavaScript" src="images/common.js"></script>
|
| 130 |
<script language="JavaScript" src="images/tipster.js"></script>
|
130 |
<!-- TIPS -->
|
| 131 |
<script language="JavaScript" src="images/_help_tips.js"></script>
|
131 |
<script language="JavaScript" src="images/tipster.js"></script>
|
| 132 |
</head>
|
132 |
<script language="JavaScript" src="images/_help_tips.js"></script>
|
| 133 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
133 |
</head>
|
| 134 |
<!-- TIPS LAYERS -------------------------------------->
|
134 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onload="self.focus();">
|
| 135 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
135 |
<!-- TIPS LAYERS -------------------------------------->
|
| 136 |
<!----------------------------------------------------->
|
136 |
<div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10"> </div>
|
| 137 |
<form action="_wform_edit_projects.asp" method="post" name="baseurl" onsubmit="MM_validateForm('base_url','Base URL','isURL','jira_key','JIRA Key','isAlphaNum');return document.MM_returnValue;">
|
137 |
<!----------------------------------------------------->
|
| 138 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
138 |
<form action="_wform_edit_projects.asp" method="post" name="baseurl" onsubmit="MM_validateForm('base_url','Base URL','isURL','jira_key','JIRA Key','isAlphaNum');return document.MM_returnValue;">
|
| 139 |
<tr>
|
139 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
| 140 |
<td width="1%" background="images/lbox_bg_orange.gif"><img src="images/s_code_review_off.gif" width="21" height="23" hspace="5" border="0"></td>
|
140 |
<tr>
|
| 141 |
<td width="50%" background="images/lbox_bg_blue.gif" nowrap class="wform_ttl"> Project Configuration for
|
141 |
<td width="1%" background="images/lbox_bg_orange.gif"><img src="images/s_code_review_off.gif" width="21" height="23" hspace="5" border="0"></td>
|
| 142 |
<%=Get_Proj_Name(parProj_id)%>
|
142 |
<td width="50%" background="images/lbox_bg_blue.gif" nowrap class="wform_ttl"> Project Configuration for
|
| 143 |
</td>
|
143 |
<%=Get_Proj_Name(parProj_id)%>
|
| 144 |
<td width="50%" background="images/lbox_bg_blue.gif" align="right" nowrap class="wform_ttl">
|
144 |
</td>
|
| 145 |
<input type="submit" name="btn" value="Save" class="form_btn"> <input type="reset" name="btn" value="Close" class="form_btn" onclick="self.close()">
|
145 |
<td width="50%" background="images/lbox_bg_blue.gif" align="right" nowrap class="wform_ttl">
|
| 146 |
</td>
|
146 |
<input type="submit" name="btn" value="Save" class="form_btn"> <input type="reset" name="btn" value="Close" class="form_btn" onclick="self.close()">
|
| 147 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%" nowrap><img src="images/h_trsp_dot.gif" width="5" height="22"></td>
|
147 |
</td>
|
| 148 |
</tr>
|
148 |
<td background="images/lbox_bg_blue.gif" align="right" width="1%" nowrap><img src="images/h_trsp_dot.gif" width="5" height="22"></td>
|
| 149 |
<tr>
|
149 |
</tr>
|
| 150 |
<td height="100%" width="1%"> </td>
|
150 |
<tr>
|
| 151 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
151 |
<td height="100%" width="1%"> </td>
|
| 152 |
<br>
|
152 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/bg_form_lightgray.gif">
|
| 153 |
<br>
|
153 |
<br>
|
| 154 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
154 |
<br>
|
| 155 |
<tr>
|
155 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 156 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
156 |
<tr>
|
| 157 |
<td width="100%">
|
157 |
<td width="1%"><img src="images/h_trsp_dot.gif" width="10" height="30"></td>
|
| 158 |
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
158 |
<td width="100%">
|
| 159 |
<tr>
|
159 |
<table width="100%" border="0" cellspacing="1" cellpadding="4">
|
| 160 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Code
|
160 |
<tr>
|
| 161 |
Review Base URL</td>
|
161 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">Code
|
| 162 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_item" colspan="3" width="100%">
|
162 |
Review Base URL</td>
|
| 163 |
<input name="base_url" type="text" size="78" maxlength="200" class="form_item" value='<%=baseURL%>'></td>
|
163 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_item" colspan="3" width="100%">
|
| 164 |
</tr>
|
164 |
<input name="base_url" type="text" size="78" maxlength="200" class="form_item" value='<%=baseURL%>'></td>
|
| 165 |
<tr>
|
165 |
</tr>
|
| 166 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">JIRA Key</td>
|
166 |
<tr>
|
| 167 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_item" colspan="3" width="100%">
|
167 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_field">JIRA Key</td>
|
| 168 |
<input name="jira_key" type="text" size="78" maxlength="200" class="form_item" value='<%=jiraKey%>'></td>
|
168 |
<td nowrap background="images/bg_form_lightbluedark.gif" class="form_item" colspan="3" width="100%">
|
| 169 |
</tr>
|
169 |
<input name="jira_key" type="text" size="78" maxlength="200" class="form_item" value='<%=jiraKey%>'></td>
|
| 170 |
</table>
|
170 |
</tr>
|
| 171 |
</td>
|
171 |
</table>
|
| 172 |
</tr>
|
172 |
</td>
|
| 173 |
</table>
|
173 |
</tr>
|
| 174 |
<input type="hidden" name="action" value="true">
|
174 |
</table>
|
| 175 |
<input type="hidden" name="proj_id" value="<%=parProj_id%>">
|
175 |
<input type="hidden" name="action" value="true">
|
| 176 |
<br>
|
176 |
<input type="hidden" name="proj_id" value="<%=parProj_id%>">
|
| 177 |
<br>
|
177 |
<br>
|
| 178 |
</td>
|
178 |
<br>
|
| 179 |
</tr>
|
179 |
</td>
|
| 180 |
<tr>
|
180 |
</tr>
|
| 181 |
<td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
181 |
<tr>
|
| 182 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
182 |
<td height="1%" width="1%"><img src="images/h_trsp_dot.gif" width="5" height="5"></td>
|
| 183 |
</tr>
|
183 |
<td valign="top" nowrap colspan="3" class="wform_ttl" background="images/lbox_bg_blue.gif"></td>
|
| 184 |
</table>
|
184 |
</tr>
|
| 185 |
</form>
|
185 |
</table>
|
| 186 |
</body>
|
186 |
</form>
|
| 187 |
</html>
|
187 |
</body>
|
| 188 |
<!-- DESTRUCTOR ------->
|
188 |
</html>
|
| 189 |
<!--#include file="common/destructor.asp"-->
|
189 |
<!-- DESTRUCTOR ------->
|
| - |
|
190 |
<!--#include file="common/destructor.asp"-->
|