This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nms-oam/gloam/WebRoot/process/updateProcess.html
2018-09-27 16:28:35 +08:00

196 lines
6.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
#include("/common/header.html")
<script type="text/javascript" src="/js/fileInput.js"></script>
<link id="bootstrap-style" href="/css/chart.css" rel="stylesheet">
<script type="text/javascript">
$(function() {
if (top.loading) {
top.layer.close(top.loading);
}
$("#nodeSelect").change(
function() {
var node = $(this).val();
$.ajax({
type : "POST",
url : "/process/findProcessByNode",
data : "node=" + node,
success : function(processList) {
$("#processSelect").empty();
$("#processSelect").append("<option value=-1>i18n_middle1.text.selectDefault_n81i</option>");
for (var i = 0; i < processList.length; i++) {
$("#processSelect").append(
"<option value="+processList[i].id+">"
+ processList[i].name
+ "</option>")
}
}
});
});
$("#fileInput").change(function(){
var fileName=$(this).val();
setValue(fileName);
var split=fileName.split(".");
suffix=split[split.length-1];
if(suffix != "tar"){
$("#suffixMsg").html("<font color='red' style='font-size:12px'>*i18n_procInfoList.text.uploadTar_n81i</font>");
$("#mysub").attr("disabled","disabled");
}else{
$("#suffixMsg").html("<font color='green' style='font-size:12px'>*i18n_procInfoList.text.format_n81i</font>");
$("#mysub").removeAttr("disabled");
}
});
/* $("#procForm").submit(function(){
//top.loading = top.layer.msg("<font color='black'>&nbsp;&nbsp;loading...</font>", {shade:0.1,icon:16,time:999000});
var node=$("#nodeSelect").val();
var proc=$("#processSelect").val();
var file=$("#fileInput").val();
if(node!=-1&&proc!=-1&&file!=""){
return true;
}else{
if(node ==-1){
$("#nodeMsg").html("<font color='red'>*i18n_procInfoList.text.bordCardNull_n81i</font>");
}else{
$("#nodeMsg").html("");
}
if(proc==-1){
$("#procMsg").html("<font color='red'>*i18n_procInfoList.text.processNull_n81i</font>");
}else{
$("#procMsg").html("");
}
if(file ==""){
$("#suffixMsg").html("<font color='red' style='font-size:12px'>*i18n_procInfoList.text.uploadTar_n81i</font>");
}
return false;
}
}); */
});
function sub() {
var node=$("#nodeSelect").val();
var proc=$("#processSelect").val();
var file=$("#fileInput").val();
if(node!=-1&&proc!=-1&&file!=""){
top.loading = top.layer.msg("<font color='black'>&nbsp;&nbsp;loading...</font>", {shade:0.1,icon:16,time:999000});
$("#procForm").submit();
}else{
if(node ==-1){
$("#nodeMsg").html("<font color='red'>*i18n_procInfoList.text.bordCardNull_n81i</font>");
}else{
$("#nodeMsg").html("");
}
if(proc==-1){
$("#procMsg").html("<font color='red'>*i18n_procInfoList.text.processNull_n81i</font>");
}else{
$("#procMsg").html("");
}
if(file ==""){
$("#suffixMsg").html("<font color='red' style='font-size:12px'>*i18n_procInfoList.text.uploadTar_n81i</font>");
}
}
}
</script>
</head>
<body class="bcColor noScroll-y aC">
<!--中间部分右边开始-->
<div class="container-fluid-full">
<div class="row-fluid">
<noscript>
<div class="alert alert-block span10">
<h4 class="alert-heading">Warning!</h4>
<p>
You need to have <a href="http://en.wikipedia.org/wiki/JavaScript"
target="_blank">JavaScript</a> enabled to use this site.
</p>
</div>
</noscript>
<!-- start: Content -->
<div id="content" class="span10">
<div class="row-fluid " style="margin-top: 10px">
<div class="box span12">
<div class="box-header" data-original-title>
<h2>
<i class=" halflings-icon align-justify"></i><span class="break"></span>
</h2>
</div>
<div class="box-content lianxiang">
<form class="form-horizontal" action="/process/uploadFile" method="post" enctype="multipart/form-data" id="procForm">
<table id="info" style="margin: auto">
<tbody>
<tr>
<td>
<div class="control-group">
<label class="control-label" for="selectError3">i18n_device_type_info.device_desc.board_n81i</label>
<div class="controls">
<select id="nodeSelect" name="node">
<option value="-1">i18n_middle1.text.selectDefault_n81i</option>
#if(nodes!=null&&nodes.size()>0) #for(node:nodes)
<option value="#(node.id)">#(node.name)</option> #end #end
</select>
<span id='nodeMsg'></span>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="control-group">
<label class="control-label" for="selectError">i18n_procInfoList.text.process_n81i</label>
<div class="controls">
<select id="processSelect" data-rel="chosen" name="process">
<option value="-1">i18n_middle1.text.selectDefault_n81i</option>
</select>
<span id="procMsg"></span>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div class="control-group">
<label class="control-label" for="fileInput">i18n_ami.text.upFile_n81i</label>
<div class="controls">
<button class="my-button-up sub" type="button" style="margin-left:5px;padding-bottom:25px;" title="i18n_entip2.message.file_n81i" onclick="javascript:uploadFile(this)">i18n_entip2.message.file_n81i</button>
<input class="input-file uniform_on" id="fileInput"
type="file" name="fileInput" style="display: none;" accept=".tar">
<span id='suffixMsg'><font color='white' style='font-size:12px'>*i18n_procInfoList.text.uploadTar_n81i</font><span>
</div>
</div>
</td>
</tr>
<tr>
<td>
<div style="margin-left: 185px">
<button onclick="sub()" id="mysub" type="button" class="btn btn-primary">i18n_acts.button.submit_n81i</button>
<button type="reset"class="btn">i18n_sp.button.cancel_n81i</button>
#if(resultState!=null)
#if(resultState==1)
<span ><font color="green" style='font-size:12px'>*i18n_procInfoList.text.updateSuccess_n81i</font></span>
#else
<span ><font color="red" style='font-size:12px'>*i18n_procInfoList.text.updateFaild_n81i</font></span>
#end
#end
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>