| Line 23... |
Line 23... |
| 23 |
<!--#include file="_access_control_general.asp"-->
|
23 |
<!--#include file="_access_control_general.asp"-->
|
| 24 |
<%
|
24 |
<%
|
| 25 |
'------------ Variable Definition -------------
|
25 |
'------------ Variable Definition -------------
|
| 26 |
Dim parTest
|
26 |
Dim parTest
|
| 27 |
Dim LocalPath
|
27 |
Dim LocalPath
|
| 28 |
Dim remExecRv
|
28 |
Dim rvRemExec
|
| 29 |
Dim rvEmail
|
29 |
Dim rvEmail
|
| 30 |
Dim rvEmail1
|
30 |
Dim rvEmail1
|
| - |
|
31 |
Dim rvEmail2
|
| - |
|
32 |
Dim rvEvent
|
| 31 |
Dim active
|
33 |
Dim active
|
| 32 |
|
34 |
|
| 33 |
'------------ Constants Declaration -----------
|
35 |
'------------ Constants Declaration -----------
|
| 34 |
'------------ Variable Init -------------------
|
36 |
'------------ Variable Init -------------------
|
| 35 |
parTest = QStrPar("test")
|
37 |
parTest = QStrPar("test")
|
| 36 |
remExecRv = ""
|
38 |
rvRemExec = ""
|
| 37 |
rvEmail = ""
|
39 |
rvEmail = ""
|
| 38 |
rvEmail1 = ""
|
40 |
rvEmail1 = ""
|
| - |
|
41 |
rvEmail2 = ""
|
| - |
|
42 |
rvEvent = ""
|
| 39 |
active = objAccessControl.IsActive("ConfigureBuildService")
|
43 |
active = objAccessControl.IsActive("ConfigureBuildService")
|
| 40 |
if NOT active Then parTest = ""
|
44 |
if NOT active Then parTest = ""
|
| 41 |
|
45 |
|
| 42 |
'----------------------------------------------
|
46 |
'----------------------------------------------
|
| 43 |
|
47 |
|
| Line 62... |
Line 66... |
| 62 |
End If
|
66 |
End If
|
| 63 |
End Function
|
67 |
End Function
|
| 64 |
|
68 |
|
| 65 |
Function makeAjaxButton( text, script )
|
69 |
Function makeAjaxButton( text, script )
|
| 66 |
If active Then
|
70 |
If active Then
|
| 67 |
makeAjaxButton = " <a id="""&script &""" class=""form_btn"" title=""" &text& """ onclick="""&script&"();return false;"">"&text&"</a>"
|
71 |
makeAjaxButton = " <a id="""&script &""" href="""" class=""form_btn"" title=""" &text& """ onclick="""&script&"();return false;"">"&text&"</a>"
|
| 68 |
Else
|
72 |
Else
|
| 69 |
makeAjaxButton = " <a class=""form_btn_disabled"" title=""" &text& """>"&text&"</a>" & result
|
73 |
makeAjaxButton = " <a class=""form_btn_disabled"" title=""" &text& """>"&text&"</a>"
|
| 70 |
End If
|
74 |
End If
|
| 71 |
End Function
|
75 |
End Function
|
| 72 |
|
76 |
|
| 73 |
'-------------------------------------------
|
77 |
'-------------------------------------------
|
| 74 |
' Perform tests on request
|
78 |
' Perform tests on request
|
| Line 80... |
Line 84... |
| 80 |
ElseIf parTest = "email1" Then
|
84 |
ElseIf parTest = "email1" Then
|
| 81 |
LocalPath = Server.MapPath("images\img_reports_admin.jpg")
|
85 |
LocalPath = Server.MapPath("images\img_reports_admin.jpg")
|
| 82 |
Call Send_Email ( "Release Manager Notification", adminEmail, objAccessControl.UserEmail, "Test Email", "This is a Test Email generated by the Release Manager Test. This email has an attachment", LocalPath )
|
86 |
Call Send_Email ( "Release Manager Notification", adminEmail, objAccessControl.UserEmail, "Test Email", "This is a Test Email generated by the Release Manager Test. This email has an attachment", LocalPath )
|
| 83 |
rvEmail1 = "Sent"
|
87 |
rvEmail1 = "Sent"
|
| 84 |
|
88 |
|
| - |
|
89 |
ElseIf parTest = "email2" Then
|
| - |
|
90 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
| - |
|
91 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Test.wsf //job:onTestMail", 0, TRUE)
|
| - |
|
92 |
Set objWSH = Nothing
|
| - |
|
93 |
If rv = 0 Then
|
| - |
|
94 |
rvEmail2 = "OK"
|
| - |
|
95 |
Else
|
| - |
|
96 |
rvEmail2 = "Error ("&rv&")"
|
| - |
|
97 |
End IF
|
| - |
|
98 |
|
| - |
|
99 |
ElseIf parTest = "event" Then
|
| - |
|
100 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
| - |
|
101 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Test.wsf //job:onRaiseEvent", 0, TRUE)
|
| - |
|
102 |
Set objWSH = Nothing
|
| - |
|
103 |
If rv = 0 Then
|
| - |
|
104 |
rvEvent = "OK"
|
| - |
|
105 |
Else
|
| - |
|
106 |
rvEvent = "Error ("&rv&")"
|
| - |
|
107 |
End IF
|
| - |
|
108 |
|
| 85 |
ElseIf parTest = "remExec" Then
|
109 |
ElseIf parTest = "remExec" Then
|
| 86 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
110 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
| 87 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestArchiveAccess", 0, TRUE)
|
111 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Test.wsf //job:onTestArchiveAccess", 0, TRUE)
|
| 88 |
Set objWSH = Nothing
|
112 |
Set objWSH = Nothing
|
| 89 |
If rv = 0 Then
|
113 |
If rv = 0 Then
|
| 90 |
remExecRv = "OK"
|
114 |
rvRemExec = "OK"
|
| 91 |
Else
|
115 |
Else
|
| 92 |
remExecRv = "Error ("&rv&")"
|
116 |
rvRemExec = "Error ("&rv&")"
|
| 93 |
End IF
|
117 |
End IF
|
| 94 |
End If
|
118 |
End If
|
| 95 |
|
119 |
|
| 96 |
%>
|
120 |
%>
|
| 97 |
<script type="text/javascript" src="scripts/json2.js"></script>
|
121 |
<script type="text/javascript" src="scripts/json2.js"></script>
|
| Line 251... |
Line 275... |
| 251 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Map File System</td>
|
275 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Map File System</td>
|
| 252 |
<%
|
276 |
<%
|
| 253 |
|
277 |
|
| 254 |
Dim objWSH,rv,result
|
278 |
Dim objWSH,rv,result
|
| 255 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
279 |
Set objWSH = Server.CreateObject("WScript.Shell")
|
| 256 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Tools.wsf //job:onTestMapArchive", 0, TRUE)
|
280 |
rv = objWSH.Run ("cmd.exe /c cscript.exe //B //NoLogo " & rootPath & SCRIPTS_FOLDER & "\Admin_Test.wsf //job:onTestMapArchive", 0, TRUE)
|
| 257 |
Set objWSH = Nothing
|
281 |
Set objWSH = Nothing
|
| 258 |
If rv = 0 Then
|
282 |
If rv = 0 Then
|
| 259 |
result = "OK"
|
283 |
result = "OK"
|
| 260 |
Else
|
284 |
Else
|
| 261 |
result = "Error ("&rv&")"
|
285 |
result = "Error ("&rv&")"
|
| Line 265... |
Line 289... |
| 265 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=result%></td>
|
289 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=result%></td>
|
| 266 |
</tr>
|
290 |
</tr>
|
| 267 |
|
291 |
|
| 268 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
292 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 269 |
<tr>
|
293 |
<tr>
|
| - |
|
294 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Remote cmd execution</td>
|
| - |
|
295 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
| - |
|
296 |
<%=makeButton("Test", "remExec",rvRemExec)%>
|
| - |
|
297 |
</td>
|
| - |
|
298 |
</tr>
|
| - |
|
299 |
|
| - |
|
300 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| - |
|
301 |
<tr>
|
| 270 |
<%
|
302 |
<%
|
| 271 |
Dim sKey1, sKey2, sValue1, sValue2, kFragment
|
303 |
Dim sKey1, sKey2, sValue1, sValue2, kFragment
|
| 272 |
kFragment = "rsa2@22:" & archive_server
|
304 |
kFragment = "rsa2@22:" & archive_server
|
| 273 |
sKey1 = "HKEY_USERS\S-1-5-20\Software\SimonTatham\PuTTY\SshHostKeys\" & kFragment
|
305 |
sKey1 = "HKEY_USERS\S-1-5-20\Software\SimonTatham\PuTTY\SshHostKeys\" & kFragment
|
| 274 |
sKey2 = "HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys\" & kFragment
|
306 |
sKey2 = "HKEY_USERS\.DEFAULT\Software\SimonTatham\PuTTY\SshHostKeys\" & kFragment
|
| Line 281... |
Line 313... |
| 281 |
<tr>
|
313 |
<tr>
|
| 282 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Plink Key [<%=sKey2%>]</td>
|
314 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Plink Key [<%=sKey2%>]</td>
|
| 283 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=sValue2%></td>
|
315 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=sValue2%></td>
|
| 284 |
</tr>
|
316 |
</tr>
|
| 285 |
|
317 |
|
| 286 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
318 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 287 |
<tr>
|
- |
|
| 288 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Package Archive Access - Remote cmd execution</td>
|
- |
|
| 289 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
- |
|
| 290 |
<%=makeButton("Test", "remExec",remExecRv)%>
|
- |
|
| 291 |
</td>
|
- |
|
| 292 |
</tr>
|
- |
|
| 293 |
|
- |
|
| 294 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
- |
|
| 295 |
<tr>
|
319 |
<tr>
|
| 296 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Email Server</td>
|
320 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Email Server</td>
|
| 297 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=MAIL_SERVER%></td>
|
321 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=MAIL_SERVER%></td>
|
| 298 |
</tr>
|
322 |
</tr>
|
| 299 |
<tr>
|
323 |
<tr>
|
| Line 309... |
Line 333... |
| 309 |
<tr>
|
333 |
<tr>
|
| 310 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Send Email With attachment</td>
|
334 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Send Email With attachment</td>
|
| 311 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
335 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
| 312 |
<%=makeButton("eMail", "email1",rvEmail1)%>
|
336 |
<%=makeButton("eMail", "email1",rvEmail1)%>
|
| 313 |
</tr>
|
337 |
</tr>
|
| - |
|
338 |
<tr>
|
| - |
|
339 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Send Email from WSH script</td>
|
| - |
|
340 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
| - |
|
341 |
<%=makeButton("eMail", "email2",rvEmail2)%>
|
| - |
|
342 |
</tr>
|
| - |
|
343 |
|
| - |
|
344 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| - |
|
345 |
<tr>
|
| - |
|
346 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Generate error event</td>
|
| - |
|
347 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">
|
| - |
|
348 |
<%=makeButton("event", "event",rvEvent)%>
|
| - |
|
349 |
</tr>
|
| - |
|
350 |
|
| 314 |
|
351 |
|
| 315 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
352 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 316 |
<tr>
|
353 |
<tr>
|
| 317 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Jira Server</td>
|
354 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col">Jira Server</td>
|
| 318 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=JIRA_URL%></td>
|
355 |
<td valign="top" nowrap background="images/bg_table_col.gif" class="body_col"><%=JIRA_URL%></td>
|