Changeset 7649:cefb68d8a450


Ignore:
Timestamp:
11/08/07 14:55:13 (6 years ago)
Author:
Yi Qiang <yqiang@…>
Branch:
default
Children:
7650:bc80ecdd8c32, 8374:65b1f782c84d
Message:

Various web server fixes.

Location:
sage/dsage/web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sage/dsage/web/index.html

    r7645 r7649  
    2121            <ul id="tabnav"> 
    2222                <li class="tab1"> 
    23                     <a href="#jobs" rel="history" onClick="getJobs(count)">Job Status</a> 
     23                    <a href="#jobs" rel="history" onClick="showJobs()">Job Status</a> 
    2424                </li> 
    2525                <li class="tab2"> 
  • sage/dsage/web/static/dsage_web.js

    r7645 r7649  
    22 
    33function getServerDetails () { 
     4    $('#server_details').load('get_server_details'); 
     5    showServer() 
     6} 
     7 
     8function showServer () { 
    49    $('#jobs_table').hide(); 
    510    $('#job_details').hide(); 
    611    $('#help').hide(); 
     12    $('#server_details').show(); 
     13    $('#navigator').hide(); 
     14} 
     15function getJobs (c) { 
     16    count = c // Set global variable count to the selected count.  
    717     
    8     $('#server_details').load('get_server_details'); 
    9     $('#server_details').show(); 
     18    // Load jobs table with the given number of jobs. 
     19    $('#jobs_table').load('get_jobs', {'count': c}, function() { 
     20            $("#jobs_table").tablesorter(); } ); 
     21             
     22    // Change current selected count to red  
     23    $('#navigator > a').css('color', 'black') 
     24    $('#' + c).css('color', 'red') 
    1025} 
    1126 
    12 function getJobs (c) { 
    13     count = c 
    14     $('#server_details').hide(); 
     27function showJobs () { 
     28    $('#server_details').hide();     
    1529    $('#job_details').hide(); 
    1630    $('#help').hide(); 
    17     $('#jobs_table').load('get_jobs', {'count': count}, function() { 
    18             $("#jobs_table").tablesorter(); } ); 
    1931    $('#jobs_table').show(); 
    2032} 
    2133 
    2234function getJobDetails (job_id) { 
     35    $('#job_details').load('get_details', {'job_id': job_id}, function() { 
     36                                        $("#job_details").tablesorter(); } ); 
     37    showJobDetails() 
     38} 
     39 
     40function showJobDetails () { 
    2341    $('#jobs_table').hide(); 
     42    $('#navigator').hide(); 
    2443    $('#server_details').hide(); 
    2544    $('#help').hide(); 
    26     $('#job_details').load('get_details', {'job_id': job_id}, function() { 
    27                                         $("#job_details").tablesorter(); } ); 
    2845    $('#job_details').show(); 
    2946} 
    3047 
    3148function getHelp () { 
     49    $('#help').load('get_help'); 
     50    showHelp() 
     51} 
     52 
     53function showHelp () { 
    3254    $('#jobs_table').hide(); 
     55    $('#navigator').hide(); 
    3356    $('#server_details').hide(); 
    3457    $('#job_details').hide(); 
    35     $('#help').load('get_help'); 
    3658    $('#help').show(); 
    3759} 
     
    4062    {  
    4163        getJobs(count) // Run it the first time 
    42         setInterval('getJobs(count)', 5000); // Update it every 5 seconds.   
     64        showJobs() // Show jobs 
     65        // setInterval('getJobs(count)', 5000); // Update it every 5 seconds.   
    4366    }  
    4467); 
Note: See TracChangeset for help on using the changeset viewer.