job_not_assigned.mako 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. <%namespace name="comps" file="jobbrowser_components.mako" />
  17. <%!
  18. from desktop.views import commonheader, commonfooter
  19. from django.template.defaultfilters import urlencode
  20. from django.utils.translation import ugettext as _
  21. %>
  22. ${ commonheader(_('Job'), "jobbrowser", user) | n,unicode }
  23. ${ comps.menubar() }
  24. <link href="${ static('jobbrowser/css/jobbrowser.css') }" rel="stylesheet">
  25. <div class="container-fluid">
  26. <div class="row-fluid">
  27. <div class="span2">
  28. <div class="sidebar-nav" style="padding-top: 0">
  29. <ul class="nav nav-list">
  30. <li class="nav-header">${_('Job ID')}</li>
  31. <li class="white truncate" title="${ jobid }">${ jobid }</li>
  32. </ul>
  33. </div>
  34. </div>
  35. <div class="span10">
  36. <div class="card card-small">
  37. <h1 class="card-heading simple">${_('Loading...')}</h1>
  38. <div class="card-body">
  39. <p>
  40. ${ _('The application might not be running yet or there is no Node Manager or Container available.') }
  41. <strong>${ _('This page will be automatically refreshed.') }</strong>
  42. <br/>
  43. <br/>
  44. <!--[if !IE]><!--><i class="fa fa-spinner fa-spin" style="font-size: 60px; color: #DDD"></i><!--<![endif]-->
  45. <!--[if IE]><img src="${ static('desktop/art/spinner.gif') }" /><![endif]-->
  46. </p>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. <script type="text/javascript" charset="utf-8">
  52. $(document).ready(function () {
  53. function checkStatus() {
  54. $.getJSON("${ url('jobbrowser.views.job_not_assigned', jobid=jobid, path=path) }?format=json", function (data) {
  55. if (data.status == 1) {
  56. window.setTimeout(checkStatus, 1000);
  57. } else if (data.status == 0) {
  58. window.location.replace("${ path }");
  59. } else {
  60. // info js popup
  61. window.setTimeout(checkStatus, 1000);
  62. }
  63. });
  64. }
  65. checkStatus();
  66. });
  67. </script>
  68. ${ commonfooter(messages) | n,unicode }