Loading

display

NameTypeDescription
datanumber, string, custom dataData to display
globalParamsOptionGlobal options (see above) concerning this tile
paramsOption[]List of options (see above) concerning each displayed dataset depending of the index of this array
eventsEvents[]List of events to emit (see below)
  • Option.timeMode:
    • date: convert the value into an ISO date.
    • duration: convert the value to a human-readable duration.
    • custom: display value as is, including HTML.

Samples

Single value with unit

<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="display">
  { 'data' 42 'globalParams' { 'timeMode' 'custom' 'unit' 'mph' } }
</discovery-tile>
</div>
{ 'data' 42 'globalParams' { 'timeMode' 'custom' 'unit' 'mph' } }

Date

<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="display">
  { 'data' NOW 'globalParams' { 'timeMode' 'date' } }
</discovery-tile>
</div>
{ 'data' NOW 'globalParams' { 'timeMode' 'date' } }

Duration

<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="display">
  { 'data' NOW 5 s - 'globalParams' { 'timeMode' 'duration' } }
</discovery-tile>
</div>
{ 'data' NOW 5 s - 'globalParams' { 'timeMode' 'duration' } }

HTML

<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="display">
  {
  'data' '<a href="https://warp10.io/" target="_blank">Warp 10</a>'
  'globalParams' { 'bgColor' '#f57f17' 'fontColor' '#bc5100' 'timeMode' 'custom' }
  }
</discovery-tile>
</div>
{ 'data' '<' 'a href="https://warp10.io/" target="_blank"' + '>Warp 10<' + '/a>' + 'globalParams' { 'bgColor' '#f57f17' 'fontColor' '#bc5100' 'timeMode' 'custom' } }
<div style="height: 250px">
<discovery-tile url="https://sandbox.senx.io/api/v0/exec" type="display">
  {
  'data' { 'text' 'SenX.io' 'url' 'https://senx.io' }
  'globalParams' { 'bgColor' '#f57f17' 'fontColor' '#bc5100' }
  }
</discovery-tile>
</div>
{ 'data' { 'text' 'SenX.io' 'url' 'https://senx.io' } 'globalParams' { 'bgColor' '#f57f17' 'fontColor' '#bc5100' } }