Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Ritchie authored and Patrick Ritchie committed Jun 23, 2016
1 parent 06da4e9 commit 1aadbf9
Show file tree
Hide file tree
Showing 2 changed files with 185 additions and 36 deletions.
106 changes: 84 additions & 22 deletions Devices.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"
<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>
<title>MTConnect Devices</title>

<link href="/styles/bootstrap.min.css" rel="stylesheet"></link>
<link href="/styles/Custom.css" rel="stylesheet"></link>
Expand Down Expand Up @@ -121,15 +121,15 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

<div class="row">

<div class="col-sm-2">
<div class="col-lg-3 col-md-4 col-xs-12">

<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">
<div class="col-lg-3 col-md-4 hidden-xs">

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

Expand All @@ -145,8 +145,6 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

<div class="panel-body">



<xsl:apply-templates select="m:Components"/>

</div>
Expand All @@ -164,10 +162,33 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

<div class="panel-body">

<ul class="list-group">
<!-- Standard Header Table-->
<table class="table table-hover visible-lg visible-md">
<thead>

<xsl:for-each select="@*">
<th><xsl:value-of select="name()"/></th>
</xsl:for-each>

</thead>

<tbody>

<tr>
<xsl:for-each select="@*">
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>

</tbody>

</table>

<!-- Small/Mobile Header List -->
<ul class="list-group visible-sm visible-xs">

<xsl:for-each select="@*">

<li class="list-group-item col-md-3">

<h6 class="list-group-item-header">
Expand All @@ -178,8 +199,8 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

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

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

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

</li>
Expand Down Expand Up @@ -214,23 +235,23 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

<div class="row">

<div class="col-sm-1">
<div class="col-lg-3 col-md-4 col-xs-12">

<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">
<div class="col-lg-3 col-md-4 hidden-xs">

<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">
<div class="col-lg-3 col-md-4 hidden-xs">

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

Expand All @@ -244,13 +265,6 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

</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">
Expand All @@ -267,8 +281,8 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"

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

<div class="table-responsive">

<!-- Standard Table -->
<div class="table-responsive visible-lg visible-md">
<table class="table table-hover">
<thead>
<th>Id</th>
Expand All @@ -295,8 +309,56 @@ xmlns:m="urn:mtconnect.org:MTConnectDevices:1.3"
</xsl:for-each>
</tbody>
</table>
</div>

<!-- Small Table -->
<div class="table-responsive hidden-xs visible-sm">

<table class="table table-hover hidden-xs visible-sm">
<thead>
<th>Id</th>
<th>Name</th>
<th>Category</th>
<th>Type</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="@type"/></td>
</tr>
</xsl:for-each>
</tbody>
</table>

</div>

<!-- Extra Small List -->
<ul class="list-group visible-xs">

<xsl:for-each select="*">

<li class="list-group-item col-sm-12">

<h6 class="list-group-item-header">

<xsl:value-of select="@type"/>

</h6>

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

<xsl:value-of select="@id"/>

</h4>

</li>

</xsl:for-each>

</div>
</ul>

</xsl:template>

Expand Down
115 changes: 101 additions & 14 deletions Streams.xsl
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
<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"
xmlns:js="urn:custom-javascript"
exclude-result-prefixes="msxsl js"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
>

<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
Expand All @@ -16,7 +19,7 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"
<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>
<title>MTConnect Device Streams</title>

<link href="/styles/bootstrap.min.css" rel="stylesheet"></link>
<link href="/styles/Custom.css" rel="stylesheet"></link>
Expand Down Expand Up @@ -55,7 +58,7 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"

</ul>

<div class="navbar-form navbar-left">
<div class="navbar-form navbar-left hidden-sm hidden-xs">

<div class="form-group">
<input id="fromText" type="text" class="form-control" style="margin-right: 10px;" placeholder="From"/>
Expand Down Expand Up @@ -106,11 +109,11 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"
<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:DeviceStream">

<div class="panel panel-default">
Expand All @@ -121,15 +124,23 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"

<div class="row">

<div class="col-sm-2">
<div class="col-lg-3 col-md-4 col-xs-12">

<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">
<div class="col-lg-3 col-md-4 hidden-xs">

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

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

</div>

<div class="col-lg-3 col-md-4 hidden-xs">

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

Expand Down Expand Up @@ -162,7 +173,30 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"

<div class="panel-body">

<ul class="list-group">
<!-- Standard Header Table-->
<table class="table table-hover visible-lg visible-md">
<thead>

<xsl:for-each select="@*">
<th><xsl:value-of select="name()"/></th>
</xsl:for-each>

</thead>

<tbody>

<tr>
<xsl:for-each select="@*">
<td><xsl:value-of select="."/></td>
</xsl:for-each>
</tr>

</tbody>

</table>

<!-- Small/Mobile Header List -->
<ul class="list-group visible-sm visible-xs">

<xsl:for-each select="@*">

Expand Down Expand Up @@ -222,12 +256,17 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"

<div class="panel-body">

<div class="table-responsive">

<!-- Standard Table -->
<div class="table-responsive visible-lg visible-md">
<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>
<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="*">
Expand All @@ -243,9 +282,57 @@ xmlns:m="urn:mtconnect.org:MTConnectStreams:1.3"
</xsl:for-each>
</tbody>
</table>
</div>

<!-- Small Table -->
<div class="table-responsive hidden-xs visible-sm">

<table class="table table-hover hidden-xs visible-sm">
<thead>
<th>Type</th>
<th>Name</th>
<th>Id</th>
<th>Value</th>
</thead>
<tbody>
<xsl:for-each select="*">
<tr>
<td><xsl:value-of select="name()"/></td>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@dataItemId"/></td>
<td><xsl:value-of select="."/></td>
</tr>
</xsl:for-each>
</tbody>
</table>

</div>

<!-- Extra Small List -->
<ul class="list-group visible-xs">

<xsl:for-each select="*">

<li class="list-group-item col-sm-12">

<h6 class="list-group-item-header">

<xsl:value-of select="@dataItemId"/>

</h6>

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

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

</h4>

</li>

</xsl:for-each>

</ul>

</div>

</div>

</div>
Expand Down

0 comments on commit 1aadbf9

Please sign in to comment.