watch_wait.mako 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ## Licensed to Cloudera, Inc. under one
  2. ## or more contributor license agreements. See the NOTICE file
  3. ## distributed with this work for additional information
  4. ## regarding copyright ownership. Cloudera, Inc. licenses this file
  5. ## to you under the Apache License, Version 2.0 (the
  6. ## "License"); you may not use this file except in compliance
  7. ## with the License. You may obtain a copy of the License at
  8. ##
  9. ## http://www.apache.org/licenses/LICENSE-2.0
  10. ##
  11. ## Unless required by applicable law or agreed to in writing, software
  12. ## distributed under the License is distributed on an "AS IS" BASIS,
  13. ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. ## See the License for the specific language governing permissions and
  15. ## limitations under the License.
  16. <%!
  17. from desktop.views import commonheader, commonfooter
  18. from django.utils.translation import ugettext as _
  19. %>
  20. <%namespace name="layout" file="layout.mako" />
  21. <%namespace name="util" file="util.mako" />
  22. ${commonheader(_('Beeswax: Waiting for query...'), "beeswax", "100px")}
  23. ${layout.menubar(section='query')}
  24. <meta http-equiv="refresh" content="3;${url('beeswax.views.watch_query', query.id)}?${fwd_params}" />
  25. <div class="container-fluid">
  26. <h1>${_('Beeswax: Waiting for query...')} ${util.render_query_context(query_context)}</h1>
  27. <div class="row-fluid">
  28. <div class="span3">
  29. <div class="well sidebar-nav">
  30. <ul class="nav nav-list">
  31. <%
  32. n_jobs = hadoop_jobs and len(hadoop_jobs) or 0
  33. mr_jobs = (n_jobs == 1) and _('MR Job') or _('MR Jobs')
  34. %>
  35. % if n_jobs > 0:
  36. <li class="nav-header">${mr_jobs} (${n_jobs})</li>
  37. % for jobid in hadoop_jobs:
  38. <li><a href="${url("jobbrowser.views.single_job", jobid=jobid)}">${jobid.replace("job_", "")}</a></li>
  39. % endfor
  40. % else:
  41. <li class="nav-header">${mr_jobs}</li>
  42. <li>${_('No Hadoop jobs were launched in running this query.')}</li>
  43. % endif
  44. </ul>
  45. </div>
  46. </div>
  47. <div class="span9">
  48. <ul class="nav nav-tabs">
  49. <li class="active"><a href="#log" data-toggle="tab">${_('Log')}</a></li>
  50. <li><a href="#query" data-toggle="tab">${_('Query')}</a></li>
  51. </ul>
  52. <div class="tab-content">
  53. <div class="active tab-pane" id="log">
  54. <pre>${log | h}</pre>
  55. </div>
  56. <div class="tab-pane" id="query">
  57. <pre>${query.query | h}</pre>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. ${commonfooter()}