Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chkr1011 committed Nov 16, 2015
2 parents 9bffae1 + 8c4b0b0 commit c49f6a2
Show file tree
Hide file tree
Showing 90 changed files with 4,260 additions and 325 deletions.
51 changes: 51 additions & 0 deletions App/HA4IoT.NativeApp/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[ignore]

# We fork some components by platform.
.*/*.web.js
.*/*.android.js

# Some modules have their own node_modules with overlap
.*/node_modules/node-haste/.*

# Ignore react-tools where there are overlaps, but don't ignore anything that
# react-native relies on
.*/node_modules/react-tools/src/React.js
.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js

# Ignore commoner tests
.*/node_modules/commoner/test/.*

# See https://github.com/facebook/flow/issues/442
.*/react-tools/node_modules/commoner/lib/reader.js

# Ignore jest
.*/node_modules/jest-cli/.*

# Ignore Website
.*/website/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js

[options]
module.system=haste

munge_underscores=true

module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy

[version]
0.17.0
34 changes: 34 additions & 0 deletions App/HA4IoT.NativeApp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IJ
#
.idea
.gradle
local.properties

# node.js
#
node_modules/
npm-debug.log
1 change: 1 addition & 0 deletions App/HA4IoT.NativeApp/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
21 changes: 21 additions & 0 deletions App/HA4IoT.NativeApp/API.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
'use strict';

var statusUrl = 'http://192.168.1.15/api/status';
var configUrl = 'http://192.168.1.15/api/configuration';

var API = {
getConfiguration: function() {
return fetch(configUrl).then((response) => response.json());
},

getStatus: function() {
return fetch(statusUrl).then((response) => response.json());
},

pollStatus: function(callback) {
this.getStatus().then((result) => callback(result));
setTimeout(() => this.pollStatus(callback), 250);
}
};

module.exports = API;
Loading

0 comments on commit c49f6a2

Please sign in to comment.