summaryrefslogtreecommitdiffstats
path: root/idrop-web/grails-app/views
diff options
context:
space:
mode:
authormconway <michael_conway@unc.edu>2013-10-24 16:50:02 (GMT)
committer mconway <michael_conway@unc.edu>2013-10-24 16:50:02 (GMT)
commitb356f41d6fb8e95f399ee45ae6239f9c77c3127a (patch)
treecd2c1758bb78a3785429b686ec65e7606786072d /idrop-web/grails-app/views
parentfb7a7bbd0d617ab1e112d3c4e2bef935c90632a7 (diff)
downloadQCG-Data-b356f41d6fb8e95f399ee45ae6239f9c77c3127a.zip
QCG-Data-b356f41d6fb8e95f399ee45ae6239f9c77c3127a.tar.gz
QCG-Data-b356f41d6fb8e95f399ee45ae6239f9c77c3127a.tar.bz2
[#1458] rule format results
Diffstat (limited to 'idrop-web/grails-app/views')
-rw-r--r--idrop-web/grails-app/views/rule/_ruleDetails.gsp20
-rwxr-xr-xidrop-web/grails-app/views/rule/index.gsp4
-rw-r--r--idrop-web/grails-app/views/rule/ruleErrorResult.gsp23
-rw-r--r--idrop-web/grails-app/views/rule/ruleResult.gsp32
4 files changed, 59 insertions, 20 deletions
diff --git a/idrop-web/grails-app/views/rule/_ruleDetails.gsp b/idrop-web/grails-app/views/rule/_ruleDetails.gsp
index 743c1c1..24793c4 100644
--- a/idrop-web/grails-app/views/rule/_ruleDetails.gsp
+++ b/idrop-web/grails-app/views/rule/_ruleDetails.gsp
@@ -13,12 +13,12 @@
<g:form name="ruleDetailsForm" id="ruleDetailsForm">
<fieldset>
- <label><g:message code="text.rule.body" /></label>
- <g:textArea id="ruleBody" name="ruleBody" value="${rule.ruleBody}" rows="40" cols="100"/>
+ <label></label>
+ <g:textArea id="ruleBody" name="ruleBody" value="${rule.ruleBody}" rows="80" cols="100"/>
<g:hiddenField name="ruleAbsPath" value="${absPath}" id="ruleAbsPath"/>
- <table class="table">
+ <table class="table alert alert-info">
<caption><g:message code="text.input.parameters"/></caption>
<g:each in="${rule.inputParameters}">
@@ -26,7 +26,7 @@
<tr>
<g:hiddenField name="inputParamName" value="${it.uniqueName}" id="inputParamName"/>
<td>${it.uniqueName}</td>
- <td><g:textField name="inputParamValue" id="inputParamValue" value="${it.getValueAsStringWithQuotesStripped()}" size="80"/></td>
+ <td><g:textField name="inputParamValue" id="inputParamValue" value="${it.getStringValue()}" size="80"/></td>
<td><i class='icon-remove' onclick='deleteInputParam(${it.uniqueName})'></i></td>
</tr>
@@ -34,7 +34,7 @@
</table>
<br/>
- <table class="table">
+ <table class="table alert alert-info">
<caption><g:message code="text.output.parameters"/></caption>
<g:each in="${rule.outputParameters}">
@@ -52,6 +52,8 @@
</fieldset>
</g:form>
<script type="text/javascript">
+
+var editor = null;
$(function() {
/* var myCodeMirror = CodeMirror.fromTextArea(document.getElementById('ruleBody'),{
mode: 'clike',
@@ -63,16 +65,12 @@ $(function() {
var codeMirrorOptions = {
mode: 'clike',
lineNumbers: true,
- theme: "blackboard"
+ theme: "eclipse"
}
//then create the editor
- var editor = new CodeMirrorUI(document.getElementById('ruleBody'),uiOptions,codeMirrorOptions);
-
-
-
+ editor = new CodeMirrorUI(document.getElementById('ruleBody'),uiOptions,codeMirrorOptions);
-
});
</script>
\ No newline at end of file
diff --git a/idrop-web/grails-app/views/rule/index.gsp b/idrop-web/grails-app/views/rule/index.gsp
index 1ad5a0a..246a909 100755
--- a/idrop-web/grails-app/views/rule/index.gsp
+++ b/idrop-web/grails-app/views/rule/index.gsp
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="${resource(dir:'css',file:'codemirror.css')}" />
<link rel="stylesheet" href="${resource(dir:'css',file:'codemirror-ui.css')}" />
-<link rel="stylesheet" href="${resource(dir:'css',file:'blackboard.css')}" />
+<link rel="stylesheet" href="${resource(dir:'css',file:'eclipse.css')}" />
</head>
<h3><a ><g:message code="text.rule" /></a></h3>
@@ -64,6 +64,7 @@
}
function callSaveRule() {
+ editor.mirror.save();
var formData = $("#ruleDetailsForm").serializeArray();
var jqxhr = $.post(context + "/rule/updateRule", formData, "html").success(
function(returnedData, status, xhr) {
@@ -116,6 +117,7 @@
}
function callRunRule() {
+ editor.mirror.save();
var formData = $("#ruleDetailsForm").serializeArray();
$("#ruleDetailDiv").hide("slow");
$(".ruleEdit").hide("slow");
diff --git a/idrop-web/grails-app/views/rule/ruleErrorResult.gsp b/idrop-web/grails-app/views/rule/ruleErrorResult.gsp
new file mode 100644
index 0000000..fb05fbf
--- /dev/null
+++ b/idrop-web/grails-app/views/rule/ruleErrorResult.gsp
@@ -0,0 +1,23 @@
+
+<div class="container">
+ <div class="row-fluid content">
+ <div class="span12 alert alert-error">
+ <h2><g:message code="error.in.rule.execution" /></h2>
+ </div>
+ </div>
+ <div class="row-fluid content alert alert-success">
+ <div class="span12">
+ ${message}
+ </div>
+ </div>
+ <div class="row-fluid content alert alert-error">
+ <div class="span12">
+ ${stackTrace}
+ </div>
+ </div>
+</div>
+
+
+
+
+
diff --git a/idrop-web/grails-app/views/rule/ruleResult.gsp b/idrop-web/grails-app/views/rule/ruleResult.gsp
index ea00cf8..077a950 100644
--- a/idrop-web/grails-app/views/rule/ruleResult.gsp
+++ b/idrop-web/grails-app/views/rule/ruleResult.gsp
@@ -1,9 +1,14 @@
- <div class="container">
- <div class="row-fluid content">
- <div class="span12">
- <table class="table">
- <g:each in="${ruleResult.outputParameterResults.keySet()}">
+<div class="container">
+ <div class="row-fluid content">
+ <div class="span12">
+
+ <table class="table">
+ <g:each in="${ruleResult.outputParameterResults.keySet()}">
+
+ <g:if test="${it == "ruleExecOut" || it == "ruleExecErrorOut" }">
+ </g:if>
+ <g:else>
<tr>
<td>
${it}
@@ -12,12 +17,23 @@
${ruleResult.outputParameterResults.get(it).resultObject}
</td>
</tr>
- </g:each>
- </table>
+ </g:else>
+ </g:each>
+ </table>
- </div>
</div>
</div>
+ <div class="row-fluid content alert alert-success">
+ <div class="span12">
+ ${execOut}
+ </div>
+ </div>
+ <div class="row-fluid content alert alert-error">
+ <div class="span12">
+ ${errorOut}
+ </div>
+ </div>
+</div>