summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views/rule
diff options
context:
space:
mode:
authormconway <michael_conway@unc.edu>2013-10-23 15:25:28 (GMT)
committer mconway <michael_conway@unc.edu>2013-10-23 15:25:28 (GMT)
commitea1122443cd228e6b23d219ccd0f3b490fa8d954 (patch)
treeeca0210bb27991a2bebb61a681e755f0c887f2be /idrop-web/grails-app/views/rule
parentb1265fa7a71b86813c0153fa2cacb4bf945d63e0 (diff)
downloadQCG-Data-ea1122443cd228e6b23d219ccd0f3b490fa8d954.zip
QCG-Data-ea1122443cd228e6b23d219ccd0f3b490fa8d954.tar.gz
QCG-Data-ea1122443cd228e6b23d219ccd0f3b490fa8d954.tar.bz2
[#1458] executing
Diffstat (limited to 'idrop-web/grails-app/views/rule')
-rwxr-xr-xidrop-web/grails-app/views/rule/index.gsp71
-rw-r--r--idrop-web/grails-app/views/rule/ruleResult.gsp25
2 files changed, 91 insertions, 5 deletions
diff --git a/idrop-web/grails-app/views/rule/index.gsp b/idrop-web/grails-app/views/rule/index.gsp
index 170179b..99ccdb7 100755
--- a/idrop-web/grails-app/views/rule/index.gsp
+++ b/idrop-web/grails-app/views/rule/index.gsp
@@ -3,16 +3,27 @@
<div id="detailsTopSection">
<div id="detailsToolbar" >
- <button type="button" id="reloadRuleButton"
+ <button type="button" id="reloadRuleButton" class="ruleEdit"
value="reloadRule"
onclick="callReloadRule()">
- <g:message code="default.button.reload.label" />
+ <i class="icon-refresh"></i><g:message code="default.button.reload.label" />
</button>
- <span id="saveRuleButton"><button type="button" id="saveRuleButton"
+ <span id="saveRuleButton"><button type="button" id="saveRuleButton" class="ruleEdit"
value="saveRule"
- onclick="callSaveRule()">
+ onclick="callSaveRule()"><i class="icon-ok"></i>
<g:message code="text.update" />
</button></span>
+ <span id="runRuleButton"><button type="button" id="runRuleButton"
+ value="runRule"
+ onclick="callRunRule()"><i class="icon-play"></i>
+ <g:message code="text.run.rule" />
+ </button></span>
+ </button></span>
+ <span id="showRuleButton"><button hidden type="button" id="showRuleButton" class="ruleResultView"
+ value="showRule"
+ onclick="callShowRule()"><i class="icon-edit"></i>
+ <g:message code="text.edit" />
+ </button></span>
</div>
</div>
@@ -20,6 +31,13 @@
<!-- div for audit table -->
<g:render template="/rule/ruleDetails" />
</div>
+
+ <div id="ruleResultDiv">
+ <!-- result of rule exec -->
+
+
+ </div>
+
<script type="text/javascript">
@@ -49,6 +67,17 @@
}
+
+ function callShowRule() {
+
+ $("#ruleDetailDiv").show("slow");
+ $(".ruleEdit").show("slow");
+ $("#ruleResultDiv").html("");
+ $("#ruleResultDiv").hide("slow");
+ $(".ruleResultView").hide("slow");
+
+ }
+
function callReloadRule(absPath) {
var absPath = $("#ruleAbsPath").val();
if (absPath == null || absPath == "") {
@@ -58,7 +87,8 @@
var params = {
absPath : absPath
- }
+
+ }
var jqxhr = $.get(context + "/rule/reloadRule", params, "html").success(
function(returnedData, status, xhr) {
var continueReq = checkForSessionTimeout(returnedData, xhr);
@@ -72,6 +102,37 @@
}
+
+ function callRunRule() {
+ var formData = $("#ruleDetailsForm").serializeArray();
+ $("#ruleDetailDiv").hide("slow");
+ $(".ruleEdit").hide("slow");
+ $("#ruleResultDiv").html("");
+ $("#ruleResultDiv").show("slow");
+ $(".ruleResultView").show("slow");
+
+ showBlockingPanel();
+
+ var jqxhr = $.post(context + "/rule/runRule", formData, "html").success(
+ function(returnedData, status, xhr) {
+ var continueReq = checkForSessionTimeout(returnedData, xhr);
+ if (!continueReq) {
+ unblockPanel();
+ return false;
+ }
+ $("#ruleResultDiv").html(returnedData);
+ unblockPanel();
+
+
+
+ }).error(function(xhr, status, error) {
+ unblockPanel();
+
+ setErrorMessage(xhr.responseText);
+ });
+
+
+ }
diff --git a/idrop-web/grails-app/views/rule/ruleResult.gsp b/idrop-web/grails-app/views/rule/ruleResult.gsp
new file mode 100644
index 0000000..ea00cf8
--- /dev/null
+++ b/idrop-web/grails-app/views/rule/ruleResult.gsp
@@ -0,0 +1,25 @@
+ <div class="container">
+ <div class="row-fluid content">
+ <div class="span12">
+
+ <table class="table">
+ <g:each in="${ruleResult.outputParameterResults.keySet()}">
+ <tr>
+ <td>
+ ${it}
+ </td>
+ <td>
+ ${ruleResult.outputParameterResults.get(it).resultObject}
+ </td>
+ </tr>
+ </g:each>
+ </table>
+
+ </div>
+ </div>
+ </div>
+
+
+
+
+