Subversion Repositories DevTools

Rev

Rev 5172 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5172 Rev 5245
Line 14... Line 14...
14
%>
14
%>
15
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/conf.asp"-->
16
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/globals.asp"-->
17
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_subs.asp"-->
-
 
19
<!--#include file="_jquery_includes.asp"-->
19
 
20
 
20
<%
21
<%
21
'------------ ACCESS CONTROL ------------------
22
'------------ ACCESS CONTROL ------------------
22
%>
23
%>
23
<!--#include file="_access_control_general.asp"-->
24
<!--#include file="_access_control_general.asp"-->
Line 57... Line 58...
57
    Else
58
    Else
58
        makeAjaxButton = "&nbsp;&nbsp;<a class=""form_btn_disabled"" title=""" &text& """>"&text&"</a>"
59
        makeAjaxButton = "&nbsp;&nbsp;<a class=""form_btn_disabled"" title=""" &text& """>"&text&"</a>"
59
    End If
60
    End If
60
End Function
61
End Function
61
%>
62
%>
62
<script type="text/javascript" src="scripts/json2.js"></script>
-
 
63
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
-
 
64
<script type="text/javascript" charset="utf-8">
63
<script type="text/javascript" charset="utf-8">
65
///////////////////////////////////////////////
64
///////////////////////////////////////////////
66
//  Function:    ajaxOpr
65
//  Function:    ajaxOpr
67
//  Description: Perform an ajax operation
66
//  Description: Perform an ajax operation
68
//  Args       :    prog        - Progam to invoke
67
//  Args       :    prog        - Progam to invoke
Line 70... Line 69...
70
//                  callback    - Callback on success
69
//                  callback    - Callback on success
71
//                  ecall       - Callback on error            
70
//                  ecall       - Callback on error            
72
//
71
//
73
function ajaxOpr(prog, args, callback, ecall)
72
function ajaxOpr(prog, args, callback, ecall)
74
{
73
{
75
    var xmlHttp 
74
    $.ajax({
76
    xmlHttp=GetXmlHttpObject(function(){ ajaxOprCallback(xmlHttp,callback, ecall);});
-
 
77
    if (xmlHttp==null)
75
        method: "GET",
78
    {
-
 
79
      alert ("Your browser does not support AJAX!");
-
 
80
      return;
76
        url: prog,
81
    }
-
 
82
 
-
 
83
    var url = prog + "?" + args;
77
        data: args,
84
 
-
 
85
    // Use async request, otherwise the spinner will not work
-
 
86
    xmlHttp.open("GET",url,true);  // `false` makes the request synchronous
-
 
87
    xmlHttp.send(null);
78
        dataType: 'json'
88
}
-
 
89
///////////////////////////////////////////////
-
 
90
//  Function:    ajaxOprCallback
-
 
91
//  Description: Perform an Ajax operation generic error handling
-
 
92
//  Args       :    xmlHttp  - Ajax Object
-
 
93
//                  callback - Function to process json results
-
 
94
//                             Json has been decoded and is a javascript object
-
 
95
//                             Handle errors for the user
-
 
96
//                  ecall    - Function called on error. 
-
 
97
//                             User should indicate failure
-
 
98
//                             This function will issue an alert for the caller
-
 
99
//
-
 
100
function ajaxOprCallback(xmlHttp,callback, ecall)
-
 
101
{
-
 
102
    //readyState of 4 or 'complete' represents that data has been returned
-
 
103
    if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
-
 
104
    {
79
    })
105
        // alert("Got to getAllProjectKeysDone"+ xmlHttp.responseText);
-
 
106
        if (xmlHttp.status !== 200) {
80
    .done(function( myJson, textStatus, jqXHR ) {
107
            ecall('Bad Status');
-
 
108
            alert("Internal AJAX error: " + xmlHttp.status);
-
 
109
        }
-
 
110
        else
-
 
111
        {
-
 
112
            // Gather the results from the callback
-
 
113
            var str = xmlHttp.responseText;
-
 
114
            try {
81
        try {
115
                var myJson = JSON.parse(str);
-
 
116
                //alert("ajaxOprCallback:" + str);
82
            //alert("ajaxOprCallback:" + myJson);
117
                if (myJson.result != 0) {
83
            if (myJson.result != 0) {
118
                    ecall('Error');
-
 
119
                    alert("AJAX request error: " + myJson.emsgSummary);
-
 
120
                }
-
 
121
                else {
-
 
122
                    callback(myJson);
-
 
123
                }
-
 
124
            }
-
 
125
            catch(e) {
-
 
126
                ecall('Error');
84
                ecall('Error');
127
                alert("JSON Parse Error: " + e);
85
                vixAlert("AJAX request error: " + myJson.emsgSummary);
-
 
86
            }
-
 
87
            else {
-
 
88
                callback(myJson);
128
            }
89
            }
129
        }
90
        }
-
 
91
        catch(e) {
-
 
92
            ecall('Error');
-
 
93
            vixAlert("JSON Parse Error: " + e);
-
 
94
        }
130
    }
95
    })
-
 
96
    .fail(function(  jqXHR, textStatus, errorThrown ) {
-
 
97
        ecall('Bad Status');
-
 
98
        vixAlert("Internal AJAX error<br>Status: " + textStatus + "<br>Msg: " + errorThrown);
-
 
99
    });
131
}
100
}
132
 
101
 
133
///////////////////////////////////////////////
102
///////////////////////////////////////////////
134
//  Function:       jiraTest   
103
//  Function:       jiraTest   
135
//  Description:    Get the list of projects from the Jira Server
104
//  Description:    Get the list of projects from the Jira Server
Line 139... Line 108...
139
    //  Show that testing has started
108
    //  Show that testing has started
140
    var el = document.getElementById("jiraTest");
109
    var el = document.getElementById("jiraTest");
141
    el.innerHTML = 'Testing';
110
    el.innerHTML = 'Testing';
142
 
111
 
143
    ajaxOpr('_json_jiraIssues.asp',
112
    ajaxOpr('_json_jiraIssues.asp',
144
            'Opr=getAllKeys', 
113
            {Opr:'getAllKeys'}, 
-
 
114
            function(myJson){ el.innerHTML = 'Test OK'; },
-
 
115
            function(txt){ el.innerHTML = "Test Failed:" + txt}
-
 
116
           );
-
 
117
}
-
 
118
 
-
 
119
///////////////////////////////////////////////
-
 
120
//  Function:       LXRTest   
-
 
121
//  Description:    Get some data fromthe LXR Server
-
 
122
//
-
 
123
function LXRTest()
-
 
124
{
-
 
125
    //  Show that testing has started
-
 
126
    var el = document.getElementById("LXRTest");
-
 
127
    el.innerHTML = 'Testing';
-
 
128
 
-
 
129
    ajaxOpr('_json_RmTests.asp',
-
 
130
            {Opr:'lxrAccessTest'}, 
145
            function(myJson){ el.innerHTML = 'Test OK'; },
131
            function(myJson){ el.innerHTML = 'Test OK'; },
146
            function(txt){ el.innerHTML = "Test Failed:" + txt}
132
            function(txt){ el.innerHTML = "Test Failed:" + txt}
147
           );
133
           );
148
}
134
}
149
 
135
 
Line 156... Line 142...
156
    //  Show that testing has started
142
    //  Show that testing has started
157
    var el = document.getElementById("zipTest");
143
    var el = document.getElementById("zipTest");
158
    el.innerHTML = 'Testing';
144
    el.innerHTML = 'Testing';
159
 
145
 
160
    ajaxOpr('_json_RmTests.asp',
146
    ajaxOpr('_json_RmTests.asp',
161
            'Opr=zipTest', 
147
            {Opr:'zipTest'}, 
162
            function(myJson){ el.innerHTML = 'Test OK'; },
148
            function(myJson){ el.innerHTML = 'Test OK'; },
163
            function(txt){ el.innerHTML = "Test Failed:" + txt}
149
            function(txt){ el.innerHTML = "Test Failed:" + txt}
164
           );
150
           );
165
}
151
}
166
 
152
 
Line 173... Line 159...
173
    //  Show that testing has started
159
    //  Show that testing has started
174
    var el = document.getElementById("eventTest");
160
    var el = document.getElementById("eventTest");
175
    el.innerHTML = 'Sending';
161
    el.innerHTML = 'Sending';
176
 
162
 
177
    ajaxOpr('_json_RmTests.asp',
163
    ajaxOpr('_json_RmTests.asp',
178
            'Opr=eventTest', 
164
            {Opr:'eventTest'}, 
179
            function(myJson){ el.innerHTML = 'Sent OK'; },
165
            function(myJson){ el.innerHTML = 'Sent OK'; },
180
            function(txt){ el.innerHTML = "Test Failed:" + txt}
166
            function(txt){ el.innerHTML = "Test Failed:" + txt}
181
           );
167
           );
182
}
168
}
183
 
169
 
Line 190... Line 176...
190
    //  Show that testing has started
176
    //  Show that testing has started
191
    var el = document.getElementById("reportEvent");
177
    var el = document.getElementById("reportEvent");
192
    el.innerHTML = 'Reporting';
178
    el.innerHTML = 'Reporting';
193
 
179
 
194
    ajaxOpr('_json_RmTests.asp',
180
    ajaxOpr('_json_RmTests.asp',
195
            'Opr=reportEvent', 
181
            {Opr:'reportEvent'}, 
196
            function(myJson){ el.innerHTML = 'Reported OK'; },
182
            function(myJson){ el.innerHTML = 'Reported OK'; },
197
            function(txt){ el.innerHTML = "Test Failed:" + txt}
183
            function(txt){ el.innerHTML = "Test Failed:" + txt}
198
           );
184
           );
199
}
185
}
200
 
186
 
Line 207... Line 193...
207
    //  Show that testing has started
193
    //  Show that testing has started
208
    var el = document.getElementById("emailTest");
194
    var el = document.getElementById("emailTest");
209
    el.innerHTML = 'Sending';
195
    el.innerHTML = 'Sending';
210
 
196
 
211
    ajaxOpr('_json_RmTests.asp',
197
    ajaxOpr('_json_RmTests.asp',
212
            'Opr=emailTest', 
198
            {Opr:'emailTest'}, 
213
            function(myJson){ el.innerHTML = 'Sent OK'; },
199
            function(myJson){ el.innerHTML = 'Sent OK'; },
214
            function(txt){ el.innerHTML = "Test Failed:" + txt}
200
            function(txt){ el.innerHTML = "Test Failed:" + txt}
215
           );
201
           );
216
}
202
}
217
///////////////////////////////////////////////
203
///////////////////////////////////////////////
Line 223... Line 209...
223
    //  Show that testing has started
209
    //  Show that testing has started
224
    var el = document.getElementById("emailTest1");
210
    var el = document.getElementById("emailTest1");
225
    el.innerHTML = 'Sending';
211
    el.innerHTML = 'Sending';
226
 
212
 
227
    ajaxOpr('_json_RmTests.asp',
213
    ajaxOpr('_json_RmTests.asp',
228
            'Opr=emailTest&Mode=Attach', 
214
            {Opr:'emailTest', Mode:'Attach'}, 
229
            function(myJson){ el.innerHTML = 'Sent OK'; },
215
            function(myJson){ el.innerHTML = 'Sent OK'; },
230
            function(txt){ el.innerHTML = "Test Failed:" + txt}
216
            function(txt){ el.innerHTML = "Test Failed:" + txt}
231
           );
217
           );
232
}
218
}
233
 
219
 
Line 240... Line 226...
240
    //  Show that testing has started
226
    //  Show that testing has started
241
    var el = document.getElementById("remExec");
227
    var el = document.getElementById("remExec");
242
    el.innerHTML = 'Testing';
228
    el.innerHTML = 'Testing';
243
 
229
 
244
    ajaxOpr('_json_RmTests.asp',
230
    ajaxOpr('_json_RmTests.asp',
245
            'Opr=remExecTest', 
231
            {Opr:'remExecTest'}, 
246
            function(myJson){ el.innerHTML = 'Test OK'; },
232
            function(myJson){ el.innerHTML = 'Test OK'; },
247
            function(txt){ el.innerHTML = "Test Failed:" + txt}
233
            function(txt){ el.innerHTML = "Test Failed:" + txt}
248
           );
234
           );
249
}
235
}
250
 
236
 
Line 257... Line 243...
257
    //  Show that testing has started
243
    //  Show that testing has started
258
    var el = document.getElementById("pkgAccess");
244
    var el = document.getElementById("pkgAccess");
259
    el.innerHTML = 'Testing';
245
    el.innerHTML = 'Testing';
260
 
246
 
261
    ajaxOpr('_json_RmTests.asp',
247
    ajaxOpr('_json_RmTests.asp',
262
            'Opr=pkgAccessTest', 
248
            {Opr:'pkgAccessTest'}, 
263
            function(myJson){ el.innerHTML = 'Test OK'; },
249
            function(myJson){ el.innerHTML = 'Test OK'; },
264
            function(txt){ el.innerHTML = "Test Failed:" + txt}
250
            function(txt){ el.innerHTML = "Test Failed:" + txt}
265
           );
251
           );
266
}
252
}
267
 
253
 
Line 273... Line 259...
273
 
259
 
274
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
260
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
275
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
261
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
276
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
262
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
277
<link rel="stylesheet" href="images/navigation.css" type="text/css">
263
<link rel="stylesheet" href="images/navigation.css" type="text/css">
278
<script language="JavaScript" src="images/common.js"></script>
-
 
279
<!-- DROPDOWN MENUS -->
264
<!-- DROPDOWN MENUS -->
280
<!--#include file="_menu_def.asp"-->
265
<!--#include file="_menu_def.asp"-->
281
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
266
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
282
<!-- StyleSheet Extensions -->
267
<!-- StyleSheet Extensions -->
283
<style>
268
<style>
Line 414... Line 399...
414
      <td>Jira Test</td>
399
      <td>Jira Test</td>
415
      <td><%=makeAjaxButton("Test", "jiraTest")%></td>
400
      <td><%=makeAjaxButton("Test", "jiraTest")%></td>
416
   </tr>
401
   </tr>
417
 
402
 
418
   <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
403
   <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
404
   <tr class="body_row">
-
 
405
      <td>LXR Server</td>
-
 
406
      <td><%=LXR_URL%></td>
-
 
407
   </tr>
-
 
408
   <tr class="body_row">
-
 
409
      <td>LXR Test</td>
-
 
410
      <td><%=makeAjaxButton("Test", "LXRTest")%></td>
-
 
411
   </tr>
-
 
412
 
-
 
413
   <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
419
   <tr class="body_col tablehdr">
414
   <tr class="body_col tablehdr">
420
      <td>End of Tests</td>
415
      <td>End of Tests</td>
421
      <td><a class="form_btn" href="admin_build_test_page.asp" title="Refresh Page">Refresh</a></td>
416
      <td><a class="form_btn" href="admin_build_test_page.asp" title="Refresh Page">Refresh</a></td>
422
   </tr>
417
   </tr>
423
   
418