-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Agent.cfg and Agent XML Stylesheet
- Loading branch information
Patrick Ritchie
authored and
Patrick Ritchie
committed
Jun 20, 2016
1 parent
866a113
commit d6aa438
Showing
24 changed files
with
456 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
window.onload = function() { | ||
|
||
document.getElementById('fromText').value = getParameterByName("from"); | ||
document.getElementById('countText').value = getParameterByName("count"); | ||
|
||
}; | ||
|
||
function getSample () { | ||
|
||
var f = document.getElementById('fromText').value | ||
var c = document.getElementById('countText').value | ||
|
||
window.location = '../sample?from=' + f + '&count=' + c; | ||
|
||
} | ||
|
||
function getParameterByName(name) { | ||
|
||
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | ||
|
||
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2016 TrakHound | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,255 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:fn="http://www.w3.org/2005/xpath-functions" | ||
xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3" | ||
> | ||
|
||
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> | ||
|
||
<xsl:template match="/"> | ||
|
||
<head> | ||
|
||
<title>MTConnect Device Streams</title> | ||
|
||
<link rel="stylesheet" | ||
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" | ||
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" | ||
crossorigin="anonymous"/> | ||
|
||
<script src="/styles/GetSample.js"></script> | ||
|
||
<!-- Latest compiled and minified JavaScript --> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" | ||
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" | ||
crossorigin="anonymous"></script> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<nav class="navbar navbar-default navbar-fixed-top"> | ||
<div class="container-fluid"> | ||
<!-- Brand and toggle get grouped for better mobile display --> | ||
<div class="navbar-header"> | ||
|
||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> | ||
<span class="sr-only">Toggle navigation</span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
<span class="icon-bar"></span> | ||
</button> | ||
|
||
<a class="navbar-brand" style="padding: 5px 20px;" href="http://www.mtconnect.org"> | ||
<img alt="Brand" src="/styles/MTConnect-Logo.png" height="40"/> | ||
</a> | ||
|
||
</div> | ||
|
||
<!-- Collect the nav links, forms, and other content for toggling --> | ||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> | ||
<ul class="nav navbar-nav"> | ||
|
||
<li><a href="../probe">Probe</a></li> | ||
|
||
<li><a href="../current">Current</a></li> | ||
|
||
<li><a href="../sample">Sample</a></li> | ||
|
||
</ul> | ||
|
||
<div class="navbar-form navbar-left"> | ||
|
||
<div class="form-group"> | ||
<input id="fromText" type="text" class="form-control" style="margin-right: 10px;" placeholder="From"/> | ||
<input id="countText" type="text" class="form-control" style="margin-right: 10px;" placeholder="Count"/> | ||
</div> | ||
|
||
<button onclick="getSample();" class="btn btn-default">Get Sample</button> | ||
|
||
</div> | ||
|
||
</div><!-- /.navbar-collapse --> | ||
</div><!-- /.container-fluid --> | ||
</nav> | ||
|
||
<div class="container-fluid" style="margin-top: 60px;"> | ||
|
||
<p> | ||
<xsl:apply-templates select="/m:MTConnectStreams/m:Header" /> | ||
</p> | ||
|
||
<hr/> | ||
|
||
<xsl:apply-templates select="/m:MTConnectStreams/m:Streams/m:DeviceStream" /> | ||
|
||
</div> | ||
|
||
<footer class="footer" style="margin-top: 20px; margin-bottom: 20px;"> | ||
|
||
<div class="container"> | ||
|
||
<div class="row"> | ||
|
||
<p class="col-md-3 text-muted">This template is designed by Feenux LLC and is available for use through the MIT license.</p> | ||
|
||
<p class="col-md-3 text-muted">Source code for this template is available at | ||
<a href="https://github.com/TrakHound/MTConnect-Agent-Stylesheet">GitHub</a> | ||
</p> | ||
|
||
<p class="col-md-3 text-muted">© 2016 Feenux LLC, All Rights Reserved</p> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</footer> | ||
|
||
</body> | ||
|
||
</xsl:template> | ||
|
||
<xsl:template match="m:DeviceStream"> | ||
|
||
<div class="panel panel-default"> | ||
|
||
<div class="panel-heading"> | ||
|
||
<div class="container-fluid"> | ||
|
||
<div class="row"> | ||
|
||
<div class="col-sm-2"> | ||
|
||
<h6 style="margin-bottom: 0px;">Device</h6> | ||
|
||
<h2 style="margin-top: 0px; margin-bottom: 5px;"><xsl:value-of select="@name"/></h2> | ||
|
||
</div> | ||
|
||
<div class="col-sm-2"> | ||
|
||
<h6 style="margin-bottom: 0px;">UUID</h6> | ||
|
||
<h4 style="margin-top: 0px; margin-bottom: 5px;"><xsl:value-of select="@uuid"/></h4> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
<div class="panel-body"> | ||
|
||
<xsl:apply-templates select="m:ComponentStream"/> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</xsl:template> | ||
|
||
<xsl:template match="m:Header"> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<i class="fa fa-bar-chart-o fa-fw"></i>Agent Information | ||
</div> | ||
|
||
<div class="panel-body"> | ||
|
||
<ul class="list-group"> | ||
|
||
<xsl:for-each select="@*"> | ||
|
||
<li class="list-group-item col-md-3"> | ||
|
||
<h6 class="list-group-item-header"> | ||
|
||
<xsl:value-of select="name()"/> | ||
|
||
</h6> | ||
|
||
<h4 class="list-group-item-text"> | ||
|
||
<xsl:value-of select="." /> | ||
|
||
</h4> | ||
|
||
</li> | ||
|
||
</xsl:for-each> | ||
|
||
</ul> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</xsl:template> | ||
|
||
<xsl:template match="m:ComponentStream"> | ||
|
||
<div style="margin-left: 10px;"> | ||
|
||
<h6 style="margin-bottom: 0px;"><xsl:value-of select="@component" /></h6> | ||
|
||
<h3 style="margin-top: 0px; margin-bottom: 5px;"><xsl:value-of select="@name" /></h3> | ||
|
||
</div> | ||
|
||
<div class="panel-group"> | ||
|
||
<xsl:apply-templates select=" m:Samples"/> | ||
<xsl:apply-templates select=" m:Events"/> | ||
<xsl:apply-templates select=" m:Condition"/> | ||
|
||
</div> | ||
|
||
</xsl:template> | ||
|
||
<xsl:template match="*"> | ||
|
||
<div class="panel panel-default"> | ||
<div class="panel-heading"> | ||
<i class="fa fa-bar-chart-o fa-fw"></i> | ||
<xsl:value-of select="name()"/> | ||
</div> | ||
|
||
<div class="panel-body"> | ||
|
||
<div class="table-responsive"> | ||
|
||
<table class="table table-hover"> | ||
<thead> | ||
<th>Timestamp</th><th>Type</th><th>Sub Type</th><th>Name</th><th>Id</th> | ||
<th>Sequence</th><th>Value</th> | ||
</thead> | ||
<tbody> | ||
<xsl:for-each select="*"> | ||
<tr> | ||
<td><xsl:value-of select="@timestamp"/></td> | ||
<td><xsl:value-of select="name()"/></td> | ||
<td><xsl:value-of select="@subType"/></td> | ||
<td><xsl:value-of select="@name"/></td> | ||
<td><xsl:value-of select="@dataItemId"/></td> | ||
<td><xsl:value-of select="@sequence"/></td> | ||
<td><xsl:value-of select="."/></td> | ||
</tr> | ||
</xsl:for-each> | ||
</tbody> | ||
</table> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
|
||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
version="1.0"> | ||
<xsl:template name="headers"> | ||
<!-- Latest compiled and minified JavaScript --> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" | ||
integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" | ||
crossorigin="anonymous"></script> | ||
</xsl:template> | ||
</xsl:stylesheet> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
Configurator/Fanuc-MTConnect-Agent-Configurator.vshost.exe.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/> | ||
</startup> | ||
</configuration> |
Oops, something went wrong.