Skip to content

Commit

Permalink
Update 6-23-16
Browse files Browse the repository at this point in the history
- Added Bootstrap files locally
- Removed remote links to bootstrap
- Added Devices.xsl for Probe stylesheet
- Added Custom.css file for simple customization of styles
  • Loading branch information
Patrick Ritchie authored and Patrick Ritchie committed Jun 23, 2016
1 parent b1e1c38 commit a206370
Show file tree
Hide file tree
Showing 6 changed files with 343 additions and 32 deletions.
7 changes: 7 additions & 0 deletions Custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.panel-default > .panel-heading {

padding: 5px 15px;

}


303 changes: 303 additions & 0 deletions Devices.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http:https://www.w3.org/1999/XSL/Transform"
xmlns:xs="http:https://www.w3.org/2001/XMLSchema"
xmlns:fn="http:https://www.w3.org/2005/xpath-functions"
xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"
>

<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">

<head>

<meta charset="utf-8"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>

<title>Okuma MTConnect Devices</title>

<link href="/styles/bootstrap.min.css" rel="stylesheet"></link>
<link href="/styles/Custom.css" rel="stylesheet"></link>

</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:https://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:MTConnectDevices/m:Header" />
</p>

<hr/>

<xsl:apply-templates select="/m:MTConnectDevices/m:Devices/m:Device" />

</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="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/TrakHound/MTConnect-Agent-Stylesheet">GitHub</a>
</p>

<p class="col-md-3 text-muted">© 2016 Feenux LLC, All Rights Reserved</p>

</div>

</div>

</footer>


<script src="/styles/jquery-1.12.4.min.js"></script>
<script src="/styles/bootstrap.min.js"></script>
<script src="/styles/GetSample.js"></script>

</body>

</xsl:template>

<xsl:template match="m:Device">

<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:Components"/>

</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:Components">

<div class="panel-group">

<xsl:apply-templates select="*"/>

</div>

</xsl:template>

<xsl:template match="m:Components/*">

<div class="panel panel-default">

<div class="panel-heading">

<div class="container-fluid">

<div class="row">

<div class="col-sm-1">

<h6 style="margin-bottom: 0px;">Name</h6>

<h3 style="margin-top: 0px; margin-bottom: 5px;"><xsl:value-of select="@name"/></h3>

</div>

<div class="col-sm-1">

<h6 style="margin-bottom: 0px;">ID</h6>

<h3 style="margin-top: 0px; margin-bottom: 5px;"><xsl:value-of select="@id"/></h3>

</div>

<div class="col-sm-1">

<h6 style="margin-bottom: 0px;">Native Name</h6>

<h3 style="margin-top: 0px; margin-bottom: 5px;"><xsl:value-of select="@nativeName"/></h3>

</div>

</div>

</div>

</div>

<!-- <div class="panel-heading">
<i class="fa fa-bar-chart-o fa-fw"></i>
<xsl:value-of select="@id"/>
<xsl:value-of select="@name"/>
<xsl:value-of select="@nativeName"/>
</div> -->

<div class="panel-body">

<div class="panel-group">

<xsl:apply-templates select="*"/>

</div>

</div>

</div>

</xsl:template>

<xsl:template match="m:DataItems">

<div class="table-responsive">

<table class="table table-hover">
<thead>
<th>Id</th>
<th>Name</th>
<th>Category</th>
<th>Native Units</th>
<th>Type</th>
<th>SubType</th>
<th>Units</th>
<th>CDATA</th>
</thead>
<tbody>
<xsl:for-each select="*">
<tr>
<td><xsl:value-of select="@id"/></td>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@category"/></td>
<td><xsl:value-of select="@nativeUnits"/></td>
<td><xsl:value-of select="@type"/></td>
<td><xsl:value-of select="@subType"/></td>
<td><xsl:value-of select="@units"/></td>
<td><xsl:value-of select="."/></td>
</tr>
</xsl:for-each>
</tbody>
</table>

</div>

</xsl:template>

</xsl:stylesheet>
42 changes: 20 additions & 22 deletions Streams.xsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
<xsl:stylesheet version="2.0"
xmlns:xsl="http:https://www.w3.org/1999/XSL/Transform"
xmlns:xs="http:https://www.w3.org/2001/XMLSchema"
xmlns:fn="http:https://www.w3.org/2005/xpath-functions"
Expand All @@ -12,22 +12,15 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"

<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/jquery-1.12.4.min.js"></script>
<script src="/styles/js/bootstrap.min.js"></script>
<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>

<meta charset="utf-8"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
<meta name="viewport" content="width=device-width, initial-scale=1"></meta>

<title>Okuma MTConnect Device Streams</title>

<link href="/styles/bootstrap.min.css" rel="stylesheet"></link>
<link href="/styles/Custom.css" rel="stylesheet"></link>

</head>

<body>
Expand Down Expand Up @@ -108,6 +101,11 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"
</div>

</footer>


<script src="/styles/jquery-1.12.4.min.js"></script>
<script src="/styles/bootstrap.min.js"></script>
<script src="/styles/GetSample.js"></script>

</body>

Expand Down Expand Up @@ -163,11 +161,11 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"
</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">
Expand All @@ -178,8 +176,8 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"

<h4 class="list-group-item-text">

<xsl:value-of select="." />

<xsl:value-of select="." />
</h4>

</li>
Expand Down
6 changes: 6 additions & 0 deletions bootstrap.min.css

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions bootstrap.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit a206370

Please sign in to comment.