|
|
|
@@ -2,13 +2,13 @@ |
|
|
|
{{template "base/head" .}} |
|
|
|
|
|
|
|
<style> |
|
|
|
#deletemodel { |
|
|
|
/* #deletemodel { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
/* 弹窗 */ |
|
|
|
|
|
|
|
#mask { |
|
|
|
/* #mask { |
|
|
|
position: fixed; |
|
|
|
top: 0px; |
|
|
|
left: 0px; |
|
|
|
@@ -84,7 +84,7 @@ |
|
|
|
transform: scaleY(1.0); |
|
|
|
-webkit-transform: scaleY(1.0); |
|
|
|
} |
|
|
|
} |
|
|
|
} */ |
|
|
|
/* 消息框 */ |
|
|
|
|
|
|
|
.alert { |
|
|
|
@@ -105,67 +105,12 @@ |
|
|
|
border-color: #d6e9c6; |
|
|
|
} |
|
|
|
|
|
|
|
.alert-info { |
|
|
|
color: #31708f; |
|
|
|
background-color: #d9edf7; |
|
|
|
border-color: #bce8f1; |
|
|
|
} |
|
|
|
|
|
|
|
.alert-warning { |
|
|
|
color: #8a6d3b; |
|
|
|
background-color: #fcf8e3; |
|
|
|
border-color: #faebcc; |
|
|
|
} |
|
|
|
|
|
|
|
.alert-danger { |
|
|
|
color: #a94442; |
|
|
|
background-color: #f2dede; |
|
|
|
border-color: #ebccd1; |
|
|
|
} |
|
|
|
|
|
|
|
.pusher { |
|
|
|
width: calc(100% - 260px); |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
/* 弹窗 (background) */ |
|
|
|
|
|
|
|
#imageModal { |
|
|
|
display: none; |
|
|
|
position: fixed; |
|
|
|
z-index: 1; |
|
|
|
left: 0; |
|
|
|
top: 0; |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
overflow: auto; |
|
|
|
background-color: rgb(0, 0, 0); |
|
|
|
background-color: rgba(0, 0, 0, 0.4); |
|
|
|
} |
|
|
|
/* 弹窗内容 */ |
|
|
|
|
|
|
|
.modal-content { |
|
|
|
background-color: #fefefe; |
|
|
|
margin: 15% auto; |
|
|
|
padding: 20px; |
|
|
|
border: 1px solid #888; |
|
|
|
width: 30%; |
|
|
|
} |
|
|
|
/* 关闭按钮 */ |
|
|
|
|
|
|
|
.close { |
|
|
|
color: #aaa; |
|
|
|
float: right; |
|
|
|
font-size: 28px; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
|
|
|
|
.close:hover, |
|
|
|
.close:focus { |
|
|
|
color: black; |
|
|
|
text-decoration: none; |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
|
|
|
|
.dis { |
|
|
|
margin-bottom: 20px; |
|
|
|
} |
|
|
|
@@ -192,18 +137,6 @@ |
|
|
|
} |
|
|
|
</style> |
|
|
|
<div class="modelarts"> |
|
|
|
<!-- 弹窗 --> |
|
|
|
<div id="mask"> |
|
|
|
<div id="loadingPage"> |
|
|
|
<div class="rect1"></div> |
|
|
|
<div class="rect2"></div> |
|
|
|
<div class="rect3"></div> |
|
|
|
<div class="rect4"></div> |
|
|
|
<div class="rect5"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 提示框 --> |
|
|
|
<div class="alert"></div> |
|
|
|
|
|
|
|
<div class="repository release dataset-list view"> |
|
|
|
@@ -324,44 +257,6 @@ |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 镜像列表弹窗 --> |
|
|
|
<div id="imageModal" class="modal" style="display: none;"> |
|
|
|
<div class="modal-content"> |
|
|
|
<span class="close">×</span> |
|
|
|
|
|
|
|
<!-- 表格 --> |
|
|
|
<form id="commitImageForm" action="{{$.Link}}/{{.JobID}}/commit_image" method="post" target="iframeContent"> |
|
|
|
{{$.CsrfTokenHtml}} |
|
|
|
<p>提交任务镜像</p> |
|
|
|
<div class="ui divider"></div> |
|
|
|
|
|
|
|
<div class="inline required field dis"> |
|
|
|
<label>镜像标签:</label> |
|
|
|
<input name="tag" id="image_tag" tabindex="3" autofocus required maxlength="255" style="width:75%"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="inline required field" style="position:relative;height:180px;"> |
|
|
|
<div style="height:20px;width:75px;"> |
|
|
|
<label>镜像描述:</label> |
|
|
|
</div> |
|
|
|
<div style="position:absolute;left:75px;top:0;width:75%"> |
|
|
|
<textarea name="description" rows="10" style="width:100%"></textarea> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ui divider"></div> |
|
|
|
|
|
|
|
<div class="inline field"> |
|
|
|
<label></label> |
|
|
|
<button class="ui green button" onclick="showmask()"> |
|
|
|
{{$.i18n.Tr "repo.cloudbrain.commit_image"}} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{{end}} {{template "base/paginate" .}} |
|
|
|
@@ -455,55 +350,10 @@ |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// 获取弹窗 |
|
|
|
var modal = document.getElementById('imageModal'); |
|
|
|
|
|
|
|
// 打开弹窗的按钮对象 |
|
|
|
var btns = document.getElementsByClassName("imageBtn"); |
|
|
|
|
|
|
|
// 获取 <span> 元素,用于关闭弹窗 |
|
|
|
var spans = document.getElementsByClassName('close'); |
|
|
|
|
|
|
|
// 点击按钮打开弹窗 |
|
|
|
for (i = 0; i < btns.length; i++) { |
|
|
|
btns[i].onclick = function() { |
|
|
|
modal.style.display = "block"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 点击 <span> (x), 关闭弹窗 |
|
|
|
for (i = 0; i < spans.length; i++) { |
|
|
|
spans[i].onclick = function() { |
|
|
|
modal.style.display = "none"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 在用户点击其他地方时,关闭弹窗 |
|
|
|
window.onclick = function(event) { |
|
|
|
if (event.target == modal) { |
|
|
|
modal.style.display = "none"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 显示弹窗,弹出相应的信息 |
|
|
|
function showmask() { |
|
|
|
$('#imageModal').css('display', 'none') |
|
|
|
$('#mask').css('display', 'block') |
|
|
|
|
|
|
|
$("iframe[name=iframeContent]").on("load", function() { |
|
|
|
var responseText = $("iframe")[0].contentDocument.body.getElementsByTagName("pre")[0].innerHTML; |
|
|
|
var json1 = JSON.parse(responseText) |
|
|
|
$('#mask').css('display', 'none') |
|
|
|
parent.location.href |
|
|
|
|
|
|
|
if (json1.result_code === "0") { |
|
|
|
$('.alert').html('操作成功!').removeClass('alert-danger').addClass('alert-success').show().delay(1500).fadeOut(); |
|
|
|
} else { |
|
|
|
$('.alert').html(json1.error_msg).removeClass('alert-success').addClass('alert-danger').show().delay(5000).fadeOut(); |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
$('.ui.green.button').click(function(){ |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// 超链接 |
|
|
|
$(".vertical.menu a").click(function(){ |
|
|
|
$(this).siblings().removeClass("activate") |
|
|
|
|