index-base.html 3.29 KB
Newer Older
chenpangpang's avatar
chenpangpang committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>JupyterLab</title><meta name="viewport" content="width=device-width,initial-scale=1">{# Copy so we do not modify the page_config with updates. #} {% set page_config_full = page_config.copy() %} {# Set a dummy variable - we just want the side effect of the update. #} {% set _ = page_config_full.update(baseUrl=base_url, wsUrl=ws_url) %}<script id="jupyter-config-data" type="application/json">{{ page_config_full | tojson }}</script>{% block favicon %}<link rel="icon" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon.ico" class="idle favicon"><link rel="" type="image/x-icon" href="{{ base_url | escape }}static/favicons/favicon-busy-1.ico" class="busy favicon">{% endblock %}<script defer="defer" src="mainJsParam"></script></head>
<script>/* Remove token from URL. */
 (function () {
    var location = window.location;
    var search = location.search;

    // If there is no query string, bail.
    if (search.length <= 1) {
      return;
    }

    // Rebuild the query string without the `token`.
    var query = '?' + search.slice(1).split('&')
      .filter(function (param) { return param.split('=')[0] !== 'token'; })
      .join('&');

    // Rebuild the URL with the new query string.
    var url = location.origin + location.pathname +
      (query !== '?' ? query : '') + location.hash;

    if (url === location.href) {
      return;
    }

    window.history.replaceState({ }, '', url);
  })();</script>
<div id="sugon-logo-wrap">
  <img src="{{page_config.fullStaticUrl}}/scnet-loading.gif" />
  <div class="waiting-text">加载服务中,请稍候</div>
  <span class="time-limit time-limited">
    当前实例任务单次运行最大时长
    <span class="time" id="sugon-time-limit"></span>
    ,请注意及时保存重要文件
  </span>
  <span class="time-limit time-unlimited">当前实例任务不会自动关停并将持续产生费用,请注意按需手动关停。</span>
</div>
</body>
<style>
#sugon-logo-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100;
  text-align: center;
}
#sugon-logo-wrap img {
  width: 50px;
}
#sugon-logo-wrap .waiting-text {
  font-size: 20px;
  font-weight: 500;
  color: #3b4048;
  line-height: 30px;
  margin: 18px 0 26px;
  text-align: center;
}
#sugon-logo-wrap .time-limit {
  font-size: 14px;
  font-weight: 400;
  color: #3B4048;
  line-height: 14px;
  display: none;
}
 #sugon-logo-wrap .time-limit .time {
    font-weight: 700;
    font-size: 18px;
    color: #FFB333;
  }
</style>
<script>
  var sugonLoadInterval = setInterval(() => {
    var sugonMenu = document.getElementById('jp-menu-panel')
    if (sugonMenu) {
      clearInterval(sugonLoadInterval)
      document.body.removeChild(document.getElementById('sugon-logo-wrap'))
    }
  }, 100)
  const query = new URLSearchParams(window.location.search);
  if (query.get('limit')) {
    const limit = query.get('limit')
    if (limit === 'unlimited') {
      document.querySelector('.time-limit.time-unlimited').style.display = 'block'
    } else {
      const timeText = Number(limit.split(':')[0]) + '小时'
      document.querySelector('.time-limit.time-limited').style.display = 'block'
      document.getElementById('sugon-time-limit').innerText = timeText
    }
  }
</script>

</html>