Subversion Repositories DevTools

Rev

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

Rev 4399 Rev 4477
Line 122... Line 122...
122
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
122
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
123
<script type="text/javascript" charset="utf-8">
123
<script type="text/javascript" charset="utf-8">
124
///////////////////////////////////////////////
124
///////////////////////////////////////////////
125
//  Function:    ajaxOpr
125
//  Function:    ajaxOpr
126
//  Description: Perform an ajax operation
126
//  Description: Perform an ajax operation
-
 
127
//  Args       :    prog        - Progam to invoke
127
//  Args       :    args - Part of URL to pass to script
128
//                  args        - Part of URL to pass to script
128
//                  callback    - Callback on success
129
//                  callback    - Callback on success
129
//                  ecall       - Callback on error            
130
//                  ecall       - Callback on error            
130
//
131
//
131
function ajaxOpr(args, callback, ecall)
132
function ajaxOpr(prog, args, callback, ecall)
132
{
133
{
133
    xmlHttp=GetXmlHttpObject(function(){ ajaxOprCallback(callback, ecall);});
134
    xmlHttp=GetXmlHttpObject(function(){ ajaxOprCallback(callback, ecall);});
134
    if (xmlHttp==null)
135
    if (xmlHttp==null)
135
    {
136
    {
136
      alert ("Your browser does not support AJAX!");
137
      alert ("Your browser does not support AJAX!");
137
      return;
138
      return;
138
    }
139
    }
139
 
140
 
140
    var url = "_json_jiraIssues.asp?" + args;
141
    var url = prog + "?" + args;
141
 
142
 
142
    // Use async request, otherwise the spinner will not work
143
    // Use async request, otherwise the spinner will not work
143
    xmlHttp.open("GET",url,true);  // `false` makes the request synchronous
144
    xmlHttp.open("GET",url,true);  // `false` makes the request synchronous
144
    xmlHttp.send(null);
145
    xmlHttp.send(null);
145
}
146
}
Line 174... Line 175...
174
                else {
175
                else {
175
                    callback(myJson);
176
                    callback(myJson);
176
                }
177
                }
177
            }
178
            }
178
            catch(e) {
179
            catch(e) {
-
 
180
                ecall('Error');
-
 
181
                alert("JSON Parse Error: " + e);
179
            }
182
            }
180
        }
183
        }
181
    }
184
    }
182
}
185
}
183
 
186
 
Line 189... Line 192...
189
{
192
{
190
    //  Show that testing has started
193
    //  Show that testing has started
191
    var el = document.getElementById("jiraTest");
194
    var el = document.getElementById("jiraTest");
192
    el.innerHTML = 'Testing';
195
    el.innerHTML = 'Testing';
193
 
196
 
-
 
197
    ajaxOpr('_json_jiraIssues.asp',
194
    ajaxOpr('Opr=getAllKeys', 
198
            'Opr=getAllKeys', 
195
            function(myJson){ el.innerHTML = 'Test OK'; },
199
            function(myJson){ el.innerHTML = 'Test OK'; },
196
            function(txt){ el.innerHTML = "Test Failed:" + txt}
200
            function(txt){ el.innerHTML = "Test Failed:" + txt}
197
           );
201
           );
198
    
-
 
199
}
202
}
-
 
203
 
-
 
204
///////////////////////////////////////////////
-
 
205
//  Function:       zipTest   
-
 
206
//  Description:    Test that the server can ZIP a file
-
 
207
//
-
 
208
function zipTest()
-
 
209
{
-
 
210
    //  Show that testing has started
-
 
211
    var el = document.getElementById("zipTest");
-
 
212
    el.innerHTML = 'Testing';
-
 
213
 
-
 
214
    ajaxOpr('_json_RmTests.asp',
-
 
215
            'Opr=zipTest', 
-
 
216
            function(myJson){ el.innerHTML = 'Test OK'; },
-
 
217
            function(txt){ el.innerHTML = "Test Failed:" + txt}
-
 
218
           );
-
 
219
}
-
 
220
 
-
 
221
 
200
</script>
222
</script>
201
<html>
223
<html>
202
<head>
224
<head>
203
 
225
 
204
<title>Admin Test Page</title>
226
<title>Admin Test Page</title>
Line 305... Line 327...
305
      <td><%=sValue2%></td>
327
      <td><%=sValue2%></td>
306
   </tr>
328
   </tr>
307
   
329
   
308
  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
330
  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
309
   <tr class="body_row">
331
   <tr class="body_row">
-
 
332
     <td>Zip File</td>
-
 
333
     <td><%=makeAjaxButton("Test", "zipTest")%></td>
-
 
334
   </tr>
-
 
335
 
-
 
336
  <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
-
 
337
   <tr class="body_row">
310
      <td>Email Server</td>
338
      <td>Email Server</td>
311
      <td><%=MAIL_SERVER%></td>
339
      <td><%=MAIL_SERVER%></td>
312
   </tr>
340
   </tr>
313
   <tr class="body_row">
341
   <tr class="body_row">
314
      <td>Admin Email</td>
342
      <td>Admin Email</td>