Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #6

Merged
merged 66 commits into from
Apr 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
bb2dec6
Ajout de fonctions time
pjap93 Feb 28, 2018
0e93952
Update time.isItAM.js
pjap93 Mar 1, 2018
82a9535
Update time.isItEvening.js
pjap93 Mar 1, 2018
c1ceeaf
Update time.isItNight.js
pjap93 Mar 1, 2018
83f98f0
Update time.isItPM.js
pjap93 Mar 1, 2018
e527997
Fix bug launcher view
Mar 4, 2018
c43cf20
Fix the height of ul menu
Mar 5, 2018
c6dbf3b
First commit
Mar 13, 2018
cd178e2
Add documentation comments for house
Mar 13, 2018
f432a1e
Add documentation comments for alarm
Mar 14, 2018
c93d8d8
Add comments for documentation of areas
Mar 14, 2018
85cb470
Add comments for documentation of box
Mar 14, 2018
50b373c
Update theme version for DocumentationJS
Mar 14, 2018
06a58f6
Add comments for documentation of the boxType
Mar 14, 2018
d51260a
add comments for documentation of calendar
Mar 15, 2018
03b60e1
Add comments for device documentation and fix typos
Mar 15, 2018
6a6132f
Add comments for deviceState documentation
Mar 15, 2018
4a25eb3
Add comments for weather documentation and fix typos
Mar 15, 2018
1c02612
Add comments for eventdocumentation
Mar 15, 2018
91d7c1a
Add comments for eventType documentation
Mar 15, 2018
5c93a3e
Fix typos of eventType documentation
Mar 15, 2018
35c22fc
Add comments for location documentation
Mar 15, 2018
e943590
Add comments for machine documentation
Mar 15, 2018
29df74e
Add comments for message documentation
Mar 15, 2018
2fe0d8e
Add comments for notification documentation
Mar 15, 2018
e5bc882
Add comments for param documentation
Mar 15, 2018
8afd469
Add comments for paramUser documentation
Mar 15, 2018
6dd491c
Add comments for room documentation
Mar 15, 2018
c935609
Add comments for mode documentation
Mar 15, 2018
dea1518
Add comments for deviceType documentation
Mar 15, 2018
c67e7f7
Add comments for music documentation
Mar 15, 2018
2c475e8
remove old reademe
Mar 15, 2018
1a5980f
Add comments for models documentation and other changes
Mar 18, 2018
364361f
Fix display param when deviceType was updated
Mar 19, 2018
c3c4cd0
Display script id in UI
Mar 19, 2018
32eaaa9
Add the possibility to see the user's areas on the map
Mar 20, 2018
bd5ebe3
Add tooltip
Mar 22, 2018
ac6c4aa
Update device settings.
pjap93 Mar 25, 2018
5194a92
Fix when new deviceType is created
Mar 25, 2018
f6e0f5e
add description on POST /devicetype/:id/exec route documentation
Pierre-Gilles Apr 1, 2018
b9cf33f
Bug in Gladys deviceType UI : missing name input
Pierre-Gilles Apr 1, 2018
3ef652d
Merge
Pierre-Gilles Apr 1, 2018
1c17ebb
correct documentation on gladys.device.delete
Pierre-Gilles Apr 1, 2018
e7b3ce4
update yarn.lock
Pierre-Gilles Apr 1, 2018
dc6d52a
Merge branch 'LeptitGeek-JSDoc'
Pierre-Gilles Apr 1, 2018
4823298
Merge pull request #305 from LeptitGeek/patch-1
Pierre-Gilles Apr 1, 2018
fbd0c84
Merge pull request #306 from LeptitGeek/patch-2
Pierre-Gilles Apr 1, 2018
a38f6cb
Merge branch 'master' of git://github.com/LeptitGeek/Gladys into Lept…
Pierre-Gilles Apr 1, 2018
0467f18
deviceType.update : added the tag in attribute we keep
Pierre-Gilles Apr 1, 2018
6282af0
Merge branch 'LeptitGeek-master'
Pierre-Gilles Apr 1, 2018
c96a91e
Merge branch 'master' of personal:GladysProject/Gladys
Pierre-Gilles Apr 1, 2018
abaf43e
Merge branch 'patch-1' of git://github.com/LeptitGeek/Gladys into Lep…
Pierre-Gilles Apr 1, 2018
c8a8735
change how the id of the script is displayed (cleaner)
Pierre-Gilles Apr 1, 2018
4ab69e7
Merge branch 'LeptitGeek-patch-1'
Pierre-Gilles Apr 1, 2018
c76c328
Merge pull request #316 from LeptitGeek/patch-2
Pierre-Gilles Apr 1, 2018
1eb65e0
Merge branch 'pjap93-devices-edit' of git://github.com/pjap93/Gladys …
Pierre-Gilles Apr 1, 2018
c87c926
add placeholder in device edit view
Pierre-Gilles Apr 1, 2018
b32032e
Merge branch 'pjap93-pjap93-devices-edit'
Pierre-Gilles Apr 1, 2018
5fb4d98
Merge branch 'pjap93-update-core-time' of git://github.com/pjap93/Gla…
Pierre-Gilles Apr 1, 2018
2a1f9f7
Time new functions : Improve PR code quality + write tests
Pierre-Gilles Apr 1, 2018
d00de43
Merge branch 'pjap93-pjap93-update-core-time'
Pierre-Gilles Apr 1, 2018
cb448b2
deploy to github pages doc
Pierre-Gilles Apr 22, 2018
b8d1941
change repo slug
Pierre-Gilles Apr 22, 2018
28ddd2c
add custom domain to jsdoc
Pierre-Gilles Apr 22, 2018
1b13718
push apidoc too to documentation.gladysproject.com
Pierre-Gilles Apr 22, 2018
0879506
add google analytics to documentation
Pierre-Gilles Apr 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

#config/googleapi.js
apidoc
docs



Expand Down
24 changes: 22 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ before_install:

script:
- "grunt coverage"

- "grunt documentation"
- "grunt apidoc"
- "mkdir documentation"
- "mv docs jsdoc"
- "mv ./jsdoc/ ./documentation/"
- "mv ./apidoc/ ./documentation/"
- echo "<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-42837031-1\"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-42837031-1'); </script>" >> ./documentation/jsdoc/index.html
- echo "<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-42837031-1\"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-42837031-1'); </script>" >> ./documentation/apidoc/index.html

env:
- CXX=g++-4.8
- CXX=g++-4.8

deploy:
provider: pages
repo: GladysProject/documentation
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: documentation
target-branch: gh-pages
fqdn: documentation.gladysproject.com
verbose: true
on:
branch: master
3 changes: 2 additions & 1 deletion api/controllers/DeviceTypeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ module.exports = {
* @apiName execDeviceType
* @apiGroup DeviceType
* @apiPermission authenticated
* @apiDescription This API is not for sensors ! It's only for devices that need to execute an action. Ex: A lamp. If you want to save the state of a sensor, you need to use the POST /devicestate route.
*
* @apiParam {float} [value] New value to apply to the deviceType
*
Expand All @@ -98,7 +99,7 @@ module.exports = {
* @apiName execDeviceTypeGet
* @apiGroup DeviceType
* @apiPermission authenticated
*
* @apiDescription This API is not for sensors ! It's only for devices that need to execute an action. Ex: A lamp. If you want to save the state of a sensor, you need to use the POST /devicestate route.
* @apiParam {float} [value] New value to apply to the deviceType
*
* @apiUse DeviceStateSuccess
Expand Down
2 changes: 1 addition & 1 deletion api/controllers/MusicController.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ module.exports = {
},

/**
* @api {post} /music/volum Set Volume
* @api {post} /music/volume Set Volume
* @apiName MusicSetVolume
* @apiGroup Music
* @apiPermission authenticated
Expand Down
102 changes: 0 additions & 102 deletions api/core/alarm/README.md

This file was deleted.

27 changes: 27 additions & 0 deletions api/core/alarm/alarm.create.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@

/**
* @public
* @description This function create an alarm
* @name gladys.alarm.create
* @param {Object} alarm
* @param {String} alarm.name The name of the alarm
* @param {datetime} alarm.datetime Datetime of the alarm when the alarm is at a specific date
* @param {time} alarm.time Time of the alarm when it's a reccurring alarm
* @param {integer} alarm.dayofweek The day the alarm should ring (reccurring alarm)
* @returns {Alarm} alarm
* @example
* var alarm = {
* name: 'Monday wake up !',
* time: '08:00',
* dayofweek: 1
* };
*
* gladys.alarm.create(alarm)
* .then(function(alarm){
* // alarm created !
* })
* .catch(function(err){
* // something bad happened ! :/
* });
*/

module.exports = function create(alarm) {

if (!(alarm && ( (alarm.dayofweek && alarm.time) || alarm.cronrule || alarm.datetime || alarm.autoWakeUp)) ){
Expand Down
21 changes: 21 additions & 0 deletions api/core/alarm/alarm.delete.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
var queries = require('./alarm.queries.js');

/**
* @public
* @description This function delete an alarm
* @name gladys.alarm.delete
* @param {Object} alarm
* @param {integer} alarm.id The id of alarm
* @returns {Alarm} alarm
* @example
* var alarm = {
* id: 1,
* };
*
* gladys.alarm.delete(alarm)
* .then(function(alarm){
* // alarm deleted !
* })
* .catch(function(err){
* // something bad happened ! :/
* });
*/

module.exports = function(alarm) {

if (!alarm.id) {
Expand Down
21 changes: 21 additions & 0 deletions api/core/alarm/alarm.get.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
var queries = require('./alarm.queries.js');

/**
* @public
* @description This function retunr all alarm of user
* @name gladys.alarm.get
* @param {Object} user
* @param {integer} user.id The id of the user whose alarms we want
* @returns {Array<alarms>} alarm
* @example
* var user = {
* id: 1,
* };
*
* gladys.alarm.get(user)
* .then(function(alarms){
* // all alarms of this user !
* })
* .catch(function(err){
* // something bad happened ! :/
* });
*/

module.exports = function(user){
return gladys.utils.sql(queries.get, [user.id]);
};
32 changes: 32 additions & 0 deletions api/core/alarm/alarm.update.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
// update an alarm

/**
* @private
* @description This function update an alarm
* @name gladys.alarm.update
* @param {Object} params
* @param {integer} params.id The id of alarm
* @param {Object} params.alarm
* @param {String} params.alarm.name The name of the alarm
* @param {datetime} params.alarm.datetime Datetime of the alarm when the alarm is at a specific date
* @param {time} params.alarm.time Time of the alarm when it's a reccurring alarm
* @param {integer} params.alarm.dayofweek The day the alarm should ring (reccurring alarm)
* @returns {Alarm} alarm
* @example
* var params = {
* id: 1,
* alarm = {
* name: 'Monday wake up !',
* time: '08:00',
* dayofweek: 1
* }
* };
*
* gladys.alarm.update(params)
* .then(function(alarm){
* // alarm updated !
* })
* .catch(function(err){
* // something bad happened ! :/
* });
*/

module.exports = function(params) {
return Alarm.update({
id: params.id
Expand Down
84 changes: 0 additions & 84 deletions api/core/area/README.md

This file was deleted.

Loading