|
- {{template "base/head" .}}
- <style>
- /* 遮罩层css效果图 */
-
- #mask {
- position: fixed;
- top: 0px;
- left: 0px;
- right: 0px;
- bottom: 0px;
- filter: alpha(opacity=60);
- background-color: #777;
- z-index: 1000;
- display: none;
- opacity: 0.8;
- -moz-opacity: 0.5;
- padding-top: 100px;
- color: #000000
- }
- /* 加载圈css效果图 */
-
- #loadingPage {
- margin: 200px auto;
- width: 50px;
- height: 40px;
- text-align: center;
- font-size: 10px;
- display: block;
- }
-
- #loadingPage>div {
- background-color: green;
- height: 100%;
- width: 6px;
- display: inline-block;
- -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
- animation: sk-stretchdelay 1.2s infinite ease-in-out;
- }
-
- #loadingPage .rect2 {
- -webkit-animation-delay: -1.1s;
- animation-delay: -1.1s;
- }
-
- #loadingPage .rect3 {
- -webkit-animation-delay: -1.0s;
- animation-delay: -1.0s;
- }
-
- #loadingPage .rect4 {
- -webkit-animation-delay: -0.9s;
- animation-delay: -0.9s;
- }
-
- #loadingPage .rect5 {
- -webkit-animation-delay: -0.8s;
- animation-delay: -0.8s;
- }
-
- @-webkit-keyframes sk-stretchdelay {
- 0%,
- 40%,
- 100% {
- -webkit-transform: scaleY(0.4)
- }
- 20% {
- -webkit-transform: scaleY(1.0)
- }
- }
-
- @keyframes sk-stretchdelay {
- 0%,
- 40%,
- 100% {
- transform: scaleY(0.4);
- -webkit-transform: scaleY(0.4);
- }
- 20% {
- transform: scaleY(1.0);
- -webkit-transform: scaleY(1.0);
- }
- }
-
- .inline.required.field.cloudbrain_benchmark {
- display: none;
- }
- </style>
-
- <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="repository">
- {{template "repo/header" .}}
- <div class="repository new repo ui middle very relaxed page grid">
- <div class="column">
- {{template "base/alert" .}}
- <form class="ui form" action="{{.Link}}" method="post">
- {{.CsrfTokenHtml}}
- <h3 class="ui top attached header">
- {{.i18n.Tr "repo.cloudbrain.new"}}
- </h3>
- <div class="ui attached segment">
- <!-- <br> -->
- <div class="inline required field">
- <label>任务名称</label>
- <input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255">
- </div>
-
- <div class="inline field">
- <input type="text" list="cloudbrain_dataset" placeholder="选择数据集" name="attachment" autofocus maxlength="36">
- <datalist id="cloudbrain_dataset" class="ui search" style='width:385px' name="attachment">
- {{range .attachments}}
- <option name="attachment" value="{{.UUID}}">{{.Attachment.Name}}</option>
- {{end}}
- </datalist>
- </div>
-
- <div class="inline required field">
- <label>工作环境</label>
- <input name="de" id="cloudbrain_de" value="{{.env}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
- </div>
- <div class="inline required field">
- <label>类型</label>
- <input name="job_type" id="cloudbrain_job_type" value="{{.notebook_type}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
- </div>
- <div class="inline required field">
- <label>规格</label>
- <select id="cloudbrain_flavor" class="ui search dropdown" placeholder="选择规格" style='width:385px' name="flavor">
- {{range .flavors}}
- <option name="flavor" value="{{.Value}}">{{.Value}}</option>
-
- {{end}}
- </select>
- </div>
- <div class="inline required field">
- <label>数据集存放路径</label>
- <input name="dataset_path" id="cloudbrain_dataset_path" value="{{.dataset_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly">
- </div>
- <div class="inline field">
- <label>描述</label>
- <input name="description" id="cloudbrain_description" tabindex="3" autofocus maxlength="255">
- </div>
- <div class="inline field">
- <label></label>
- <button class="ui green button" onclick="showmask()">
- {{.i18n.Tr "repo.cloudbrain.new"}}
- </button>
- <a class="ui button" href="/">{{.i18n.Tr "repo.cloudbrain.cancel"}}</a>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- {{template "base/footer" .}}
-
- <script>
- // 点击按钮后遮罩层显示
- function showmask() {
- document.getElementById("mask").style.display = "block"
- }
-
- // 页面加载完毕后遮罩层隐藏
- document.onreadystatechange = function() {
- if (document.readyState === "complete") {
- document.getElementById("mask").style.display = "none"
- }
- }
-
- $('select.dropdown')
- .dropdown();
-
- $(function() {
- $("#cloudbrain_job_type").change(function() {
- if ($(this).val() == 'BENCHMARK') {
- $(".cloudbrain_benchmark").show();
- } else {
- $(".cloudbrain_benchmark").hide();
- }
- })
- })
- </script>
|