You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
osem_dash/assets/scripts/bundle-ddc4bffa28.js

1 line
23 KiB
JavaScript

!function e(t,a,s){function r(i,o){if(!a[i]){if(!t[i]){var l="function"==typeof require&&require;if(!o&&l)return l(i,!0);if(n)return n(i,!0);var u=new Error("Cannot find module '"+i+"'");throw u.code="MODULE_NOT_FOUND",u}var d=a[i]={exports:{}};t[i][0].call(d.exports,function(e){var a=t[i][1][e];return r(a?a:e)},d,d.exports,e,t,a,s)}return a[i].exports}for(var n="function"==typeof require&&require,i=0;i<s.length;i++)r(s[i]);return r}({"/home/travis/build/developmentseed/sense/app/assets/scripts/actions/action-creators.js":[function(e,t,a){"use strict";function s(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t["default"]=e,t}function r(e){return e&&e.__esModule?e:{"default":e}}function n(e){return{type:c["REQUEST_SENSOR_DATA_"+e.toUpperCase()]}}function i(e,t){return{type:c["RECEIVE_SENSOR_DATA_"+e.toUpperCase()],data:t,receivedAt:Date.now()}}function o(e,t){return function(a){a(n(e));var s=f["default"].senseBox["sensorId--"+e];return(0,u["default"])(f["default"].api+"/boxes/"+f["default"].senseBox.id+"/data/"+s+"?from-date="+t).then(function(e){if(e.status>=400)throw new Error("Bad response");return e.json()}).then(function(t){a(i(e,t))},function(e){return console.log("e",e),a(i(null,null,"Data not available"))})}}Object.defineProperty(a,"__esModule",{value:!0}),a.fetchSensorData=o;var l=e("isomorphic-fetch"),u=r(l),d=e("./action-types"),c=s(d),p=e("../config"),f=r(p)},{"../config":"/home/travis/build/developmentseed/sense/app/assets/scripts/config.js","./action-types":"/home/travis/build/developmentseed/sense/app/assets/scripts/actions/action-types.js","isomorphic-fetch":"isomorphic-fetch"}],"/home/travis/build/developmentseed/sense/app/assets/scripts/actions/action-types.js":[function(e,t,a){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.REQUEST_SENSOR_DATA_TEMPERATURE="REQUEST_SENSOR_DATA_TEMPERATURE",a.RECEIVE_SENSOR_DATA_TEMPERATURE="RECEIVE_SENSOR_DATA_TEMPERATURE",a.REQUEST_SENSOR_DATA_PRESSURE="REQUEST_SENSOR_DATA_PRESSURE",a.RECEIVE_SENSOR_DATA_PRESSURE="RECEIVE_SENSOR_DATA_PRESSURE",a.REQUEST_SENSOR_DATA_LUMINOSITY="REQUEST_SENSOR_DATA_LUMINOSITY",a.RECEIVE_SENSOR_DATA_LUMINOSITY="RECEIVE_SENSOR_DATA_LUMINOSITY",a.REQUEST_SENSOR_DATA_UV="REQUEST_SENSOR_DATA_UV",a.RECEIVE_SENSOR_DATA_UV="RECEIVE_SENSOR_DATA_UV",a.REQUEST_SENSOR_DATA_HUMIDITY="REQUEST_SENSOR_DATA_HUMIDITY",a.RECEIVE_SENSOR_DATA_HUMIDITY="RECEIVE_SENSOR_DATA_HUMIDITY"},{}],"/home/travis/build/developmentseed/sense/app/assets/scripts/components/charts/chart-line.js":[function(e,t,a){"use strict";function s(e){return e&&e.__esModule?e:{"default":e}}var r=function(){function e(e,t){var a=[],s=!0,r=!1,n=void 0;try{for(var i,o=e[Symbol.iterator]();!(s=(i=o.next()).done)&&(a.push(i.value),!t||a.length!==t);s=!0);}catch(l){r=!0,n=l}finally{try{!s&&o["return"]&&o["return"]()}finally{if(r)throw n}}return a}return function(t,a){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,a);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=e("react"),i=s(n),o=e("d3"),l=s(o),u=e("lodash"),d=s(u),c=i["default"].createClass({displayName:"LineChart",propTypes:{className:i["default"].PropTypes.string,data:i["default"].PropTypes.array,axisLineVal:i["default"].PropTypes.number,axisLineMax:i["default"].PropTypes.number,axisLineMin:i["default"].PropTypes.number,dataUnitSuffix:i["default"].PropTypes.string},chart:null,onWindowResize:function(){this.chart.checkSize()},componentDidMount:function(){this.onWindowResize=d["default"].debounce(this.onWindowResize,200),window.addEventListener("resize",this.onWindowResize),this.chart=p(),l["default"].select(this.refs.container).call(this.chart.data(this.props.data).axisLineVal(this.props.axisLineVal).axisValueMax(this.props.axisLineMax).axisValueMin(this.props.axisLineMin).dataUnitSuffix(this.props.dataUnitSuffix))},componentWillUnmount:function(){window.removeEventListener("resize",this.onWindowResize),this.chart.destroy()},componentDidUpdate:function(e){console.log("LineChart compone