Changeset 10816
- Timestamp:
- 08/05/11 14:33:13 (22 months ago)
- Location:
- ossiedev/trunk/tools/cornetApps
- Files:
-
- 8 modified
-
HtmlPages/static/frames.js (modified) (5 diffs)
-
HtmlPages/views.py (modified) (2 diffs)
-
HtmlPages/views.pyc (modified) (previous)
-
cornetApps.db (modified) (previous)
-
templates/HtmlPages/ossie.html (modified) (1 diff)
-
templates/HtmlPages/running.html (modified) (1 diff)
-
templates/HtmlPages/waveforms.html (modified) (1 diff)
-
urls.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/trunk/tools/cornetApps/HtmlPages/static/frames.js
r10814 r10816 4 4 $(this).css('background-color', '#3e1'); 5 5 }); 6 }); 7 8 $(function closePage(){ 9 window.onbeforeunload=function(){ 10 return 'Please remember to uninstall ALL WAVEFORMS and scripts before leaving.';} 6 11 }); 7 12 … … 21 26 }); 22 27 23 $(function closePage(){ 24 window.onbeforeunload=function(){ 25 return 'Please remember to uninstall ALL WAVEFORMS and scripts before leaving.';} 28 $("#left_bottom").ready(function(){ 29 $("#apps").load("/running/"); 26 30 }); 27 31 … … 36 40 var tabsIdRightTop = '#right_top .tabs'; 37 41 38 $("#right -top").ready(function(){42 $("#right_top").ready(function(){ 39 43 // Preload tab on page load 40 44 if($(tabsIdRightTop + ' LI.current A').length > 0){ … … 53 57 tabsIdRightBot = "#right_bottom .tabs" 54 58 55 $("#right -bottom").ready(function(){59 $("#right_bottom").ready(function(){ 56 60 // Preload tab on page load 57 61 if($(tabsIdRightBot + 'LI.current A').length > 0){ … … 77 81 } 78 82 83 function install(waveform){ 84 $("#apps").load("/install/"+waveform); 85 } 86 87 function uninstall(waveform){ 88 $("#apps").load("/uninstall/"+waveform); 89 } -
ossiedev/trunk/tools/cornetApps/HtmlPages/views.py
r10814 r10816 64 64 return render_to_response("HtmlPages/nodes.html", locals(), context_instance=RequestContext(request)) 65 65 66 def waveforms(request):67 ctrlr = Controller(False)68 ctrlr.createWidgetContainer()69 ctrlr.CORBAutils.init_CORBA(False)70 ctrlr.buildModel()71 72 availableList = ctrlr.model.getSystemWaveforms()73 74 return render_to_response("HtmlPages/waveforms.html", locals(), context_instance=RequestContext(request))75 76 66 def register_page(request): 77 67 if request.method == 'POST': … … 88 78 variables = RequestContext(request, {'form':form}) 89 79 return render_to_response('registration/register.html', variables) 80 81 def buildWebDash(): 82 ctrlr = Controller(False) 83 ctrlr.createWidgetContainer() 84 ctrlr.CORBAutils.init_CORBA(False) 85 ctrlr.buildModel() 86 return ctrlr 87 88 def waveforms(request): 89 ctrlr = buildWebDash() 90 availableList = ctrlr.model.getSystemWaveforms() 91 return render_to_response("HtmlPages/waveforms.html", locals(), context_instance=RequestContext(request)) 92 93 def running_page(request): 94 ctrlr = buildWebDash() 95 96 availableList = ctrlr.model.getSystemWaveforms() 97 instancesList = [] 98 instances = [] 99 for waveform in availableList: 100 instances = ctrlr.model.getInstanceWaveforms(waveform.getName()) 101 if instances: 102 for instance in instances: 103 instancesList.append(instance) 104 105 return render_to_response('HtmlPages/running.html', {'instancesList' : instancesList}) 106 107 def install(request, waveform_to_install): 108 ctrlr = buildWebDash() 109 instance = ctrlr.installWaveform(waveform_to_install, True) 110 return running_page(request) 111 112 def uninstall(request, instance_to_uninstall): 113 ctrlr = buildWebDash() 114 uninstall = ctrlr.uninstallWaveform(instance_to_uninstall) 115 return running_page(request) -
ossiedev/trunk/tools/cornetApps/templates/HtmlPages/ossie.html
r10814 r10816 15 15 <div id="left_bottom"> 16 16 <p>Active Applications</p> 17 <div id="apps"></div> 17 18 </div><!--end #left_bottom--> 18 19 </div><!--end #column_left--> -
ossiedev/trunk/tools/cornetApps/templates/HtmlPages/running.html
r10815 r10816 1 1 {% if instancesList %} 2 < h1>Running Instances</h1>2 <!--<h1>Running Instances</h1>--> 3 3 <table> 4 4 {% for instance in instancesList %} 5 5 <tr> 6 6 <td> <a href='/WebDash/{{ instance.getName }}/display/'>{{ instance.getName }}</a> </td> 7 <td> <button onClick="window.location='/WebDash/{{ instance.getName }}/uninstall/'">Uninstall </button></td> 7 <!--<td> <button onClick="window.location='/WebDash/{{ instance.getName }}/uninstall/'">Uninstall </button></td>--> 8 <td><button onClick="javascript:uninstall('{{ instance.getName }}');">Uninstall</button></td> 8 9 </tr> 9 10 {% endfor %} 10 11 </table> 11 12 {% else %} 12 <p>No waveforms currently running.<p>13 <p>No running waveforms.<p> 13 14 {% endif %} -
ossiedev/trunk/tools/cornetApps/templates/HtmlPages/waveforms.html
r10814 r10816 5 5 <tr> 6 6 <td> {{ wave.getName }} </td> 7 <td> <button onClick="window.location='/WebDash/{{ wave.getName }}/install/'">Install</button> </td> 7 <!--<td> <button onClick="window.location='/WebDash/{{ wave.getName }}/install/'">Install</button> </td>--> 8 <td> <button onClick="javascript:install('{{ wave.getName }}');">Install</button> </td> 8 9 {% endfor %} 9 10 </tr> 10 11 </table> 11 12 {% else %} 12 <p>No waveforms currentlyrunning.</p>13 <p>No available waveforms. Check if nodebooter is running.</p> 13 14 {% endif %} -
ossiedev/trunk/tools/cornetApps/urls.py
r10786 r10816 25 25 url(r'^waveforms/$', 'HtmlPages.views.waveforms'), 26 26 url(r'^register/$', 'HtmlPages.views.register_page'), 27 url(r'^install/(?P<waveform_to_install>.*)/$', 'HtmlPages.views.install'), 28 url(r'^uninstall/(?P<instance_to_uninstall>.*)/', 'HtmlPages.views.uninstall'), 29 url(r'^running/$', 'HtmlPages.views.running_page'), 27 30 28 31 # url(r'^cornetApps/', include('cornetApps.foo.urls')),