Merge branch 'dev_item_bank' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_item_bank

dev_jupyter
杨树林 5 years ago
commit 69511a4f6b

@ -26,7 +26,14 @@ class CreateShixunService < ApplicationService
# 创建镜像
ShixunMirrorRepository.create!(:shixun_id => shixun.id, :mirror_repository_id => main_mirror.id)
# 创建主服务配置
ShixunServiceConfig.create!(:shixun_id => shixun.id, :mirror_repository_id => main_mirror.id)
config_params =
if shixun.is_jupyter?
{shixun_id: shixun.id, mirror_repository_id: main_mirror.id, cpu_limit: 2,
memory_limit: 1024, lower_cpu_limit: 0.2, request_limit: 100}
else
{shixun_id: shixun.id, mirror_repository_id: main_mirror.id}
end
ShixunServiceConfig.create!(config_params)
# 创建子镜像相关数据(实训镜像关联表,子镜像服务配置)
sub_mirrors.each do |sub|
ShixunMirrorRepository.create!(:shixun_id => shixun.id, :mirror_repository_id => sub.id)

@ -158,6 +158,26 @@
<!-- 在tpi js里加载这3个脚本 -->
<script>
function Return_Reload() {
var isPageHide = false;
window.addEventListener('pageshow', function () {
if (isPageHide) {
window.location.reload();
}
});
window.addEventListener('pagehide', function () {
isPageHide = true;
});
}
Return_Reload();
(function() { // Scoping function to avoid globals
var href = location.href;
if(window.location.port === "3007"){

Loading…
Cancel
Save