UNPKG

lpio

Version:

The last dashboard app you'll ever need

40 lines (33 loc) 1.16 kB
<link rel="import" href="../../bower_components/polymer/polymer.html"> <link rel="import" href="behaviors/widget-api.html"> <link rel="import" href="behaviors/dashboard-api.html"> <link rel="import" href="../behaviors/http-connect.html"> <link rel="import" href="../settings/lp-settings.html"> <dom-module id="lp-api"> <template> <lp-redux id="redux" state="{{state}}"></lp-redux> <lp-settings key="host" value="{{host}}"></lp-settings> <lp-settings key="port" value="{{port}}"></lp-settings> </template> </dom-module> <script> /* The API layer implements AJAX calls and action creator/dispatcher methods for the Redux. */ (function () { Polymer({ is: 'lp-api', properties: { state: { type: Object, notify: true, readonly: true } }, behaviors:[ApiBehaviors.Widget, ApiBehaviors.Dashboard, LinchPinBehaviors.HttpConnect], dispatch: function(action){ this.$.redux.dispatch(action); } }); })(); </script>