Integration

Web Components

Discovery is a set of Web Components, so, you can use it easily in your own development:

With NPM/Yarn

$ npm i @senx/discovery-widgets
$ yarn add @senx/discovery-widgets

With CDN

<script nomodule src="https://unpkg.com/@senx/discovery-widgets/dist/discovery/discovery.js"></script>
<script type="module" src="https://unpkg.com/@senx/discovery-widgets/dist/discovery/discovery.esm.js"></script>

Basic usage

<html lang="en">
<head>
  <title>Test</title>
</head>
<body>
<discovery-dashboard url="https://warp.senx.io/api/v0/exec" dashboard-title="Test">
{
  'title' 'Test'
  'description' 'Dashboard test'
  'tiles' [ 
    {
      'title' 'test' 
      'options' { 'autoRefresh' 1 }
      'x' 0 'y' 0 'w' 12 'h' 4
      'type' 'area'
      'macro' <%
        1 4 <%
          DROP NEWGTS 'g' STORE
          1 10 <%
            'ts' STORE $g $ts RAND + STU * NOW + NaN NaN NaN RAND ADDVALUE DROP
          %> FOR
          $g
        %> FOR
      %>
    }
  ]
}
</discovery-dashboard>
<script nomodule src="https://unpkg.com/@senx/discovery-widgets/dist/discovery/discovery.js"></script>
<script type="module" src="https://unpkg.com/@senx/discovery-widgets/dist/discovery/discovery.esm.js"></script>
</body>
</html>

Next steps

Found an issue on this page or something missing?

Tell us onSlack iconThe Lounge, the Warp 10 Community Slack.