Skip to content
Snippets Groups Projects
Commit 21bfb023 authored by wactbprot's avatar wactbprot
Browse files

merge, state-struct

parents 767bad46 2eb0bd1f
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,22 @@ h.registerHelper('toExchPath', function(dotpath) { ...@@ -7,6 +7,22 @@ h.registerHelper('toExchPath', function(dotpath) {
return new h.SafeString(dotpath.replace(/\./g, "/")); return new h.SafeString(dotpath.replace(/\./g, "/"));
}); });
h.registerHelper('niceValue', function(value) {
var val;
if(_.isObject(value)){
val = JSON.stringify(value, false, "\n");
}
if(_.isArray(value)){
val = value.join("\n");
}
if(_.isString(value)){
val = value;
}
return new h.SafeString(val);
});
var templates = function(){ var templates = function(){
var ff = fs.readdirSync(fpath) var ff = fs.readdirSync(fpath)
, hc = {}; , hc = {};
......
...@@ -2,11 +2,13 @@ ...@@ -2,11 +2,13 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<!--
<meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" />
-->
<title>{{mpid}}</title> <title>{{mpid}}</title>
</head> </head>
<body> <body>
......
...@@ -3,65 +3,87 @@ ...@@ -3,65 +3,87 @@
<div class='col-sm-4'> <div class='col-sm-4'>
<div class='serial panel panel-default'> <div class='serial panel panel-default'>
<div class='panel-heading'> <div class='panel-heading'>
<h3 class='panel-title'>Step: {{@index}}</h3> <h3 class='panel-title'>Step: {{@index}}</h3>
</div> </div>
<div class='panel-body'> <div class='panel-body'>
{{#each step}} {{#each step}}
<div class='parallel panel panel-default' > <div class='parallel panel panel-default' >
<div class='panel-heading {{State}}'> <div class='panel-heading {{State}}'>
<h3 class='panel-title'>{{TaskName}}</h3> <h3 class='panel-title'>{{TaskName}}</h3>
</div> </div>
<div class='panel-body {{State}}'> <div class='panel-body {{State}}'>
<b>State:</b> {{State}}<br> <h4>State</h4>
<p>
{{State}}
</p>
{{#if Action}}
<h4>Action</h4>
<p>
{{Action}}
</p>
{{/if}}
{{#if ExchangePath}}
<h4>Exchange Path</h4>
<p>
<a href='http://localhost:8001/{{../../mpid}}/exchange/{{{toExchPath ExchangePath}}}' target='_blank'>{{ExchangePath}}
</a>
</p>
{{/if}}
{{#if StopIf}}
<h4>StopIf</h4>
<p>
<a href='http://localhost:8001/{{../../mpid}}/exchange/{{toExchPath StopIf}}' target='_blank'>{{StopIf}}
</a>
</p>
{{/if}}
{{#if RunIf}}
<h4>RunIf</h4>
<p>
<a href='http://localhost:8001/{{../../mpid}}/exchange/{{toExchPath RunIf}}' target='_blank'>{{RunIf}}
</a>
</p>
{{/if}}
{{#if Action}} {{#if DefinitionClass}}
<b>Action:</b> {{Action}}<br> <h4>Definition Class</h4>
{{/if}} <p>
{{DefinitionClass}}
</p>
{{/if}}
{{#if Repeat}}
<h4>Repeat</h4>
<p>
{{Repeat}}
</p>
{{/if}}
{{#if Wait}}
<h4>Wait</h4>
<p>
{{Wait}} (ms)
</p>
{{/if}}
{{#if Comment}}
<h4>Describtion</h4>
<p>
{{Comment}}
</p>
{{/if}}
{{#if ExchangePath}} {{#if Value}}
<b>Exchange Path:</b> <h4>Value</h4>
<a href='http://localhost:8001/{{../../mpid}}/exchange/{{{toExchPath ExchangePath}}}' target='_blank'>{{ExchangePath}} <p>
</a> {{niceValue Value}}
<br> </p>
{{/if}} {{/if}}
</div>
{{#if StopIf}} </div>
<b>StopIf:</b> {{/each}}
<a href='http://localhost:8001/{{../../mpid}}/exchange/{{toExchPath StopIf}}' target='_blank'>{{StopIf}}
</a>
<br>
{{/if}}
{{#if RunIf}}
<b>RunIf:</b>
<a href='http://localhost:8001/{{../../mpid}}/exchange/{{toExchPath RunIf}}' target='_blank'>{{RunIf}}
</a>
<br>
{{/if}}
{{#if DefinitionClass}}
<b>Definition Class:</b> {{DefinitionClass}}<br>
{{/if}}
{{#if Repeat}}
<b>Repeat:</b> {{Repeat}}<br>
{{/if}}
{{#if Wait}}
<b>Wait:</b> {{Wait}} (ms)<br>
{{/if}}
{{#if Comment}}
<b>Descr.:</b> {{Comment}}<br>
{{/if}}
{{#if Value}}
<b>Value:</b> {{Value}}<br>
{{/if}}
</div>
</div>
{{/each}}
</div> </div>
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment