Skip to content

Commit

Permalink
Improvements to history chart;
Browse files Browse the repository at this point in the history
Added charts to thing event list
  • Loading branch information
hspaay committed Jul 27, 2024
1 parent d6fe1af commit 6a6151c
Show file tree
Hide file tree
Showing 23 changed files with 456 additions and 580 deletions.
3 changes: 2 additions & 1 deletion bindings/hiveoview/src/service/HiveovService.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/hiveot/hub/bindings/hiveoview/src/session"
"github.com/hiveot/hub/bindings/hiveoview/src/views"
"github.com/hiveot/hub/bindings/hiveoview/src/views/app"
"github.com/hiveot/hub/bindings/hiveoview/src/views/comps"
"github.com/hiveot/hub/bindings/hiveoview/src/views/dashboard"
"github.com/hiveot/hub/bindings/hiveoview/src/views/directory"
"github.com/hiveot/hub/bindings/hiveoview/src/views/history"
Expand Down Expand Up @@ -144,7 +145,7 @@ func (svc *HiveovService) createRoutes(router *chi.Mux, rootPath string) http.Ha

// History view. Optional query params 'timestamp' and 'duration'
r.Get("/history/{thingID}/{key}", history.RenderHistoryPage)
r.Get("/latestValue/{thingID}/{key}", history.RenderHistoryLatest)
r.Get("/latestValue/{thingID}/{key}", comps.RenderHistoryLatest)

// Status components
r.Get("/status", status.RenderStatus)
Expand Down
14 changes: 0 additions & 14 deletions bindings/hiveoview/src/static/chartjs-4.4.1.umd.js

This file was deleted.

45 changes: 45 additions & 0 deletions bindings/hiveoview/src/static/echarts.min.js

Large diffs are not rendered by default.

272 changes: 0 additions & 272 deletions bindings/hiveoview/src/static/sse-2.2.0.js

This file was deleted.

2 changes: 1 addition & 1 deletion bindings/hiveoview/src/views/app/app.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div id="detailsPage" class="hidden" displayIfTarget="/thing">
{{template "detailsPage.gohtml" .}}
</div>
<div id="historyPage" class="hidden" displayIfTarget="/history">
<div id="historyPage" class="hidden" displayIfTarget="/history" style="height:100%">
{{template "historyPage.gohtml" .}}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion bindings/hiveoview/src/views/base.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="/static/[email protected]"></script>

{{/* use chartjs for time series display. include the date libraries*/}}
<script src="/static/chartjs-4.4.1.umd.js"></script>
<script src="/static/chartjs-4.4.3.min.js"></script>
<script src="/static/luxon-3.4.4.min.js"></script>
<script src="/static/chartjs-adapter-luxon-1.3.1.js"></script>

Expand Down
Loading

0 comments on commit 6a6151c

Please sign in to comment.