프라퍼티 암호화 기능 추가
This commit is contained in:
@@ -251,6 +251,29 @@ var url_view = '<c:url value="/onl/admin/common/propertyMan.view" />';
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#btn_pop_encrypt").click(function() {
|
||||||
|
var prpty2Val = $("input[name=prpty2Val]").val();
|
||||||
|
if (prpty2Val == '') {
|
||||||
|
alert("프라퍼티 값을 입력하세요");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var postData = {
|
||||||
|
cmd : "ENCRYPT",
|
||||||
|
prpty2Val : prpty2Val,
|
||||||
|
};
|
||||||
|
$.ajax({
|
||||||
|
type : "POST",
|
||||||
|
url : url,
|
||||||
|
data : postData,
|
||||||
|
success : function(args) {
|
||||||
|
$("input[name=prpty2Val]").val(args);
|
||||||
|
},
|
||||||
|
error : function(e) {
|
||||||
|
alert(e.responseText);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
buttonControl(key);
|
buttonControl(key);
|
||||||
titleControl(key);
|
titleControl(key);
|
||||||
});
|
});
|
||||||
@@ -289,12 +312,17 @@ var url_view = '<c:url value="/onl/admin/common/propertyMan.view" />';
|
|||||||
<table class="table_row" cellspacing="0">
|
<table class="table_row" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width:20%;"><%= localeMessage.getString("propertyDetail.propertyKey") %></th>
|
<th style="width:20%;"><%= localeMessage.getString("propertyDetail.propertyKey") %></th>
|
||||||
<td><input type="text" name="prptyName" style="width:calc(100% - 85px);" /> <!-- <img src="<c:url value="/img/btn_pop_input.png"/>" id="btn_pop_input" /></td> -->
|
<td>
|
||||||
<button type="button" class="cssbtn smallBtn2" id="btn_pop_input" style="vertical-align:middle; font-weight:bold;"><i class="material-icons">input</i><%= localeMessage.getString("button.input") %></button>
|
<input type="text" name="prptyName" style="width:calc(100% - 85px);" /> <!-- <img src="<c:url value="/img/btn_pop_input.png"/>" id="btn_pop_input" /></td> -->
|
||||||
|
<button type="button" class="cssbtn smallBtn2" id="btn_pop_input" style="vertical-align:middle; font-weight:bold;"><i class="material-icons">input</i><%= localeMessage.getString("button.input") %></button>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><%= localeMessage.getString("propertyDetail.propertyValue") %></th>
|
<th style="width:20%;"><%= localeMessage.getString("propertyDetail.propertyValue") %></th>
|
||||||
<td><input type="text" name="prpty2Val"/></td>
|
<td>
|
||||||
|
<input type="text" name="prpty2Val" style="width:calc(100% - 85px);"/>
|
||||||
|
<button type="button" class="cssbtn smallBtn2" id="btn_pop_encrypt" style="vertical-align:middle; font-weight:bold;"><i class="material-icons">lock</i><%= localeMessage.getString("button.encode") %></button>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<!-- grid -->
|
<!-- grid -->
|
||||||
|
|||||||
Binary file not shown.
@@ -19,6 +19,7 @@ import com.eactive.eai.agent.encryption.ReloadEncryptionYNCommand;
|
|||||||
import com.eactive.eai.agent.property.ReloadPropertyCommand;
|
import com.eactive.eai.agent.property.ReloadPropertyCommand;
|
||||||
import com.eactive.eai.rms.common.base.OnlBaseAnnotationController;
|
import com.eactive.eai.rms.common.base.OnlBaseAnnotationController;
|
||||||
import com.eactive.eai.rms.common.vo.GridResponse;
|
import com.eactive.eai.rms.common.vo.GridResponse;
|
||||||
|
import com.eactive.ext.djb.DamoManager;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
@@ -152,4 +153,11 @@ public class PropertyController extends OnlBaseAnnotationController {
|
|||||||
return new ModelAndView("excelView", resultMap);
|
return new ModelAndView("excelView", resultMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping(value = "/onl/admin/common/propertyMan.json", params = "cmd=ENCRYPT")
|
||||||
|
public ResponseEntity<String> encrypt(PropertyUI propertyForm) throws Exception {
|
||||||
|
String encrypted = DamoManager.getInstance().encrypt(propertyForm.getPrpty2Val());
|
||||||
|
return ResponseEntity.ok(encrypted);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user