Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
chkr1011 committed Apr 15, 2017
2 parents 4dff331 + f9c779f commit 38f5599
Show file tree
Hide file tree
Showing 81 changed files with 572 additions and 701 deletions.
4 changes: 2 additions & 2 deletions App/HA4IoT.ManagementApp/HA4IoT.ManagementApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@
<Content Include="Settings\CloudConnectorServiceSettings.component.js" />
<Content Include="Settings\ControllerSettings.component.html" />
<Content Include="Settings\ControllerSettings.component.js" />
<Content Include="Settings\OpenWeatherMapSettings.component.html" />
<Content Include="Settings\OpenWeatherMapSettings.component.js" />
<Content Include="Settings\OpenWeatherMapServiceSettings.component.html" />
<Content Include="Settings\OpenWeatherMapServiceSettings.component.js" />
<Content Include="Settings\Settings.component.html" />
<Content Include="Settings\Settings.component.js" />
<Content Include="Settings\SlaveServiceSettings.component.html" />
Expand Down
134 changes: 67 additions & 67 deletions ...ngs/OpenWeatherMapSettings.component.html → ...nWeatherMapServiceSettings.component.html
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
<div class="panel panel-default">
<div class="panel-heading">Open Weather Map settings</div>
<div class="panel-body">

<div class="alert alert-info" role="alert">In order to use the Open Weather Map powered weather station you must create a free account at <a href="https://home.openweathermap.org/users/sign_up">Open Weather Map</a> and fill the required fields.</div>
<div class="alert alert-warning" role="alert">If there is already an HA4IoT installation in your LAN it is highly recommended to use the slave controller service
to receive the actual values from the master controller. This will reduce the effective API calls to the Open
Weather Map API which are limited for free accounts.</div>

<form class="form-horizontal">

<div class="form-group">
<label class="col-md-2 control-label">Enabled</label>
<div class="col-md-10">
<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.IsEnabled"><label></label>
</label>
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">Latitude</label>
<div class="col-md-10">
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Latitude">
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">Longitude</label>
<div class="col-md-10">
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Longitude">
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">App ID</label>
<div class="col-md-10">
<input type="text" class="form-control" ng-model="owmsCtrl.Model.AppId">
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">Values</label>

<div class="col-md-10">
<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseTemperature">Use temperature
</label>

<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseHumidity">Use humidity
</label>

<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseSunriseSunset">Use sunrise / sunset
</label>

<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseWeather">Use weather
</label>
</div>
</div>
</form>
</div>
<div class="panel-footer clearfix">
<button class="btn btn-default pull-right" ng-click="owmsCtrl.save()">Save</button>
</div>
<div class="panel panel-default">
<div class="panel-heading">Open Weather Map settings</div>
<div class="panel-body">

<div class="alert alert-info" role="alert">In order to use the Open Weather Map powered weather station you must create a free account at <a href="https://home.openweathermap.org/users/sign_up">Open Weather Map</a> and fill the required fields.</div>
<div class="alert alert-warning" role="alert">If there is already an HA4IoT installation in your LAN it is highly recommended to use the slave controller service
to receive the actual values from the master controller. This will reduce the effective API calls to the Open
Weather Map API which are limited for free accounts.</div>

<form class="form-horizontal">

<div class="form-group">
<label class="col-md-2 control-label">Enabled</label>
<div class="col-md-10">
<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.IsEnabled"><label></label>
</label>
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">Latitude</label>
<div class="col-md-10">
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Latitude">
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">Longitude</label>
<div class="col-md-10">
<input type="number" class="form-control" ng-model="owmsCtrl.Model.Longitude">
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">App ID</label>
<div class="col-md-10">
<input type="text" class="form-control" ng-model="owmsCtrl.Model.AppId">
</div>
</div>

<div class="form-group">
<label class="col-md-2 control-label">Values</label>

<div class="col-md-10">
<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseTemperature">Use temperature
</label>

<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseHumidity">Use humidity
</label>

<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseSunriseSunset">Use sunrise / sunset
</label>

<label class="checkbox-inline">
<input type="checkbox" ng-model="owmsCtrl.Model.UseWeather">Use weather
</label>
</div>
</div>
</form>
</div>
<div class="panel-footer clearfix">
<button class="btn btn-default pull-right" ng-click="owmsCtrl.save()">Save</button>
</div>
</div>
84 changes: 42 additions & 42 deletions ...tings/OpenWeatherMapSettings.component.js → ...penWeatherMapServiceSettings.component.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
(function () {
var module = angular.module("app");

function createController(controllerProxyService, modalService) {

var ctrl = this;

ctrl.Model = {
Latitude: "",
Longitude: "",
AppId: "",
UseTemperature: true,
UseHumidity: true,
UseSunriseSunset: true,
UseWeather: true,
IsEnabled: true
}

ctrl.$onInit = function () {
controllerProxyService.get("Service/ISettingsService/GetSettings", { "Uri": "OpenWeatherMapServiceSettings" }, function (response) {
ctrl.Model = response;
});
}

ctrl.save = function () {
var payload = {
Uri: "OpenWeatherMapServiceSettings",
Settings: ctrl.Model
}

controllerProxyService.execute("Service/ISettingsService/Replace", payload);

modalService.show("Info", "Open Weahter Map settings successfully saved.");
}
}

module.component("openWeatherMapSettings", {
templateUrl: "Settings/OpenWeatherMapSettings.component.html",
controllerAs: "owmsCtrl",
controller: ["controllerProxyService", "modalService", createController]
});

(function () {
var module = angular.module("app");

function createController(controllerProxyService, modalService) {

var ctrl = this;

ctrl.Model = {
Latitude: "",
Longitude: "",
AppId: "",
UseTemperature: true,
UseHumidity: true,
UseSunriseSunset: true,
UseWeather: true,
IsEnabled: true
}

ctrl.$onInit = function () {
controllerProxyService.get("Service/ISettingsService/GetSettings", { "Uri": "OpenWeatherMapServiceSettings" }, function (response) {
ctrl.Model = response;
});
}

ctrl.save = function () {
var payload = {
Uri: "OpenWeatherMapServiceSettings",
Settings: ctrl.Model
}

controllerProxyService.execute("Service/ISettingsService/Replace", payload);

modalService.show("Info", "Open Weahter Map settings successfully saved.");
}
}

module.component("openWeatherMapSettings", {
templateUrl: "Settings/OpenWeatherMapSettings.component.html",
controllerAs: "owmsCtrl",
controller: ["controllerProxyService", "modalService", createController]
});

})();
2 changes: 1 addition & 1 deletion App/HA4IoT.ManagementApp/Settings/Settings.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<controller-settings></controller-settings>
<open-weather-map-settings></open-weather-map-settings>
<open-weather-map-service-settings></open-weather-map-service-settings>
<slave-service-settings></slave-service-settings>
<twitter-client-settings></twitter-client-settings>
<telegram-bot-settings></telegram-bot-settings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
}

ctrl.$onInit = function () {
controllerProxyService.get("Service/ISettingsService/GetSettings", { "Uri": "ControllerSlaveSettings" }, function (response) {
controllerProxyService.get("Service/ISettingsService/GetSettings", { "Uri": "ControllerSlaveServiceSettings" }, function (response) {
ctrl.Model = response;
});
}

ctrl.save = function () {
var payload = {
Uri: "Service/ControllerSlaveServiceSettings",
Uri: "ControllerSlaveServiceSettings",
Settings: ctrl.Model
}

Expand Down
2 changes: 1 addition & 1 deletion App/HA4IoT.WebApp/AppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function createAppController($http, $scope, modalService, apiService, localizati
c.appConfiguration.showWindowsOverview = c.windows.length > 0;

if (c.areas.length === 1) {
c.setActivePanel(c.Areas[0].id);
c.setActivePanel(c.areas[0].Id);
}

c.apiService.newStatusReceivedCallback = c.applyNewStatus;
Expand Down
2 changes: 1 addition & 1 deletion App/HA4IoT.WebApp/cache.manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Version 1.17.170
# Version 1.17.173

CACHE:

Expand Down
1 change: 1 addition & 0 deletions App/LocalDeployInfo.dat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
192.168.1.15=
192.168.1.16=
Loading

0 comments on commit 38f5599

Please sign in to comment.