Skip to content

Commit

Permalink
feat(doc) add event filter query parser
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasebner committed May 8, 2024
1 parent ede5f2c commit 7ba512e
Show file tree
Hide file tree
Showing 7 changed files with 1,782 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ lastmod = ["lastmod", ":git", "date"]
url = "/download"
name = "Download"
weight = 10

[[menu.main]]
url = "https://open62541.org/query-http/index.html"
name = "Query Parser"
weight = 10

[[menu.main]]
identifier = "docu"
Expand Down
59 changes: 59 additions & 0 deletions static/query-http/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=.8">
<meta name="color-scheme" content="light dark" />
<title>OPC UA EventFilter Query Language</title>
<link rel="stylesheet" href="pico.min.css" />
<link rel="stylesheet" href="style.css" />
<script src="jquery-3.7.1.min.js"></script>
<script src="query.js"></script>
<script type="text/javascript">
function pretty(j) {
if(j[0] != '{') {
return j;
}
while(j.substring(j.length - 1) != '}') {
j = j.substring(0, j.length - 1);
}

try {
var jsonObj = JSON.parse(j);
return JSON.stringify(jsonObj, null, '\t');
} catch(err) {
return j;
}
}

parse_fun = Module.cwrap('parse', 'string', ['string'])

$(document).ready(function() {
$("#submitForm").submit(function(e){
e.preventDefault();
out = parse_fun($("#query").val());
$("#result").val(pretty(out));
});
});
</script>
</head>
<body>
<header class="container"><h1>OPC UA EventFilter Query Language</h1></header>
<main class="container">
<div class="grid">
<div>
<h3>Query Input</h3>
<form id="submitForm">
<textarea id="query" rows ="25" placeholder="Enter query here..."></textarea>
<br/>
<input type="submit" value="Submit">
</form>
</div>
<div>
<h3>Result</h3>
<textarea id="result" rows="25"></textarea>
</div>
</div>
</main>
</body>
</html>
2 changes: 2 additions & 0 deletions static/query-http/jquery-3.7.1.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions static/query-http/pico.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 7ba512e

Please sign in to comment.