Compare commits

...

1909 Commits

Author SHA1 Message Date
server 53bc33fc3e Example Debian Buster install script 2020-05-08 15:34:21 -06:00
Rick Carlino 1a7ee04d0b
Merge pull request #1778 from FarmBot/dep_updates
FBJS updates
2020-05-08 16:15:39 -05:00
gabrielburnworth 4a7a683ba7 dep updates (fe) 2020-05-08 13:27:15 -07:00
Rick Carlino 8700d50c81
Merge pull request #1777 from FarmBot/plant_z
Add plant z input
2020-05-07 15:39:35 -05:00
gabrielburnworth 3bab5694b8 add plant z input 2020-05-07 12:15:49 -07:00
Rick Carlino e205214ba4
Merge pull request #1776 from FarmBot/dep_updates
Dependency upgrades
2020-05-07 08:24:47 -05:00
gabrielburnworth 73e9daed05 dep updates (fe) 2020-05-06 15:56:04 -07:00
gabrielburnworth 426f97ddc2 minor step changes 2020-05-06 15:55:59 -07:00
Rick Carlino 88e526cce3
Merge pull request #1775 from FarmBot/point_meta_updates
Merge meta attrs, dont overwrite
2020-05-06 16:40:08 -05:00
Rick Carlino 9e14c2125d
Merge branch 'staging' into point_meta_updates 2020-05-06 15:10:17 -05:00
Rick Carlino 889c78c77a Merge meta attrs, dont overwrite 2020-05-06 15:07:27 -05:00
Rick Carlino 3b1dbe2209
Merge pull request #1774 from FarmBot/mark_as
New Mark As UI
2020-05-01 14:29:18 -05:00
gabrielburnworth 980d39f70d new update_resource ui 2020-05-01 09:00:21 -07:00
Rick Carlino 461f4c2509
Merge pull request #1772 from FarmBot/shutdown_step
Add shutdown sequence step
2020-04-28 10:28:39 -05:00
gabrielburnworth d2176fd6ea dep updates (fe) 2020-04-28 07:20:21 -07:00
gabrielburnworth c9511593a3 add shutdown sequence command 2020-04-28 07:18:04 -07:00
Rick Carlino 66553d143d
Merge pull request #1771 from FarmBot/planted_at_updates
Override `created_at` value with `planted_at` value when available
2020-04-27 21:50:03 -05:00
Rick Carlino 696350343b Override `created_at` value with `planted_at` value when available 2020-04-27 16:09:12 -05:00
Rick Carlino 1f773c44fc
Merge pull request #1770 from FarmBot/planted_at_updates
Set default `planted_at` value
2020-04-27 15:45:50 -05:00
Rick Carlino 87c22d4a96 Set default `planted_at` value 2020-04-27 15:05:53 -05:00
Rick Carlino 9f35dd9992
Merge pull request #1769 from FarmBot/dep_updates
Dependency upgrades
2020-04-24 11:10:19 -05:00
gabrielburnworth 14bf5216e0 dep updates (fe) 2020-04-24 08:22:24 -07:00
gabrielburnworth 1d196d633a Merge branch 'master' of https://github.com/FarmBot/Farmbot-Web-App into staging 2020-04-24 06:49:58 -07:00
Rick Carlino de607e3e3a
Merge pull request #1768 from FarmBot/master-hotfix/update-fallback
Minor hotfix
2020-04-23 20:07:29 -05:00
gabrielburnworth d931cd1b84 update coverage task 2020-04-23 16:55:52 -07:00
gabrielburnworth b3f93dd678 update fallback 2020-04-23 15:58:33 -07:00
Rick Carlino 7f9ecd450d
Merge pull request #1767 from FarmBot/fe_updates
Misc updates
2020-04-23 15:04:05 -05:00
gabrielburnworth 69462e4b60 weeks refactor 2020-04-23 12:12:04 -07:00
gabrielburnworth d3732aed20 version updates 2020-04-23 12:11:25 -07:00
Rick Carlino 6213028f0f
Merge pull request #1765 from FarmBot/mark_as
Mark As step updates
2020-04-21 20:38:10 -05:00
gabrielburnworth 281813369e resource_update -> update_resource (fe) 2020-04-21 14:39:55 -07:00
Rick Carlino 1014eece5f
Merge pull request #1764 from FarmBot/minor-fixes
Minor fixes
2020-04-20 18:06:23 -05:00
gabrielburnworth 6f484ab2e3 minor fixes 2020-04-20 14:07:40 -07:00
Rick Carlino 0bd6d9a967
Merge pull request #1763 from FarmBot/mark_as
Add weed status for Mark As step
2020-04-20 09:26:28 -05:00
gabrielburnworth 25b2f18c4c add weed status for mark as 2020-04-17 16:13:26 -07:00
Rick Carlino 1556084dbd
Merge branch 'staging' into always_upgrade 2020-04-17 13:22:18 -05:00
Rick Carlino 0571100229 Remind custoemrs to upgrade FBOS before troubleshooting 2020-04-17 13:13:32 -05:00
Rick Carlino d6909f439c
Merge pull request #1760 from FarmBot/mark_as
Delete dump_info node
2020-04-17 11:54:09 -05:00
Rick Carlino 36b5c90b65 Merge remote-tracking branch 'origin/mark_as' into mark_as 2020-04-17 11:09:29 -05:00
Rick Carlino f3ac957485 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into mark_as 2020-04-17 11:08:31 -05:00
Rick Carlino 6f834517ca More dump_info removal 2020-04-17 11:08:17 -05:00
Rick Carlino 44c3f7dc4e
Merge branch 'staging' into mark_as 2020-04-17 11:01:53 -05:00
Rick Carlino 5bb77c1c14 Delete dump_info node 2020-04-17 10:58:36 -05:00
Rick Carlino 3ee1478a58
Merge pull request #1759 from FarmBot/mark_as
Plant stage updates.
2020-04-17 10:58:02 -05:00
Rick Carlino df9e0ef26b Update PLANT_STAGES 2020-04-17 09:56:53 -05:00
Rick Carlino 0e02ca06ee Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into mark_as 2020-04-16 15:57:29 -05:00
Rick Carlino 643bcb1a37
Merge pull request #1758 from FarmBot/mark_as
Phase 0: Ability to pass variables to MARK AS step
2020-04-16 13:27:52 -05:00
Rick Carlino 88b20a73ea Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into mark_as 2020-04-16 13:26:29 -05:00
Rick Carlino e8a8165635
Merge branch 'staging' into mark_as 2020-04-16 13:04:15 -05:00
Rick Carlino 588d4eb36e
Merge pull request #1757 from FarmBot/settings_updates
Settings and dependency updates
2020-04-16 13:04:03 -05:00
Rick Carlino efea80b593 Deprecate `resource_update`. Add `update_resource`. 2020-04-15 13:46:46 -05:00
gabrielburnworth c75d93f3c4 dep updates (fe) 2020-04-14 16:03:48 -07:00
gabrielburnworth bee1e0e074 settings panel updates 2020-04-14 16:03:38 -07:00
Rick Carlino 4375a935f0
Merge pull request #1756 from FarmBot/recovery_release
v9.3.0 - Jolly Juniper
2020-04-14 09:33:24 -05:00
Rick Carlino 7d5fe7c9f6 Deploy fixes 2020-04-14 09:09:07 -05:00
Rick Carlino e801d53d51 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2020-04-14 08:47:43 -05:00
Rick Carlino bf0a03d11d
Merge pull request #1754 from FarmBot/search_refactor
Search Refactor
2020-04-14 08:46:51 -05:00
gabrielburnworth ec757b1b29 misc bug fixes 2020-04-13 23:38:49 -07:00
gabrielburnworth 3c3b120b9b refactor search fields 2020-04-13 18:15:11 -07:00
Rick Carlino 046035ab9e
Merge pull request #1753 from FarmBot/staging
v9.2.6 - Jolly Juniper
2020-04-13 17:27:06 -05:00
Rick Carlino 52b481e831 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2020-04-13 16:43:16 -05:00
Rick Carlino 73422eb8ea
Merge pull request #1752 from FarmBot/criteria_ui_updates
Criteria UI updates
2020-04-13 16:42:26 -05:00
gabrielburnworth b087e08f13 criteria ui updates 2020-04-13 12:24:38 -07:00
Rick Carlino 1e1b405c32
Merge pull request #1751 from FarmBot/staging
v9.2.6 release
2020-04-12 11:49:39 -05:00
Rick Carlino dccea4e474
Merge pull request #1750 from FarmBot/image_updates
v9.2.6 - Jolly Juniper
2020-04-12 11:22:26 -05:00
Rick Carlino 91d86bad0c Update structure.sql 2020-04-12 10:55:08 -05:00
Rick Carlino bfe4df68a8 Fix typo in migration 2020-04-12 10:41:53 -05:00
Rick Carlino dd6a43d901 Dep updates 2020-04-12 10:33:49 -05:00
Rick Carlino 726cd6d4e7 Merge branch 'master' into image_updates 2020-04-12 10:24:48 -05:00
Rick Carlino d730cd9260 Bump image limit from 100 to 450 2020-04-12 10:24:17 -05:00
Rick Carlino eb8cfd3c91
Merge pull request #1749 from FarmBot/staging
v9.2.5 - Jolly Juniper
2020-04-08 14:00:45 -05:00
Rick Carlino 8f9bd4a5e7
Merge pull request #1746 from FarmBot/weeds
Add new weed pointer type
2020-04-02 13:51:59 -05:00
gabrielburnworth 3ebf434945 use Weed instead of GenericPointer for weeds 2020-04-02 10:24:33 -07:00
Rick Carlino 92a7194c6e
Merge pull request #1744 from FarmBot/bugfix/add-tool
Fix add tool bug
2020-03-31 09:32:33 -05:00
gabrielburnworth 24ad841d7f add and edit tool improvements 2020-03-30 17:57:32 -07:00
Rick Carlino b45f806309
Merge pull request #1740 from FarmBot/staging
v9.2.4
2020-03-24 12:43:37 -05:00
Rick Carlino cf7ec86106
Merge pull request #1738 from FarmBot/weeds
Part I: Fork "Weed" point type from "GenericPointer"
2020-03-22 20:53:42 -05:00
Rick Carlino 37f7517c51 Temporary changes to pass type checking. May not be correct. 2020-03-22 19:26:19 -05:00
Rick Carlino 2a04803dc6 Fork `Weed` pointer_type from GenericPointer, not Plant 2020-03-22 18:57:47 -05:00
Rick Carlino 3700406687 Add new `Weed` PointerType 2020-03-22 18:32:00 -05:00
Rick Carlino 1ba0ff7871
Merge pull request #1737 from FarmBot/deps
Routine Dep Upgrades
2020-03-22 14:07:55 -05:00
Rick Carlino be23cd44b5 Routine dep upgrades: JS 2020-03-20 11:09:54 -05:00
Rick Carlino 43d1b9da33 Routine dep upgrades: Ruby 2020-03-20 10:31:18 -05:00
Rick Carlino bda30bae09
Merge pull request #1736 from FarmBot/staging
v9.2.3 - Jolly Juniper
2020-03-18 16:23:53 -05:00
Rick Carlino de21cb16da Merge branch 'master' of https://git.heroku.com/farmbot-production into staging 2020-03-18 15:56:33 -05:00
Rick Carlino 0a153bc656 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2020-03-18 15:56:14 -05:00
Rick Carlino 149451c270
Merge pull request #1735 from FarmBot/bot-online-bugfix
Minor bug fix
2020-03-18 15:46:50 -05:00
Gabriel Burnworth d7de315c20
flip bot online boolean 2020-03-18 13:09:11 -07:00
Rick Carlino 61c09b69b9 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App 2020-03-17 15:29:47 -05:00
Rick Carlino 863071824b
Merge pull request #1733 from FarmBot/staging
v9.2.2 - Jolly Juniper
2020-03-17 15:27:37 -05:00
Rick Carlino 82f2fbef90
Merge pull request #1732 from FarmBot/diagnosis-icons
Diagnosis icons
2020-03-17 14:34:49 -05:00
gabrielburnworth c736348bed add icon to diagnosis indicator 2020-03-17 09:47:17 -07:00
gabrielburnworth 309737dd33 remove plants from default criteria 2020-03-17 08:34:32 -07:00
Rick Carlino 3a9ea9af79
Merge pull request #1731 from FarmBot/staging
v9.2.1 - Jolly Juniper
2020-03-16 19:19:41 -05:00
Rick Carlino bc68f3e79f Merge branch 'staging' 2020-03-16 19:08:55 -05:00
Rick Carlino 85be07efe5
Merge pull request #1730 from FarmBot/panel-updates
Groups panel updates
2020-03-14 14:55:03 -05:00
gabrielburnworth fe9ff346a8 group panel updates 2020-03-13 14:56:14 -07:00
gabrielburnworth ec878e0dae tools panel updates 2020-03-13 14:56:14 -07:00
gabrielburnworth b1c2b36a37 settings refactoring 2020-03-13 14:56:09 -07:00
gabrielburnworth 11f349ac89 dep updates (fe) 2020-03-13 14:06:02 -07:00
Rick Carlino 67373e4f7e
Merge pull request #1726 from FabioDessi/issue-1685
Improve grid line labels in farm designer #2
2020-03-12 12:07:05 -05:00
Fabio Dessi dd46830b9d Merge branch 'staging' into issue-1685 2020-03-03 09:02:11 +01:00
Fabio Dessi 63b333746d [WIP] Grid line improvements for y axis 2020-03-03 08:41:29 +01:00
Rick Carlino 2c6033f57a
Merge pull request #1724 from FarmBot/labeling-improvements
Labeling improvements and refactoring
2020-02-28 13:51:48 -06:00
gabrielburnworth 4d2ea00130 settings updates 2020-02-28 09:01:19 -08:00
gabrielburnworth c8c57d5340 organize German translation file 2020-02-28 08:37:58 -08:00
gabrielburnworth 4013291787 fix commas 2020-02-28 08:35:32 -08:00
gabrielburnworth 25d944e4b7 add missing panels 2020-02-28 08:35:17 -08:00
gabrielburnworth de6f886586 remove unused code 2020-02-28 08:34:54 -08:00
gabrielburnworth 800625e8a1 improve element annotation 2020-02-28 08:34:28 -08:00
Rick Carlino bce0700cd9
Merge pull request #1723 from FarmBot/staging
v9.2.0 - Jolly Juniper
2020-02-27 15:37:03 -06:00
Rick Carlino cccecf58f6
Merge pull request #1722 from MarcRoland/patch-1
Update de.json
2020-02-27 15:14:23 -06:00
MarcRoland c2308cb987
Update de.json 2020-02-27 11:52:14 -08:00
Rick Carlino ffbf660143
Merge pull request #1721 from FarmBot/cleanup
Cleanup
2020-02-26 13:30:15 -08:00
gabrielburnworth edb96d3ca8 cleanup and refactoring 2020-02-26 12:17:54 -08:00
Rick Carlino a49e5e67ba
Merge pull request #1720 from FarmBot/misc-updates
Misc fixes and updates
2020-02-26 11:32:19 -08:00
gabrielburnworth 90ddd78bb8 remove old tools page 2020-02-26 10:28:21 -08:00
gabrielburnworth 9bd98aca1e misc updates 2020-02-26 10:28:16 -08:00
Rick Carlino 49fdced812
Merge pull request #1718 from FarmBot/updates
Dep Upgrades
2020-02-26 06:47:23 -08:00
Rick Carlino 6bc0034d67 Dep updates 2020-02-26 08:18:25 -06:00
Rick Carlino 8e0cf2603c
Merge pull request #1715 from FarmBot/minor-fixes
Minor bug fixes and upgrades
2020-02-24 10:19:51 -08:00
gabrielburnworth 4a0035b9eb minor bug fixes 2020-02-24 08:56:26 -08:00
gabrielburnworth 19eebde8e2 dep updates (fe) 2020-02-24 08:55:37 -08:00
Rick Carlino cd52670c0b
Merge pull request #1711 from FarmBot/days_ago
days => days_ago
2020-02-24 08:52:04 -08:00
Rick Carlino fd62ccd9aa
Merge branch 'staging' into days_ago 2020-02-21 20:17:33 -06:00
Rick Carlino 1a4a106179 days => days_ago 2020-02-21 20:13:29 -06:00
Rick Carlino ee8851b0af
Merge pull request #1709 from FarmBot/tool-updates
Tool updates
2020-02-21 10:32:41 -06:00
gabrielburnworth 40150a307c tool updates 2020-02-20 19:06:43 -08:00
Rick Carlino a5b1d5631e
Merge pull request #1701 from FarmBot/staging
v9.1.3 - Jolly Juniper
2020-02-20 12:57:33 -06:00
Rick Carlino 26a4f66a75
Merge pull request #1700 from FarmBot/tool_deleteion
Fixes for Tool deletion issues
2020-02-19 11:57:17 -06:00
Rick Carlino 73222de627 Dismount tool prior to deletion 2020-02-19 11:15:18 -06:00
Rick Carlino ddb480921e Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into tool_deleteion 2020-02-19 11:14:54 -06:00
Rick Carlino 5945d2a38d
Merge pull request #1699 from FarmBot/model_version_updates
Settings and version updates part 2
2020-02-18 16:16:24 -06:00
gabrielburnworth a04ec59ba5 model and version updates part 2 2020-02-18 12:52:52 -08:00
Rick Carlino 310686508f
Merge pull request #1698 from FarmBot/model_updates
Settings and version updates
2020-02-16 08:25:23 -06:00
gabrielburnworth 66b5e3c962 refactor external urls 2020-02-15 11:11:50 -08:00
gabrielburnworth cf0af59e42 model and version updates 2020-02-15 11:08:35 -08:00
gabrielburnworth 9dab0c4bc5 hardware settings ui updates 2020-02-15 11:06:45 -08:00
Rick Carlino 94ee85bd83 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App 2020-02-14 08:50:32 -06:00
Rick Carlino 672aae441b Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App 2020-02-14 08:50:26 -06:00
Rick Carlino 3d0223e56a
Merge pull request #1696 from FarmBot/staging
v9.1.1 - Jolly Juniper
2020-02-14 08:48:49 -06:00
Rick Carlino 93d2521511
Merge pull request #1695 from FarmBot/new-models
Add new models
2020-02-14 08:24:51 -06:00
gabrielburnworth aafd84fff7 support new models 2020-02-13 16:53:20 -08:00
Rick Carlino 8f8056a3e3
Merge pull request #1694 from FarmBot/sensor_reading_limits
Cap sensor readings to 5,000 count
2020-02-13 17:07:01 -06:00
Rick Carlino c1a9bc63bf SensorReadingController test improvement 2020-02-13 13:15:37 -06:00
Rick Carlino 2a6fe06ba3 Cap sensor readings to 5,000 count 2020-02-13 13:10:48 -06:00
Rick Carlino 6c3e60999c
Merge pull request #1693 from FarmBot/email_verbiage
Verbiage updates
2020-02-12 19:26:53 -06:00
Rick Carlino 10a025369d Verbiage updates 2020-02-12 18:35:02 -06:00
Rick Carlino e490aa83f6
Merge pull request #1691 from FarmBot/staging
v9.1.1 - Jolly Juniper
2020-02-10 10:43:19 -06:00
Rick Carlino eec9790a0b
Merge pull request #1690 from FarmBot/monday
PointGroup, SensorReading updates
2020-02-10 10:07:29 -06:00
Rick Carlino de140d02a5 Add pagination to numerous API endpoints 2020-02-10 09:05:42 -06:00
Rick Carlino c0fab4a38c fill `nil` criteria attributes with PointGroup::DEFAULT_CRITERIA 2020-02-10 08:34:05 -06:00
Rick Carlino 313008b21b
Merge pull request #1689 from FabioDessi/issue-1685
Improve grid line labels in farm designer
2020-02-10 08:08:10 -06:00
Fabio Dessi 2aed62b9f8 [FIX] code coverage extension 2020-02-09 14:38:01 +01:00
Fabio Dessi 4fe9d89912 [WIP] Grid line improvements for x axis 2020-02-09 10:59:03 +01:00
Rick Carlino e989e66d9b
Merge pull request #1687 from FarmBot/fix-blinky-tests
Fix blinky ruby tests
2020-02-08 16:10:40 -06:00
gabrielburnworth 3367bc667b fix blinky ruby tests 2020-02-08 10:56:47 -08:00
Rick Carlino 93f5d59bf4 Merge pull request #1686 from FarmBot/groups-updates
Groups UI updates
2020-02-08 11:23:28 -06:00
gabrielburnworth 1af5af0696 board type updates 2020-02-07 15:17:31 -08:00
gabrielburnworth e46b4de0bb os download page updates 2020-02-07 15:05:59 -08:00
gabrielburnworth 464b730cd8 groups updates 2020-02-07 15:05:16 -08:00
Rick Carlino 837cbe8a85
Merge pull request #1684 from FabioDessi/grid_line_improvements
zoom on grid now changes strokeWidth instead of zoom
2020-02-07 15:06:01 -06:00
Fabio Dessi 8f3a674f9d zoom on grid now changes strokeWidth instead of zoom 2020-02-07 06:16:30 +01:00
Rick Carlino 3e300defa1
Merge pull request #1682 from FarmBot/staging
v9.1.0 - Jolly Juniper
2020-02-06 07:44:37 -06:00
Rick Carlino cd685d6590
Merge pull request #1683 from FarmBot/ci_got_slower
Fix blinky test.
2020-02-05 18:12:45 -06:00
Rick Carlino 05f6c52f67 reduce time diff check in test 2020-02-05 17:42:33 -06:00
Rick Carlino a565261517
Merge pull request #1681 from PitouGames/logs-responsive
Logs responsive
2020-02-05 17:21:40 -06:00
Rick Carlino e5a154e3a0
Merge branch 'staging' into logs-responsive 2020-02-05 13:31:19 -06:00
Rick Carlino 286e6b5bbb
Merge pull request #1680 from FarmBot/setup_fix
Update ubuntu_setup.sh
2020-02-05 13:26:09 -06:00
Pitou ea031aaf4d Fix french translation 2020-02-05 19:26:47 +01:00
Rick Carlino 4119865370
Merge branch 'staging' into setup_fix 2020-02-05 09:10:10 -06:00
Rick Carlino da00ca4d98 Update ubuntu_setup.sh 2020-02-05 09:01:34 -06:00
Pitou 9288757f97 Allow horizontal scroll on small devices 2020-02-05 00:03:06 +01:00
Rick Carlino 66962e1bdb
Merge pull request #1679 from FarmBot/remove_diag_dumps
Remove diag dumps
2020-02-04 14:23:40 -06:00
Rick Carlino 0b4ea1e385 Remove diag dumps 2020-02-04 13:42:40 -06:00
Rick Carlino 11d08aea99
Merge pull request #1673 from FarmBot/staging
v9.1.0
2020-02-03 08:38:04 -06:00
Rick Carlino 1934e4ba7c
Merge pull request #1676 from FarmBot/connectivity_widget_updates
Verbiage Updates to WiFi Connectivity Error Message
2020-01-31 10:43:50 -06:00
Rick Carlino 1cfa4f9e9e Verbiage updates 2020-01-31 09:51:11 -06:00
Rick Carlino 13b4e159df Merge branch 'master' of https://git.heroku.com/farmbot-production into staging 2020-01-29 08:44:12 -06:00
Rick Carlino e84e05a45e
Merge pull request #1672 from FarmBot/download-page
OS download page
2020-01-29 08:07:58 -06:00
gabrielburnworth 313e92b1c3 update circle config coverage check 2020-01-28 12:16:45 -08:00
gabrielburnworth 9dfd31da10 add os download page 2020-01-28 12:02:12 -08:00
Rick Carlino c3029d06ed
Merge pull request #1671 from FarmBot/staging
Recovery Deployment, 28 JAN
2020-01-28 13:02:21 -06:00
Rick Carlino 7e1cad0f9f
Merge pull request #1670 from FarmBot/firmware_quickfix
Firmware quickfix
2020-01-28 11:54:39 -06:00
Rick Carlino f0eadf2c98 Fix tests 2020-01-28 11:05:48 -06:00
Rick Carlino 9ccb0fab68 Possible workaround for v9 firmware reset issues. 2020-01-28 08:27:59 -06:00
Rick Carlino e5b20c15c9 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App 2020-01-25 09:20:59 -06:00
Rick Carlino f11a553231
Merge pull request #1668 from FarmBot/staging
v9.0.4 - Jolly Juniper
2020-01-25 09:19:57 -06:00
Rick Carlino bbd711eb24
Merge pull request #1667 from FarmBot/node_upgrade
Dependency upgrades
2020-01-24 16:09:43 -06:00
gabrielburnworth 981d005423 dep updates (fe) 2020-01-24 11:54:58 -08:00
gabrielburnworth 3b2422607f update ci config 2020-01-24 11:54:49 -08:00
Gabriel Burnworth e05b4a3d1c
upgrade node version 2020-01-23 16:04:34 -08:00
Rick Carlino 39e5418b3e
Merge pull request #1666 from FarmBot/dep_upgrades
Dep Upgrades
2020-01-23 14:45:04 -06:00
Rick Carlino fc7f98b79b Dep upgrades 2020-01-23 14:20:12 -06:00
Rick Carlino 4451c4decd
Merge pull request #1665 from FarmBot/criteria_groups
Criteria-based groups (API Only)
2020-01-17 08:44:14 -06:00
Rick Carlino 6fbe9ec1df Fix broke test 2020-01-16 16:54:17 -06:00
Rick Carlino 77ee927ce8 FBJS Update 2020-01-16 16:44:02 -06:00
Rick Carlino d829c4e3dd Commented code removal 2020-01-16 16:15:42 -06:00
Rick Carlino b8eb47b0cc ✔️ 2020-01-16 16:13:01 -06:00
Rick Carlino ff596c6f1f DRY up the `criteria` declaration in ::Mutations 2020-01-16 15:51:36 -06:00
Rick Carlino 393f6c3eed Test cleanup. NEXT: Fix PointGroup#update 2020-01-16 15:24:04 -06:00
Rick Carlino f6b67052ca Tests for PointGroup#create (with criteria) 2020-01-16 15:08:07 -06:00
Rick Carlino 9edba110f6 WIP: Use a "criteria map" 2020-01-16 14:35:05 -06:00
Rick Carlino 612042efaa WIP 2020-01-16 07:41:11 -06:00
Rick Carlino 3a3e52d46e Add `comparison` celery node. Upgrade deps 2020-01-15 15:53:06 -06:00
Rick Carlino 0fe2329809
Merge pull request #1663 from FarmBot/coverage_task
Update coverage task
2020-01-13 14:13:16 -06:00
gabrielburnworth ab7c360304 fix coverage task 2020-01-13 11:37:37 -08:00
Rick Carlino 024964d380
Merge pull request #1657 from PitouGames/fix_frontpage_ui
Fix frontpage ui
2020-01-10 08:20:48 -06:00
Rick Carlino e19efe31e9
Merge branch 'staging' into fix_frontpage_ui 2020-01-10 07:44:42 -06:00
Rick Carlino 6220a85bd5 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App 2020-01-10 07:38:59 -06:00
Rick Carlino 1e5ebb9c9b
Merge pull request #1662 from FarmBot/staging
Recovery Release
2020-01-10 07:36:47 -06:00
Rick Carlino 070a882173
Merge pull request #1660 from FarmBot/form-bugfix
Fix farm event form display bug
2020-01-09 21:23:11 -06:00
Gabriel Burnworth 6227b17d16 add fallback coverage value 2020-01-09 18:13:00 -08:00
gabrielburnworth 927ad8c54e dep updates (fe) 2020-01-09 17:30:59 -08:00
gabrielburnworth 339ec2f3c0 fix farm event edit panel bug 2020-01-09 15:36:49 -08:00
Rick Carlino a31c21bb4d
Merge pull request #1658 from FarmBot/staging
v9.0.3 - Jolly Juniper
2020-01-09 14:53:33 -06:00
Pitou 6f699a72a2 Add SMTP indication in example.env
See also https://forum.farmbot.org/t/how-to-configure-smtp-with-gmail/5714
2020-01-09 11:25:42 +01:00
Pitou 547a73727f Fix UI for sm devices 2020-01-09 11:23:53 +01:00
Rick Carlino db040aa301
Merge pull request #1655 from FarmBot/step_changes
Step changes
2020-01-08 08:54:38 -06:00
Rick Carlino bc08514f7e Update tests to account for verbiage changes 2020-01-07 15:27:59 -06:00
Rick Carlino 7f0892d8b2 More step cosmetic fixes 2020-01-07 15:00:25 -06:00
Rick Carlino a13272d6be
Merge pull request #1654 from FarmBot/log_problems_iii
Revert Ruby 2.7.0 Upgrade (for now)
2020-01-07 11:12:20 -06:00
Rick Carlino d63b9ef39c Hmm. 2020-01-07 10:12:26 -06:00
Rick Carlino 800fa28f83 Revert Ruby 2.7.0 upgrade for now. 2020-01-07 10:03:27 -06:00
Rick Carlino 37d4d27dce
Merge pull request #1652 from gabrielburnworth/staging
Form updates and refactoring
2020-01-07 08:02:20 -06:00
gabrielburnworth 4549ecf405 fix ci-only test failure again 2020-01-03 14:41:07 -08:00
gabrielburnworth e2838539b4 fix ci-only test failure 2020-01-03 14:16:45 -08:00
gabrielburnworth 72dfcb23ee dep updates (fe) 2020-01-03 13:48:58 -08:00
gabrielburnworth 6f2b74dc52 fix test failure 2020-01-03 13:34:39 -08:00
gabrielburnworth 8b8b198d93 add step tests 2020-01-03 12:55:29 -08:00
gabrielburnworth a10267507b no executables farm event form 2020-01-03 12:17:56 -08:00
gabrielburnworth 271884f2d0 update folder creation 2020-01-03 12:17:39 -08:00
gabrielburnworth 781ac33b10 cleanup and refactoring 2020-01-03 12:17:12 -08:00
gabrielburnworth 9d7833b71c refactor tests 2020-01-03 12:06:28 -08:00
gabrielburnworth a38e7b6b91 refactor using new ts features 2020-01-03 12:04:55 -08:00
Rick Carlino a32d9f025b
Merge pull request #1650 from FarmBot/new_steps
(DRAFT) New Sequence Steps, Part II
2020-01-03 13:58:49 -06:00
Rick Carlino 4b06a8ae11 Revert URI.open() calls for now 2020-01-03 13:13:51 -06:00
Rick Carlino 6c6057c97f Bump bundler version 2020-01-03 12:45:28 -06:00
Rick Carlino 8b14c32028 tile_write_pin.tsx tests 2020-01-03 12:15:01 -06:00
Rick Carlino 69ed6e89b7 tile_reboot.tsx tests 2020-01-03 11:51:24 -06:00
Rick Carlino ab94c0098c open() => URI.open() 2020-01-03 11:18:31 -06:00
Rick Carlino 1383a5bb1a Round II of 2.7.0 deprecation fixes 2020-01-03 09:49:59 -06:00
Rick Carlino 721fea39b2 First wave of 2.7.0 deprecation fixes 2020-01-03 09:31:48 -06:00
Rick Carlino 2226d3b34b Update unit tests to account for input position swap 2020-01-03 08:18:21 -06:00
Rick Carlino d5bbc95b1f Linter fix 2020-01-02 17:07:06 -06:00
Rick Carlino 44b4604552 Sizing and color changes pt III 2020-01-02 16:45:32 -06:00
Rick Carlino f51e9ad4c9 Verbiage and color changes. 2020-01-02 16:05:12 -06:00
Rick Carlino 3f86376d09 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into new_steps 2020-01-02 15:50:39 -06:00
Rick Carlino 0d9bf3ccc5 Fix test breakage due to refactoring 2020-01-02 15:46:52 -06:00
Rick Carlino f9e5559ee0 More tests + step color updates, DRY up perihperal selector. 2020-01-02 13:58:20 -06:00
Rick Carlino eeabe48cef Fix test breakage in set_servo_angle. 2020-01-02 12:56:21 -06:00
Rick Carlino d306b65909 Use radio buttons for pin selection (instead of input text boxes) 2020-01-02 12:20:29 -06:00
Rick Carlino 19798b894f
Merge pull request #1648 from FarmBot/new_steps
Part I of New Sequence Steps
2020-01-02 11:40:15 -06:00
Rick Carlino b7c618aec8 More tests for `reboot` RPC in sequence editor 2020-01-02 11:10:54 -06:00
Rick Carlino 44c1e0b964 Fix test failure 2020-01-02 09:11:11 -06:00
Rick Carlino 47a2e5b1e3 Merge branch 'staging' into new_steps 2019-12-30 16:52:30 -06:00
Rick Carlino 6aff7445f1 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into new_steps 2019-12-30 16:52:24 -06:00
Rick Carlino 51f061a325 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-12-30 16:52:10 -06:00
Rick Carlino 1f6a71e6af
Merge pull request #1647 from gabrielburnworth/staging
Bulk plant status update
2019-12-30 16:50:56 -06:00
gabrielburnworth aed825a7ad fix text display bug 2019-12-30 12:16:36 -08:00
gabrielburnworth afd35f7291 add webcam tests 2019-12-30 12:16:07 -08:00
gabrielburnworth b8707f90cb peripherals column refactor 2019-12-30 12:15:39 -08:00
gabrielburnworth 31127c4edd update tool slot position string 2019-12-30 12:14:15 -08:00
gabrielburnworth 53b09e70a4 bulk plant status update 2019-12-30 12:13:23 -08:00
Rick Carlino d854cb9b22
Merge pull request #1645 from FarmBot/log_fbos_version
Add FBOS version to debug logs
2019-12-30 14:08:54 -06:00
gabrielburnworth f83a345227 add fbos version to debug log 2019-12-30 10:21:28 -08:00
Rick Carlino f2ca8fc6fa Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into new_steps 2019-12-30 12:10:53 -06:00
Rick Carlino 4ea82828d4 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-12-30 11:53:33 -06:00
Rick Carlino 3677fb8a37
Merge pull request #1644 from gabrielburnworth/staging
Tools panel updates
2019-12-30 11:52:43 -06:00
gabrielburnworth 1063b38626 left panel css fixes 2019-12-30 08:09:34 -08:00
gabrielburnworth ebe8831900 tools panel updates 2019-12-30 08:08:48 -08:00
Rick Carlino c3f5423823
Merge pull request #1643 from gabrielburnworth/staging
Add new board type
2019-12-30 08:17:31 -06:00
gabrielburnworth 2ad20ea54d dep updates (fe) 2019-12-27 12:59:13 -08:00
Rick Carlino 56002e5555 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-12-27 14:58:49 -06:00
gabrielburnworth 6bc6e6ffec add new board type 2019-12-27 12:30:58 -08:00
Rick Carlino ea8428621a
Merge pull request #1642 from gabrielburnworth/staging
Add camera type
2019-12-27 14:16:23 -06:00
gabrielburnworth 1455bebba2 minor folder edit fixes 2019-12-27 10:38:29 -08:00
gabrielburnworth 22465a5558 add none camera type 2019-12-27 10:37:54 -08:00
Rick Carlino 4fa48cb74b
Merge pull request #1641 from gabrielburnworth/staging
Improve error recovery
2019-12-27 12:26:09 -06:00
gabrielburnworth c2d80bd55c increase error containment 2019-12-26 12:20:10 -08:00
Rick Carlino fea40c1d9a Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App 2019-12-26 10:49:57 -06:00
Rick Carlino a810743fa7
Merge pull request #1640 from FarmBot/staging
v9.0.2 - Jolly Juniper
2019-12-26 10:48:09 -06:00
Rick Carlino 79690a90a2 WIP 2019-12-26 10:25:03 -06:00
Rick Carlino 5e52d3c6dd
Merge pull request #1639 from FarmBot/folders_feature
"Folders" Feature (Sequences Only)
2019-12-26 10:12:21 -06:00
Gabriel Burnworth 4dd1c04ae8
minor css fix 2019-12-24 11:38:45 -08:00
gabrielburnworth 071ffe39b5 add sequence update test 2019-12-23 16:01:00 -08:00
gabrielburnworth 9c3340be56 folders ui tests 2019-12-23 14:38:48 -08:00
Rick Carlino cd20fcf943 Add estop, servo_angle, toggle_pin steps. 2019-12-21 22:43:41 -06:00
gabrielburnworth 8d5218f67c folders ui updates 2019-12-21 11:47:19 -08:00
gabrielburnworth 307105c96e Merge branch 'staging' of https://github.com/FarmBot/Farmbot-Web-App into folders 2019-12-21 11:46:16 -08:00
Rick Carlino f5554a4e00
Merge pull request #1638 from gabrielburnworth/staging
Add pin bindings to usage index
2019-12-20 18:48:35 -06:00
Rick Carlino f5be061c4d Merge branch 'folders' of https://github.com/gabrielburnworth/Farmbot-Web-App into folders 2019-12-20 18:09:39 -06:00
gabrielburnworth 6a8bd52902 add pin bindings to usage index 2019-12-20 15:48:56 -08:00
Rick Carlino a0abdcb198 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-20 17:46:23 -06:00
Rick Carlino ac5cc41b95
Merge pull request #1636 from FabioDessi/issue-1582
Farm designer grid line improvements #1582
2019-12-20 16:51:33 -06:00
Rick Carlino ee20868cb4
Merge branch 'staging' into issue-1582 2019-12-20 11:28:28 -06:00
Rick Carlino 545c7ca4c1
Merge pull request #1637 from FarmBot/fix_ci
Fix CI, upgrade deps.
2019-12-20 11:28:13 -06:00
Rick Carlino 9646426964 Dep upgrades 2019-12-20 11:01:32 -06:00
gabrielburnworth fa7fc0024e folders ui bug fix and test prep 2019-12-20 08:59:46 -08:00
Rick Carlino 434d6e5d79 Fix CI 2019-12-20 10:56:29 -06:00
Fabio Dessi 98a0abd7fa Merge branch 'staging' into issue-1582 2019-12-20 16:17:49 +01:00
Rick Carlino f803dfd6cf Boop 2019-12-19 20:24:20 -06:00
gabrielburnworth 4b12828262 minor folders ui fixes 2019-12-19 18:03:31 -08:00
Rick Carlino 209b355481 Dont preemptively saved unsaved sequences when moving between folders. CC: @gabreilBurnworth 2019-12-19 20:01:17 -06:00
Rick Carlino 114673d756 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-19 19:55:33 -06:00
Rick Carlino 4d92f37a98
Merge pull request #1635 from FarmBot/sensor_reading
Add `read_at` column to `sensor_readings` table.
2019-12-19 19:55:24 -06:00
Rick Carlino 34b3a69e9e Merge conflicts 2019-12-19 19:55:16 -06:00
Rick Carlino 077894bb4d Add `read_at` column to `sensor_readings` table. Closes #1363 2019-12-19 19:32:51 -06:00
gabrielburnworth a2ae2ea38e folder ui updates 2019-12-19 17:30:02 -08:00
Rick Carlino df92e1d8db Merge branch 'master' of https://git.heroku.com/farmbot-production 2019-12-19 17:51:18 -06:00
Rick Carlino 2fa3aa55f4
Merge pull request #1634 from FarmBot/staging
v9.0.1 - Jolly Juniper
2019-12-19 17:46:23 -06:00
Rick Carlino d2549c0208
Merge pull request #1633 from FarmBot/force_reset
Add `needs_reset` column to `devices` table.
2019-12-19 16:15:48 -06:00
Rick Carlino 8e43cb894c Add `needs_reset` column to `devices` table 2019-12-19 15:41:03 -06:00
Rick Carlino 2099d7acbb Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2019-12-19 15:26:54 -06:00
Rick Carlino f9ac3e659f Fix the folder color picker 2019-12-19 10:26:40 -06:00
Rick Carlino e02673aa79 Make icons easier to click. NEXT: Fix edit state rendering issues 2019-12-18 18:47:51 -06:00
Rick Carlino 08e15087cd Change saucer for sequence in item UI 2019-12-18 18:31:52 -06:00
Rick Carlino 1607449bb7 Add saucer to sequence item UI 2019-12-18 18:28:24 -06:00
Rick Carlino 1d7534adae Improve the "click to move" functionality 2019-12-18 18:14:56 -06:00
Rick Carlino 205121da43 Even more cleanup. TODO: Cleanup sequence move UI 2019-12-18 18:04:07 -06:00
Rick Carlino 129309e910 Rename some classes, pull move arrow to the right 2019-12-18 17:55:01 -06:00
Rick Carlino 3cd5754b63 Remove extra padding on folder items 2019-12-18 17:42:16 -06:00
Rick Carlino 2db87096a3 Hmm 2019-12-18 17:35:58 -06:00
Rick Carlino 0c9a04c6d8 Smoosh folder items, too 2019-12-18 17:22:55 -06:00
Rick Carlino f31c38158f Smoosh folders closer together 2019-12-18 17:12:12 -06:00
Rick Carlino 8d91e18650 Float stuff correctly 2019-12-18 17:02:50 -06:00
Rick Carlino b0718c2e9a Hmm... CC: @gabrielBurnworth 2019-12-18 16:46:38 -06:00
Rick Carlino ed0661917e Merge branch 'folders' of https://github.com/gabrielburnworth/Farmbot-Web-App into folders 2019-12-18 16:09:18 -06:00
gabrielburnworth 74b0373c51 add empty state wrapper back 2019-12-18 13:23:37 -08:00
gabrielburnworth cb3f858fcf add left panel back 2019-12-18 13:18:27 -08:00
Rick Carlino fc7d0882b2 Pull elipsis to the right 2019-12-18 15:14:58 -06:00
Rick Carlino 2a701bdc63 CC: @gabrielBurnworth 2019-12-18 14:56:55 -06:00
Rick Carlino 27e7b3f30a Adjust padding oops 2019-12-18 14:45:38 -06:00
Rick Carlino 0f8f8d63a4 Make folder heading bars look more like mockup 2019-12-18 14:44:11 -06:00
Rick Carlino 8d6c14cb21 Use real buttons instead of <i/> 2019-12-18 14:14:37 -06:00
Rick Carlino a74d389862 Put buttons inline with search bar 2019-12-18 13:48:48 -06:00
Rick Carlino 3fb1487cdb icon tweaks. 2019-12-18 13:28:15 -06:00
Rick Carlino 88b7b1ffae Make searchbar look like farm designer search bar 2019-12-18 12:48:48 -06:00
Rick Carlino 4c7902c0a2 Reducer header size, add tool tip 2019-12-18 12:45:29 -06:00
Rick Carlino 6c6e488295
Merge pull request #1630 from FarmBot/test_doc_fixes
API test docs update
2019-12-18 11:58:40 -06:00
Rick Carlino 4490bbc531 Line up icons and stuff 2019-12-18 11:57:03 -06:00
Rick Carlino cad3839e87 Fix onClick for folder drop 2019-12-18 11:33:23 -06:00
Rick Carlino 566f23b01f Styling changes to drop area for folders 2019-12-18 11:22:44 -06:00
gabrielburnworth 6ba8d6612d fixes for api test docs 2019-12-18 08:28:20 -08:00
Rick Carlino 15f5b64005 Popovers work 2019-12-17 18:32:30 -06:00
Rick Carlino e454c7e412 IDEA: Use a <Popover/> 2019-12-17 18:16:45 -06:00
Rick Carlino 7661f97a98 Click ellipsis to expand button cluster 2019-12-17 18:06:36 -06:00
Rick Carlino 97889e7021 Even more factoring. 2019-12-17 17:37:05 -06:00
Rick Carlino 2ed25887e1 Factor components down, reduce duplication, etc.. 2019-12-17 16:25:08 -06:00
Rick Carlino f8575fb7eb
Merge pull request #1629 from FarmBot/staging
Dep Upgrades (Prod)
2019-12-17 16:20:38 -06:00
Rick Carlino 17c33ba7bc Merge conflicts 2019-12-17 15:33:10 -06:00
Rick Carlino 814cb4451e Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2019-12-17 15:10:18 -06:00
Rick Carlino edff93a66d
Merge pull request #1628 from FarmBot/fbjs_update
FBJS Upgrades
2019-12-17 15:05:38 -06:00
Rick Carlino 858bfeb457 Merge conflicts 2019-12-17 14:43:02 -06:00
Rick Carlino 76828b0ba0
Merge pull request #1627 from FarmBot/dep_updates
Dependency upgrades
2019-12-17 14:39:17 -06:00
Rick Carlino da5bed9fce farmbot@9.0.0-rc1, part I 2019-12-17 14:33:47 -06:00
Rick Carlino 04db845e94 WIP 2019-12-17 14:19:17 -06:00
Fabio Dessi 938789e554 added superior grid and conditional stroke values based on zoomLvl 2019-12-16 15:48:06 +01:00
Fabio Dessi 92374ed20f passing zoomLvl to Grid Component 2019-12-16 15:40:15 +01:00
Fabio Dessi 8dc809380e added .idea folder to .gitignore 2019-12-16 15:35:01 +01:00
Rick Carlino 88bb6fa2aa Begin cleanup of <Folders/> 2019-12-13 15:26:57 -06:00
Rick Carlino bbd5f14cfe Done with all non-UI tests. 2019-12-13 15:11:22 -06:00
gabrielburnworth b1b2cf23bc dep updates (fe) 2019-12-13 12:33:16 -08:00
Rick Carlino bc847b3611
Merge pull request #1626 from FarmBot/staging
v9.0.0
2019-12-13 14:30:43 -06:00
Rick Carlino a75a358a96 Tests for Actions.FOLDER_SEARCH 2019-12-13 14:04:48 -06:00
Rick Carlino 6092abc03f More tests. NEXT: Tests for Actions.FOLDER_SEARCH 2019-12-13 13:32:06 -06:00
Rick Carlino 0ef7833d81
Merge pull request #1624 from PitouGames/staging
French translations
2019-12-13 13:20:45 -06:00
Rick Carlino f71ff37caf Resource reducer tests for FOLDER_TOGGLE. 2019-12-13 11:28:33 -06:00
Rick Carlino a964b14418 Finish writing tests for actions.ts 2019-12-13 09:00:25 -06:00
Rick Carlino 8ae678ce07 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-13 07:24:08 -06:00
Rick Carlino 70118937fa type fixes 2019-12-12 17:01:41 -06:00
Rick Carlino c145fd3de9 STABLE, but coverage is -0.61 2019-12-12 16:56:57 -06:00
Rick Carlino d2a9130cfb
Merge branch 'staging' into staging 2019-12-12 15:15:58 -06:00
Rick Carlino 5cef28bf15
Merge pull request #1625 from FarmBot/coverage_task
Update coverage task
2019-12-12 15:15:37 -06:00
Rick Carlino 0c1fc4d2f3 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-12 14:32:20 -06:00
Rick Carlino 96b508be1e WIP 2019-12-12 14:32:08 -06:00
Rick Carlino d84b33a203 Tests for createFolder. 2019-12-12 13:53:02 -06:00
gabrielburnworth cef9a3e6f3 update coverage task 2019-12-12 11:51:19 -08:00
Rick Carlino 2a0e390472 Tests for setFolderName. 2019-12-12 11:33:45 -06:00
Rick Carlino 3a4fe9cd60 setFolderColor tests 2019-12-12 10:16:08 -06:00
Pitou f88f3fd858 Give more space to descriptions 2019-12-12 16:22:46 +01:00
Pitou dabd8032a1 Fix and add french translations 2019-12-12 16:11:42 +01:00
Rick Carlino 6f5f1f84a7 TESTS: finds sequences in an `initial` folder node 2019-12-12 08:50:46 -06:00
Rick Carlino a2bb562c3e TEST: finds sequences in an `medial` folder node. 2019-12-12 08:40:06 -06:00
Rick Carlino d129b028f1 Bug fixes + related tests. 2019-12-12 08:23:14 -06:00
Pitou fbcbf3bf92 Fix and add french tranlations 2019-12-12 14:59:02 +01:00
Rick Carlino f1c3fb5baf Tests related to filtering folders by sequence name. 2019-12-11 20:28:53 -06:00
Rick Carlino ccc9a98e96 Tests for searching initial, medial, terminal folder nodes. 2019-12-11 19:07:07 -06:00
Rick Carlino 32bbe8ad96 Tests for searchFolderTree part I. 2019-12-11 16:44:54 -06:00
Rick Carlino eeb199b816 Dead code removal. 2019-12-11 15:08:07 -06:00
Rick Carlino 3904c7d1f8
Merge pull request #1623 from FarmBot/ci-fix
Update CI config
2019-12-11 14:31:23 -06:00
Rick Carlino 7f6449ece2 Bug fix: Save newly saved sequences under the correct folder 2019-12-11 14:24:47 -06:00
Rick Carlino f4b59ea0d5 Editing updates 2019-12-11 14:01:33 -06:00
Rick Carlino ea88ad4c26 Add color picker 2019-12-11 13:22:48 -06:00
Rick Carlino b08826708a Hotfix for folder name edit bug 2019-12-11 12:44:51 -06:00
Gabriel Burnworth 0614e81ed4
hopefully improve ci reliability 2019-12-11 09:55:15 -08:00
Rick Carlino 4dae2a283f Ability to move sequences between folders, for real 2019-12-11 10:08:49 -06:00
Rick Carlino bdce179f88 Ability to move sequences between folders 2019-12-11 09:52:40 -06:00
Rick Carlino 8b15c7fecd Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-11 08:03:28 -06:00
Rick Carlino 2adf28b6dc WIP, typefixes 2019-12-11 08:03:21 -06:00
Rick Carlino 4037f6bab1 Always expand folders when searching 2019-12-10 16:13:16 -06:00
Rick Carlino 606bc19def Remove scratchpad page, move folder UI into sequence editor 2019-12-10 15:46:53 -06:00
Rick Carlino 85b3b0051c
Merge pull request #1622 from gabrielburnworth/staging
Map action updates
2019-12-10 14:48:26 -06:00
Rick Carlino 7994801daa Fixed tests. 2019-12-10 14:17:37 -06:00
gabrielburnworth 0625a20853 minor css fix 2019-12-10 12:10:22 -08:00
gabrielburnworth c08b9f4682 reorganize point panels folder 2019-12-10 12:09:52 -08:00
gabrielburnworth 240f86c7c1 update map actions 2019-12-10 12:08:54 -08:00
Rick Carlino bb9566345a
Merge pull request #1621 from FarmBot/master
Master => Staging
2019-12-10 14:06:15 -06:00
Rick Carlino 92869beb32 Remove all `let` exports in favor of `const` exports. 2019-12-10 13:53:20 -06:00
Rick Carlino f0dcbcd54f Fix most failures. TODO: Fix frontend/devices/__tests__/reducer_test.ts 2019-12-10 13:26:32 -06:00
Rick Carlino c47651282f TODO: Fix Actions.FOLDER_SEARCH problems. 2019-12-10 12:52:48 -06:00
Rick Carlino e26d8e870f (FAILING) Remove old sequence list selector menu 2019-12-09 19:36:51 -06:00
Rick Carlino 13f020901a
Merge pull request #1620 from FarmBot/recovery_deploy
Recovery deploy
2019-12-09 19:04:53 -06:00
Rick Carlino 947d205c09 Be less noisy when cancelling account deletion 2019-12-09 18:24:22 -06:00
Rick Carlino 9a4755c30b WIP 2019-12-09 17:59:02 -06:00
Rick Carlino f54fb07d61 Bug fix: render folderless sequences 2019-12-09 17:35:29 -06:00
Rick Carlino 897ed8206a Minor cleanup / keyprop fixes. Root cause: foldeMetaInfo is not adding -1 key. 2019-12-09 08:54:38 -06:00
Rick Carlino fd884ad9fa PROBLEM: Folderless sequences are not rendering 2019-12-09 08:48:52 -06:00
Rick Carlino 4e87effeba Search filtering works 2019-12-08 15:23:26 -06:00
Rick Carlino 142611deaa Filtering works, but only for first level? :thinking_face: 2019-12-08 13:55:54 -06:00
Rick Carlino 06d0bd1c82 TODO: Filter sequences 2019-12-07 16:56:35 -06:00
Rick Carlino b3eb1fff13
Merge pull request #1616 from FarmBot/staging
v8.2.4 - Iridescent Iris
2019-12-06 13:51:20 -06:00
Rick Carlino d7e4373db7 WIP 2019-12-06 13:45:18 -06:00
Rick Carlino 13b3971daf
Merge pull request #1615 from gabrielburnworth/staging
Fix Farmware ENV bug
2019-12-06 13:41:11 -06:00
gabrielburnworth f60f82cb06 fix farmware env translation bug 2019-12-06 08:45:56 -08:00
Rick Carlino 9541970fb3 Dont clobber search term when folder strucutre changes 2019-12-06 10:16:44 -06:00
Rick Carlino 4f0373a3a2 Dont clobber search term when folder strucutre changes 2019-12-06 10:09:29 -06:00
Rick Carlino 2e1ce7d3fa Install fuse.js, add search terms to state tree 2019-12-06 09:47:52 -06:00
Rick Carlino 8d50fcdf96 FBJS Upgrade 2019-12-06 08:09:08 -06:00
Rick Carlino 5c6fb08a5d Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-05 16:40:15 -06:00
Rick Carlino 076bdbdb5d Ability to collapse/expand all 2019-12-05 16:40:06 -06:00
Rick Carlino b0c31b2e61 Toggle input box when editing folder names 2019-12-05 16:18:50 -06:00
Rick Carlino 1fedc1917d Minor bug fixes for folder collapse button 2019-12-05 16:02:53 -06:00
Rick Carlino fc74f2c717
Merge pull request #1614 from gabrielburnworth/staging
Add label to tool sensor indicator
2019-12-05 15:54:43 -06:00
Rick Carlino 435273994a Bug fix: Duplicate key props for folderless sequences 2019-12-05 15:52:01 -06:00
gabrielburnworth b48029528f add label to tool sensor indicator 2019-12-05 12:57:44 -08:00
gabrielburnworth dc9bbe6f66 clean up views 2019-12-05 12:55:41 -08:00
gabrielburnworth 8eb348202a designer state cleanup 2019-12-05 12:53:31 -08:00
gabrielburnworth 249184661e file cleanup 2019-12-05 12:52:16 -08:00
Rick Carlino b190fe3609 Bug fix: De-duplicate parent <=> folder relationship 2019-12-05 12:07:08 -06:00
Rick Carlino d1496ddb1e OK: Move parentIndex into localMetaAttributes 2019-12-05 11:11:40 -06:00
Rick Carlino eb231231c7 TODO: Move parentIndex into localMetaAttributes 2019-12-05 10:24:10 -06:00
Rick Carlino 2782a3e517 Add `localMetaAttributes` 2019-12-05 10:12:14 -06:00
Rick Carlino 0fa65f0eac Change ingest() => Use named args instead of positional args 2019-12-05 08:54:39 -06:00
Rick Carlino be16f15917 Fix key prop warning 2019-12-04 17:26:16 -06:00
Rick Carlino 66afa66287 Cruft removal 2019-12-04 16:42:27 -06:00
Rick Carlino a94c666d76
Merge pull request #1613 from gabrielburnworth/staging
Fix firefox drag bug
2019-12-04 14:52:19 -06:00
Rick Carlino c5a6e2052e Embed sequence UUIDs in folder tree strucutre 2019-12-04 14:50:53 -06:00
Rick Carlino d28c9d67ed Fix delete button, index stuff less often 2019-12-04 14:01:49 -06:00
gabrielburnworth e00a2cf793 fix firefox drag bug 2019-12-04 11:10:17 -08:00
Rick Carlino 2a3a244024 deleteFolder() fixes. TODO: Why is UI stale? 2019-12-04 11:51:52 -06:00
Rick Carlino 8b6c03216e Fixes for createFolder() 2019-12-04 11:30:32 -06:00
Rick Carlino 7813e88a69 TODO: Handle nil folder.id 2019-12-04 10:50:52 -06:00
Rick Carlino 976a912c07 Add folder indexer 2019-12-04 09:49:55 -06:00
Rick Carlino e2d311e3ea Update types, downloader, reducers to accomodate new folder resource 2019-12-04 09:12:34 -06:00
Rick Carlino 755ce7f178 FBJS upgrade to v8.4.0 2019-12-03 17:30:03 -06:00
Rick Carlino c3bb45e0a2 Tests for edge cases 2019-12-03 17:09:52 -06:00
Rick Carlino eada674e50 Folders#destroy 2019-12-03 16:22:47 -06:00
Rick Carlino 627e46d807 tests for Folders#show, Folders#index 2019-12-03 15:49:06 -06:00
Rick Carlino fbc63ace3b Consolidate specs into single file 2019-12-03 14:13:57 -06:00
Rick Carlino 1f84001e6e Folders#update action 2019-12-03 14:09:00 -06:00
Rick Carlino dc86f82795 Folders#create action 2019-12-03 13:36:41 -06:00
Rick Carlino 3030344426 Verbiage changes in FoldersController 2019-12-03 12:20:40 -06:00
Rick Carlino 4f1c767f2c Add Folders table, update sequences to reference folders 2019-12-03 11:30:22 -06:00
Rick Carlino 402b9eda3e UNSTABLE: Begin backend implementation of `Folder` resource 2019-12-03 10:32:27 -06:00
Rick Carlino a0e8165361 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-12-03 07:55:13 -06:00
Rick Carlino 24bccc522b
Merge pull request #1612 from FarmBot/master
Merge pull request #1611 from FarmBot/dec2_rc1
2019-12-02 21:19:09 -06:00
Rick Carlino 04b9f1c2e7
Merge pull request #1609 from gabrielburnworth/staging
Misc additions and fixes
2019-12-02 20:18:54 -06:00
Rick Carlino 3c42868b9e
Merge pull request #1611 from FarmBot/dec2_rc1
v8.2.3
2019-12-02 20:17:30 -06:00
Rick Carlino 2073d2022b WIP. Working on deleteFolder() tests 2019-12-02 19:54:43 -06:00
gabrielburnworth 0eb8a82f2b dep updates (fe) 2019-12-02 14:09:51 -08:00
gabrielburnworth c30c312783 fix checkboxes on mozilla 2019-12-02 14:00:49 -08:00
gabrielburnworth 4f8e344c63 add zero and calibrate to command list 2019-12-02 13:56:29 -08:00
Rick Carlino e8c6257a7f
Merge pull request #1604 from gabrielburnworth/staging
Add saved gardens panel
2019-12-02 14:41:29 -06:00
Gabriel Burnworth 83932c5aaa
fix ruby test 2019-12-02 11:43:55 -08:00
Rick Carlino 56b9de1893 WIP: Begin deleteFolder() implementation / tests. 2019-12-02 12:42:33 -06:00
Rick Carlino 62246fbe20 Edge case test: Adding a folder to a terminal folder 2019-12-02 12:21:12 -06:00
Rick Carlino 43826465ec FIX: medial nodes are always at index[1]. Terminal nodes at index[2]. 2019-12-02 11:53:37 -06:00
Rick Carlino 1aa316ee62 Test case: Adding a new folder to an `initial` folder 2019-12-02 11:23:13 -06:00
Rick Carlino 7f2c174d29 Ability to add folder to level 0 2019-12-02 10:07:37 -06:00
Rick Carlino 90e97d7bbb Fix type errors 2019-12-02 09:16:44 -06:00
gabrielburnworth 97a9ee8d57 add saved gardens panel 2019-11-27 12:11:45 -08:00
Rick Carlino fd06e84e56
Merge pull request #1602 from FarmBot/demo-plants
Update plant seeds
2019-11-27 14:05:28 -06:00
Gabriel Burnworth 06af09c939
fix tests 2019-11-27 11:31:00 -08:00
Gabriel Burnworth a003beb8f7
remove extra peripherals from express seeder 2019-11-27 11:00:16 -08:00
Gabriel Burnworth 2de8e737eb
Update plant_fixtures.yml 2019-11-27 09:34:37 -08:00
Rick Carlino b8196d5214 Tests for color / name setters. 2019-11-27 11:24:17 -06:00
Rick Carlino 187b3bcbab Test for expand / collapse all. 2019-11-27 07:37:56 -06:00
Rick Carlino 2ee4268048 Tests for toggleFolderOpenState(); 2019-11-27 07:01:39 -06:00
Rick Carlino a579ace0e2 Unit test for halt()ing during a directory climb(); 2019-11-26 16:15:15 -06:00
Rick Carlino 531280a927 Part I of climb() tests. 2019-11-26 16:06:38 -06:00
Rick Carlino d07dd5eb15 climb() works. 2019-11-26 16:00:07 -06:00
Rick Carlino 7f5759382a Begin climb() utility function. 2019-11-26 15:49:18 -06:00
Rick Carlino 254adfa765 ingest() works, plus tests. 2019-11-26 14:45:21 -06:00
Rick Carlino 6b70eccf67 WIP, tree climber part I 2019-11-26 10:15:04 -06:00
Rick Carlino f5a9be23de
Merge pull request #1601 from FarmBot/log_fix
Prevent background workers from crashing when logs are deleted.
2019-11-26 08:25:44 -06:00
Rick Carlino f13bead10e Opps 2019-11-26 07:41:27 -06:00
Rick Carlino 982956ca91 Prevent background workers from crashing when logs are deleted. 2019-11-26 07:22:29 -06:00
Rick Carlino 906a62596f Schema change 230933223 2019-11-25 20:56:02 -06:00
Rick Carlino 95e346558c Index folderName by parent_id 2019-11-25 16:23:14 -06:00
Rick Carlino 2300341153
Merge pull request #1597 from FarmBot/staging
v8.2.1 - Iridescent Iris
2019-11-25 16:22:19 -06:00
Rick Carlino 7f60abcaea
Merge pull request #1600 from FarmBot/inactivity_debug
Bug fix for `rake api:tidy`
2019-11-25 15:57:32 -06:00
Rick Carlino a1c2b16d67 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-11-25 15:44:31 -06:00
Rick Carlino 63cb166444 Add debug point for inactivity mailer 2019-11-25 15:23:25 -06:00
Rick Carlino 76b3f9692e Account for non-activiated accounts 2019-11-25 15:05:18 -06:00
Rick Carlino 7be0569a89 Updates for better DataDog visibility. 2019-11-25 14:42:41 -06:00
Rick Carlino 38a63981eb Debug deploy 2019-11-25 13:47:42 -06:00
Rick Carlino 7676370be0 Interpolate API_PORT into docker-compose.yml. Fixes #1598 2019-11-25 13:24:14 -06:00
Rick Carlino d99f598784 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into fix_docker_compose 2019-11-25 13:23:13 -06:00
Rick Carlino 53d203372c
Merge pull request #1596 from PitouGames/staging
Translate french statements
2019-11-25 12:51:12 -06:00
Gabriel Burnworth 98a9eb539b
Update panel_header.tsx 2019-11-25 10:42:34 -08:00
Rick Carlino 6b9209edad WIP 2019-11-25 12:18:22 -06:00
Pitou 5c7bcac281 Translate french statements 2019-11-25 19:03:46 +01:00
Rick Carlino c88abc010e Possible fix: normalize folder names 2019-11-25 10:08:51 -06:00
Rick Carlino 69249dc471
Merge pull request #1590 from FarmBot/trim_logs
Clean up excess logs via sampling
2019-11-24 10:07:28 -06:00
Rick Carlino 21fe23b5a4
Merge branch 'staging' into trim_logs 2019-11-24 09:01:40 -06:00
Rick Carlino 1559ee0f0f Clean up excess logs via sampling 2019-11-24 08:58:38 -06:00
Rick Carlino 91c9c6d2f7 WIP 2019-11-24 08:39:45 -06:00
Rick Carlino 32d7b95961 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-11-23 11:44:04 -06:00
Rick Carlino 741e06a2cc
Merge pull request #1581 from gabrielburnworth/staging
Map action updates
2019-11-23 11:43:55 -06:00
Rick Carlino fa1ec452c0
Merge branch 'staging' into staging 2019-11-23 11:10:54 -06:00
Rick Carlino 026078a6d2
Merge pull request #1589 from FarmBot/verbiage
Verbiage Updates
2019-11-23 10:59:22 -06:00
Rick Carlino 71a5c5c122 Minor verbiage updates 2019-11-23 10:03:04 -06:00
Rick Carlino 502edf6221 Initial data model probably complete. Next: actions. 2019-11-23 09:32:36 -06:00
gabrielburnworth 6305e41e8f fix group edit mode actions 2019-11-22 11:57:22 -08:00
Rick Carlino 18cb99f1f3 Verbiages updates, part I 2019-11-22 11:51:36 -06:00
Rick Carlino 86d0a9238b WIP 2019-11-22 11:43:30 -06:00
Rick Carlino fd867fca70
Merge pull request #1579 from FarmBot/better_inactive
Remove deprecation warnings, rename api:deprecate to api:tidy
2019-11-22 08:26:02 -06:00
Rick Carlino 27c66e31fc
Merge branch 'staging' into better_inactive 2019-11-22 07:58:15 -06:00
Rick Carlino fee91ee2b2
Merge pull request #1580 from gabrielburnworth/staging
Map updates
2019-11-22 07:58:00 -06:00
gabrielburnworth 8422f446a9 add map scale transition 2019-11-21 14:32:05 -08:00
gabrielburnworth a821afd290 add restriction and new exit to plant edit mode 2019-11-21 14:30:42 -08:00
Rick Carlino 98c22d5835
Merge branch 'staging' into better_inactive 2019-11-21 14:16:03 -06:00
Rick Carlino 84a18ffde6 Remove deprecation warnings, rename api:deprecate to api:tidy 2019-11-21 13:57:19 -06:00
Rick Carlino 73276a323c
Merge pull request #1578 from FarmBot/better_inactive
Delete inactive accounts automatically.
2019-11-21 13:35:51 -06:00
Rick Carlino e8bf8e3587 Verbiage updates 2019-11-21 11:44:47 -06:00
Rick Carlino e70695536a Account deactivation ✔️ 2019-11-21 11:25:46 -06:00
Rick Carlino a0e69bdb4a Automatically delete old accounts after 14 days. TODO: Tests 2019-11-20 17:49:39 -06:00
Rick Carlino 8ac0c0625e
Merge pull request #1577 from gabrielburnworth/staging
Panel updates and fixes
2019-11-20 14:21:36 -06:00
gabrielburnworth 574be119b1 dep updates (fe) 2019-11-20 11:59:21 -08:00
gabrielburnworth a6b6b872f1 fix margin css 2019-11-20 11:51:32 -08:00
gabrielburnworth 290eb11441 fix auto-deprecator 2019-11-20 11:50:49 -08:00
gabrielburnworth aa6326c3b2 allow translation of new phrases 2019-11-20 11:50:15 -08:00
gabrielburnworth 0a4db75572 update point panels 2019-11-20 11:48:55 -08:00
gabrielburnworth 4eb8ac28a8 add new panel color 2019-11-20 11:48:14 -08:00
Rick Carlino b8929d6de5
Merge pull request #1576 from gabrielburnworth/staging
Change map zoom method
2019-11-19 13:35:05 -06:00
gabrielburnworth db135676dd dep updates (fe) 2019-11-19 10:49:01 -08:00
gabrielburnworth 27214fa0a4 clean up test output 2019-11-19 10:34:11 -08:00
gabrielburnworth 8f626c2833 remove css zoom usage 2019-11-19 10:22:52 -08:00
Rick Carlino b251dbdf8c
Merge pull request #1575 from FarmBot/grid_planting
Grid and Row Planting
2019-11-19 11:48:28 -06:00
Rick Carlino 839928a1fe Linter fixes 2019-11-19 11:24:09 -06:00
Rick Carlino 5ccdc30654 AddPlant no longer has a done button. Remove tests for said button. 2019-11-19 10:02:39 -06:00
Rick Carlino 19c7ef2f36 createCB tests 2019-11-19 09:31:04 -06:00
Rick Carlino 22f90b08fa <PlantGrid/> tests, part II 2019-11-19 08:58:22 -06:00
Rick Carlino 60fc32fd7e <PlantGrid/> tests, part I 2019-11-19 08:25:03 -06:00
Rick Carlino dbb330efcf stashGrid tests 2019-11-18 17:57:03 -06:00
Rick Carlino 354e51b265 saveGrid tests 2019-11-18 17:34:36 -06:00
Rick Carlino 085f165318 Merge branch 'grid_planting' of github.com:FarmBot/Farmbot-Web-App into grid_planting 2019-11-18 15:54:15 -06:00
Rick Carlino efb2eeab00 InputCell tests 2019-11-18 15:52:53 -06:00
Rick Carlino 9c0bbc3f81 Tests for generateGrid 2019-11-18 14:20:46 -06:00
Rick Carlino ad5b8cca37 mapStateToProps tests. 2019-11-18 13:38:23 -06:00
Rick Carlino 0c687233c7 Merge branch 'security_updates' into grid_planting 2019-11-18 04:40:41 -06:00
Rick Carlino 9dcdf1a000 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into security_updates 2019-11-18 04:37:52 -06:00
Rick Carlino 79085e32a0 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into grid_planting 2019-11-18 04:37:38 -06:00
Rick Carlino e711183cf0
Merge branch 'staging' into grid_planting 2019-11-16 09:38:00 -06:00
Rick Carlino e249949738 Security updates 2019-11-16 09:32:48 -06:00
Rick Carlino 7b8cfe9f4b overflowX: none 2019-11-15 16:43:25 -06:00
Rick Carlino 8127f5e529 overflowY: scroll 2019-11-15 16:32:08 -06:00
Rick Carlino 80f20cf7f4 Add styles to horizontal rule 2019-11-15 16:23:30 -06:00
Rick Carlino 0518f7e40e Use `name` as `plant.name` instead of `openfarm_slug` 2019-11-15 16:20:06 -06:00
Rick Carlino be854a047b Allow scrolling of grid planting panel 2019-11-15 16:07:04 -06:00
Rick Carlino 652b5e1358 openfarm_slug the variable, not the string 2019-11-15 15:59:52 -06:00
Rick Carlino f86182f46a Confirm save on exit via back button 2019-11-15 15:55:22 -06:00
Rick Carlino 8a903b7463 Swap numPlantsV and spacingH 2019-11-15 15:16:15 -06:00
Rick Carlino 9c83b01e4a Swap numPlantsV and spacingH 2019-11-15 15:14:46 -06:00
Rick Carlino 97bad3c217 Remove DONE button 2019-11-15 14:58:44 -06:00
Rick Carlino 232dccaf5d Grid icons match users xy_swap setting 2019-11-15 13:36:59 -06:00
Rick Carlino 1d14585ccb Dont clear form values when user clicks "CANCEL" 2019-11-15 12:41:10 -06:00
Rick Carlino 5b809926ad Swap the position of the SAVE and CLEAR buttons. Change CLEAR to CANCEL. 2019-11-15 12:34:48 -06:00
Rick Carlino 7f00a1fe6e Add "Grid and Row" header 2019-11-15 11:53:10 -06:00
Rick Carlino 313b129e7f Style the button. NEXT: Test and ship 2019-11-15 10:51:23 -06:00
Rick Carlino 0a2c9a7b74 Input boxes are ✔️. NEXT: Buttons, tests. 2019-11-15 10:39:22 -06:00
Rick Carlino 8661241fd8 Extract grid inputs to <GridInput/> 2019-11-15 08:30:13 -06:00
Rick Carlino 47942fb9c8 Limit grids to 100 for now. 2019-11-15 07:45:22 -06:00
Rick Carlino 55ed669de7 preview and clear works (grid planting) 2019-11-14 15:36:04 -06:00
Rick Carlino 0240da91db It initializes a grid. NEXT: Save the plant to API 2019-11-14 11:49:30 -06:00
Rick Carlino 784ddda2aa initPlantGrid() is ready for use. 2019-11-14 10:32:28 -06:00
Rick Carlino 84d32ae347
Merge pull request #1574 from FarmBot/master
Master -> Staging
2019-11-14 10:00:01 -06:00
Rick Carlino d979ee6381 Implementation and tests for vectorGrid() helper. 2019-11-14 09:59:25 -06:00
Rick Carlino 1cf8a3c76d Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into grid_planting 2019-11-14 08:09:50 -06:00
Rick Carlino b8867cc165
Merge pull request #1573 from FarmBot/thursday_deploy
v8.2.0 - Iridescent Iris
2019-11-14 08:06:21 -06:00
Rick Carlino 2f4f470499 Merge branch 'staging' into grid_planting 2019-11-14 08:01:04 -06:00
Rick Carlino 0e2c016ef4 Feature flag for ota_update_hour 2019-11-13 16:49:39 -06:00
Rick Carlino e1780991d4 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into thursday_deploy 2019-11-13 15:55:21 -06:00
Rick Carlino 12b6d1918d Stub out Preview/Save/Clear buttons 2019-11-13 15:39:32 -06:00
Rick Carlino 5f90caa19a Add `dispatch` to props. Change "apply" to "preview" 2019-11-13 14:59:56 -06:00
Rick Carlino ea0aebcdc9 Stub out HTML form controls. TODO: Add `dirty` flag, undo button 2019-11-13 14:18:17 -06:00
Rick Carlino f4bd323db9 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into grid_planting 2019-11-13 10:52:46 -06:00
Rick Carlino 1f9caf057d
Merge pull request #1570 from FarmBot/ota_hour_part_iii
Honor user time format settings for OTA update time
2019-11-13 10:38:57 -06:00
Rick Carlino dd077d0cf7 Tests for Util.scrollToBottom 2019-11-13 10:14:52 -06:00
Rick Carlino b6d3852a0f Show "immediate" first in dropdown 2019-11-13 09:56:32 -06:00
Rick Carlino da8cf5ea0d Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-11-12 15:32:41 -06:00
Rick Carlino f04da2a91c Tests for assertIsHour() 2019-11-12 14:53:47 -06:00
Rick Carlino b6c4f296cc Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into ota_hour_part_iii 2019-11-12 14:02:14 -06:00
Rick Carlino 5c9d312ea2
Merge pull request #1569 from PitouGames/master
Fix some french translations
2019-11-12 14:01:50 -06:00
Rick Carlino a5cbb3f0fc ✔️ Honor user time format settings when selecting OTA Hour. Needs tests. 2019-11-12 13:58:46 -06:00
Rick Carlino e0bfcb4b42 [UNSTABLE/WIP] Want to upgrade to TSC 3.7 so I can use type assertions 2019-11-12 12:56:42 -06:00
Rick Carlino 50829d9b02 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-11-12 12:22:54 -06:00
Pitou 87f59f5075 Fix login page french translation 2019-11-12 16:13:43 +01:00
Pitou ac1f28c2cb Fix some french translations 2019-11-12 16:13:43 +01:00
Rick Carlino ea64565c21
Merge pull request #1566 from FarmBot/mqtt_hotfix
Better MQTT error messages for end users.
2019-11-11 15:18:17 -06:00
Rick Carlino 1aaff4c40d
Merge branch 'staging' into mqtt_hotfix 2019-11-11 13:42:59 -06:00
Rick Carlino 774732d37f
Merge pull request #1567 from FarmBot/ota_hour_part_ii
OTA hour selector updates, part I
2019-11-11 10:36:53 -06:00
Rick Carlino 6bc9ca53ff Merge branch 'master' of https://git.heroku.com/farmbot-production into staging 2019-11-11 09:53:35 -06:00
Rick Carlino de7af7c867 Done: Start at midnight, disable dropdown if not auto-updating, move OTA selector to device pane. TODO: Use user-selected hour format (24 v. 12h format) 2019-11-10 18:49:37 -06:00
Rick Carlino 8d67f98d2a
Merge branch 'staging' into mqtt_hotfix 2019-11-08 13:34:02 -06:00
Rick Carlino d57c020ec0 Merge branch 'master' of https://git.heroku.com/farmbot-production into mqtt_hotfix 2019-11-08 13:09:41 -06:00
Rick Carlino 4c406dfab7 [HOTFIX] Explain to user why MQTT broker kicked you off 2019-11-08 11:53:00 -06:00
Rick Carlino 19a6cabf70
Merge pull request #1565 from FarmBot/ota_time
Ability to set OTA time of day. Closes #1487
2019-11-08 10:33:03 -06:00
Rick Carlino ed8f1fa961 Tests 2019-11-08 10:08:40 -06:00
Rick Carlino 405c5e02db Gemfile.lock update, typecheck/lint error fix. 2019-11-08 09:04:00 -06:00
Rick Carlino 8c559f345f Add `as soon as possible` to dropdown 2019-11-08 08:59:28 -06:00
Rick Carlino 079149af3b Use `nil` to signify "immediate OTA update" on ota_hour column 2019-11-08 07:45:00 -06:00
Rick Carlino 507a4fd5dd Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into ota_time 2019-11-07 15:19:50 -06:00
Rick Carlino 2ba8f7a6df
Merge pull request #1563 from gabrielburnworth/staging
Points panels updates
2019-11-07 15:19:21 -06:00
Rick Carlino da788fab41 Hour of day selector for OTA (frontend) 2019-11-07 15:12:37 -06:00
Rick Carlino 8d6eae6a4d Add ota_hour to devices table 2019-11-07 13:35:10 -06:00
gabrielburnworth 6bd32c243c update points panels 2019-11-07 11:17:50 -08:00
Rick Carlino dedb98c15f
Merge pull request #1562 from FarmBot/minor_changes
Minor changes
2019-11-07 11:02:35 -06:00
Rick Carlino 4b14d370b4 Minor changes 2019-11-07 10:40:19 -06:00
Rick Carlino c657df777f
Merge pull request #1561 from gabrielburnworth/staging
Saved gardens panel updates
2019-11-06 16:06:59 -06:00
gabrielburnworth a977afc5a8 dep updates (fe) 2019-11-06 09:16:58 -08:00
gabrielburnworth 8215abc978 update saved gardens panel 2019-11-06 09:01:05 -08:00
gabrielburnworth 212fa65a4e fix log settings menu bug 2019-11-06 09:00:40 -08:00
Rick Carlino 3495cf9cf6
Merge pull request #1558 from FarmBot/errors
rescue_from(JSON::ParserError)
2019-11-04 18:02:55 -06:00
Rick Carlino d5f8c00eef Rescue from JSON::ParserError 2019-11-04 07:39:04 -06:00
Rick Carlino 6efe519d70 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-11-02 09:15:33 -05:00
Rick Carlino 6712efc5fd
Merge pull request #1557 from gabrielburnworth/staging
Updates and cleanup
2019-11-02 08:02:40 -05:00
gabrielburnworth c4025dab40 release channel UI update and cleanup 2019-11-01 14:25:39 -07:00
Rick Carlino 8eaf643de2
Merge pull request #1556 from FarmBot/staging
v8.1.5 - Iridescent Iris
2019-11-01 15:12:03 -05:00
Rick Carlino faafb0d6f1 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-11-01 14:52:57 -05:00
Rick Carlino 6f94c9f4f9
Merge pull request #1555 from FarmBot/release_issues
Throttle Policy final fixes.
2019-11-01 14:48:59 -05:00
Rick Carlino 87e271ce89 Reduce some limits slightly 2019-11-01 14:17:40 -05:00
Rick Carlino 6e46c10e3f
Merge pull request #1554 from FarmBot/staging
v8.1.4 - Iridescent Iris
2019-11-01 12:05:28 -05:00
Rick Carlino 8555acfbed Set TTL _after_ calling `incr()`. 2019-11-01 10:58:24 -05:00
Rick Carlino 33ebb628f5 Tests for new throttle policy 2019-10-31 15:53:09 -05:00
Rick Carlino fa6c6196bb QA Ready 2019-10-31 15:42:45 -05:00
Rick Carlino 2cdef7f569 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into release_issues 2019-10-31 13:33:08 -05:00
Rick Carlino 245a70f736
Merge pull request #1552 from gabrielburnworth/staging
Dependency upgrades
2019-10-31 13:29:45 -05:00
Rick Carlino 98251fbb02 ThrottlePolicy re-write 2019-10-31 11:38:55 -05:00
Rick Carlino 8af5fa5ac3 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into release_issues 2019-10-31 11:38:43 -05:00
Rick Carlino 9432137e94
Merge branch 'staging' into staging 2019-10-31 10:22:43 -05:00
Rick Carlino 71545c6e94 [UNSTABLE] Rework throttler 2019-10-31 10:13:52 -05:00
Rick Carlino 693b5ecc3f
Merge pull request #1553 from FarmBot/release_issues
v8.1.4 - Iridescent Iris
2019-10-31 07:13:23 -05:00
Rick Carlino 6e57d80bdf Dead code removal. 2019-10-30 17:19:47 -05:00
Rick Carlino 4e9fe4ae7a Cache debugging: #find_or_create_by => #find_or_create_by! 2019-10-30 16:55:16 -05:00
Rick Carlino e41fbca364 Remove caching from LogService (for now) 2019-10-30 16:28:59 -05:00
Rick Carlino 69d87b259c Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into release_issues 2019-10-30 16:12:23 -05:00
gabrielburnworth c7d44453aa dep updates (fe) 2019-10-30 13:14:31 -07:00
Rick Carlino 3c5771e4bf Debug deploy 2019-10-30 15:07:52 -05:00
Rick Carlino 011e900aee
Merge pull request #1550 from FarmBot/staging
v8.1.3 - Iridescent Iris
2019-10-30 14:55:28 -05:00
Rick Carlino ddb7ec451b
Merge pull request #1551 from gabrielburnworth/staging
Fixes and updates
2019-10-30 14:26:48 -05:00
gabrielburnworth e57d476f4b update os release notes fetch 2019-10-30 11:25:56 -07:00
gabrielburnworth 71bb473a1a add sort comparison UI 2019-10-30 11:25:29 -07:00
gabrielburnworth 7d3a525847 sequence list item refactor and del mode 2019-10-30 11:24:58 -07:00
gabrielburnworth fc593899a5 update error handling in coverage task 2019-10-30 11:24:29 -07:00
Rick Carlino 2abdc41c42
Merge pull request #1549 from AscendFB/cosmetic-fixes
farmware buttons back in front
2019-10-30 07:55:00 -05:00
AscendFB 104c6e349f farmware buttons back in front 2019-10-30 12:13:03 +01:00
Rick Carlino 085de4c049
Merge pull request #1547 from FarmBot/point_group_update_bug
PointGroups::Update reconcilation bug fix.
2019-10-29 11:58:04 -05:00
Rick Carlino 5072ad0175 Possible partial fix for `point_id` reconcilation. 2019-10-29 11:33:47 -05:00
Rick Carlino 864215ad3c
Merge pull request #1546 from FarmBot/point_group_update_bug
Fixes to seeds.rb
2019-10-29 10:36:43 -05:00
Rick Carlino c418e4b263 Fix seeds.rb 2019-10-29 10:07:51 -05:00
Rick Carlino 294528b6a9
Merge pull request #1545 from AscendFB/cosmetic-fixes
Plant indicator fix
2019-10-29 08:59:24 -05:00
Rick Carlino c385dcc875
Merge branch 'staging' into cosmetic-fixes 2019-10-29 08:13:23 -05:00
Rick Carlino 7bc4e56220
Merge pull request #1543 from FarmBot/telemetry3
Use Redis for Throttling of RMQ Resources
2019-10-29 08:13:00 -05:00
Rick Carlino f9aa0c8c63
Merge branch 'staging' into telemetry3 2019-10-29 07:50:10 -05:00
Rick Carlino 9a09b7581c
Merge pull request #1541 from gabrielburnworth/staging
Reduce OpenFarm API usage
2019-10-29 07:49:53 -05:00
AscendFB 448a97c199 double plant indicator 2019-10-29 11:59:19 +01:00
Rick Carlino e7af24d3e4 Redis integration complete. TODO: Integration test 2019-10-28 14:14:01 -05:00
Rick Carlino de09cad3b4 Begin use of `cache_key`s when tracking throttles. NEXT: Remove @entries in favor of Redis 2019-10-28 13:39:02 -05:00
gabrielburnworth e065834e95 remove duplicate crop icon requests 2019-10-28 11:24:12 -07:00
Rick Carlino c2688aab0a Add @namespace to TimePeriod 2019-10-28 13:05:46 -05:00
Rick Carlino 4e3aa00030 Ready to add Redis support ✔️ 2019-10-28 12:40:50 -05:00
Rick Carlino 7ff6a499e0 Remove ::TimePeriod references from ::ThrottlePolicy 2019-10-28 12:23:49 -05:00
Rick Carlino 2a621e2f00 ? Add runtime typecheck to ::TimePeriod constructor 2019-10-28 11:54:30 -05:00
Rick Carlino cb2e97cbb2 Remove TimePeriod references from ThrottlePolicy 2019-10-28 11:25:37 -05:00
Rick Carlino a501decb1c Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into telemetry3 2019-10-28 11:02:17 -05:00
Rick Carlino 3152d46f55
Merge pull request #1540 from FarmBot/rails_upgrade
Upgrade to Rails v6
2019-10-28 10:59:55 -05:00
Rick Carlino 5d81693e5a
Merge branch 'staging' into rails_upgrade 2019-10-28 09:30:05 -05:00
Rick Carlino a4c544d651 Bundler upgrades 2019-10-28 09:29:43 -05:00
Rick Carlino f16014bfd1 ✔️ Rails v6 Upgrade 2019-10-28 09:23:12 -05:00
Rick Carlino dbfec00e68 Upgrade complete, test coverage needs increase 2019-10-28 09:11:19 -05:00
Rick Carlino e0620d40d8 Module#parent => Module#module_parent 2019-10-28 08:48:18 -05:00
Rick Carlino f49f84d82d
Merge pull request #1539 from FarmBot/verbiage
Update error message
2019-10-28 08:17:40 -05:00
Rick Carlino bd87b5b198 Merge conflict 2019-10-28 08:12:34 -05:00
Rick Carlino 8801d7eaa0 Update error message 2019-10-28 07:50:04 -05:00
Rick Carlino 1fe846a86c
Merge pull request #1537 from FarmBot/staging
v8.1.2
2019-10-25 17:00:03 -05:00
Rick Carlino 6010e65af9
Merge pull request #1536 from FarmBot/friday_deploy
v8.1.2 - Iridescent Iris
2019-10-25 15:53:08 -05:00
Rick Carlino 4cad4e39c2 Fix: Dont save `debug`, `fun`, nil logs 2019-10-25 14:35:28 -05:00
Rick Carlino afd76cc15e Typo 2019-10-25 14:09:25 -05:00
Rick Carlino 7410ac6504 Instantiate TimePeriod from within ThrottlePolicy 2019-10-25 11:51:28 -05:00
Rick Carlino ee31e44c1a Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into telemetry3 2019-10-25 11:49:52 -05:00
Rick Carlino 8f7e043535
Merge pull request #1535 from gabrielburnworth/staging
Panel refactoring
2019-10-25 11:45:04 -05:00
Rick Carlino 0096adf9ee Add namespace to throttle policy (for Redis) 2019-10-25 11:29:21 -05:00
gabrielburnworth a757b3be13 panel color cleanup 2019-10-25 08:33:33 -07:00
Rick Carlino 3797242dfe Update tests, deprecate v6 log checks 2019-10-25 10:11:09 -05:00
Rick Carlino ed43424a9d
Merge pull request #1534 from AscendFB/cosmetic-fixes
#1525 Box-select fixes
2019-10-25 09:12:01 -05:00
Rick Carlino f612f9cb45
Merge branch 'staging' into cosmetic-fixes 2019-10-25 08:33:29 -05:00
Rick Carlino fc38737b7e
Merge pull request #1533 from FarmBot/bugfix/default-value-form-update
Sequence bugfix
2019-10-25 08:31:32 -05:00
Rick Carlino c67f0d1710
Merge branch 'staging' into cosmetic-fixes 2019-10-25 08:12:31 -05:00
Rick Carlino f2b0a1bdbc
Merge branch 'staging' into bugfix/default-value-form-update 2019-10-25 08:11:44 -05:00
Rick Carlino 571ef34a1d
Merge pull request #1532 from FarmBot/telemetry2
Telemetry Updates
2019-10-25 08:11:34 -05:00
AscendFB d4b07cca61 add light panel for plant selection 2019-10-25 12:37:44 +02:00
AscendFB 42868887cf
Merge pull request #12 from FarmBot/staging
Get updates
2019-10-25 12:30:31 +02:00
AscendFB 6fd340f12b Merge changes 2019-10-25 12:28:58 +02:00
AscendFB 6f620d174e #1525 some fixes 2019-10-25 12:05:18 +02:00
Gabriel Burnworth a8dee31134
fix default value form update bug 2019-10-24 15:56:55 -07:00
Rick Carlino dec4f8ffb1 Add throttle policy to Telemetry channel 2019-10-24 15:51:40 -05:00
Rick Carlino 4cbb463a23 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2019-10-24 15:33:24 -05:00
Rick Carlino d825ec5540 Fix tests related to sync object timestamps 2019-10-24 14:32:27 -05:00
Rick Carlino bf418ead32 WIP. TODO: Fix sync objects to look like Rails 5 timestamps, maybe. 2019-10-24 14:12:11 -05:00
Rick Carlino 504ea18bcc Fix const auto-loader problems, change belongs_to behavior to allow `nil` by default (sorry). 2019-10-24 12:44:11 -05:00
Rick Carlino 9d8308d6f7 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-10-24 09:53:18 -05:00
Rick Carlino 641ba988de
Merge pull request #1529 from FarmBot/telemetry
Telemetry v1
2019-10-24 09:52:55 -05:00
Rick Carlino 3921a69cf2 Upgrade to rspec-rails. 649 examples, 6 failures 2019-10-24 09:46:54 -05:00
Rick Carlino 9d17e5f83c Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into rails_upgrade 2019-10-24 09:31:10 -05:00
Rick Carlino 5bb7719f56 ✔️ Telemetry reporting. 2019-10-24 09:10:01 -05:00
Rick Carlino d27117216b Handle malformed telemetry 2019-10-24 09:01:51 -05:00
Rick Carlino 39d461296e Test case: LogService throttle 2019-10-24 08:18:56 -05:00
Rick Carlino 746738a25c
Merge pull request #1528 from FarmBot/staging
v8.1.1 - Iridescent Iris
2019-10-24 07:48:04 -05:00
Rick Carlino 93d0428e7f Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into telemeetry_channel 2019-10-24 07:39:45 -05:00
Rick Carlino bd4d88ade4 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2019-10-24 07:24:30 -05:00
Rick Carlino 5e00b20072 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into telemeetry_channel 2019-10-24 07:23:28 -05:00
Rick Carlino 3e3ad18f40
Merge pull request #1523 from gabrielburnworth/staging
Panel updates
2019-10-24 07:23:13 -05:00
gabrielburnworth ce04296919 panel updates 2019-10-23 13:08:38 -07:00
Rick Carlino b66731a1f4 Temporarily add `message` field 2019-10-23 15:03:09 -05:00
Rick Carlino 0bbcc8c786 Possible fix for NPE noted on staging in LogService 2019-10-23 14:56:54 -05:00
Rick Carlino e21676afc2 First implementation of telemetry channel 2019-10-23 13:44:07 -05:00
Rick Carlino cb49531eb5
Merge pull request #1521 from FarmBot/cosmetic-fixes
Routine Upgrades
2019-10-23 12:18:51 -05:00
Rick Carlino 493c439ebc [WIP, UNSTABLE] Phase out `update_attributes`, :on hooks 2019-10-23 11:33:30 -05:00
Rick Carlino 59b31a85d7
Merge branch 'staging' into cosmetic-fixes 2019-10-23 10:39:34 -05:00
Rick Carlino 987e0754ec Style and dep. updates 2019-10-23 10:34:31 -05:00
Rick Carlino ef15148c5b
Merge pull request #1505 from AscendFB/cosmetic-fixes
Updates to box-select and Select panel in FarmDesigner + some fixes
2019-10-23 10:22:21 -05:00
AscendFB 2f331f0f9d Try to keep 'selected' in a defined state 2019-10-23 12:15:53 +02:00
AscendFB d80309f129
Merge branch 'staging' into cosmetic-fixes 2019-10-23 12:00:22 +02:00
Rick Carlino 6d77bf42e5
Merge pull request #1512 from FarmBot/staging
v8.1.0 - Iridescent Iris
2019-10-22 20:24:34 -05:00
Rick Carlino 0445717cbb
Merge pull request #1513 from FarmBot/css_bloopers
Fix toast colors (whoops!)
2019-10-22 16:28:58 -05:00
Rick Carlino fce9acd721 Fix toast colors 2019-10-22 15:51:22 -05:00
Rick Carlino 604e985447
Merge pull request #1508 from FarmBot/css_stuff
Make the groups button a different shade of blue
2019-10-22 12:56:55 -05:00
Gabriel Burnworth 7d989e82b2
fix minor css bug 2019-10-22 10:35:33 -07:00
Rick Carlino 08f7e7373c
Merge branch 'staging' into cosmetic-fixes 2019-10-22 11:52:59 -05:00
Rick Carlino fd5ce8084a
Merge branch 'staging' into css_stuff 2019-10-22 11:47:24 -05:00
Rick Carlino 209a88c5e4
Merge pull request #1509 from gabrielburnworth/staging
Fixes and cleanup
2019-10-22 11:44:33 -05:00
gabrielburnworth 5d76123682 misc fixes 2019-10-22 09:03:00 -07:00
Rick Carlino d4824a5e63 Merge branch 'css_stuff' of github.com:FarmBot/Farmbot-Web-App into css_stuff 2019-10-22 10:39:16 -05:00
Rick Carlino ba8f326502 Fix failing test. 2019-10-22 10:36:34 -05:00
Rick Carlino da2b764be0 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into css_stuff 2019-10-22 09:36:34 -05:00
Rick Carlino f225a4279a
Merge branch 'staging' into css_stuff 2019-10-22 09:36:31 -05:00
Rick Carlino b473884621 Fix groups panel button, probably 2019-10-22 09:28:27 -05:00
Rick Carlino 29ecee243c
Merge branch 'staging' into cosmetic-fixes 2019-10-22 08:25:18 -05:00
Rick Carlino 3871a0b083
Merge pull request #1507 from FarmBot/css_stuff
Minor Update to Feature Flag
2019-10-21 17:35:54 -05:00
Rick Carlino 46bd4f2b32 Update feature flag rendering for `boot_sequence` 2019-10-21 16:17:05 -05:00
Rick Carlino fb388cc103
Merge pull request #1506 from FarmBot/real_release_candidate
Release Candidate II
2019-10-21 15:10:35 -05:00
Rick Carlino fed514c2e3 Linter fixes 2019-10-21 14:47:01 -05:00
Rick Carlino bfa2f2fd38 Test coverage increases 2019-10-21 14:37:16 -05:00
Rick Carlino 638821cf66 Possible fix- `customFilterRule` prop. 2019-10-21 10:47:13 -05:00
AscendFB 1bed755e88 Add dark-blue button css, so existing "light"blue buttons will remain as they were 2019-10-20 16:01:12 +02:00
AscendFB 8f593ea098 Merge branch 'cosmetic-fixes' of https://github.com/AscendFB/Farmbot-Web-App into cosmetic-fixes 2019-10-20 13:04:13 +02:00
AscendFB 49bbee536e
Merge pull request #11 from FarmBot/staging
Merge changes
2019-10-20 12:53:46 +02:00
AscendFB 71eda445df More changes mostly to #1426, also resolved #1385 2019-10-20 11:57:13 +02:00
Rick Carlino da5820f23b
Merge pull request #1503 from FarmBot/release_candidate
CSS, Nav Bar updates
2019-10-14 12:00:10 -04:00
Rick Carlino 4e3d499ccd Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into release_candidate 2019-10-13 15:52:55 -05:00
Rick Carlino d038f1268f
Merge pull request #1502 from FarmBot/updates
Routine Updates
2019-10-13 16:51:44 -04:00
Rick Carlino 8d83215bd9 Add new FBOS informational_setting fields, hide some links, expose others. 2019-10-13 15:48:11 -05:00
Rick Carlino 66817cc21a Merge branch 'updates' into release_candidate 2019-10-13 15:29:12 -05:00
Rick Carlino 1901dd3a20 Update Gemfile.lock 2019-10-13 15:20:36 -05:00
Rick Carlino 75cabbf90a Final updates (Ruby version) 2019-10-13 15:14:58 -05:00
Rick Carlino 3c09d0bb1a Updates, part III (Bundler) 2019-10-13 14:50:40 -05:00
Rick Carlino 1c5e03d54c Updates, part II (blueprint) 2019-10-13 14:29:44 -05:00
Rick Carlino 16d4966361 Updates, part I 2019-10-13 14:20:53 -05:00
AscendFB 5bfa90e53d Issues #1406 , #1495 , #1411 , #1426 2019-10-13 18:41:29 +02:00
AscendFB 9a249b3416
Merge pull request #10 from FarmBot/staging
update
2019-10-13 18:35:50 +02:00
Rick Carlino d44e3e5944 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into release_candidate 2019-10-10 15:16:25 -05:00
Rick Carlino 65226a32e4 WIP 2019-10-10 15:13:35 -05:00
Rick Carlino a2487d9b2e disallowGroups => hideGroups 2019-10-10 14:47:09 -05:00
Rick Carlino e353eda31f New LocationForm prop: `allowGroups` 2019-10-10 14:26:13 -05:00
Rick Carlino f84fa4275d Revert changes to variable dropdowns 2019-10-10 14:04:09 -05:00
Rick Carlino 98baa520e9 Remove tests that were testing presence of nav items (pre-icon nav stuff) 2019-10-10 13:46:40 -05:00
Rick Carlino 2792281043 [UNSTABLE] More feature flag removals 2019-10-10 12:43:44 -05:00
Rick Carlino a460e6e0c0 [UNSTABLE] More feature flag removals 2019-10-10 12:32:58 -05:00
Rick Carlino 4931d96d74
Merge pull request #1498 from FarmBot/groups_perf
Release Candidate I
2019-10-10 12:14:36 -05:00
Rick Carlino 7358fa1b65 Disallow groups in sequence header 2019-10-10 11:56:15 -05:00
Rick Carlino fd8cddf051 Tests / refactor of <PointGroupItem/> 2019-10-10 11:38:19 -05:00
Rick Carlino 2f5dd155c1 Dead code removal. 2019-10-10 09:34:06 -05:00
Rick Carlino 26a98f486a Add new feature flags 2019-10-09 16:04:23 -05:00
Rick Carlino c1c2bbf250 Fix failing test 2019-10-09 14:49:02 -05:00
Rick Carlino 344cb2582a [UNSTABLE] Formatting. Begin migration off of FIND HOME ON BOOT 2019-10-09 14:26:40 -05:00
Rick Carlino 7a86a1aab3 Add performance to group detail page, probably. 2019-10-09 13:34:38 -05:00
Rick Carlino a172c4c003 Tidy icon cache 2019-10-09 11:42:15 -05:00
Rick Carlino 6a05e140b0 ref. integrity issues in seeds.rb 2019-10-09 08:26:15 -05:00
Rick Carlino 49e7f85746 CSS Updates 2019-10-09 07:55:30 -05:00
Rick Carlino 3656428ea3
Merge pull request #1494 from gabrielburnworth/staging
Fixes and additions
2019-10-09 07:26:50 -05:00
gabrielburnworth ee3c9a081c minor cleanup 2019-10-08 12:32:15 -07:00
gabrielburnworth b3e2830cce last seen bug fix 2019-10-08 12:32:15 -07:00
gabrielburnworth 8d3c537332 group fixes and additions 2019-10-08 12:32:15 -07:00
Rick Carlino 0e85a10dc5
Merge pull request #1492 from FarmBot/final_groups_stuff
(DRAFT) Final Changes to New "Groups" Feature.
2019-10-08 14:30:16 -05:00
Rick Carlino 05c521e02a Update Gemfile.lock 2019-10-08 14:07:42 -05:00
Rick Carlino b6da1752a1 Linter error 2019-10-08 14:06:17 -05:00
Rick Carlino 7dc7409a15 More tests for point group components 2019-10-08 13:56:03 -05:00
Rick Carlino f30d3fc4eb Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into final_groups_stuff 2019-10-08 12:46:08 -05:00
Rick Carlino 43c8108e3c Dead code removal. 2019-10-08 12:46:04 -05:00
Rick Carlino 5342432c2a
Merge pull request #1493 from AscendFB/cosmetic-fixes
Cosmetic fixes
2019-10-08 12:43:32 -05:00
AscendFB b3f3923e64 Issue #1436 Location form in "execute sequence" steps 2019-10-08 18:10:36 +02:00
Rick Carlino 77aa69977f Type errors 2019-10-08 10:19:51 -05:00
Rick Carlino 86497b5187 Debug removal 2019-10-08 10:08:52 -05:00
Rick Carlino a475c38fc9 Final changes before adding tests 2019-10-08 09:52:03 -05:00
AscendFB 364c29d1ce Move_abs input row in full width 2019-10-08 16:26:57 +02:00
Rick Carlino fe52fedaf5 Fix failing tests related to point group auto_sync 2019-10-07 16:09:36 -05:00
Rick Carlino 961d47dbd6 Fix PointGroup auto sync message problems on FE. 2019-10-07 15:26:09 -05:00
AscendFB 6a9ce98a34 Some additional unit tests 2019-10-07 21:36:53 +02:00
Rick Carlino 4e677792c1 Clean up auto_sync code 2019-10-07 14:14:59 -05:00
Rick Carlino 9697498b04 Handle auto-sync delegation in Points::Destroy 2019-10-07 13:35:15 -05:00
AscendFB b0ec64bb92
Merge pull request #9 from FarmBot/staging
Get changes
2019-10-04 22:13:37 +02:00
AscendFB 1ee9f713d5 Issue #1437 Options overflow, Issue #1471 farmware tooltips, and image container fix 2019-10-04 22:10:50 +02:00
Rick Carlino 6a314d11e4 Possible fix for blinky rspec sepc 2019-10-04 15:09:22 -05:00
Rick Carlino 8dc1be228b QUick fix- more investigation needed 2019-10-04 11:26:55 -05:00
Rick Carlino fad467530c Caching / race issue fix, part I 2019-10-04 10:21:21 -05:00
Rick Carlino f62bbf4aec :thinking_face: 2019-10-04 09:59:23 -05:00
Rick Carlino b432163b25 [UNSTABLE WIP] Protect in-use (by regimen, farmevent) deletion of point groups 2019-10-03 17:20:21 -05:00
Rick Carlino 91283ca628 [UNSTABLE WIP] Protect in-use (by sequence) deletion of point groups 2019-10-03 16:29:43 -05:00
Rick Carlino 51a090fee6 Typos, part II 2019-10-03 14:25:33 -05:00
Rick Carlino f09b1eba87 Use point_group_id instead of resource_id. Fix typos. 2019-10-03 14:06:36 -05:00
Rick Carlino 42d931ad3e Delete PointGroupItems before deleting points CC: @connorRigby 2019-10-03 13:52:00 -05:00
Rick Carlino 1507eb51f8 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into final_groups_stuff 2019-10-03 11:25:36 -05:00
Rick Carlino 7bc0f89ea3
Merge pull request #1484 from kbravh/fix-nav-shifting
Fix nav jiggle by adding data-title attribute and css:after
2019-10-03 11:25:22 -05:00
Rick Carlino 30b895b4d4 Redirect user to pointGroupDetail after creating group 2019-10-03 11:20:13 -05:00
Rick Carlino 13f1ac2225 WIP 2019-10-03 10:43:51 -05:00
Rick Carlino 4cb735b098 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into final_groups_stuff 2019-10-03 10:43:28 -05:00
Rick Carlino 5c56a2b764
Merge branch 'staging' into fix-nav-shifting 2019-10-03 10:17:45 -05:00
Rick Carlino 0b4ce5dd44
Merge pull request #1485 from kbravh/mark-as-sprouted
add sprouted to the MARK AS options
2019-10-03 10:17:06 -05:00
Karey Higuera 23db485363 add sprouted to the MARK AS options 2019-10-02 14:49:28 -05:00
Rick Carlino 7f55338e54 Trigger an auto_sync message when point_group_items are destroyed 2019-10-02 12:14:13 -05:00
Karey Higuera 5342c2eae7 Fix nav jiggle by adding data-title attribute and css:after
Reorder content and display order in navbar.scss
2019-10-02 11:05:59 -05:00
Rick Carlino a466a2997f Fix PointGroup referential integrity issues 2019-10-02 09:24:57 -05:00
Rick Carlino ae9465873e [BIG CHANGE] Retroactively fix referential integrity issues 2019-10-02 08:04:53 -05:00
Rick Carlino bbb9dcdfcc Possible fix for refernetial integrity issues with Point <=> PointGroup after Point#destroy 2019-10-01 16:23:30 -05:00
Rick Carlino 20ce166d46 WIP 2019-10-01 16:05:42 -05:00
Rick Carlino 0d67345d8d BUG: PointGroup#update does not accept sort_type, part II 2019-10-01 15:26:12 -05:00
Rick Carlino e52e7c8169 BUG: PointGroup#update does not accept sort_type 2019-10-01 15:16:38 -05:00
Rick Carlino a2154a10e1 <FBSelect/> for sort order 2019-10-01 15:02:29 -05:00
Rick Carlino 144fa34e29 Deploy ability to set `sort_type` while I work on the Real VersionTM 2019-10-01 11:53:11 -05:00
Rick Carlino 8300086835 Move `boot sequence` selector to below firmware selection. 2019-10-01 10:15:24 -05:00
Rick Carlino e03dc38160 Remove every_point and associated corpus entries 2019-10-01 09:50:17 -05:00
Rick Carlino 2e79d97e5e
Merge pull request #1475 from FarmBot/final_groups_stuff
Add `sort_type` (API-side only)
2019-09-30 17:28:31 -05:00
Rick Carlino 2ef6480816 Add `sort_type` (API-side only) 2019-09-30 17:09:00 -05:00
Rick Carlino 1222ce54fe
Merge pull request #1474 from FarmBot/monday
Group Bug Fixes
2019-09-30 14:19:30 -05:00
Rick Carlino 1a9c7f3508 mapStateToProps() test 2019-09-30 13:49:54 -05:00
Rick Carlino b5a8d53b02 Update createGroup() tests 2019-09-30 11:22:11 -05:00
Rick Carlino 6b1db0c51c Bug fix: Allow creation of PointGroups that contain points created during current session. 2019-09-30 10:22:12 -05:00
Rick Carlino 9213d4f37e Bug fix: Dont crash PointGroup detail view if OF Icon is `null`. 2019-09-30 09:45:09 -05:00
Rick Carlino 66bd0a9c27 Update NPM deps 2019-09-28 19:21:56 -05:00
Rick Carlino ee85a8e6e3
Merge pull request #1465 from FarmBot/friday
Dep Upgrades
2019-09-28 10:15:41 -05:00
Rick Carlino 6a1ee3830b Merge branch 'staging' of https://github.com/AscendFB/Farmbot-Web-App into friday 2019-09-27 11:32:50 -05:00
Rick Carlino d2e1a84005 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into friday 2019-09-27 11:30:43 -05:00
Rick Carlino 8f41f7d87d Update bundler deps 2019-09-27 11:26:21 -05:00
Rick Carlino 1c83bf4ad8 Update NPM deps 2019-09-27 11:20:31 -05:00
Rick Carlino ab6472510d Re-arrange help text in ubuntu_setup.sh 2019-09-27 08:25:43 -05:00
AscendFB 22665da324 Merge branch 'staging' of https://github.com/AscendFB/Farmbot-Web-App into staging 2019-09-27 11:14:02 +02:00
AscendFB 7549312b1c again linters, should fix my settings now 🔰 2019-09-27 11:13:41 +02:00
AscendFB 61c9fe62b4
Linter fix 2019-09-27 10:45:26 +02:00
AscendFB 8934b10832
Merge pull request #8 from FarmBot/staging
Pull latest changes
2019-09-27 10:00:53 +02:00
Rick Carlino 5547dd69f7
Merge pull request #1463 from FarmBot/groups_vii
Ability to use groups for iteration
2019-09-26 16:30:18 -05:00
Rick Carlino 3f5159267c Linter fix 2019-09-26 15:57:53 -05:00
Rick Carlino 2e15b74ce9 ✔️ Tests done 2019-09-26 15:48:10 -05:00
Rick Carlino e0e88119db De-Curry newVariableCreator 2019-09-26 15:07:51 -05:00
Rick Carlino d124c58251 TODO: De-Curry newVariableCreator 2019-09-26 13:45:54 -05:00
Rick Carlino 0785ee979a Render `name` of selected PointGroup 2019-09-26 11:34:22 -05:00
Rick Carlino ba0503ef00 Fixed WIP errors. NEXT: Format selected pointGroup 2019-09-26 10:23:23 -05:00
Rick Carlino 34c632cad3 Fix convertDDItoVariable NPEs 2019-09-26 09:24:26 -05:00
AscendFB 58aa3d8606 Merge branch 'staging' of https://github.com/AscendFB/Farmbot-Web-App into staging 2019-09-26 12:46:44 +02:00
AscendFB 3d83f01f5b Tooltips and helpbuttons updates no.3 2019-09-26 12:44:51 +02:00
AscendFB dcb12a89c9
Merge pull request #7 from FarmBot/staging
Merging changes
2019-09-26 12:29:04 +02:00
Rick Carlino 82b7f4cf16 Add groups to dropdown list; prevent runtime error in move_abs 2019-09-25 13:40:37 -05:00
Rick Carlino 7b046af751 Upgrades and any removals 2019-09-25 10:25:18 -05:00
Rick Carlino 52ab40b189
Merge pull request #1456 from gabrielburnworth/staging
Add new device info
2019-09-25 08:06:02 -05:00
gabrielburnworth a8cf0b455b add new fbos details 2019-09-24 14:50:55 -07:00
Rick Carlino 4e999e68da
Merge pull request #1455 from FarmBot/groups_v
Add `every_point`, `point_group` nodes, tests, cleanup, dep upgrades.
2019-09-24 14:47:48 -05:00
Rick Carlino d576656fbd Rename some device table columns, add tests for point_groups CS node. MIGRATION REQUIRED 2019-09-24 14:25:08 -05:00
Rick Carlino fc1f80c4fc Remove useless guard clauses, test for older code 2019-09-24 11:48:11 -05:00
Rick Carlino 9a59395715 Merge conflicts, part II 2019-09-24 11:05:43 -05:00
Rick Carlino 1acb46486c Merge conflicts, text coverage increase for of crop caching 2019-09-24 11:04:25 -05:00
Rick Carlino a3d73b35c6
Merge pull request #1453 from gabrielburnworth/staging
Frontend cleanup
2019-09-24 11:03:35 -05:00
Rick Carlino b11e5a0e15 Upgrade FBJS (every_point, point_group celery node additions). 2019-09-24 10:31:57 -05:00
Gabriel Burnworth 8361f5d96e
Merge branch 'staging' into staging 2019-09-24 06:16:29 -07:00
AscendFB 9edd2c21fd Tooltips and helpbuttons updates no.2 2019-09-24 11:12:33 +02:00
AscendFB 87d2a0f524
Merge pull request #6 from FarmBot/staging
Merging changes
2019-09-24 10:57:04 +02:00
Rick Carlino 066f304ea3
Merge pull request #1454 from FarmBot/groups_v
PointGroup related additions
2019-09-23 19:06:18 -05:00
Rick Carlino fa5f9ed1ff PointGroup related additions 2019-09-23 18:34:37 -05:00
gabrielburnworth f5982bf1af cleanup 2019-09-23 11:56:35 -07:00
Rick Carlino 1e267e751c
Merge pull request #1452 from FarmBot/techdebt
Upgrades
2019-09-23 13:24:45 -05:00
Rick Carlino 161cf07116 Routine dep upgrades, JS 2019-09-23 11:56:06 -05:00
Rick Carlino 5a10be3ed9 Routine dep upgrades, Ruby 2019-09-23 11:41:03 -05:00
Rick Carlino 37bcde3050
Merge pull request #1451 from FarmBot/turnkey
"Boot Sequence" Initial Implementation
2019-09-23 11:23:29 -05:00
Rick Carlino c1ca5cb753 Test updates 2019-09-23 10:17:19 -05:00
Rick Carlino af29d10a82 Prevent deletion of boot sequences that are in_use 2019-09-20 16:13:42 -05:00
Rick Carlino ab1613aeb2 ✔️ Tests 2019-09-20 14:02:13 -05:00
Rick Carlino 6bd619c669 Fix test 2019-09-20 10:52:51 -05:00
Rick Carlino 33942d98cd Filter variable-bearing sequence 2019-09-20 10:05:36 -05:00
Rick Carlino a0337e0ae3 Fix foreign key in migration. 2019-09-19 15:51:54 -05:00
Rick Carlino 79d5974dde Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into turnkey 2019-09-19 15:16:30 -05:00
Rick Carlino 78f449218e FE implementation of boot sequence selector 2019-09-19 15:16:04 -05:00
Rick Carlino 4005dbefee
Merge pull request #1450 from gabrielburnworth/staging
Device throttle update
2019-09-19 15:11:41 -05:00
Rick Carlino ea55b67173 Delete typings/ directory. 2019-09-19 14:15:35 -05:00
gabrielburnworth 549c97deb3 fix device throttle update bug 2019-09-19 12:15:22 -07:00
Rick Carlino 9297f3ae95 👏 Remove old react-redux hacks 2019-09-19 14:09:00 -05:00
Rick Carlino e5bfa4997c uncaught exception: undefined 2019-09-19 10:24:54 -05:00
Rick Carlino 84affe3464 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into turnkey 2019-09-19 10:17:51 -05:00
Rick Carlino f295add527 WIP 2019-09-19 10:03:31 -05:00
Rick Carlino 11ad1789f2
Merge pull request #1448 from FarmBot/staging
v8.0.7 - Iridescent Iris
2019-09-19 09:01:14 -05:00
AscendFB d9fa2ba6ac Tooltips and helpbuttons updates #1 2019-09-19 15:41:37 +02:00
Rick Carlino fc2c42161f WIP 2019-09-19 08:37:05 -05:00
AscendFB bce57f2552
Merge pull request #5 from FarmBot/staging
Pulling changes
2019-09-19 12:38:30 +02:00
Rick Carlino 7843a1e93c Remove legacy shims (v6 support ended 4 months ago) 2019-09-18 13:40:32 -05:00
Rick Carlino f52248537e Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into ping_fixes_iv 2019-09-18 09:51:31 -05:00
Rick Carlino c1b5de325e Tests for sendOutboundPing() 2019-09-18 09:51:22 -05:00
Rick Carlino ae273593d2
Merge pull request #1446 from FarmBot/ping_fixes_iv
Ping Cleanup
2019-09-18 09:42:13 -05:00
Rick Carlino 13bf921d07 More tests for connectivityReducer() 2019-09-18 09:27:33 -05:00
Rick Carlino 96981df093 Update tests for dispatchNetwork(Up|Down)() 2019-09-18 09:16:19 -05:00
Rick Carlino bec1cacdba Tests for connectDevice() 2019-09-18 08:57:45 -05:00
Rick Carlino ba3a6d3d1e Tests for execSequence action. 2019-09-18 08:36:33 -05:00
Rick Carlino f2439292e8 Add onLog test back 2019-09-17 19:56:18 -05:00
Rick Carlino 6edbfa33c0 Fix failing tests related to stash/unstash 2019-09-17 19:36:24 -05:00
Rick Carlino 4dde181488 [FAILING] Cleanup and formatting 2019-09-17 16:45:40 -05:00
Rick Carlino d8a5458142 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into ping_fixes_iv 2019-09-17 16:31:24 -05:00
Rick Carlino f387fa54ce Possible ping fix? 🤞 2019-09-17 16:06:30 -05:00
Rick Carlino 80d6ff4c48
Merge pull request #1445 from FarmBot/staging
v8.0.6 - Iridescent Iris
2019-09-17 15:33:10 -05:00
Rick Carlino b13a61641a WIP squash this 2019-09-17 14:39:56 -05:00
Rick Carlino 99b8b823aa Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into legacy_connectivity_removals 2019-09-17 14:26:24 -05:00
Rick Carlino 69ff481f91 [UNSTABLE] Pull out more legacy junk. V. unstable. 2019-09-17 14:26:19 -05:00
Rick Carlino 2aa84d264d [UNSTABLE] Dead code removal- NETWORK_RESET 2019-09-17 13:06:24 -05:00
Rick Carlino 321d818454 Idea #7 2019-09-17 11:31:07 -05:00
Rick Carlino f47f4754f4 Idea #6 2019-09-17 11:21:43 -05:00
Gabriel Burnworth 3c55e1961a
fix test 2019-09-17 09:18:32 -07:00
Rick Carlino 0488c36a1c Idea #5 2019-09-17 11:07:19 -05:00
gabrielburnworth e3845b3070 flip boolean 2019-09-17 08:53:18 -07:00
Rick Carlino 2a82b37068
Merge pull request #1440 from gabrielburnworth/staging
Minor updates
2019-09-17 10:15:07 -05:00
Rick Carlino ab4287937f
Merge pull request #1443 from FarmBot/staging
v8.0.5 - Iridescent Iris (Master <= Staging)
2019-09-17 07:59:12 -05:00
gabrielburnworth c7c2a57749 add markdown option to logs page 2019-09-16 14:22:20 -07:00
gabrielburnworth d2ae4ff300 update pi GPIO pin restrictions 2019-09-16 14:21:55 -07:00
Rick Carlino 12eebc9f44
Merge pull request #1439 from RickCarlino/interim_prod_branch
v8.0.5 - Iridescent Iris
2019-09-16 16:09:34 -05:00
Rick Carlino e0473eb795 Update tests for create_points.tsx 2019-09-16 15:15:15 -05:00
Rick Carlino ee5efd02d0 Don't copy props into state. 2019-09-16 11:55:50 -05:00
Rick Carlino 529ea9b90f Tests for moveToPoint() 2019-09-16 09:55:02 -05:00
Rick Carlino 07bd01c086 Fix faiiling tests (due to farmdesigner / sequence editor updates) 2019-09-16 09:14:33 -05:00
AscendFB 83b1698288
Merge pull request #4 from FarmBot/staging
Update branch
2019-09-14 20:56:21 +02:00
Rick Carlino 85e1a0365c Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into better_sequence_errors 2019-09-13 18:35:08 -05:00
Rick Carlino 2d507f7410 [EXPERIMENTAL] Undo decisions made in previous commit 2019-09-13 18:18:58 -05:00
Rick Carlino b4a0e73589 [EXPERIMENTAL] Remove dead code, modify PING_OK/PING_NO reducers 2019-09-13 15:58:58 -05:00
Rick Carlino b0e46d95f9
Merge pull request #1434 from gabrielburnworth/staging
Fixes and cleanup
2019-09-13 13:49:39 -05:00
Rick Carlino 061b7917c0 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into better_sequence_errors 2019-09-13 13:19:13 -05:00
gabrielburnworth e77a7bf701 dep updates 2019-09-13 11:03:37 -07:00
gabrielburnworth 6f2973400d location form cleanup and fixes 2019-09-13 11:02:09 -07:00
gabrielburnworth edceb18569 add version rc compare 2019-09-13 11:01:27 -07:00
gabrielburnworth 1f3102a8ab improve toast colors 2019-09-13 11:00:51 -07:00
Rick Carlino be53e2725c
Merge pull request #1432 from AscendFB/sequences_updates
Sequences updates
2019-09-13 12:53:01 -05:00
Rick Carlino 4d92d4ccf0 [EXPERIMENTAL] "move to this point" button, plus better data reset on point create form. 2019-09-13 10:17:51 -05:00
Rick Carlino 43406feea8 [EXPERIMENTAL] Default new point x/y to bot position value instead of 0. PART II 2019-09-13 09:45:56 -05:00
Rick Carlino 8238322fc2 [EXPERIMENTAL] Default new point x/y to bot position value instead of 0. 2019-09-13 09:02:31 -05:00
AscendFB e77f12cd0f
Merge branch 'staging' into sequences_updates 2019-09-13 11:08:41 +02:00
Rick Carlino 444426ec88 Decrease DataDog polling interval to 1/100 from 1/10 2019-09-12 17:01:41 -05:00
Rick Carlino 91b1110733 Add debounce to FarmEvent#create 2019-09-12 16:50:44 -05:00
Rick Carlino 3c900fce94 Put ping intnerval back to normal, maybe, CC: @connorRigby 2019-09-12 15:51:35 -05:00
Rick Carlino cca67ba779 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into better_sequence_errors 2019-09-12 15:42:58 -05:00
Rick Carlino a7dad2e556 Minimal point editing stuff 2019-09-12 15:42:55 -05:00
Rick Carlino d1c56ab75a
Merge pull request #1428 from FarmBot/staging
v8.0.4 - Iridescent Iris
2019-09-12 15:20:05 -05:00
Rick Carlino e4ad0ce045
Merge pull request #1427 from RickCarlino/fix_ping_issues
Post-Deploy Fixes
2019-09-12 14:54:35 -05:00
Rick Carlino 1e2aa88310 EXPERIMENTAL: Render RPC Error explanation in toast, part II 2019-09-12 14:46:13 -05:00
Rick Carlino a81ae37087 EXPERIMENTAL: Render RPC Error explanation in toast 2019-09-12 14:29:45 -05:00
Rick Carlino 9100ae11a1 ✔️ 2019-09-12 14:19:07 -05:00
Rick Carlino 1f2699a300 Fix pingNo + tests 2019-09-12 13:24:45 -05:00
Rick Carlino 4f8715692b Gem updates 2019-09-12 08:35:58 -05:00
Rick Carlino 7066ca88d0 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into fix_ping_issues 2019-09-11 17:32:17 -05:00
Rick Carlino c662dc0e19
Merge pull request #1425 from gabrielburnworth/staging
Dependency and translation maintenance
2019-09-11 17:08:28 -05:00
Rick Carlino 7802c91aaf Possible fix for pessimistic logs 2019-09-11 16:58:53 -05:00
Rick Carlino bfb98d14fb Typo 2019-09-11 16:16:00 -05:00
Rick Carlino 7cb8649191 Tests for datadog logs 2019-09-11 16:07:17 -05:00
gabrielburnworth 8ebd3574e7 translation maintenance 2019-09-11 10:50:48 -07:00
gabrielburnworth e6c09256dc dep updates 2019-09-11 10:49:54 -07:00
Rick Carlino 34cd38bbbf Send log errors to DataDog 2019-09-11 10:18:24 -05:00
Rick Carlino f5aaf4acd9 Be even more lenient about FE lockout 2019-09-10 17:02:57 -05:00
Rick Carlino 8d9f5cfe7c Increase ping interval for quicker network hiccup recovery 2019-09-10 16:55:54 -05:00
Rick Carlino b4b3cd9027 Possible fix for `too much recursion` error 2019-09-10 15:10:21 -05:00
Rick Carlino 940f8ef93a Record QoS stats 2019-09-10 14:34:20 -05:00
Rick Carlino b8566b1604 Add browser-http-intake.logs.datadoghq.com to CSP 2019-09-10 14:16:25 -05:00
Rick Carlino 49f2a569ab [EXPERIMENTAL] Conditionally add DataDog agent. 2019-09-10 14:03:06 -05:00
Rick Carlino 576c27c9c5
Merge pull request #1423 from FarmBot/staging
v8.0.3 - Iridescent Iris
2019-09-10 12:11:38 -05:00
Rick Carlino 55839f2b17
Merge pull request #1422 from gabrielburnworth/staging
Dropdown bug fix
2019-09-09 16:48:44 -05:00
gabrielburnworth baed1f0664 fix dropdown bug 2019-09-09 14:18:22 -07:00
Rick Carlino 437df4e4db
Merge pull request #1420 from gabrielburnworth/staging
Dependency upgrades and cleanup
2019-09-09 13:00:14 -05:00
gabrielburnworth 4c31f47860 cleanup 2019-09-09 09:26:57 -07:00
gabrielburnworth 1c78c14cb4 dep updates 2019-09-09 09:09:48 -07:00
Rick Carlino 2f0fae1cd0
Merge pull request #1418 from RickCarlino/latency_panel_idea_iii
First Draft of "Network Latency" Panel, Plus Others
2019-09-09 09:34:12 -05:00
Rick Carlino c7b76261fa Merge branch 'latency_panel_idea_iii' of github.com:RickCarlino/farmbot-web-app into latency_panel_idea_iii 2019-09-09 08:24:45 -05:00
Rick Carlino 1c59cf8128 Tests for reducer, mapStateToProps 2019-09-09 08:23:28 -05:00
Ascend cfc7baf587 Issue FarmBot#1379 Updates to Execute sequence step. 2019-09-09 12:38:41 +02:00
Ascend 427cbab172 Issue FarmBot#1376 Move to dropdown now opened when speed <100 2019-09-09 11:52:53 +02:00
Rick Carlino 40dce4c52d Late additions. 2019-09-08 21:04:57 -05:00
Rick Carlino 382409ec2a Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into latency_panel_idea_iii 2019-09-08 18:13:54 -05:00
Rick Carlino c54232bd4e
Merge branch 'staging' into latency_panel_idea_iii 2019-09-08 18:13:41 -05:00
Rick Carlino bdef67704f Tests for dispatchQosStart() 2019-09-08 18:03:27 -05:00
Rick Carlino c516d7fc9f Change empty state graphic for Farm events. Fixes #1415 2019-09-08 17:14:22 -05:00
Rick Carlino cb77c09555 Finish tests for qos.ts 2019-09-07 12:23:13 -05:00
Rick Carlino f7b645d580 Updates to shortRevision() display stuff. Fixes #1409 2019-09-07 11:10:28 -05:00
Rick Carlino 3a4b4c2db7 Re-arrange farm designer tabs per #1408 2019-09-07 10:34:57 -05:00
Ascend 51216e0bc3 Issue #1378 Sequence step 'move to' more compact 2019-09-07 13:01:44 +02:00
Rick Carlino 5d61c61fd2 Typo, remove setTimeout 2019-09-06 14:20:48 -05:00
Rick Carlino 9d23db4130 Whoops add timeout callback back 2019-09-06 14:05:09 -05:00
Rick Carlino 2a64b3cb20 Make `end` attr mandatory for `timeout` pings. CC: @gabrielBurnworth 2019-09-06 13:05:15 -05:00
Rick Carlino 9ab6913409 Clean up how units are displayed 2019-09-06 11:39:03 -05:00
AscendFB 7bbc5dcccd
Merge pull request #3 from FarmBot/staging
Update branch
2019-09-06 17:22:39 +02:00
Rick Carlino 610b7b3706 Debug blinky UI more 2019-09-06 09:33:23 -05:00
Rick Carlino 709e779eca Increase ping interval (possible cause of UI flailing?) 2019-09-06 09:04:52 -05:00
Rick Carlino 1e1188a318 UI Updates CC: @roryAronson 2019-09-06 08:23:32 -05:00
Rick Carlino 8b9585b145 UI for quality of service meter. NEXT: Needs tests. 2019-09-05 20:51:49 -05:00
Rick Carlino 6e9ff55a38 Reducer is now tracking QoS stats. NEXT: Add to UI, write tests. 2019-09-05 17:27:42 -05:00
Rick Carlino 9858fa343b TODO: Insert QOS Ping ID into dispatchNetworkUp/Down() 2019-09-05 16:44:12 -05:00
Rick Carlino 9599f14a98 Add QOS helpers 2019-09-05 13:54:17 -05:00
Rick Carlino 4dac62290d
Merge pull request #1405 from RickCarlino/latency_panel_idea_ii
Pre-Latency Panel Updates
2019-09-05 13:49:34 -05:00
Rick Carlino 14ae7567c2 [STABLE] ✔️ 2019-09-05 13:18:18 -05:00
Rick Carlino b6ce6de8c6 [UNSTABLE] More string => number conversion 2019-09-05 12:25:25 -05:00
Rick Carlino a0ebd30a32 [UNSTABLE] Switch connectivity panel to use UNIX instead of JSON dates 2019-09-05 10:16:25 -05:00
Rick Carlino adfb11cd1b Reshuffle strucutre of connectivity state tree branch 2019-09-05 09:17:05 -05:00
Rick Carlino 1a8d7024a7
Merge pull request #1403 from AscendFB/sequences_updates
Updated 'IF ...' tile
2019-09-05 08:44:06 -05:00
AscendFB a5a7e1218d
Merge pull request #2 from FarmBot/staging
Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into sequence_updates
2019-09-04 21:04:22 +02:00
AscendFB c6d00ab30e
Merge pull request #1 from FarmBot/staging
Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging
2019-09-04 21:00:46 +02:00
Ascend 3080b7792e Thanks tslint plugin 2019-09-04 20:54:21 +02:00
Rick Carlino d4abffa6f7
Merge pull request #1402 from RickCarlino/tests_sept_3
Tests for keyboard shortcuts.
2019-09-03 15:44:54 -05:00
Rick Carlino c4ac2e1485 Increase coverage of hotkey code 2019-09-03 14:55:56 -05:00
Rick Carlino 29aca332d8
Merge pull request #1400 from RickCarlino/groups_updates
Groups CSS updates
2019-09-03 13:50:05 -05:00
Rick Carlino 761c6b0444 Merge branch 'staging' of https://github.com/AscendFB/Farmbot-Web-App into tests_sept_3 2019-09-03 13:11:52 -05:00
Rick Carlino 7e71cb2327 Fix SASS issues, remove runtime warning (React) 2019-09-03 13:10:14 -05:00
Ascend f32f601b37 Issue Farmbot#1377 Updates to If statement command 2019-09-01 17:04:32 +02:00
AscendFB 716cc8e231
Another space that did not fit 2019-09-01 16:16:04 +02:00
Ascend 82e629f659 Issue Farmbot#1298 Mobile nav menu animation fix 2019-08-31 12:57:08 +02:00
Ascend 04b97175bc Issue Farmbot#1373 Add ESC hotkey in farmdesigner 2019-08-29 13:25:55 +02:00
Ascend c34c9f1f3c Box LEDs labels visible again 2019-08-29 11:41:56 +02:00
Rick Carlino fa44f39cf3 un-inline stuff 2019-08-28 16:47:10 -05:00
Rick Carlino 26cb7973f0 CSS Adjustments, part I. TODO: Removal inline styles after debugging. 2019-08-28 13:11:33 -05:00
Rick Carlino 9fe8bb104a Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-08-28 08:15:48 -05:00
Rick Carlino 9094dfb691
Merge pull request #1399 from gabrielburnworth/staging
Misc minor updates
2019-08-28 08:01:16 -05:00
gabrielburnworth 93d90fac83 tests and cleanup 2019-08-27 13:54:43 -07:00
Rick Carlino 0a3217105e Merge branch 'master' into staging 2019-08-27 15:54:19 -05:00
gabrielburnworth 4edfa20b60 Merge branch 'master' of https://github.com/FarmBot/Farmbot-Web-App into staging 2019-08-27 13:53:53 -07:00
Rick Carlino 973b403524
Merge pull request #1398 from RickCarlino/master
Adjust CSP policy
2019-08-27 15:53:43 -05:00
Rick Carlino bb76d99ef5 Adjust CSP reporting 2019-08-27 15:21:02 -05:00
Rick Carlino cc1a933f7a
Merge pull request #1396 from AscendFB/issues
Issue Farmbot#1372 Indicator circle also when hovered + test update
2019-08-27 13:11:57 -05:00
Gabriel Burnworth 8826530713
remove trailing whitespace 2019-08-27 10:26:57 -07:00
AscendFB ae1c8292ed
Update frontend/farm_designer/map/active_plant/__tests__/hovered_plant_test.tsx
Co-Authored-By: Gabriel Burnworth <gabrielburnworth@users.noreply.github.com>
2019-08-27 18:28:13 +02:00
AscendFB e615659cc4
Update frontend/farm_designer/map/active_plant/hovered_plant.tsx
Co-Authored-By: Gabriel Burnworth <gabrielburnworth@users.noreply.github.com>
2019-08-27 18:27:58 +02:00
Rick Carlino 77bb85bb67 Merge branch 'master' of https://git.heroku.com/farmbot-production 2019-08-27 10:20:13 -05:00
Rick Carlino 8c3f12719f Merge branch 'master' into staging 2019-08-27 10:18:14 -05:00
Rick Carlino 1bbc83c672
Merge pull request #1397 from RickCarlino/real_log_service
Log Format Updates
2019-08-27 10:17:54 -05:00
Rick Carlino 6cc7afd132 Merge branch 'real_log_service' into staging 2019-08-27 10:03:05 -05:00
Rick Carlino e0e0753d00 Change log format 2019-08-27 09:59:58 -05:00
Rick Carlino 997ce1c5ed
Merge branch 'staging' into issues 2019-08-27 08:49:53 -05:00
Rick Carlino f85c66f9e9
Merge pull request #1395 from gabrielburnworth/staging
Cleanup and fixes
2019-08-27 08:47:54 -05:00
AscendFB fda026a4d1
Hopefully got the right whitespaces 2019-08-27 13:37:42 +02:00
AscendFB 1e17383693
Merge branch 'staging' into issues 2019-08-27 12:50:28 +02:00
Ascend f61852d577 Issue Farmbot#1372 Indicator circle also when hovered + test update 2019-08-27 12:42:09 +02:00
Gabriel Burnworth c8f5675630
lower ci resource usage 2019-08-26 16:54:27 -07:00
gabrielburnworth 71d90d61b6 refactor and adjust ci 2019-08-26 16:19:16 -07:00
gabrielburnworth 9158d53021 update filter status 2019-08-26 15:08:23 -07:00
Gabriel Burnworth a6ff17099f
increase ci timeout 2019-08-26 13:34:35 -07:00
gabrielburnworth 3a20d17eaf cleanup and fixes 2019-08-26 11:56:17 -07:00
Rick Carlino 75b72e13da
Merge pull request #1394 from RickCarlino/testing_stuff
Dep upgrades and test suite updates.
2019-08-26 11:44:01 -05:00
Rick Carlino f37861eb08 Dep upgrades, test upgrades 2019-08-26 11:13:33 -05:00
Rick Carlino e8dfc65bc8
Merge branch 'staging' into staging 2019-08-24 17:31:04 -05:00
Rick Carlino 968ee6c04c
Merge pull request #1389 from gabrielburnworth/staging
Panel updates and bug fixes
2019-08-24 17:24:55 -05:00
Ascend d8c0d67717 Consecutive blank lines are forbidden!! 2019-08-24 16:12:31 +02:00
Ascend 79f39cae2c Merge branch 'staging' of https://github.com/AscendFB/Farmbot-Web-App into staging 2019-08-24 13:53:58 +02:00
Ascend 9529ef5aa9 Fix tests 2019-08-24 13:53:52 +02:00
AscendFB 2951baeb05
Merge branch 'staging' into staging 2019-08-24 01:18:56 +02:00
Ascend 3e3192f088 Issue Farmbot#1303 Tooltips in HW widget were cut off. 2019-08-24 00:57:25 +02:00
gabrielburnworth 2f0bd67222 bug fixes 2019-08-23 14:19:22 -07:00
gabrielburnworth d868625ba3 task and dep updates 2019-08-23 14:19:02 -07:00
gabrielburnworth 538ef0f1e4 panel updates 2019-08-23 14:18:40 -07:00
Rick Carlino 3ae676ef54
Merge pull request #1388 from RickCarlino/assertion_log_type
Assertion additions, part II
2019-08-23 14:37:37 -05:00
Ascend 57308337a7 Issue Farmbot#1326 Autosave for device name and removal of save button 2019-08-23 21:33:50 +02:00
Rick Carlino df00fd0fa3 Test fixes II 2019-08-23 14:20:08 -05:00
Rick Carlino 2dd02e17df Test fixes 2019-08-23 14:02:33 -05:00
Rick Carlino 0416d91051 Assertion log hotfixes 2019-08-23 12:55:11 -05:00
Rick Carlino 631291f42a Add assertion_log to LOG_TYPES #migrationRequired 2019-08-23 11:53:24 -05:00
Rick Carlino d37f0ef5a5
Merge pull request #1387 from RickCarlino/assert_block
Assert Block
2019-08-23 09:37:35 -05:00
Rick Carlino 61b328dbed Assert block tests, part II 2019-08-23 09:21:18 -05:00
Ascend da5608903b Issue Farmbot#1325 Removed unused SAVE Button from Hardware widget 2019-08-23 16:03:14 +02:00
Rick Carlino 5ed05f6c32 Mostly done testing. Minor cleanup needed 2019-08-23 08:54:48 -05:00
Rick Carlino 434adc12ae tests for <LuaPart/> 2019-08-22 16:26:59 -05:00
Rick Carlino b6d6f1de16 Regression fix / re-deploy. 2019-08-22 16:13:44 -05:00
Rick Carlino a4ca4ba71e WIP. 2019-08-22 16:05:47 -05:00
Rick Carlino 17b6737187 CSS Updates 2019-08-22 14:42:35 -05:00
Rick Carlino 356ad25b23 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into assert_block 2019-08-22 14:34:51 -05:00
Rick Carlino 8499353caa
Merge pull request #1386 from gabrielburnworth/staging
update feature wall
2019-08-22 14:34:35 -05:00
gabrielburnworth 4f1bad1b92 update feature wall 2019-08-22 11:58:20 -07:00
Rick Carlino 92e62cbd27 :shipit:... but after writing unit tests 2019-08-22 13:48:12 -05:00
Ascend 2eaee043e4 Issue FarmBot#1302 'Delete' buttons are now fa-times 2019-08-22 19:43:11 +02:00
Rick Carlino 3dd9ec1af2 Add `continue` assertion_type. 2019-08-22 12:35:01 -05:00
Ascend 9b505c2250 Issue#1300 Fonts of syncbutton at autosync 2019-08-22 19:04:30 +02:00
Ascend 6285693eac Issue #1289 Improve toast text colors 2019-08-22 17:53:16 +02:00
Rick Carlino 1e598a3362 First round of tweaks 2019-08-22 10:15:39 -05:00
Rick Carlino 7b1e956a28 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into assert_block 2019-08-22 10:04:45 -05:00
Rick Carlino 2ff9850498 Functional, but not-so-great-looking ASSERT block. 2019-08-22 10:02:54 -05:00
AscendFB 2f564530b4
Merge pull request #1 from FarmBot/staging
Merge updates
2019-08-22 16:28:54 +02:00
Rick Carlino eb88029bbf
Merge pull request #1383 from RickCarlino/assert_block
Assert Block, Part I
2019-08-21 17:35:27 -05:00
Rick Carlino f7e9a52700 Add `assertion` to allowed RPC list. 2019-08-21 17:35:12 -05:00
Rick Carlino 460d2f9779 Assert node + dep upgrades 2019-08-21 16:45:36 -05:00
Rick Carlino 6cf1b4d008
Merge pull request #1381 from RickCarlino/groups_frontend
Groups Frontend, Part I
2019-08-21 13:37:06 -05:00
Rick Carlino b69d5ae0ed Dead code removal. Done. 2019-08-21 10:28:42 -05:00
Rick Carlino ba5ceaeede <LittleIcon /> tests. 2019-08-21 09:33:56 -05:00
Rick Carlino 3952cf6294 TODO: Fix group deletion bug 2019-08-21 07:51:19 -05:00
Rick Carlino b7c54af744 <GroupDetail /> 2019-08-20 19:55:02 -05:00
Rick Carlino 243b8bcd7c TODO: group_detail.tsx group_detail_active.tsx 2019-08-20 15:41:53 -05:00
Rick Carlino 7ad10bcac8 GrouplListPanel click handler tests. 2019-08-20 14:55:30 -05:00
Rick Carlino 510164403a Extract conditionals into different React components 2019-08-20 11:44:24 -05:00
Rick Carlino fb2e83d02d createGroup() tests 2019-08-20 11:02:36 -05:00
Rick Carlino cab3ca311f Unstub some handlers 2019-08-20 10:03:39 -05:00
Rick Carlino 2c06823783 Tests for <GroupListPanel/> 2019-08-19 15:52:50 -05:00
Rick Carlino 8a1b7df060 <GroupInventoryItem/> tests 2019-08-19 11:33:11 -05:00
Rick Carlino bfd877f86a <PlantLayer/> test updates 2019-08-19 11:05:13 -05:00
Rick Carlino 3a917060b4 clickMapPlant() tests 2019-08-16 14:59:46 -05:00
Rick Carlino c6c4c1b010 click-to-add works. Needs tests. 2019-08-16 09:01:19 -05:00
Rick Carlino 3df37d89b1 DRY up more action creators. TODO: Write a thunk for click-to-add. 2019-08-16 08:31:20 -05:00
Rick Carlino 9d1b5e0f1d Add action creator for Actions.SELECT_PLANT 2019-08-15 20:52:31 -05:00
Rick Carlino 444829fda6 Clicking plants from GroupDetail panel works, need to update reducer 2019-08-15 20:22:55 -05:00
Rick Carlino dfe045bdda Cleanup debug code 2019-08-15 19:23:46 -05:00
Rick Carlino 4828645c6d Hover PointGroupItem highlights the point on the map 2019-08-15 19:14:15 -05:00
Rick Carlino 6ec17d9371 Load icons for each item in the group 2019-08-15 15:27:20 -05:00
Rick Carlino 3a51eb6ed9 Bug fixes: Redirect back when PointGroup panel cant find point group. Enforce point_id uniqueness 2019-08-15 14:47:47 -05:00
Rick Carlino 61872841a7 CC: @roryAronson 2019-08-15 14:19:01 -05:00
Rick Carlino 5237295111 Upgrade FBJS to remove legacy warning. 2019-08-15 11:49:20 -05:00
Rick Carlino 9725b00d4b Add Mode.addPointToGroup 2019-08-15 11:17:36 -05:00
Rick Carlino 2ea676fcdd Ability to remove points by clicking icon. Ability to save group from detail view panel 2019-08-14 15:57:23 -05:00
Rick Carlino ca7c7f4b33 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into groups_frontend 2019-08-14 15:26:53 -05:00
Rick Carlino aece60eead
Merge pull request #1369 from RickCarlino/first_party_farmware
First party farmware endpoint. Fixes #1368
2019-08-14 14:31:01 -05:00
Rick Carlino f5a28a727d Fix typos add tests 2019-08-14 14:07:59 -05:00
Rick Carlino a230dd9c42 Add first party farmwares to sync object 2019-08-14 13:36:40 -05:00
Rick Carlino 1f2a21d6d4 Merge branch 'master' into first_party_farmware 2019-08-14 11:38:25 -05:00
Rick Carlino bff47bef86 Test deploy of first_party_farmware resource. CC: @connorRigby 2019-08-14 11:37:44 -05:00
Rick Carlino 8726284b46 WIP- add delete button to detail view 2019-08-14 10:55:49 -05:00
Rick Carlino 8d7f781be6 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into groups_frontend 2019-08-14 09:45:42 -05:00
Rick Carlino 0026ccc5a3
Merge pull request #1367 from RickCarlino/connectivity_panel
Connectivity Panel Updates
2019-08-14 09:34:14 -05:00
Rick Carlino b8b7cc2a8b Merge branch 'connectivity_panel' of github.com:RickCarlino/farmbot-web-app into connectivity_panel 2019-08-14 08:43:30 -05:00
Rick Carlino 78c9dcc5b1 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into groups_frontend 2019-08-14 08:33:28 -05:00
Rick Carlino 2ce3ff2de0 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into connectivity_panel 2019-08-14 08:31:28 -05:00
Rick Carlino edea5884e2
Merge pull request #1366 from RickCarlino/fr_i18n
French i18n updates
2019-08-12 21:27:31 -05:00
Rick Carlino 4c083d56af
Merge pull request #37 from gabrielburnworth/fr_i18n
Include translation updates
2019-08-12 13:54:24 -05:00
gabrielburnworth b10ea6d2ec run language helper (fr) 2019-08-12 10:29:43 -07:00
PrincesseLulu 73e91fe570 Update fr.json 2019-08-12 10:27:35 -07:00
Rick Carlino fa7d200ab5
Merge pull request #36 from gabrielburnworth/fr_i18n
Update translation files
2019-08-12 11:55:52 -05:00
gabrielburnworth 95e688fd32 run language helper (fr) 2019-08-12 09:42:36 -07:00
Rick Carlino 1a74a1dc27 Fix linter warning. 2019-08-12 08:18:44 -05:00
Rick Carlino cec064f257 Updates to fr.json (Thanks, @PrincesseLulu) 2019-08-12 08:06:49 -05:00
Rick Carlino 51984ca38e Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-08-12 07:56:14 -05:00
Rick Carlino d18d74fe99
Merge pull request #1361 from gabrielburnworth/staging
Updates
2019-08-09 07:49:10 -05:00
gabrielburnworth d9aecb4563 run language helper (fr) 2019-08-08 21:13:11 -07:00
gabrielburnworth 2428e2f0d2 hopefully fix occasional ci issues 2019-08-08 21:13:03 -07:00
Rick Carlino 088b8d21dc Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into groups_frontend 2019-08-08 13:12:25 -05:00
Rick Carlino 8e78fa9baa Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into connectivity_panel 2019-08-08 13:09:22 -05:00
Rick Carlino c539423f0c Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-08-08 13:08:15 -05:00
Rick Carlino 18e95a781b
Merge pull request #1358 from PrincesseLulu/staging
Update frensh translation
2019-08-08 13:07:47 -05:00
Rick Carlino d72c511d7e Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-08-08 12:39:36 -05:00
Gabriel Burnworth 5d0d389f5c
Merge branch 'staging' into staging 2019-08-08 10:26:11 -07:00
Rick Carlino bdf583a099
Merge pull request #1357 from RickCarlino/connectivity_panel
Provide link to docs in connectivity panel
2019-08-08 09:14:12 -05:00
Rick Carlino 12985637b3
Merge branch 'master' into connectivity_panel 2019-08-08 09:13:56 -05:00
Rick Carlino 68578c1435
Merge pull request #35 from gabrielburnworth/master
connectivity doc link improvements
2019-08-08 08:32:51 -05:00
gabrielburnworth ea030fdf8e connectivity doc link improvements 2019-08-07 15:03:31 -07:00
PrincesseLulu 1e8db8fe15
Update fr.json move already translated 2019-08-07 23:52:16 +02:00
PrincesseLulu 7590a5e4cb
Update fr.json translation 2019-08-07 23:45:11 +02:00
Rick Carlino d3bb7f1a03 Merge branch 'master' of https://git.heroku.com/farmbot-production into connectivity_panel 2019-08-07 16:20:38 -05:00
Rick Carlino 944fbe6076 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into connectivity_panel 2019-08-07 16:15:09 -05:00
Rick Carlino 7be8a39f47 Provide link to docs in connectivity panel 2019-08-07 16:13:50 -05:00
Rick Carlino 2ac05141c2 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into groups_frontend 2019-08-07 15:48:59 -05:00
Rick Carlino c6a1c38589 WIP, Stable-ish. NEXT: Add delete button, ability to click points of a group 2019-08-07 15:48:53 -05:00
Rick Carlino 359ff2efa8 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2019-08-07 13:02:37 -05:00
Rick Carlino adc1c4c5dc
Merge pull request #1356 from FarmBot/logs_search
(HOTFIX) Ability to search a subset of log fields on Logs#search. Fixes #1354
2019-08-07 10:34:35 -05:00
Rick Carlino 995ad3d23c Better handling of floats 2019-08-07 10:16:57 -05:00
Rick Carlino 7540488698 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into logs_search 2019-08-07 09:37:00 -05:00
Rick Carlino 4c44a3c9e2
Merge branch 'master' into logs_search 2019-08-07 08:22:49 -05:00
Rick Carlino 0a6bbb4bfb Ability to search a subset of log fields on Logs#search. Fixes #1354 2019-08-07 08:15:08 -05:00
Rick Carlino 5dbd9d6bd2 Stub out group detail view. 2019-08-06 15:58:00 -05:00
Rick Carlino bc02e91dbb [UNSTABLE] Redirect to group panel after creating group 2019-08-06 15:17:42 -05:00
Rick Carlino a020f6993d [UNSTABLE] Stub out groups panel 2019-08-06 15:00:58 -05:00
Rick Carlino 1c01f1d3ba Dep. upgrades 2019-08-06 08:38:36 -05:00
Rick Carlino 90ed3234e8
Merge pull request #1353 from RickCarlino/groups_frontend
Add PointGroup resource to FE
2019-08-06 08:24:56 -05:00
Rick Carlino 056b58da90 Add PointGroup resource to FE 2019-08-05 16:45:19 -05:00
Rick Carlino 76c2386c09
Merge pull request #1351 from RickCarlino/groups_backend
Groups (API only)
2019-08-05 16:32:32 -05:00
Rick Carlino 23744364e5 Done with backend implementation. NEXT: Frontend resource loading and FBJS interfaces. 2019-08-05 14:59:55 -05:00
Rick Carlino 65ada4efec PointGroupsController#index 2019-08-05 14:37:20 -05:00
Rick Carlino 9676a32459 Tests for PointGroup#create 2019-08-05 13:27:16 -05:00
Rick Carlino 99e192c8df Extract helpers into module. NEXT: PointGroups::Update 2019-08-05 10:51:49 -05:00
Rick Carlino 845a9a4251 Tests for invalid ID detection error messages 2019-08-05 10:43:51 -05:00
Rick Carlino 7b3efe1c72 Preload point_group_items in PointGroupSerializer 2019-08-05 10:38:20 -05:00
Rick Carlino 0669745c78 Specs for PointGroup#create. NEXT: Make sure PointGroupSerializer preloads stuff. 2019-08-05 10:02:32 -05:00
Rick Carlino 615e0e1f9c === BEGIN POINT GROUPS BACKEND IMPLEMENTATION === 2019-08-04 14:30:18 -05:00
Rick Carlino 9e28319d62
Merge pull request #1349 from RickCarlino/read_only_mode
Read only mode finishing touches. Fixes #1321
2019-08-04 11:26:52 -05:00
Rick Carlino 4daea04e45 Change CSS for read-only indicator 2019-08-01 22:04:37 -05:00
Rick Carlino 2010f6efbd Add DESTROY_RESOURCE_START action 2019-08-01 11:55:25 -05:00
Rick Carlino 90b65ab5c6
Merge pull request #1348 from RickCarlino/read_only_mode
Read only mode, part I
2019-08-01 11:50:02 -05:00
Rick Carlino 2ca039b7f1 Part I of read-only stuff complete. 2019-08-01 11:28:48 -05:00
Rick Carlino 8a704332cd Updates to crud-related tests. 2019-08-01 08:52:25 -05:00
Rick Carlino 404facb183 Tests for read_only_mode/* 2019-08-01 08:01:15 -05:00
Rick Carlino cc172bf585 Test for appIsReadonly 2019-07-31 14:40:42 -05:00
Rick Carlino 208a467369 Move `beforeEach` into reducer_support.ts. NEXT: Testing 2019-07-31 11:54:56 -05:00
Rick Carlino ed99ba815c Stable enough to use, needs QA, tests, edge case implementation. NEXT: Implement DELETE_RESOURCE_START action 2019-07-31 11:25:27 -05:00
Rick Carlino fbe76c06fc First draft of read-only mode. NEXT: Ability to exit read-only mode, Warn about failed HTTP requests. 2019-07-31 10:27:09 -05:00
Rick Carlino ff85f5c533 Added beforeEach filter. NEXT: Add it to ResourceReducer 2019-07-31 08:50:43 -05:00
Rick Carlino 5c068ad158 Rework afterEach callbacks of generateReducer. NEXT: add `beforeFilter`. 2019-07-30 16:30:07 -05:00
Rick Carlino 0b956f28d9 Move readonly helper files into their own dir 2019-07-30 14:47:32 -05:00
Rick Carlino 400508e507 Interceptor idea works 2019-07-30 13:12:55 -05:00
Rick Carlino 0799254263 Merge branch 'staging' into read_only_mode 2019-07-30 11:47:44 -05:00
Rick Carlino b4ca4f89ca
Merge pull request #1346 from FarmBot/staging
v8.0.2 - Iridescent Iris
2019-07-30 11:40:15 -05:00
Rick Carlino 7aaef7f93e WIP - read only mode 2019-07-30 07:56:04 -05:00
Rick Carlino 51fde417ae
Merge pull request #1344 from gabrielburnworth/staging
misc updates
2019-07-29 13:56:23 -05:00
gabrielburnworth cbc165c53b update security 2019-07-29 10:54:07 -07:00
gabrielburnworth a9ba45419a minor css fix 2019-07-29 10:52:18 -07:00
gabrielburnworth 52ac3dfe98 update translation metrics 2019-07-29 10:51:58 -07:00
Rick Carlino 05a744df55 Dead code removal, test fixes 2019-07-29 10:46:43 -05:00
Rick Carlino 6249ea8b0a Add readonly mode to backend, stub out UI for toggles. 2019-07-29 10:33:20 -05:00
Rick Carlino 6ceb9b563f
Merge pull request #1343 from RickCarlino/dep_upgrades
Routine dep upgrades
2019-07-29 08:43:28 -05:00
Rick Carlino ad3f60acc7 Routine dep upgrades 2019-07-28 18:02:24 -05:00
Rick Carlino f8876b51b5
Merge pull request #1342 from RickCarlino/pg_cleanup_chores
Limit WAIT node time limit to 3 minutes
2019-07-28 17:46:28 -05:00
Rick Carlino 1eaed7fc4b
Merge branch 'staging' into pg_cleanup_chores 2019-07-28 17:21:52 -05:00
Rick Carlino 075960677b Limit WAIT node time limit to 3 minutes 2019-07-28 16:32:47 -05:00
Rick Carlino e960700f91
Merge pull request #1341 from RickCarlino/pg_cleanup_chores
Better error message for PG::ProgramLimitExceeded.
2019-07-28 15:57:59 -05:00
Rick Carlino e4c32af1db Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into pg_cleanup_chores 2019-07-28 15:40:47 -05:00
Rick Carlino 55bb23836b Better error messages for PG::ProgramLimitExceeded 2019-07-28 15:39:40 -05:00
Rick Carlino 0de97946f8
Merge pull request #1331 from FarmBot/add-security-md
Add SECURITY.md
2019-07-28 14:11:51 -05:00
Rick Carlino 2f3e03572a
Merge branch 'staging' into add-security-md 2019-07-28 13:53:41 -05:00
Rick Carlino 6c427bdd5b
Merge pull request #1340 from lepetitcodeur/spanish-translation
finish Spanish translations and correct strings for consistency
2019-07-28 12:29:47 -05:00
Karey Higuera 72730239bb finish Spanish translations and correct strings for consistency 2019-07-27 14:53:30 -05:00
Rick Carlino e731548137
Merge pull request #1339 from RickCarlino/active_storage_part_5
Changes to GCS, Rate Limiter.
2019-07-26 16:40:05 -05:00
Rick Carlino ffb395c1cf Update specs to match recent changes to GCS / RMQ Util 2019-07-26 14:52:32 -05:00
Rick Carlino d0cc254884 Update URL generator heuristic 2019-07-26 14:34:29 -05:00
Rick Carlino d0b19695a9
Merge branch 'staging' into add-security-md 2019-07-26 11:37:40 -05:00
Rick Carlino 7d4ea8104f
Merge pull request #1338 from RickCarlino/paperclip_removal_ii
First Draft of Paperclip => ActiveStorage transition.
2019-07-26 11:17:40 -05:00
Rick Carlino 8d30b3c9e7 Add storage.yml (again?) 2019-07-26 10:58:16 -05:00
Rick Carlino 553b89217c
Merge branch 'staging' into add-security-md 2019-07-26 10:39:35 -05:00
Rick Carlino 296039af08 Merge branch 'paperclip_removal_ii' of github.com:RickCarlino/farmbot-web-app into paperclip_removal_ii 2019-07-26 08:58:58 -05:00
Rick Carlino 3efb85ec92 Tests for regular_url 2019-07-26 08:49:53 -05:00
Rick Carlino 9535fd46b3 Typos 2019-07-26 08:29:28 -05:00
Rick Carlino 3440f0b7e2 Temporary URL generation workaround 2019-07-25 17:58:05 -05:00
Rick Carlino 2e1e4a1ccc Add storage.yml to version control (Uses ENV vars) 2019-07-25 13:28:17 -05:00
Rick Carlino fa93b9c09f Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into paperclip_removal_ii 2019-07-25 13:15:45 -05:00
Rick Carlino 54b64990a1
Merge branch 'staging' into paperclip_removal_ii 2019-07-25 13:14:57 -05:00
Rick Carlino 864885f925 Add tests 2019-07-25 13:10:06 -05:00
Rick Carlino c986db4eef
Merge pull request #1327 from gabrielburnworth/staging
Dependency upgrades
2019-07-24 16:46:25 -05:00
Rick Carlino 24aad50159 Works, needs refactoring 2019-07-24 12:18:07 -05:00
Rory Aronson 996be8154e
Add SECURITY.md 2019-07-23 20:28:01 -07:00
gabrielburnworth e4a664491f dep updates 2019-07-23 13:57:55 -07:00
gabrielburnworth 955729a465 misc fixes 2019-07-23 13:57:43 -07:00
Rick Carlino 5b9026def8 Rename GCS_KEYFILE => GOOGLE_CLOUD_KEYFILE_JSON 2019-07-23 15:07:37 -05:00
Rick Carlino bdf473bb25 GCS Works. NEXT: Get rid of policy object "interop" keys. 2019-07-22 17:24:40 -05:00
Rick Carlino bc639e7aeb [UNSTABLE] Local file storage works. NEXT: GCS 2019-07-22 14:11:31 -05:00
Rick Carlino e8ebaf4ed8 [UNSTABLE] Local file storage works. NEXT: GCS 2019-07-22 14:09:40 -05:00
Rick Carlino 79bd373260 [UNSTABLE] Begin ActiveStorage installation again 2019-07-22 11:05:19 -05:00
Rick Carlino 40ca866bab
Merge pull request #1297 from RickCarlino/paperclip_removal_ii
[DRAFT] Begin incremental removal of `Paperclip`.
2019-07-22 10:28:58 -05:00
Rick Carlino 27abd0f1cf Remove unused gems, Paperclip URL helpers. 2019-07-20 16:33:05 -05:00
Rick Carlino 1741fb71c7
Merge pull request #1296 from FarmBot/staging
v8.0.1 - Iridescent Iris
2019-07-20 16:25:58 -05:00
Rick Carlino d386dec1c2 Lower throttle window from 10 minutes to 5 minutes. 2019-07-20 13:59:47 -05:00
Rick Carlino 14de8bacce
Merge pull request #1295 from RickCarlino/sequence_bugs
Fix auto_sync regresion in SequencesController.
2019-07-20 13:34:20 -05:00
Rick Carlino 03730e3534 Fix #1294 (sequence auto_sync bug) 2019-07-19 17:09:03 -05:00
Rick Carlino f8e46e861f Formatting. 2019-07-19 16:50:06 -05:00
Rick Carlino d2eb75c68b
Merge pull request #1286 from RickCarlino/preboot_changes
Remove preboot
2019-07-17 15:51:31 -05:00
Rick Carlino a01fb961d4 Preboot removal, part III 2019-07-17 15:22:50 -05:00
Rick Carlino 8bc3849e6c
Merge pull request #1285 from gabrielburnworth/staging
Prevent saving of empty Farm Events
2019-07-17 15:20:33 -05:00
gabrielburnworth dcdc1ae79f prevent saving of empty farm events 2019-07-17 12:38:26 -07:00
Rick Carlino 992b6f9e1c
Merge pull request #1284 from RickCarlino/wednesday
Fix #1283
2019-07-17 11:28:23 -05:00
Rick Carlino 0284d90b33 Force refresh `updated_at` of FarmEvent,Regimen. Fixes #1283 2019-07-17 11:10:12 -05:00
Rick Carlino 01eac40dd6 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-07-17 10:38:47 -05:00
Rick Carlino 22aaac23a2
Merge pull request #1282 from gabrielburnworth/staging
Update FBOS details
2019-07-16 15:40:08 -05:00
Rick Carlino f4b90eaea5
Merge pull request #1281 from FarmBot/staging
v8.0.0
2019-07-16 15:38:24 -05:00
Rick Carlino 6d9f18b708
Merge branch 'master' into staging 2019-07-16 14:11:06 -05:00
gabrielburnworth 1fb8048ba4 update fbos details 2019-07-16 12:07:29 -07:00
Rick Carlino 522faac3f1
Merge pull request #1280 from RickCarlino/wednesday
Log sanitizer updates. Fixes #1279
2019-07-16 10:32:17 -05:00
Rick Carlino 2a8629d45b
Merge branch 'staging' into wednesday 2019-07-16 09:19:19 -05:00
Rick Carlino 3de2a3fdad
Merge pull request #1277 from gabrielburnworth/staging
Simplify board type dropdown component
2019-07-16 09:19:08 -05:00
Rick Carlino 5351f0c48f
Merge branch 'staging' into staging 2019-07-16 08:40:31 -05:00
Rick Carlino 67101f93b3
Merge branch 'staging' into wednesday 2019-07-16 08:39:56 -05:00
Rick Carlino 3f275a767d
Merge pull request #1278 from gabrielburnworth/toast_colors
Fix toast colors
2019-07-16 08:39:04 -05:00
Rick Carlino 43c4729441 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into wednesday 2019-07-16 08:37:23 -05:00
Rick Carlino 90b9fbd2d3 Downgrade exception to "return false;" in log sanitizer 2019-07-16 08:37:09 -05:00
Rick Carlino 45090a0575
Merge branch 'staging' into toast_colors 2019-07-16 08:03:17 -05:00
Rick Carlino 4128d99afc
Merge branch 'staging' into staging 2019-07-16 08:01:14 -05:00
Rick Carlino 59d7df8566
Merge pull request #1275 from RickCarlino/tuesday
Throttle MQTT emails to 1/day max. Closes #1273.
2019-07-16 08:01:02 -05:00
gabrielburnworth 7a7d24c17f fix toast colors 2019-07-15 17:37:27 -07:00
gabrielburnworth 676f83f05c simplify board type dropdown component 2019-07-15 16:22:37 -07:00
Rick Carlino 9fafc6ba6b
Merge branch 'staging' into tuesday 2019-07-15 17:23:12 -05:00
Rick Carlino e902f9bb9e Improve tests for Device.connection_warning 2019-07-15 17:20:07 -05:00
Rick Carlino 42430c569b
Merge pull request #1274 from RickCarlino/monday
FE-side `Alert` creation.
2019-07-15 17:10:02 -05:00
Rick Carlino 3252e8cc7e Don't send MQTT throttle emails more than once per day. 2019-07-15 17:08:51 -05:00
Rick Carlino 7dd178e2d8 FBJS upgrade 2019-07-15 16:41:46 -05:00
Rick Carlino ebaa3c675d Done. Closes #1272 2019-07-15 16:23:06 -05:00
Rick Carlino e2b5690471 Add tests 2019-07-15 16:15:53 -05:00
Rick Carlino 5477adca07 add `none` to the list of option on `firmware_missing` card. 2019-07-15 15:32:42 -05:00
Rick Carlino e0e1198a7e Done, needs tests 2019-07-15 15:22:41 -05:00
Rick Carlino 6fef439d20 [STABLE][TEST-ME] Draft I 2019-07-15 14:44:40 -05:00
Rick Carlino 51d8f0e0ca
Merge pull request #1271 from RickCarlino/monday
Parcel Updates
2019-07-14 20:23:47 -05:00
Rick Carlino a5955364dd Add @babel/core (parcel v7 stuff) 2019-07-14 18:53:22 -05:00
Rick Carlino 04daa7df00 Bundler upgrades 2019-07-14 18:23:03 -05:00
Rick Carlino 1421e10fba
Merge pull request #1270 from RickCarlino/fri
Updates to demo accounts, configs, docker
2019-07-14 17:16:21 -05:00
Rick Carlino a1192763b4 Merge branch 'remove_bot_alerts_from_fe' of github.com:RickCarlino/farmbot-web-app into fri 2019-07-14 17:01:20 -05:00
Rick Carlino 23119d4c12 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into fri 2019-07-13 13:10:24 -05:00
Rick Carlino ff957f9ecb
Merge pull request #1269 from gabrielburnworth/fix_apt_ci_issue
Fix apt ci issue
2019-07-13 12:54:33 -05:00
Gabriel Burnworth fde2f11a93
ensure specified version of node is installed 2019-07-12 18:09:11 -07:00
gabrielburnworth 8b2cef8727 fix apt ci issue 2019-07-12 16:57:12 -07:00
Rick Carlino 4397195e79 Merge branch 'remove_bot_alerts_from_fe' into fri 2019-07-12 16:23:50 -05:00
Rick Carlino c12c2214e2
Merge pull request #34 from gabrielburnworth/remove_bot_alerts_from_fe
remove bot alerts from FE
2019-07-12 15:55:14 -05:00
gabrielburnworth f746dc80eb post-FBJS update cleanup 2019-07-12 13:50:32 -07:00
gabrielburnworth 8e6fc08a10 remove bot alerts from FE 2019-07-12 13:39:40 -07:00
Rick Carlino 288456c416 Updates to demo seeder 2019-07-12 15:10:25 -05:00
Rick Carlino 83b7955e28 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into fri 2019-07-12 14:32:18 -05:00
Rick Carlino 2c8e177095 [UNSTABLE] Dep upgrades + interface updates 2019-07-12 14:30:10 -05:00
Rick Carlino 67e2937da8 Test deploy; please ignore. 2019-07-12 10:16:47 -05:00
Rick Carlino 89d8120d7e Update tests 2019-07-12 09:06:58 -05:00
Rick Carlino faa4888dec Upgrade FBJS, add "none" firmware option 2019-07-12 08:42:34 -05:00
Rick Carlino 8b2eedf695
Merge pull request #1266 from RickCarlino/thurs
Debounce auto_sync messages for FarmEvents, Regimens.
2019-07-12 07:55:50 -05:00
Rick Carlino 8f99ec3d1f Debounce regimen / farm_event auto sync messages ✔️ 2019-07-11 18:17:27 -05:00
Rick Carlino 638b27a9cd
Merge pull request #1264 from FarmBot/staging
v7.3.4 - Happy Hibiscus
2019-07-11 17:15:30 -05:00
Rick Carlino fd6ca38a50 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into wed 2019-07-11 16:33:19 -05:00
Rick Carlino 84d03130af
Merge pull request #1265 from gabrielburnworth/staging
Dependency upgrades
2019-07-11 16:22:34 -05:00
gabrielburnworth bbc2b24ea7 FBOS beta tag name fetch fix 2019-07-10 15:45:58 -07:00
gabrielburnworth 3976d0767c add confirm sequence deletion setting 2019-07-10 15:45:30 -07:00
gabrielburnworth bfe143a122 dep updates (FE) 2019-07-10 15:44:32 -07:00
Rick Carlino b38dbb715a Fix Regimen#update again 2019-07-10 17:07:09 -05:00
Rick Carlino aafcba433a Fix Regimen#update 2019-07-10 16:49:16 -05:00
Rick Carlino a0096263b6 Add call to manually_sync!() in FarmEvents::Create 2019-07-10 16:36:06 -05:00
Rick Carlino 0a2584542d IDEA / NEEDS QA: Add "silent" mode for auto_sync 2019-07-10 16:15:24 -05:00
Rick Carlino ef7b19d625
Merge pull request #1263 from RickCarlino/wed
RmqUtilController, Gemfile updates
2019-07-10 15:50:28 -05:00
Rick Carlino 2a4a0678b3 Error message typo 2019-07-10 15:14:24 -05:00
Rick Carlino 04691ce944 Tests for rate limiter and supporting methods 2019-07-10 15:10:08 -05:00
Rick Carlino ef25b66a28 Track rate limit cache _after_ authn 2019-07-10 14:28:21 -05:00
Rick Carlino 6bb7209f89 🚑 2019-07-10 13:52:35 -05:00
Rick Carlino 94c8766066 Third draft: Connection limiter 2019-07-10 13:12:48 -05:00
Rick Carlino 5143e74ddd Second draft: Connection limiter 2019-07-10 12:57:31 -05:00
Rick Carlino f98907c6b7 First draft: Connection limiter 2019-07-10 12:17:47 -05:00
Rick Carlino 5c56fa75a9 Test deploy to debug log service on staging 2019-07-10 10:39:35 -05:00
Rick Carlino a63db132aa Merge conflict resolution 2019-07-10 07:44:42 -05:00
Rick Carlino b7f09e51e8
Mark as dependency tracking (#1262)
* Set resource_id to device.id instead of 0 (less surprising to users)
* Changes to Device.current, tests for `resource_update` dep tracking
* Re-enable demos
2019-07-09 20:40:31 -05:00
Rick Carlino 499e0a1a69 Remove before_action 2019-07-09 10:31:39 -05:00
Rick Carlino 6437435853 :ambulence: 2019-07-09 10:20:21 -05:00
Rick Carlino 9424b5338a Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-07-09 10:18:27 -05:00
Rick Carlino 9b54c72896
Merge pull request #1261 from RickCarlino/staging
Guest account seed update: fbos_version
2019-07-07 17:55:19 -05:00
Rick Carlino 3326cb7f38 Set resource_id to device.id instead of 0 (less surprising to users) 2019-07-07 17:32:18 -05:00
Rick Carlino fba943ef0d Guest account seed update: fbos_version 2019-07-07 17:10:36 -05:00
Rick Carlino ad9d135f2e
Merge pull request #1260 from RickCarlino/hotfix_july_4
Updates to Demo Page (Needs Tests)
2019-07-07 16:35:44 -05:00
Rick Carlino 086bc56881 Tests for new mqttConnect() member fn 2019-07-07 15:40:54 -05:00
Rick Carlino 110dd2c060 Fix most tests. TODO: Fix the rest 2019-07-06 23:32:37 -05:00
Rick Carlino 1f545b4fa3 Always discard changes on guest accounts 2019-07-05 23:52:43 -05:00
Rick Carlino 2100cb996f Re-enable sequence variable seeds 2019-07-05 23:19:19 -05:00
Rick Carlino 87ac1089ed Fix Redis namespacing of CS Fragments, part II 2019-07-05 11:51:03 -05:00
Rick Carlino 0a8dd40570 Fix Redis namespacing of CS Fragments 2019-07-05 11:27:43 -05:00
Rick Carlino ccb9e37521 Better verbiage 2019-07-04 16:01:04 -05:00
Rick Carlino 8c1a13804a Add performance to demo page 2019-07-04 15:49:51 -05:00
Rick Carlino ed26a3ecb9 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into hotfix_july_4 2019-07-04 15:17:39 -05:00
Rick Carlino 62235851b9 UNSTABLE: Disable guest accounts 2019-07-04 15:16:14 -05:00
Rick Carlino 6f6b21e473
Merge pull request #1259 from RickCarlino/nerveshub_hotfix
Nerveshub hotfix
2019-07-03 11:51:39 -05:00
Rick Carlino ea858461e6 Update tests 2019-07-03 11:29:09 -05:00
Rick Carlino ea29ad877b Remove return statement after report_problem 2019-07-03 10:30:24 -05:00
Rick Carlino 81de8952d7 Staging diagnostics 2019-07-03 08:59:12 -05:00
Rick Carlino 10582e9e55
Merge pull request #1258 from FarmBot/staging
v7.3.3 - Happy Hibiscus
2019-07-02 18:32:25 -05:00
Rick Carlino 557b767147
Merge pull request #1257 from gabrielburnworth/staging
Internationalization improvements
2019-07-02 13:21:54 -05:00
gabrielburnworth b2faafe764 add low cpu/ram test run option 2019-07-02 10:05:05 -07:00
gabrielburnworth 2576a3b60b improve internationalization 2019-07-02 10:03:16 -07:00
Rick Carlino b68bedbffd
Merge pull request #1255 from gabrielburnworth/staging
Upkeep
2019-07-01 16:37:36 -05:00
gabrielburnworth bec7cc208f interface cleanup 2019-07-01 09:54:59 -07:00
gabrielburnworth 83c06b8dad dep updates 2019-07-01 09:32:15 -07:00
gabrielburnworth feba32807c change default map zoom level 2019-07-01 09:26:01 -07:00
Rick Carlino 34baac5287
Merge pull request #1254 from gabrielburnworth/staging
minor cleanup
2019-06-29 17:00:27 -05:00
gabrielburnworth 9e186b1152 minor cleanup 2019-06-28 12:05:37 -07:00
gabrielburnworth db203a444a regimen variable labels 2019-06-28 12:05:19 -07:00
Rick Carlino 46d7413610
Merge pull request #1253 from RickCarlino/wed
Cleanup carriage returns in  toast messages + more tests.
2019-06-27 10:45:35 -05:00
Rick Carlino 09885cd513
Merge branch 'staging' into wed 2019-06-27 10:27:22 -05:00
Rick Carlino 0121088330 Clean up carriage returns 2019-06-27 10:25:42 -05:00
Rick Carlino cca51135fb Add tests, remove carriage returns. 2019-06-27 09:26:01 -05:00
Rick Carlino d1bd747837
Merge pull request #1252 from RickCarlino/wed
More Toast Updates
2019-06-26 17:40:03 -05:00
Rick Carlino dea4db156b Tests for most of FBToast class 2019-06-26 16:35:39 -05:00
Rick Carlino 08fa7e0344 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into wed 2019-06-26 15:47:40 -05:00
Rick Carlino a7363ae0f7 FBToast tests: constructor and onEnter hooks 2019-06-26 15:47:26 -05:00
Rick Carlino 60efb36eb5
Merge pull request #1251 from gabrielburnworth/staging
test improvements
2019-06-26 15:46:54 -05:00
Rick Carlino 74ee415069 Factor toast into class 2019-06-26 15:12:16 -05:00
gabrielburnworth 624f12aef3 update coverage task 2019-06-26 12:36:34 -07:00
gabrielburnworth 6220f31c5f add PinMode test 2019-06-26 12:34:43 -07:00
Rick Carlino 1157f26f22
Merge pull request #1250 from RickCarlino/wed
Routine Dep. Updates
2019-06-26 11:29:24 -05:00
Rick Carlino ace9839be7 Tests for toast.ts 2019-06-26 10:59:24 -05:00
Rick Carlino 96b8b2823d Add verbose flag to JS tests 2019-06-26 09:02:20 -05:00
Rick Carlino 82eb99636a Update gemfile 2019-06-26 08:47:49 -05:00
Rick Carlino 00b73be37d
Merge pull request #1249 from RickCarlino/tuesday
Updates, Part II
2019-06-25 16:43:30 -05:00
Rick Carlino 33da0b6418 Done. 2019-06-25 16:26:02 -05:00
Rick Carlino df3f977e3f SQUASHME: Circleci test 4 2019-06-25 15:04:50 -05:00
Rick Carlino 8127fcf5db SQUASHME: Circleci test 3 2019-06-25 14:36:47 -05:00
Rick Carlino da2a3ef8f1 SQUASHME: Circleci test 2 2019-06-25 14:35:06 -05:00
Rick Carlino 153b7763ea SQUAHME: Circleci test 1 2019-06-25 13:39:05 -05:00
Rick Carlino bcccf7b768 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into monday 2019-06-25 09:44:51 -05:00
Rick Carlino 055cd41a57 Merge branch 'master' into monday 2019-06-25 09:44:45 -05:00
Rick Carlino b509811bb1 Remove skylight 2019-06-25 09:20:26 -05:00
Rick Carlino 1941b76726
Merge pull request #1247 from RickCarlino/monday
Toastr updates, Part I
2019-06-25 08:50:37 -05:00
Rick Carlino 294de3bae5 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into monday 2019-06-24 16:47:20 -05:00
Rick Carlino da700f3fef Make toast lib monolithic 2019-06-24 16:39:49 -05:00
Rick Carlino 1485d1c136
Merge pull request #1246 from RickCarlino/monday
Improve vergbiage when `default_value` is missing.
2019-06-24 15:55:13 -05:00
Rick Carlino a656457de7
Merge branch 'staging' into monday 2019-06-24 15:13:05 -05:00
Rick Carlino adbccf06ee Add MISSING_PARAM const 2019-06-24 15:06:14 -05:00
Rick Carlino 6b8b45bf6b TODO: `default_value` issues. 2019-06-24 14:48:34 -05:00
Rick Carlino aada221c48
Merge pull request #1245 from RickCarlino/monday
FBJS Update, New default path for newly registered users.
2019-06-24 13:35:55 -05:00
Rick Carlino adda53433b Install farmbot@8.0.1-rc8 2019-06-24 12:11:53 -05:00
Rick Carlino 8c9d97d14a Change default page for newly activated accounts 2019-06-24 11:36:08 -05:00
Rick Carlino 9dfce8b9e9 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into friendly_cs 2019-06-24 11:10:19 -05:00
Rick Carlino 68327621d1
Merge pull request #1242 from gabrielburnworth/staging
Misc updates
2019-06-24 10:59:01 -05:00
gabrielburnworth 2049e44dd3 update dep 2019-06-24 08:39:59 -07:00
Rick Carlino dbf60ab045
Merge branch 'staging' into staging 2019-06-23 13:50:37 -05:00
Rick Carlino 1bd09e88cb
Merge pull request #1243 from RickCarlino/circle
22 June Updates
2019-06-23 13:50:22 -05:00
Rick Carlino fe0828573b Change order of ubuntu_example.sh 2019-06-22 16:59:32 -05:00
Rick Carlino c37f1de8ba Test commit; Please ignore. 2019-06-22 15:19:36 -05:00
Gabriel Burnworth e7be43bca2
add test 2019-06-21 15:06:32 -07:00
gabrielburnworth 064ca3ef32 dep updates 2019-06-21 14:49:10 -07:00
gabrielburnworth 38ddb3db6c add default value to dropdown 2019-06-21 14:49:10 -07:00
gabrielburnworth 4c552a1a7e add pin number dropdown 2019-06-21 14:49:09 -07:00
gabrielburnworth 97fbdd46d4 discard unsaved sequence changes option 2019-06-21 14:48:59 -07:00
gabrielburnworth 6d31ee5018 misc updates 2019-06-21 14:43:46 -07:00
Rick Carlino b6dc92075f Merge branch 'staging' into friendly_cs 2019-06-21 16:00:24 -05:00
Rick Carlino 3828c2eadc Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into friendly_cs 2019-06-21 16:00:10 -05:00
Rick Carlino 3d2c8aaae4 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App into staging 2019-06-21 15:58:01 -05:00
Rick Carlino 44c85ed9d4
Merge pull request #1241 from FarmBot/nerves-hub-updates
Update NervesHub `devices` endpoint
2019-06-21 15:46:35 -05:00
Rick Carlino 40bb06a0d6 Update seeds.rb 2019-06-21 15:33:16 -05:00
Rick Carlino 161dc72dc7 CSS Updates 2019-06-21 14:52:52 -05:00
Rick Carlino 8f9358ad1c Update null value error message for celery script 2019-06-21 11:35:22 -05:00
Connor Rigby 098a4f93bd
Update NervesHub `devices` endpoint
* This addresses the upcoming change to the NervesHub API
  * https://github.com/nerves-hub/nerves_hub_web/pull/499
* Update nerves_hub tests
2019-06-21 09:25:55 -07:00
Rick Carlino 637b6a9a9d
Merge pull request #1240 from RickCarlino/guest_accounts
Upgrades
2019-06-21 10:57:34 -05:00
Rick Carlino 3a7eb6a7ab Remove deprecated `Buffer` usage. 2019-06-21 09:53:32 -05:00
Rick Carlino 059b4c61f0 Account for differences between VSCode jest and regular jest (opps!) 2019-06-21 08:23:36 -05:00
Rick Carlino 1f886db4ee Tests, part I 2019-06-21 08:09:14 -05:00
Rick Carlino 644d1455f8 Add `object-fit` property 2019-06-19 20:06:23 -05:00
Rick Carlino 1e2d8477a7 Add callbacks back 2019-06-19 17:27:43 -05:00
Rick Carlino 5ec5d7f05b Add responsive CSS and probably not crash staging. 2019-06-19 17:10:38 -05:00
Rick Carlino a97402881b Use Express for demo accounts instead of Express XL 2019-06-19 16:18:08 -05:00
Rick Carlino 73cd2124f2 Use whitelist for config.x_frame_options 2019-06-19 14:08:05 -05:00
Rick Carlino 96ecddf32e Experimental x_frame_options 2019-06-19 13:32:47 -05:00
Rick Carlino bb3d7fa81e Disable config.x_frame_options 2019-06-19 12:45:46 -05:00
Rick Carlino 334f8edf18 Remove useless iframe config option 2019-06-19 10:30:06 -05:00
Rick Carlino 088f597b09 Still debugging x-frame-options :thinking_face: 2019-06-18 17:20:31 -05:00
Rick Carlino b3bba663c7 Fix: Prop names, autoplay typo, iframe issue. 2019-06-18 16:04:42 -05:00
Rick Carlino df7c8d4c8d Add rake task for clean + real CSS / layout 2019-06-18 15:55:35 -05:00
Rick Carlino 5553adb79f Add marketing message 2019-06-18 14:55:48 -05:00
Rick Carlino b210f7deaa Don't show the "Welcome to the FarmBot Web App" or "Choose your FarmBot" message center cards 2019-06-18 14:02:13 -05:00
Rick Carlino c703d912ea PART II: Reduce use of "guest" in favor of "demo" 2019-06-18 13:08:18 -05:00
Rick Carlino 8083f1de9d Reduce use of "guest" in favor of "demo" 2019-06-18 12:57:55 -05:00
Rick Carlino 4b0c65b88b Update Rack::Attack 2019-06-18 12:28:01 -05:00
Rick Carlino e38153567a Add webcam feeds to seeding options 2019-06-18 09:41:35 -05:00
Rick Carlino 19e02ad9af Dependency updates 2019-06-18 08:32:24 -05:00
Rick Carlino 3463154a9b Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into guest_accounts 2019-06-18 08:17:20 -05:00
Rick Carlino 9a7e11e060
Merge pull request #1239 from gabrielburnworth/staging
Misc updates
2019-06-18 08:14:31 -05:00
Gabriel Burnworth 5c99dfd1e1
fix alerts test 2019-06-17 20:23:25 -07:00
gabrielburnworth ddfa308405 message card updates 2019-06-17 18:44:20 -07:00
gabrielburnworth 9a35a52c2b peripheral form updates 2019-06-17 18:43:44 -07:00
Rick Carlino 592f6b6a1f Tests for Transport#send_guest_token_to 2019-06-17 18:26:04 -05:00
Rick Carlino cdedafcf48 Fix FakeTransport bug; NEXT: Tests for Transport#send_guest_token_to 2019-06-17 18:08:02 -05:00
Rick Carlino 808b1b71f3 Tests for Api::GuestAccountsController complete; tracking down bug in FakeTransport 2019-06-17 17:05:17 -05:00
Rick Carlino 95f9b6a9ef UNSTABLE: Begin testing of Api::GuestAccountsController 2019-06-17 15:46:19 -05:00
Rick Carlino 105d792d0d Tests for FARMBOT_GUEST_USER auth 2019-06-17 11:51:47 -05:00
Rick Carlino 5cacc3c205 Add fuzz tests for guest account endpoint 2019-06-17 11:33:34 -05:00
Rick Carlino 8fbfc8290e /guest endpoint works. NEEDS: CSS, tests, edge/error case handling, CSP 2019-06-16 15:59:32 -05:00
Rick Carlino 05f122cec8 Stub out GuestAccountsController 2019-06-16 13:10:25 -05:00
Rick Carlino da973c23f4 Allow guest subscriptions. 2019-06-15 16:35:27 -05:00
Rick Carlino b9607c09c8 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into guest_accounts 2019-06-15 14:29:08 -05:00
Rick Carlino fd57e05074
Merge pull request #1238 from RickCarlino/fbjs_configs
FBJS-related config updates
2019-06-15 14:26:45 -05:00
Rick Carlino b0f5473616 FBJS-related config updates 2019-06-15 09:02:34 -05:00
Rick Carlino 68b5f2df3c
Merge pull request #1237 from gabrielburnworth/staging
Misc cleanup
2019-06-15 08:05:03 -05:00
gabrielburnworth cb261fe92e add confirm plant deletion option 2019-06-14 16:01:04 -07:00
gabrielburnworth 7ae67e078c misc cleanup 2019-06-14 15:59:46 -07:00
Rick Carlino 52f74fb044
Merge pull request #1236 from RickCarlino/hotfix
Minor Hotfix
2019-06-14 15:29:42 -05:00
Rick Carlino ceb9a90b74 Fix one last Redis key template 2019-06-14 14:52:37 -05:00
Rick Carlino 28fa9d0b90 Upgrade FBJS (adds RMQ config recomendations) 2019-06-14 14:42:22 -05:00
Rick Carlino fe74c4648b Use Redis namespaces for caching stuff. 2019-06-14 14:23:25 -05:00
Rick Carlino c4aad56bdf WIP, TODO: Handle farmbot_guest auth issues 2019-06-14 14:20:26 -05:00
Rick Carlino 1f10a5930c Stub out state transitions. 2019-06-13 19:57:49 -05:00
Rick Carlino 42d4fcba16 Stub out a /demo endpoint 2019-06-13 19:14:27 -05:00
Rick Carlino 48dd82be6f
Merge pull request #1235 from RickCarlino/human_friendly_cs_errors
Improve readability of `write_pin` celery script invalidation
2019-06-13 18:43:38 -05:00
Rick Carlino ee86966eba Remove old draft GuestUser stuff. Too much has changed since that time. 2019-06-13 14:24:27 -05:00
Rick Carlino cc7402f9d6 Friendlier write_pin errors for CeleryScript(TM) invalidation. 2019-06-13 14:02:31 -05:00
Rick Carlino 0346fe9adb
Merge pull request #1234 from gabrielburnworth/staging
read sensor button cleanup
2019-06-13 09:56:18 -05:00
gabrielburnworth 19b80b75d2 read sensor button cleanup 2019-06-12 15:16:32 -07:00
Rick Carlino fad236654f
Merge pull request #1232 from gabrielburnworth/staging
Dependency upgrades
2019-06-12 07:56:19 -05:00
gabrielburnworth 02fc8d337a Merge branch 'master' of https://github.com/FarmBot/Farmbot-Web-App into staging 2019-06-11 13:44:30 -07:00
gabrielburnworth 4f148cbf6d dep updates 2019-06-11 12:51:53 -07:00
Gabriel Burnworth b54bebcbee
fix auto-deprecate task 2019-06-11 12:42:58 -07:00
Rick Carlino fd43e9b101
Merge pull request #1228 from FarmBot/staging
v7.3.1 Released Candidate
2019-06-11 13:06:03 -05:00
Rick Carlino 91cd11a696
Merge pull request #1231 from RickCarlino/password_failure
RmqUtilsController + bundler updates
2019-06-11 12:28:22 -05:00
Rick Carlino a8b385dfa1 Bundler upgrades 2019-06-11 11:17:30 -05:00
Rick Carlino cf5f6f020f RmqUtilsController updates 2019-06-11 11:14:58 -05:00
Rick Carlino f3f39d6758
Merge pull request #1229 from RickCarlino/archival_scope_updates
Change default archival_scope on `PointsController`
2019-06-11 10:02:28 -05:00
Rick Carlino 7dd7aaef85
Merge branch 'staging' into archival_scope_updates 2019-06-11 09:42:42 -05:00
Rick Carlino 34957641e1
Merge pull request #1230 from gabrielburnworth/staging
Farm Designer settings menu
2019-06-11 09:42:29 -05:00
gabrielburnworth 9e8ae68da9 designer settings menu 2019-06-10 14:43:11 -07:00
Rick Carlino f16c4b4c39 Add tests for #index action also 2019-06-10 15:31:06 -05:00
Rick Carlino 701b416ced Add tests 2019-06-10 15:15:10 -05:00
Rick Carlino d67d3b2935 change default archival scope 2019-06-10 14:53:45 -05:00
Rick Carlino cba5646e23
Merge pull request #1227 from RickCarlino/sunday
FBJS upgrade, v8.0.0-rc5
2019-06-09 14:45:22 -05:00
Rick Carlino 45f5a506fb FBJS upgrade, v8.0.0-rc5 2019-06-09 13:11:15 -05:00
Rick Carlino 6e8ff217f6
Merge pull request #1226 from gabrielburnworth/staging
UI updates
2019-06-09 12:28:06 -05:00
gabrielburnworth 8c65f89313 gantry_mounted dropdown support 2019-06-07 17:26:55 -07:00
gabrielburnworth 98d11502dd add hide sensors option 2019-06-07 17:26:32 -07:00
gabrielburnworth 5719818f60 UI removals/reshuffles 2019-06-07 17:26:12 -07:00
Rick Carlino 46d706385e
Merge pull request #1225 from RickCarlino/friday
Hotfix
2019-06-07 13:24:58 -05:00
Rick Carlino 195bcb1991 Merge branch 'staging' of https://github.com/gabrielburnworth/Farmbot-Web-App into friday 2019-06-07 11:54:29 -05:00
Rick Carlino 669ac48355 Force manual sync when wrapping fragment/owner. 2019-06-07 11:48:43 -05:00
Rick Carlino 631964dff8 CC: @connorRigby 2019-06-07 11:29:27 -05:00
gabrielburnworth 76153f28e3 misc fixes and cleanup 2019-06-06 16:54:48 -07:00
Rick Carlino 68c3ac9308
Merge pull request #1223 from RickCarlino/friday
Bug fixes, deprecations
2019-06-06 14:48:32 -05:00
Rick Carlino 281f553448 Do the same for Regimen class. Fix soon-to-be-deprecated HashDif constant 2019-06-06 13:35:18 -05:00
Rick Carlino 844cbb9006 Redeploy, but still CC: @ConnorRigby 2019-06-06 13:13:55 -05:00
Rick Carlino 86c0abb162 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into friday 2019-06-06 13:01:16 -05:00
Rick Carlino d2b0a4c9b0 Possible fix to FarmEvent auto_sync bug. CC: @ConnorRigby 2019-06-06 13:00:55 -05:00
Rick Carlino 84dab82d38
Merge pull request #1222 from RickCarlino/friday
Use NPM version of FBJS instead of Github hosted version
2019-06-06 12:52:58 -05:00
Rick Carlino 02c4d4f01f Use NPM version of FBJS instead of Github hosted version 2019-06-06 11:54:02 -05:00
Rick Carlino f1a01e200a
Merge pull request #1221 from RickCarlino/revert_v8_heuristic
Revert FBOS v8 Version Detection Heuristic
2019-06-06 11:45:40 -05:00
Rick Carlino e791b7894b Refresh UI 5 minutes later instead of immediatly 2019-06-06 09:48:31 -05:00
Rick Carlino e00a12eb0d Dep upgrades 2019-06-06 09:38:02 -05:00
Rick Carlino ed58e43d27 Test release of new v8 detection heuristic (still has old heuristic, also CC: @connorRigby) 2019-06-05 19:06:42 -05:00
Rick Carlino ef555f1099 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into revert_v8_heuristic 2019-06-05 17:35:55 -05:00
Rick Carlino cf99730e22 Local Farmbot (Again) 2019-06-05 17:35:49 -05:00
Rick Carlino 986be94018
Merge pull request #1220 from gabrielburnworth/staging
Updates and cleanup
2019-06-05 17:35:38 -05:00
gabrielburnworth 088a74a867 add expand step option config 2019-06-05 13:49:24 -07:00
gabrielburnworth a8df6c8a3c update constants.ts 2019-06-05 13:48:55 -07:00
gabrielburnworth 901463ea11 sensor/peripheral code cleanup 2019-06-05 13:48:31 -07:00
gabrielburnworth fb48165d68 test output cleanup 2019-06-05 13:48:18 -07:00
Rick Carlino 23b0b9e3f8 Local Farmbot 2019-06-05 15:39:03 -05:00
Rick Carlino 0c90e09230
Merge pull request #1219 from gabrielburnworth/staging
Misc fixes and updates
2019-06-04 18:04:55 -05:00
gabrielburnworth c68e1ed8d5 dep updates 2019-06-04 15:08:46 -07:00
gabrielburnworth d73fd0765a dropdown label updates 2019-06-04 15:07:52 -07:00
gabrielburnworth feb7b07a6f misc fixes and updates 2019-06-04 15:07:24 -07:00
Rick Carlino 6f4e6b7af6
Merge pull request #1218 from RickCarlino/fbjs
FBJS Upgrade
2019-06-04 07:11:00 -05:00
Rick Carlino 948a228871
Merge pull request #33 from gabrielburnworth/fbjs
test fixes
2019-06-04 06:36:32 -05:00
gabrielburnworth 1f36ddd57e mock cachedCrop in all tests 2019-06-03 19:09:49 -07:00
gabrielburnworth 341eaa4ac7 add new firmware settings to test support 2019-06-03 19:09:33 -07:00
Rick Carlino 0e6c9e2a7c farmbot@8.0.1-rc3 upgrade 2019-06-03 19:32:09 -05:00
Rick Carlino d884e5db77 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-06-03 19:17:53 -05:00
Rick Carlino d48bf051d9
Merge pull request #1217 from gabrielburnworth/staging
add new firmware settings
2019-06-03 19:16:38 -05:00
gabrielburnworth 76fb80915b add new firmware settings 2019-06-03 16:41:59 -07:00
Rick Carlino 483675b2fe
Merge pull request #1216 from gabrielburnworth/staging
upgrade typescript
2019-06-03 14:12:09 -05:00
gabrielburnworth bc1aca5b0a upgrade typescript 2019-06-03 11:46:58 -07:00
Rick Carlino da4c5a6a8a Merge branch 'master' into staging 2019-05-31 09:45:17 -05:00
Rick Carlino 13b55255f8
Merge pull request #1215 from gabrielburnworth/staging
Translation helper updates
2019-05-30 14:25:57 -05:00
gabrielburnworth b89972ad76 translation helper updates 2019-05-30 11:38:53 -07:00
gabrielburnworth 7c99cf0ee7 dep updates 2019-05-30 11:10:15 -07:00
Rick Carlino a337509bc8
Merge pull request #1213 from dcriado/locale-es
Complete Spanish translation file
2019-05-30 10:15:29 -05:00
Rick Carlino 36d0f5d0b6
Merge branch 'staging' into locale-es 2019-05-29 17:24:04 -05:00
Rick Carlino a87629efff
Merge pull request #1214 from RickCarlino/wed
Resource Worker Updates
2019-05-29 17:23:49 -05:00
Rick Carlino 7539f1cb91 [STABLE] Fix failing tests 2019-05-29 16:55:09 -05:00
Rick Carlino 4b8739c18e UNSTABLE: Factor down service runners. 2019-05-29 15:48:58 -05:00
Rick Carlino b2a06ffa29
Merge branch 'staging' into locale-es 2019-05-29 14:47:42 -05:00
Rick Carlino 2633643fb9 Remove unused file 2019-05-29 14:14:05 -05:00
David 9feb2a1317
Add missing trailing dots and minor fixes 2019-05-29 21:13:48 +02:00
David 7eb60c64b3
Translate T U V W values 2019-05-29 20:58:26 +02:00
Rick Carlino 5c854520d6 Possible fix 2019-05-29 11:55:27 -05:00
Rick Carlino 8b6c8fe004 (POSSIBLE NOISE) Re-enable resource worker for debugging. 2019-05-29 10:55:54 -05:00
David 85781b1637
Translate S values 2019-05-29 17:23:56 +02:00
David ccaf1aa38b
Translate O P R values 2019-05-29 17:01:25 +02:00
David 871a3e4e57
Translate K L M N values 2019-05-29 16:33:41 +02:00
David 6048e63507
Translate H I values 2019-05-29 16:04:12 +02:00
Rick Carlino 2d37efe506
Merge pull request #1212 from RickCarlino/tues
FBJS Upgrade
2019-05-29 08:54:50 -05:00
David 1042707318
Fix empty values in translation A C 2019-05-29 13:43:01 +02:00
David 629a53cb50
Translate F G values 2019-05-29 13:35:55 +02:00
David 7ffb530b3f
Translate E values 2019-05-29 13:14:15 +02:00
David 6bf79e7608
Translate D values 2019-05-29 12:55:46 +02:00
David 8b3fc5c7bb
Translate X Y Z values 2019-05-29 12:40:48 +02:00
David 4427ee3241
Improve other translations values 2019-05-29 12:22:47 +02:00
David 22aa39aa29
Translate C values 2019-05-29 12:15:09 +02:00
David 6498aa4632
Translate B values 2019-05-29 11:49:37 +02:00
David 825f7997e9
Translate A values 2019-05-29 11:42:39 +02:00
David 4e0d36bf97
Translate # values 2019-05-29 11:04:13 +02:00
David 326b98c616
Improve already translated values
- CamelCase replaced
- Minor typos fixed
- Ease-of-read favored
- Translation accuracy increased based on app context
2019-05-29 10:55:28 +02:00
Rick Carlino da0f4a514d FBJS v8.0.0-rc2 2019-05-28 20:13:40 -05:00
Rick Carlino c2f898c3e0 Dont mix * and # in AMQP routing key 2019-05-28 16:32:11 -05:00
Rick Carlino 69ccdce02a Remove logger, disable resource_channel for now 2019-05-28 15:42:58 -05:00
Rick Carlino 5839c4d8d1 Fix typo 2019-05-28 15:21:44 -05:00
Rick Carlino 5f8578bfdb Debug AMQP on staging 2019-05-28 15:07:24 -05:00
Rick Carlino 4c44044082 Merge branch 'master' of github.com:FarmBot/Farmbot-Web-App 2019-05-28 14:39:08 -05:00
Rick Carlino 9c8fbdcbf0 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into sun 2019-05-28 14:21:59 -05:00
Rick Carlino 12185962df Merge branch 'master' into sun 2019-05-28 14:17:56 -05:00
Rick Carlino a27acf2a78 Merge branch 'master' of https://git.heroku.com/farmbot-production 2019-05-28 14:11:53 -05:00
Rick Carlino bd27ada9c7 Recovery deploy 2019-05-28 14:11:23 -05:00
Rick Carlino 03acbf0a4b Fix typo 2019-05-28 13:54:08 -05:00
Rick Carlino f7b6d169b1
Merge pull request #1211 from RickCarlino/sun
Update ping logic / move ping logic into FBJS
2019-05-28 10:53:43 -05:00
Rick Carlino 86d3a52759 Add tests to /connectivity 2019-05-28 10:13:43 -05:00
Rick Carlino bf793a07f0 v8.0.1-rc1 from NPM rather than Github 2019-05-27 16:22:49 -05:00
Rick Carlino 9da8a749d9 IDEA: Move ping logic into FBJS. NEXT: Tests, manual QA 2019-05-26 18:26:05 -05:00
Rick Carlino 3df2a50872
Merge pull request #1210 from RickCarlino/thurs
Fixes, Upgrades, Ping/Pong Additions
2019-05-26 08:45:53 -05:00
Rick Carlino 6c53a90bcc Comment out ping/pong test utils 2019-05-25 20:16:52 -05:00
Rick Carlino fc5377855a v8.0.1-rc0 2019-05-25 20:13:18 -05:00
Rick Carlino c4720496b1 Add ability to set `gantry_mounted` prop in `PointsController#update` (#create already had it) 2019-05-25 18:56:21 -05:00
Rick Carlino 6d64ef77c5 v8.0.0 upgrade 2019-05-24 15:56:46 -05:00
Rick Carlino f5f7875f88 🤞 2019-05-24 15:10:29 -05:00
Rick Carlino d240e06a44 Add ping/pong to channel whitelist. 2019-05-24 14:28:00 -05:00
Rick Carlino 6cfa1bc0f9 QA Build of FBJS 2019-05-24 10:53:52 -05:00
Rick Carlino 3a39190945
Merge pull request #1209 from RickCarlino/thurs
Dont allow JSON primitives when POST/PUTing to API
2019-05-23 16:21:14 -05:00
Rick Carlino 48d22c734f
Merge branch 'staging' into thurs 2019-05-23 15:16:48 -05:00
Rick Carlino 25b978c52d Dont allow JSON primitives when POST/PUTing to API 2019-05-23 14:46:38 -05:00
Rick Carlino 370ac265a2
Merge pull request #1208 from RickCarlino/thurs
FBJS Fixes
2019-05-23 14:44:50 -05:00
Rick Carlino e722bc9c9c Fix tests 2019-05-23 14:27:07 -05:00
Rick Carlino bdc905033f Merge branch 'thurs' of github.com:RickCarlino/farmbot-web-app into thurs 2019-05-23 13:57:39 -05:00
Rick Carlino 6c89f9be42 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into thurs 2019-05-23 13:57:24 -05:00
Rick Carlino f7050f4bb9
Merge branch 'staging' into thurs 2019-05-23 13:57:20 -05:00
Rick Carlino be6355c092 Revert database.yml changes 2019-05-23 13:09:46 -05:00
Rick Carlino 8f40ccafcf Remove onRemove stub handler 2019-05-23 11:54:44 -05:00
Rick Carlino b103edac49 Add note about optional values in example.env 2019-05-23 11:53:00 -05:00
Rick Carlino d017854358 Remove debugger 2019-05-23 11:49:10 -05:00
Rick Carlino 4ceb0c491d Use FBJS constants instead of strings for even names. 2019-05-23 10:49:12 -05:00
Rick Carlino 4543df8464
Merge pull request #1207 from RickCarlino/wed
Stricter JSON validation, more descriptive errors
2019-05-23 09:59:14 -05:00
Rick Carlino 218d77abab Merge branch 'wed' of github.com:RickCarlino/farmbot-web-app into wed 2019-05-22 15:36:41 -05:00
Rick Carlino 75059ccf0f Keep using YAML serialization, actually 2019-05-22 15:36:09 -05:00
Rick Carlino 6b5e3e1a2d Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into wed 2019-05-22 15:27:01 -05:00
Rick Carlino e9557c98ff
Merge branch 'staging' into wed 2019-05-22 15:26:56 -05:00
Rick Carlino bf69ae09bd stricter JSON validation 2019-05-22 15:19:26 -05:00
Rick Carlino fc09e1a1a4
Merge pull request #1206 from RickCarlino/wed
Increase limits, loosen restrictions on `/farmware_env` endpoint.
2019-05-22 13:27:52 -05:00
Rick Carlino ed24e82c81 Increase FarmwareEnv limit, allow compound data types 2019-05-22 11:21:09 -05:00
Rick Carlino b917be6c57 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into wed 2019-05-22 10:15:48 -05:00
Rick Carlino 8ca82ced7b Dont require email validation when running seeds 2019-05-22 10:08:39 -05:00
Rick Carlino 0f98b20c37
Merge pull request #1205 from gabrielburnworth/staging
Tool and map updates
2019-05-22 09:46:16 -05:00
gabrielburnworth 43a0c21d72 map size ui 2019-05-21 18:04:30 -07:00
gabrielburnworth a68a149a01 use custom map sizes 2019-05-21 16:24:17 -07:00
gabrielburnworth 4aad63de76 add seed troughs to FE 2019-05-21 15:18:25 -07:00
Rick Carlino 6bf5568815
Merge pull request #1202 from RickCarlino/status_v8_ii
FBJS v8.0.0-rc2
2019-05-21 09:24:26 -05:00
Rick Carlino 643126ddd0
Merge branch 'staging' into status_v8_ii 2019-05-21 08:48:24 -05:00
Rick Carlino 77635e3292
Merge pull request #1203 from Saturate/feat/danish-translation
Danish translation
2019-05-21 08:47:02 -05:00
Allan Kimmer Jensen 10d0db2236
Update translation_metrics.md 2019-05-21 11:00:41 +02:00
Allan Kimmer Jensen c52f599026
Start translation into danish 2019-05-21 10:59:42 +02:00
Rick Carlino 9d1db2f7fe FBJS v8.0.0-rc2 2019-05-20 18:26:41 -05:00
Rick Carlino 25370deb02
Merge pull request #1201 from gabrielburnworth/staging
update URLs
2019-05-20 18:10:25 -05:00
gabrielburnworth 0af336e42a update URLs 2019-05-20 13:16:10 -07:00
Rick Carlino 7b15a8f485
Merge pull request #1200 from RickCarlino/priority
Add "priority" arg to "rpc_request" nodes.
2019-05-19 12:21:24 -05:00
Rick Carlino 290d2fdc04 Upgrade to fbjs8-rc1 2019-05-17 15:58:18 -05:00
gabrielburnworth d3f7cc63d5 priority FBJS updates 2019-05-17 13:14:01 -07:00
Rick Carlino 485137cafa Add priority to corpus 2019-05-17 14:28:09 -05:00
Gabriel Burnworth 3f316ddd97
add boardID test 2019-05-16 19:44:13 -07:00
Gabriel Burnworth 94ff75a263
fix missing boardID 2019-05-16 18:28:40 -07:00
Rick Carlino d1cefd36f4
Merge pull request #1198 from gabrielburnworth/staging
Cleanup and fixes
2019-05-16 15:17:08 -05:00
gabrielburnworth 3db5014b11 fix rake task 2019-05-16 12:35:42 -07:00
gabrielburnworth 8cc17a8955 alert cleanup and fixes 2019-05-16 12:35:33 -07:00
Rick Carlino 1b48df5231
Merge pull request #1197 from gabrielburnworth/staging
Dependency Upgrades
2019-05-16 14:03:30 -05:00
gabrielburnworth 70cedb168b dep updates 2019-05-16 09:56:27 -07:00
Rick Carlino 4a941bc224
Merge pull request #1196 from FarmBot/staging
v7.3.0 - Happy Hibiscus
2019-05-16 10:28:41 -05:00
Rick Carlino 191b0ead3d
Merge pull request #1195 from RickCarlino/tues
Capitalization fixes for `device.name`
2019-05-15 16:39:06 -05:00
Rick Carlino 6411f6328d Capitalization fixes 2019-05-15 16:10:13 -05:00
Rick Carlino 1404150214
Merge pull request #1194 from RickCarlino/tues
More tweaks to `none` seeder
2019-05-15 14:38:29 -05:00
Rick Carlino b8c84fcd75 Enable spread by default, disable encoders by default 2019-05-15 14:16:14 -05:00
Rick Carlino a3e07b77dd Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into tues 2019-05-15 13:37:54 -05:00
Rick Carlino 800ea702ea Revert more things related to the none seeder 2019-05-15 13:37:48 -05:00
Rick Carlino c437636fb5
Merge pull request #1193 from gabrielburnworth/staging
Misc fixes
2019-05-15 12:11:50 -05:00
gabrielburnworth 9a5e7d8179 update onBroadcast 2019-05-15 09:18:32 -07:00
gabrielburnworth b38e77694a update translation helper 2019-05-15 09:14:01 -07:00
gabrielburnworth a6fa9523d4 show resource features 2019-05-15 09:13:17 -07:00
gabrielburnworth 1b57a95e46 misc fixes 2019-05-15 09:12:26 -07:00
gabrielburnworth 80d24da54f fix map image filter bug 2019-05-15 09:11:43 -07:00
Rick Carlino c68db3475f
Merge pull request #1192 from RickCarlino/tues
Changes to `none` seeder
2019-05-14 10:30:10 -05:00
Rick Carlino 579fa443df Revert changes for `none` seeder 2019-05-14 09:57:35 -05:00
Rick Carlino 312960f1bf
Merge pull request #1191 from RickCarlino/public_broadcast_fixes
Settings Updates, Bug Fixes
2019-05-14 09:13:33 -05:00
Rick Carlino c8e8f0cda4
Merge pull request #32 from gabrielburnworth/public_broadcast_fixes
fix linter errors
2019-05-14 08:43:42 -05:00
gabrielburnworth 8a436f6233 fix linter errors 2019-05-13 17:13:28 -07:00
Rick Carlino 791b7b137b
Merge branch 'staging' into public_broadcast_fixes 2019-05-13 17:38:24 -05:00
Rick Carlino 4d24432f2c Change default firmware_hard from "none" to nil, plus FBJS stuff 2019-05-13 17:35:58 -05:00
Rick Carlino b8836c8aba
Merge pull request #1190 from RickCarlino/saturday
Account Seeder Updates
2019-05-13 13:30:07 -05:00
Rick Carlino bb525c26ec Stub out unused instance methods in AbstractSeeder 2019-05-13 11:45:33 -05:00
Rick Carlino c5177ebc45 Upgrade FBJS 2019-05-13 10:53:19 -05:00
Rick Carlino 21d96f8ee9 Explicitly set None seeder to use `NONE` firmware_hardware 2019-05-13 10:39:54 -05:00
Rick Carlino 27b2002782 Change default firmware_hard from "arduino" to "none" 2019-05-13 10:30:35 -05:00
Rick Carlino 894419b8ae Fix pin binding numbers 2019-05-11 16:45:23 -05:00
Rick Carlino 34c67642fe IDEA: device.device == device 2019-05-11 16:12:20 -05:00
Rick Carlino 2bedb0301a Change XL settings to reflect spreadsheet changes 2019-05-11 16:07:41 -05:00
Rick Carlino f96d9d6eff Genesis v1.4 Profile: `settings_firmware` should be "Farmduino (Genesis v1.4)" 2019-05-11 15:54:51 -05:00
Rick Carlino e52bba45e6 Clear out settings when product_line is `none` 2019-05-11 15:46:31 -05:00
Rick Carlino c64722af96 Resetting account should reset `settings_device_name` to "FarmBot" 2019-05-11 15:34:01 -05:00
Rick Carlino b794c60bb7 [STABLE] Add tests for the slot<=>tool pairing parts of the seeder 2019-05-11 15:28:42 -05:00
Rick Carlino f074a13488 Dont log out when seeding/reseting an acct. 2019-05-11 15:05:28 -05:00
Rick Carlino ad31f45114 Disable sequence seeding in production (until v8 release) 2019-05-11 14:11:38 -05:00
Rick Carlino 2957b58c49 Add Alert:SEED_DATA after account reset 2019-05-11 11:37:16 -05:00
Rick Carlino 937be279fc Attach tools to slots by default. 2019-05-11 10:44:44 -05:00
Rick Carlino b966112803 Routine dep upgrades 2019-05-11 09:30:05 -05:00
Rick Carlino 9ac0389a69
Merge pull request #1189 from gabrielburnworth/staging
Dependency upgrades
2019-05-11 08:58:23 -05:00
gabrielburnworth ebfecd3c12 dep updates 2019-05-10 17:50:34 -07:00
gabrielburnworth 0e7deb79f5 add hover test 2019-05-10 17:14:40 -07:00
gabrielburnworth 19066c964c enable new card 2019-05-10 17:13:32 -07:00
Rick Carlino 9d89d5aab0
Merge pull request #1188 from RickCarlino/logs_and_messages
Slight Update
2019-05-07 11:27:43 -05:00
Rick Carlino a7f975f4d3 Merge branch 'logs_and_messages' of github.com:RickCarlino/farmbot-web-app into logs_and_messages 2019-05-06 16:31:00 -05:00
Rick Carlino f9fa6d65ff Update test- Alert::BULLETIN is not a default Alert 2019-05-06 16:30:29 -05:00
Rick Carlino d7c0b27b2c Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into logs_and_messages 2019-05-06 14:09:37 -05:00
Rick Carlino e21196df39
Merge branch 'staging' into logs_and_messages 2019-05-06 14:09:29 -05:00
Rick Carlino 528f0940ee Update broadcast rake task 2019-05-06 14:05:19 -05:00
Rick Carlino e7d70ed91d
Merge pull request #1187 from gabrielburnworth/staging
Fix translation helper
2019-05-06 13:10:43 -05:00
gabrielburnworth f6dd5f5030 fix translation helper 2019-05-06 10:30:49 -07:00
Rick Carlino 5845471303
Merge pull request #1186 from ESIEESPACE/french-translation
French Translation
2019-05-06 09:30:46 -05:00
Rick Carlino a1df77c02f
Merge branch 'staging' into french-translation 2019-05-06 08:17:55 -05:00
Wallerand Delevacq bbdf51186e French Translation 2019-05-06 13:46:28 +02:00
Rick Carlino 4744300ae3
Merge pull request #1185 from RickCarlino/logs_and_messages
Minor updates
2019-05-04 15:47:00 -05:00
Rick Carlino fc879bfd2d Better handling of empty passwords 2019-05-04 15:05:03 -05:00
Rick Carlino 6ae1b0edc0 Update max_log_count and priority value of default alerts (new user sign up) 2019-05-04 13:34:29 -05:00
Rick Carlino ddf9c7e0f8
Merge pull request #1184 from gabrielburnworth/staging
UI updates
2019-05-04 11:32:08 -05:00
gabrielburnworth fdf2f640c6 add new path to test 2019-05-03 16:44:04 -07:00
gabrielburnworth 0842656660 update seeding UI 2019-05-03 12:51:02 -07:00
gabrielburnworth ceaff8a4bd add new board type 2019-05-03 12:50:27 -07:00
Rick Carlino 430b1850ec
Merge pull request #1183 from RickCarlino/foreground_validation
Updates to Account Reset
2019-05-03 14:33:57 -05:00
Rick Carlino 51ab8a76b0
Merge branch 'staging' into foreground_validation 2019-05-03 13:23:38 -05:00
Rick Carlino 670f4e2dcb Do validation errors in foreground 2019-05-03 13:15:03 -05:00
Rick Carlino 9a44547988
Merge pull request #1182 from RickCarlino/staging
Pin docker db/redis version down to explicit version
2019-05-03 12:39:50 -05:00
Rick Carlino 5ad7050c85 Pin docker db/redis version down to explicity version 2019-05-03 12:09:08 -05:00
Rick Carlino 2b478a46af
Merge pull request #1181 from RickCarlino/staging
Require password confirmation when reseting account
2019-05-03 11:54:00 -05:00
Rick Carlino 2cc0bd50e5 Require password confirmation when reseting account 2019-05-03 11:26:39 -05:00
Rick Carlino a363d4914c
Merge pull request #1180 from RickCarlino/upgrades
Upgrade FBJS
2019-05-03 10:20:16 -05:00
Rick Carlino c4a4a2127b Upgrade farmbot to v7.0.8 2019-05-03 09:34:44 -05:00
Rick Carlino e6d7904b3e Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-05-03 09:32:06 -05:00
Rick Carlino 05b5cd8389
Merge pull request #1178 from RickCarlino/account_reset
Account Reset Endpoint
2019-05-03 08:43:56 -05:00
Rick Carlino 247ffcac96 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-05-03 08:26:11 -05:00
Rick Carlino 571a94e501
Merge branch 'staging' into account_reset 2019-05-03 08:20:40 -05:00
Rick Carlino 3f2a09a7a1
Merge pull request #1179 from gabrielburnworth/staging
Account Reset UI
2019-05-03 08:20:18 -05:00
gabrielburnworth 3e231c485c add test 2019-05-02 19:06:18 -07:00
gabrielburnworth 8d9cf27e8a reset account UI 2019-05-02 18:37:10 -07:00
Rick Carlino 338b3df061 Pry removal 2019-05-02 19:26:03 -05:00
Rick Carlino 5cf8c73fd7 Devices#reset endpoint 2019-05-02 19:20:22 -05:00
Rick Carlino 8bb97b747a String renames for firmware_hardware and product_line 2019-05-02 17:44:36 -05:00
Rick Carlino 4040e058b4 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into verbiage 2019-05-02 17:25:47 -05:00
Rick Carlino 18ae05ca82
Merge pull request #1177 from RickCarlino/account_seeder_iii
Account seeders for Express models
2019-05-02 15:17:03 -05:00
Rick Carlino 4062fc0c54 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-05-02 13:41:12 -05:00
Rick Carlino 05c78bf55d Merge branch 'master' into staging 2019-05-02 13:41:07 -05:00
Rick Carlino f9bd4f1fe6
Merge branch 'staging' into account_seeder_iii 2019-05-02 13:35:39 -05:00
Rick Carlino 2361ef1afe Seeder for express_xl_1.0 2019-05-02 13:15:30 -05:00
Rick Carlino fdaef651da Dont use class constants for configuration 2019-05-02 12:53:52 -05:00
Rick Carlino ca8a9c029e Express 1.0 seeder 2019-05-02 12:36:18 -05:00
Rick Carlino 8eeac7e957 add gantry_mounted attribute to ToolSlot 2019-05-02 11:52:33 -05:00
Rick Carlino 74ed1ec296 INTERMISSION: Need to add ToolSlot#gantry_mounted(boolean) to account for express style gantry mount tools 2019-05-02 10:22:48 -05:00
Rick Carlino 708661a9a6 xl_1.4 + tests 2019-05-02 09:13:46 -05:00
Rick Carlino 9437f6f7b1
Merge pull request #1176 from RickCarlino/account_seeder_iii
Genesis 1.3 Default Seeds
2019-05-01 19:28:36 -05:00
Rick Carlino 66f61e844f Tests for genesis 1.4 seeding 2019-05-01 17:45:19 -05:00
Rick Carlino fc852a82b2 Dead code removal 2019-05-01 17:13:02 -05:00
Rick Carlino 072fbe23b9 Implementation of Genesis 1.3 seeds 2019-05-01 14:57:35 -05:00
Rick Carlino ea400faf3e Fix typo with vacuum peripherals, continue 1.3 testing 2019-05-01 14:33:50 -05:00
Rick Carlino 39ebf11ad8 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into account_seeder_iii 2019-05-01 13:47:45 -05:00
Rick Carlino 5116a10954 Update tests to accomodate more seed types 2019-05-01 13:45:03 -05:00
Rick Carlino 351cb007f9
Merge pull request #1175 from RickCarlino/account_seeder_iii
Add map_size_(x|y) to WebAppConfig table / FBJS
2019-05-01 12:18:12 -05:00
Rick Carlino 90a808cd6a Inherit from AbstractGenesis rather than AbstractSeeder 2019-05-01 12:17:06 -05:00
Rick Carlino b3a9ba859e Rename Abstract => AbstractSeeder 2019-05-01 10:14:34 -05:00
Rick Carlino ae441b1b0a Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into account_seeder_iii 2019-05-01 10:05:43 -05:00
Rick Carlino 0a05f5bbbd
Merge branch 'staging' into account_seeder_iii 2019-05-01 10:05:39 -05:00
Rick Carlino f2f44da12e Add map_size_(x|y) 2019-05-01 10:03:55 -05:00
Rick Carlino 02fadc52a4
Merge pull request #1174 from RickCarlino/account_seeder_iii
Account Defaults: Genesis v1.2
2019-04-30 19:58:03 -05:00
Rick Carlino 0b73a17ef9 Add more tests 2019-04-30 17:10:23 -05:00
Rick Carlino d5bd13099b Minor fix. Genesis 1.2 seeds done; need better tests 2019-04-30 16:47:24 -05:00
Rick Carlino 8fdaa49b9e SEED SEQUENCE: sequences_plant_seed 2019-04-30 16:30:49 -05:00
Rick Carlino e3211f9cfa SEED SEQUENCE: sequences_water_plant 2019-04-30 16:17:45 -05:00
Rick Carlino 7c1b0ea062 SEED SEQUENCE: sequences_unmount_tool 2019-04-30 16:11:02 -05:00
Rick Carlino 87823bce83 SEED SEQUENCE: Pickup seed (genesis) 2019-04-30 15:37:27 -05:00
Rick Carlino 41f5abfda6 seed sequences_mount_tool 2019-04-30 15:13:46 -05:00
Rick Carlino 11a6ea03cf Seed tools (genesis 1.4) 2019-04-30 13:47:28 -05:00
Rick Carlino 65bfc110be Seed slots 1-6 2019-04-30 13:32:56 -05:00
Rick Carlino 2ad2cc73d6 Move tool names into namespace. Begin tool_slots_slot_X implementation 2019-04-30 13:11:39 -05:00
Rick Carlino c882bb46f4 Scaffolding for FBOS/Firmware configs 2019-04-30 12:41:09 -05:00
Rick Carlino 1552bcd927 Moroe cleanup of PRODUCT_LINE info. 2019-04-30 11:54:59 -05:00
Rick Carlino 8203dfb158 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into account_seeder_iii 2019-04-30 09:36:24 -05:00
Rick Carlino bc2cb86013 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into staging 2019-04-30 09:36:11 -05:00
Rick Carlino 396424c217
Merge pull request #1173 from FarmBot/staging
v7.2.6 - Happy Hibiscus
2019-04-30 09:28:31 -05:00
Rick Carlino 119f9f4616 WIP; Fix bug in Abstract seeder, update tests for genesis 1.2 seeder 2019-04-30 09:20:48 -05:00
Rick Carlino b20874633b Seperate plants and toolslots into distinct seeds files. Update tests. 2019-04-30 09:03:11 -05:00
Rick Carlino f8c218d0c0
Merge pull request #1172 from gabrielburnworth/staging
Improve Map Image Display
2019-04-30 07:34:43 -05:00
gabrielburnworth 5041dad952 fix map image scaling bugs 2019-04-29 19:25:40 -07:00
gabrielburnworth e4b68524f5 fix minor farmware nav bug 2019-04-29 19:23:55 -07:00
Rick Carlino a02563d2a5 Add sequences to fixtures.yml 2019-04-29 15:28:50 -05:00
Rick Carlino 2707ac8e68 Make seeder callbacks order dependent 2019-04-29 14:01:39 -05:00
Rick Carlino fe3e0afb80 Merge branch 'staging' into account_seeder_iii 2019-04-29 13:03:42 -05:00
Rick Carlino d8da8b711e
Merge pull request #1171 from FarmBot/staging
v7.2.5 - Happy Hibiscus
2019-04-29 12:38:30 -05:00
Rick Carlino e32d03c28a WIP. TODO: Continue working on Devices::Seeders::GenesisOneTwo 2019-04-29 12:26:28 -05:00
Rick Carlino 9ffae5c203
Merge pull request #1170 from RickCarlino/routine_upgrades
Routine dep upgrades
2019-04-29 10:13:08 -05:00
Rick Carlino f83e556e10
Merge branch 'staging' into routine_upgrades 2019-04-29 09:56:15 -05:00
Rick Carlino ac2dd79d80 Routine dep upgrades 2019-04-29 09:51:44 -05:00
gabrielburnworth db75f83528 fix farmware nav bug 2019-04-26 15:11:33 -07:00
gabrielburnworth 2726c43b7f login page improvements 2019-04-26 09:52:03 -07:00
gabrielburnworth e038d0a1a2 remove unused prop 2019-04-26 09:51:58 -07:00
gabrielburnworth 85a6e0ceb8 add if step test 2019-04-26 09:33:29 -07:00
gabrielburnworth cc6f5f135e reorganize account tests 2019-04-26 09:32:03 -07:00
gabrielburnworth 4e347cfd96 map image pre-calibration preview 2019-04-25 12:11:00 -07:00
gabrielburnworth 0f67cc3fdf fix scan image offline bug 2019-04-25 10:02:30 -07:00
gabrielburnworth cdd72f3c9d add voltage indicator 2019-04-24 16:27:04 -07:00
gabrielburnworth 40623e2af0 resolve alert content upon fetch 2019-04-23 11:44:10 -07:00
gabrielburnworth 45aa7137eb hide incorrect alert times 2019-04-23 11:42:35 -07:00
gabrielburnworth ac5c14780b fix minor spelling errors 2019-04-23 11:42:11 -07:00
gabrielburnworth 922d088c70 add markdown to alerts 2019-04-23 11:41:03 -07:00
gabrielburnworth 917d23126f minor fixes 2019-04-23 11:40:32 -07:00
Rick Carlino 3600f69c41
Merge pull request #1169 from RickCarlino/user_deletion_bg
Perform account deletion in background worker
2019-04-19 16:55:45 -07:00
Rick Carlino d92f47dd77
Merge branch 'staging' into user_deletion_bg 2019-04-19 16:37:51 -07:00
Rick Carlino 06ea475d91
Merge pull request #1168 from RickCarlino/seed_data
Seed data
2019-04-19 16:37:39 -07:00
Rick Carlino a6aba98657 Move account deletion to background worker 2019-04-19 16:26:12 -07:00
Rick Carlino 2b30eabe16 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into user_deletion_bg 2019-04-19 16:23:54 -07:00
Rick Carlino 3d22e6c127
Merge branch 'staging' into seed_data 2019-04-19 16:21:38 -07:00
Rick Carlino a3aa20d742
Merge pull request #1167 from gabrielburnworth/staging
FE renames and additions
2019-04-19 16:10:18 -07:00
Rick Carlino 8cafaf289c ✔️ Seeder for default plants 2019-04-19 16:07:29 -07:00
gabrielburnworth ce0c161b1f add bulletin alert card UI 2019-04-19 15:48:43 -07:00
Rick Carlino 25952a02cc Change names/formatting in Devices::Seeders::Abstract 2019-04-19 15:19:46 -07:00
gabrielburnworth d856a4781e rename enigma -> alert 2019-04-19 15:04:25 -07:00
Rick Carlino dfc928049a
Merge pull request #1166 from RickCarlino/seed_data
Minor Fixes
2019-04-19 14:30:37 -07:00
Rick Carlino 35b9c145c6 Backend utils for broadcasting 2019-04-19 14:07:47 -07:00
Rick Carlino e3abb4bf6a WIP 2019-04-19 13:35:26 -07:00
Rick Carlino 9ee2db72d7 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into seed_data 2019-04-19 13:18:58 -07:00
Rick Carlino 98aa190b96
Merge pull request #1165 from RickCarlino/global_bulletin
Global bulletins for the message center
2019-04-19 13:08:47 -07:00
Rick Carlino 982e0f6c0e Add Alert::BULLETIN 2019-04-19 12:38:38 -07:00
Rick Carlino f6c9e0854f Add `href_label` 2019-04-19 12:15:08 -07:00
Rick Carlino 9ea9fcb95e Rename Enigma => Alert 2019-04-19 10:56:45 -07:00
Rick Carlino 06a98ea6e0 WIP: GlobalBulletin controller 2019-04-18 23:08:15 -07:00
Rick Carlino 25cc52795f Class name typo XlOneZero => ExpressXlOneZero 2019-04-18 22:09:02 -07:00
Rick Carlino 69e096cb09
Merge pull request #1164 from RickCarlino/seed_data
Post deploy refresh bug fix...
2019-04-18 21:58:10 -07:00
Rick Carlino 6964d2daeb Initial tests + global UI refresh fix 2019-04-18 20:52:31 -07:00
Rick Carlino 2545a0bc97 Stub out Devices::Seeders::* 2019-04-18 20:26:07 -07:00
Rick Carlino c48312b877
Merge pull request #1163 from RickCarlino/upgrades
Validations, Middlewares, Enigma alerts, Upgrades
2019-04-18 19:52:26 -07:00
Rick Carlino 19809e7388 Remove production logger 2019-04-18 18:58:04 -07:00
Rick Carlino 586d83a236 Merge conflicts 2019-04-18 17:54:30 -07:00
Rick Carlino e41234fe9a Update limits 2019-04-18 17:36:29 -07:00
Rick Carlino b0dc438bca Stricter validations for ToolSLot (avoid double slotting at DB layer, too) 2019-04-18 17:33:10 -07:00
Rick Carlino 12806e849f Stricter validations for Enigma problem tags 2019-04-18 17:10:45 -07:00
gabrielburnworth 318470fb66 fix ruby tests 2019-04-18 17:07:04 -07:00
Rick Carlino fb37b00af4 Merge branch 'staging' of https://github.com/gabrielburnworth/Farmbot-Web-App into upgrades 2019-04-18 17:00:05 -07:00
gabrielburnworth 808a9bfe93 updates 2019-04-18 16:39:18 -07:00
gabrielburnworth 23160a5606 fix pin dropdown bugs 2019-04-18 16:39:18 -07:00
gabrielburnworth c690bf760b message fixes and updates 2019-04-18 16:39:15 -07:00
Rick Carlino e4521978b7 Add middlewares back 2019-04-18 11:46:00 -07:00
Rick Carlino 315e50c48f Dep upgrades 2019-04-18 11:44:05 -07:00
Rick Carlino 0d5155c147 Merge branch 'master' into staging 2019-04-18 11:31:01 -07:00
Rick Carlino 3681aeb33b Debug AMQP/connectivity issues 2019-04-17 15:42:50 -07:00
Rick Carlino 75265861ab Fixme 2019-04-17 15:15:53 -07:00
Rick Carlino e032acddfd
Merge pull request #1161 from RickCarlino/staging
v7.2.3 - Happy Hibiscus
2019-04-17 15:14:28 -07:00
Rick Carlino f66203eac7 Update Gemfile.lock 2019-04-17 14:41:12 -07:00
Rick Carlino 14f19e76e4
Merge pull request #1159 from RickCarlino/release_candidate
Release candidate
2019-04-17 14:16:12 -07:00
Rick Carlino 450f9a4c4f Merge branch 'staging' of https://github.com/gabrielburnworth/Farmbot-Web-App into release_candidate 2019-04-17 13:55:09 -07:00
Rick Carlino e7bf038bee Update rack middleware config 2019-04-17 13:48:54 -07:00
gabrielburnworth 412a46415c add force unlock config 2019-04-17 12:40:04 -07:00
gabrielburnworth cb44640ca5 misc fixes 2019-04-17 12:39:56 -07:00
Rick Carlino 83d9cb8287
Merge pull request #1157 from gabrielburnworth/staging
Misc additions
2019-04-16 10:49:55 -07:00
gabrielburnworth 45908ff660 add messages 2019-04-16 10:14:52 -07:00
gabrielburnworth beee68850a add microsteps 2019-04-16 10:01:27 -07:00
gabrielburnworth 08259b0ab1 misc updates 2019-04-16 10:00:00 -07:00
Rick Carlino 6d68f73fbe
Merge pull request #1156 from RickCarlino/microsteps
Microstep migrations
2019-04-16 08:58:51 -07:00
Rick Carlino 88b18b20d8 Microstep migrations 2019-04-16 08:30:52 -07:00
Rick Carlino 36829ccd18
Merge pull request #1155 from RickCarlino/verbiage
Verbiage updates: Tools => "Tools and Seed Containers"
2019-04-15 19:53:26 -07:00
Rick Carlino ee23635dd0 updates to tests 2019-04-15 19:11:35 -07:00
Rick Carlino a9b6492823 Verbiage updates: Tools => "Tools and Seed Containers" 2019-04-15 18:23:58 -07:00
Rick Carlino c163cb13dd
Merge pull request #1154 from RickCarlino/slo_visit
Password Reset Fix
2019-04-15 16:14:03 -07:00
Rick Carlino 323fd29a8e Add tests for UserMailer URL generation helpers 2019-04-15 15:55:10 -07:00
Rick Carlino c21fb485bb More cleanup 2019-04-15 15:35:30 -07:00
Rick Carlino f0edeac404 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into slo_visit 2019-04-15 15:35:05 -07:00
Rick Carlino 91f4237a88 👍 2019-04-15 15:25:52 -07:00
Rick Carlino 8e11c42a90 Needs tests, QA 2019-04-15 14:56:46 -07:00
Rick Carlino 828a5aef27 WIP 2019-04-15 14:39:18 -07:00
Rick Carlino b6f0a46631
Merge pull request #1150 from RickCarlino/time_format_24_hour
Create account seed hint when user signs up
2019-04-15 11:20:09 -07:00
Rick Carlino 76d3938cc3
Merge branch 'staging' into time_format_24_hour 2019-04-15 11:00:59 -07:00
Rick Carlino ca8b9d2f83 Remove rollbar 2019-04-13 20:25:29 -07:00
Rick Carlino e2ae388b6d Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into time_format_24_hour 2019-04-13 19:52:58 -07:00
Rick Carlino 8faf0168cf
Merge pull request #1151 from gabrielburnworth/staging
FE updates
2019-04-13 11:52:17 -05:00
gabrielburnworth ea039789f5 add API enigmas to FE 2019-04-12 19:50:25 -07:00
gabrielburnworth 27c0efd980 web app config updates 2019-04-12 19:50:10 -07:00
Rick Carlino 8574ae35ab Merge branch 'time_format_24_hour' of github.com:RickCarlino/farmbot-web-app into time_format_24_hour 2019-04-12 17:56:17 -05:00
Rick Carlino bccace1286 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into time_format_24_hour 2019-04-12 17:55:11 -05:00
Rick Carlino 11f89fa111 Run migrations 2019-04-12 17:55:03 -05:00
Rick Carlino cc2d40f8bf
Merge branch 'staging' into time_format_24_hour 2019-04-12 17:40:37 -05:00
Rick Carlino 4b7b068e7e
Merge pull request #1149 from RickCarlino/verbiage_updates
Update Verbiage
2019-04-12 17:40:22 -05:00
Rick Carlino 66f6c858dd Update verbiage 2019-04-12 17:19:54 -05:00
Rick Carlino 4b18163fbf Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into time_format_24_hour 2019-04-12 14:47:32 -05:00
Rick Carlino b308c5ed64 Add Enigma at time of account creation 2019-04-12 14:47:20 -05:00
Rick Carlino 5b737273da More tests 2019-04-12 13:52:53 -05:00
Rick Carlino e6610eb8b1
Merge pull request #1148 from gabrielburnworth/staging
Misc fixes
2019-04-12 13:51:07 -05:00
gabrielburnworth aeeeea3808 fix spec 2019-04-11 23:43:02 -07:00
gabrielburnworth f303c27ce5 misc UI fixes 2019-04-11 23:01:51 -07:00
gabrielburnworth 8c053b2388 alerts fixes 2019-04-11 23:01:48 -07:00
Rick Carlino 0d3fea0adf
Merge pull request #1147 from RickCarlino/time_format_24_hour
Stub out Enigmas controller
2019-04-11 17:04:48 -05:00
Rick Carlino 133a2a7e78 Stub out Enigmas controller 2019-04-11 16:03:14 -05:00
Rick Carlino 5fc55b3649
Merge pull request #1146 from RickCarlino/time_format_24_hour
FBJS upgrades + changes to relevant interfaces
2019-04-10 20:40:38 -05:00
Rick Carlino 5319e48d58 FBJS upgrades + changes to relevant interfaces 2019-04-10 16:52:02 -05:00
Rick Carlino ed5b4b1a94
Merge pull request #1145 from RickCarlino/seed_data
Stub out Devices#seed endpoint
2019-04-10 16:14:20 -05:00
Rick Carlino 80ed4aad36
Merge branch 'staging' into seed_data 2019-04-10 15:43:38 -05:00
Rick Carlino 42e5d85171 Stub out Devices#seed endpoint 2019-04-10 15:40:31 -05:00
gabrielburnworth 30ee97d172 minor color adjustment 2019-04-10 12:18:48 -07:00
Rick Carlino d29f3ef459
Merge pull request #1144 from gabrielburnworth/staging
Updates
2019-04-10 09:52:45 -05:00
gabrielburnworth 1e92fe11bc fix linter error 2019-04-09 23:18:18 -07:00
gabrielburnworth 22d54c1c44 misc minor bug fixes 2019-04-09 23:02:39 -07:00
gabrielburnworth d0ea0d9e86 add default values to tooltips 2019-04-09 23:02:39 -07:00
gabrielburnworth e60106b1c4 add 24hr format config 2019-04-09 23:02:33 -07:00
gabrielburnworth 494e7b2de3 pin step updates 2019-04-09 21:28:31 -07:00
gabrielburnworth f20981e639 move step updates 2019-04-09 21:28:24 -07:00
gabrielburnworth 398d175bfe sequence settings menu 2019-04-09 20:58:51 -07:00
gabrielburnworth 4421baab04 alerts 2019-04-09 20:40:15 -07:00
gabrielburnworth 224e21ebe9 firmware hardware status indicator 2019-04-09 19:09:57 -07:00
gabrielburnworth 40defc57b8 panel header icons 2019-04-09 19:07:39 -07:00
gabrielburnworth b88f4fd7e8 change UI farm event titles 2019-04-09 18:52:12 -07:00
gabrielburnworth ab715c1bba mobile panel navigation 2019-04-09 18:45:59 -07:00
gabrielburnworth b6eff330ab variable form styling 2019-04-09 18:42:25 -07:00
gabrielburnworth c17d22e07a dev override configs 2019-04-09 18:29:25 -07:00
gabrielburnworth 1033fb1014 disable commands when disconnected 2019-04-09 18:15:50 -07:00
gabrielburnworth e873b9a6f4 connection status indicator 2019-04-09 17:45:51 -07:00
Rick Carlino b42a0aee10
Merge pull request #1143 from RickCarlino/auto_timezone
Set device timezone upon first login
2019-04-09 16:21:02 -05:00
Rick Carlino 68865cb224 Fix linter warnings 2019-04-09 16:01:41 -05:00
Rick Carlino 7773506501 Dead code removal, tests for timezone selector 2019-04-09 15:17:08 -05:00
Rick Carlino a8004328f1 Add tests for auto timezone setter 2019-04-09 13:02:10 -05:00
Rick Carlino 8eb0a0bb16 Set timezone on initial app load. TODO: Docs, tests. 2019-04-09 12:28:06 -05:00
Rick Carlino 88fcb85d40 Remove need for user intervention when setting timezone. 2019-04-08 15:22:37 -05:00
Rick Carlino 50d38e4006
Merge pull request #1142 from gabrielburnworth/staging
Dependency upgrades
2019-04-08 09:19:08 -05:00
gabrielburnworth 7da23d948f dep updates 2019-04-05 14:15:22 -07:00
Rick Carlino a993fd6918
Merge pull request #1141 from FarmBot/staging
v7.2.3
2019-04-05 15:33:59 -05:00
1584 changed files with 60625 additions and 22132 deletions

View File

@ -1,4 +1,3 @@
DOCKER_COMPOSE_VERSION=1.22.0
ADMIN_PASSWORD=this_is_a_fake_admin_pass
POSTGRES_PASSWORD=fake_db_password_also
API_HOST=10.1.10.219

View File

@ -1,44 +1,77 @@
version: 2
jobs:
build:
version: 2.1
executors:
build-executor:
machine: true
working_directory: /home/circleci/project
commands:
build-commands:
steps:
- checkout
- restore_cache:
keys:
- cache-v1-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
- run:
name: Shuffle configs around, install Docker-Compose
name: After cache restore
command: |
curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
git clean -xdn
mkdir -p docker_cache
ls docker_cache
#sudo docker images
#if [ -f docker_cache/images.tar.gz ]; then gunzip -c docker_cache/images.tar.gz | sudo docker load; fi
- run:
name: Build and Install Deps
command: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
mv .circleci/circle_envs .env
- run:
name: Install Ruby/JS deps
command: |
echo -e '\ndocker_volumes/db/pg_wal/*' >> .dockerignore
sudo docker-compose run web gem install bundler
sudo docker-compose run web bundle install
sudo docker-compose run web npm install
- run:
name: Create databases and secrets
command: |
sudo docker-compose run web bundle exec rails db:create
sudo docker-compose run web bundle exec rails db:migrate
sudo docker-compose run web rake keys:generate
- run:
name: Run Ruby tests
name: After cache update
command: |
sudo docker-compose run web rspec spec
git clean -xdn
ls docker_cache
#sudo docker images
#if [ ! -f docker_cache/images.tar.gz ]; then sudo docker save $(sudo docker images ruby -q) | gzip > docker_cache/images.tar.gz; fi
- save_cache:
key: cache-v1-{{ .Revision }}-{{ .Environment.CIRCLE_WORKFLOW_ID }}
paths:
- docker_volumes
- node_modules
- docker_cache
rspec-commands:
steps:
- run:
name: Run linters
name: Run Ruby Tests
command: |
sudo docker-compose run web npm run linters
sudo docker-compose run web rspec spec --format progress --format RspecJunitFormatter --out test-results/rspec/rspec.xml
jest-commands:
steps:
- run:
name: Run JS tests
command: |
sudo docker-compose run web npm run test-slow
sudo docker-compose run web npm run test-very-slow -- -c .circleci/jest-ci.config.js
echo 'export COVERAGE_AVAILABLE=true' >> $BASH_ENV
lint-commands:
steps:
- run:
name: Check Coveralls coverage on staging
name: Run JS Linters
command: |
sudo docker-compose run -e CIRCLE_SHA1="$CIRCLE_SHA1" -e CIRCLE_BRANCH="$CIRCLE_BRANCH" web rake coverage:run
sudo docker-compose run web npm run linters
when: always
coverage-commands:
steps:
- run:
name: Check coverage status
command: |
sudo docker-compose run -e CIRCLE_SHA1="$CIRCLE_SHA1" -e CIRCLE_BRANCH="$CIRCLE_BRANCH" -e CIRCLE_PULL_REQUEST="$CIRCLE_PULL_REQUEST" web rake coverage:run
when: always
- run:
name: Report coverage to Coveralls
command: |
@ -47,3 +80,60 @@ jobs:
sudo docker-compose run -e COVERALLS_REPO_TOKEN=lEX6nkql7y2YFCcIXVq5ORvdvMtYzfZdG web npm run coverage
fi
when: always # change to `on_success` for a stricter comparison
workflows:
version: 2
build_and_test:
jobs:
#- build
- all
#- test-api:
# requires:
# - build
#- run-linters:
# requires:
# - build
#- test-fe:
# requires:
# - build
jobs:
build:
executor: build-executor
steps:
- build-commands
all:
executor: build-executor
steps:
- build-commands
- rspec-commands
- lint-commands
- jest-commands
- store_test_results:
path: test-results
- coverage-commands
test-api:
executor: build-executor
steps:
- build-commands
- rspec-commands
- store_test_results:
path: test-results
run-linters:
executor: build-executor
steps:
- build-commands
- lint-commands
test-fe:
executor: build-executor
parallelism: 4
steps:
- build-commands
- run:
name: Run JS Tests
command: |
circleci tests glob **/__tests__/**/*.ts* | circleci tests split > /tmp/tests-to-run
sudo docker-compose run web npm run test-very-slow -- -c .circleci/jest-ci.config.js $(cat /tmp/tests-to-run)
- store_test_results:
path: test-results

View File

@ -0,0 +1,11 @@
const baseConfig = require("../jest.config");
baseConfig.rootDir = "..";
baseConfig.reporters.push([
"jest-junit",
{
outputDirectory: "test-results/jest"
}
]);
module.exports = baseConfig;

6
.gitignore vendored
View File

@ -1,6 +1,7 @@
.cache
.env
.vscode
.idea
*.log
*.pem
coverage_api
@ -13,17 +14,18 @@ package-lock.json
public/assets/
public/direct_upload/temp/*.jpg
public/dist
public/system
tmp
api_docs.md
erd_diagram.png
erd.pdf
*scratchpad*
scratchpad.rb
/config/master.key
config/credentials.yml.enc
# ActiveStorage blobs:
storage/*
# === Legacy
public/system
config/application.yml
coverage
mqtt/

View File

@ -1 +1 @@
2.6.1
2.6.5

27
Gemfile
View File

@ -1,54 +1,45 @@
source "https://rubygems.org"
ruby "~> 2.6.1"
ruby "~> 2.6.5"
gem "rails"
gem "active_model_serializers"
gem "bunny"
gem "delayed_job_active_record" # TODO: Get off of SQL backed jobs. Use Redis
gem "delayed_job"
gem "devise"
gem "discard"
gem "figaro"
gem "fog-google"
gem "font-awesome-rails"
gem "foreman"
gem "google-cloud-storage", "~> 1.11", require: false
gem "jwt"
gem "mutations"
gem "paperclip"
gem "pg"
gem "polymorphic_constraints"
gem "rabbitmq_http_api_client"
gem "rack-attack"
gem "rack-cors"
gem "rails_12factor"
gem "rails"
gem "redis", "~> 4.0"
gem "request_store"
gem "rollbar"
gem "scenic"
gem "secure_headers"
gem "skylight"
gem "tzinfo" # For validation of user selected timezone names
gem "valid_url"
gem "rabbitmq_http_api_client"
gem "zero_downtime_migrations"
gem "redis", "~> 4.0"
gem "kaminari"
group :development, :test do
gem "thin"
gem "climate_control"
gem "codecov", require: false
gem "simplecov"
gem "database_cleaner"
gem "factory_bot_rails"
gem "faker"
gem "hashdiff"
gem "letter_opener"
gem "lol_dba"
gem "pry-rails"
gem "pry"
gem "rails-erd"
gem "rspec-rails"
gem "rspec"
gem "selenium-webdriver"
gem 'rspec_junit_formatter'
gem "simplecov"
gem "smarf_doc", git: "https://github.com/RickCarlino/smarf_doc.git"
gem "climate_control"
end
group :production do

View File

@ -7,325 +7,300 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.3)
actionpack (= 5.2.3)
actioncable (6.0.2.2)
actionpack (= 6.0.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
actionmailbox (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
mail (>= 2.7.1)
actionmailer (6.0.2.2)
actionpack (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
actionpack (6.0.2.2)
actionview (= 6.0.2.2)
activesupport (= 6.0.2.2)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.2.2)
actionpack (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
nokogiri (>= 1.8.5)
actionview (6.0.2.2)
activesupport (= 6.0.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.10.9)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_model_serializers (0.10.10)
actionpack (>= 4.1, < 6.1)
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (5.2.3)
activesupport (= 5.2.3)
activejob (6.0.2.2)
activesupport (= 6.0.2.2)
globalid (>= 0.3.6)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
activemodel (6.0.2.2)
activesupport (= 6.0.2.2)
activerecord (6.0.2.2)
activemodel (= 6.0.2.2)
activesupport (= 6.0.2.2)
activestorage (6.0.2.2)
actionpack (= 6.0.2.2)
activejob (= 6.0.2.2)
activerecord (= 6.0.2.2)
marcel (~> 0.3.1)
activesupport (5.2.3)
activesupport (6.0.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
amq-protocol (2.3.0)
arel (9.0.0)
bcrypt (3.1.12)
builder (3.2.3)
bunny (2.14.1)
amq-protocol (~> 2.3, >= 2.3.0)
zeitwerk (~> 2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
amq-protocol (2.3.1)
bcrypt (3.1.13)
builder (3.2.4)
bunny (2.15.0)
amq-protocol (~> 2.3, >= 2.3.1)
case_transform (0.2)
activesupport
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
choice (0.2.0)
climate_control (0.2.0)
codecov (0.1.14)
codecov (0.1.16)
json
simplecov
url
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
daemons (1.3.1)
database_cleaner (1.7.0)
concurrent-ruby (1.1.6)
crass (1.0.6)
database_cleaner (1.8.3)
declarative (0.0.10)
declarative-option (0.1.0)
delayed_job (4.1.5)
activesupport (>= 3.0, < 5.3)
delayed_job_active_record (4.1.3)
activerecord (>= 3.0, < 5.3)
delayed_job (4.1.8)
activesupport (>= 3.0, < 6.1)
delayed_job_active_record (4.1.4)
activerecord (>= 3.0, < 6.1)
delayed_job (>= 3.0, < 5)
devise (4.6.2)
devise (4.7.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.3)
discard (1.0.0)
activerecord (>= 4.2, < 6)
docile (1.3.1)
erubi (1.8.0)
eventmachine (1.2.7)
excon (0.62.0)
factory_bot (5.0.2)
digest-crc (0.5.1)
discard (1.2.0)
activerecord (>= 4.2, < 7)
docile (1.3.2)
erubi (1.9.0)
factory_bot (5.1.2)
activesupport (>= 4.2.0)
factory_bot_rails (5.0.1)
factory_bot (~> 5.0.0)
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faker (1.9.3)
i18n (>= 0.7)
faraday (0.15.4)
faker (2.11.0)
i18n (>= 1.6, < 2)
faraday (0.17.3)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.13.1)
faraday_middleware (0.14.0)
faraday (>= 0.7.4, < 1.0)
ffi (1.10.0)
figaro (1.1.1)
thor (~> 0.14)
fog-core (2.1.0)
builder
excon (~> 0.58)
formatador (~> 0.2)
mime-types
fog-google (1.9.1)
fog-core (<= 2.1.0)
fog-json (~> 1.2)
fog-xml (~> 0.1.0)
google-api-client (~> 0.23.0)
fog-json (1.2.0)
fog-core
multi_json (~> 1.10)
fog-xml (0.1.3)
fog-core
nokogiri (>= 1.5.11, < 2.0.0)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
foreman (0.85.0)
thor (~> 0.19.1)
formatador (0.2.5)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
google-api-client (0.23.9)
google-api-client (0.37.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.7.0)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mime-types (~> 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.9)
googleauth (0.6.7)
faraday (~> 0.12)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.1)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.0)
google-cloud-storage (1.25.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.11.0)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.4, < 3.0)
memoist (~> 0.16)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (~> 0.7)
hashdiff (0.3.8)
signet (~> 0.12)
hashdiff (1.0.1)
hashie (3.6.0)
httpclient (2.8.3)
i18n (1.6.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
json (2.2.0)
jsonapi-renderer (0.2.0)
jwt (2.1.0)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.7.0)
launchy (~> 2.2)
lol_dba (2.1.5)
actionpack (>= 3.0)
activerecord (>= 3.0)
railties (>= 3.0)
loofah (2.2.3)
json (2.3.0)
jsonapi-renderer (0.2.2)
jwt (2.2.1)
kaminari (1.2.0)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.0)
kaminari-activerecord (= 1.2.0)
kaminari-core (= 1.2.0)
kaminari-actionview (1.2.0)
actionview
kaminari-core (= 1.2.0)
kaminari-activerecord (1.2.0)
activerecord
kaminari-core (= 1.2.0)
kaminari-core (1.2.0)
loofah (2.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
memoist (0.16.0)
method_source (0.9.2)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mimemagic (0.3.3)
mini_mime (1.0.1)
memoist (0.16.2)
method_source (1.0.0)
mimemagic (0.3.4)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest (5.14.0)
multi_json (1.13.1)
multipart-post (2.0.0)
mutations (0.9.0)
multipart-post (2.1.1)
mutations (0.9.1)
activesupport
nio4r (2.3.1)
nokogiri (1.10.2)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
os (1.0.0)
paperclip (6.1.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
passenger (6.0.2)
os (1.0.1)
passenger (6.0.4)
rack
rake (>= 0.8.1)
pg (1.1.4)
polymorphic_constraints (1.0.0)
rails
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pg (1.2.3)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (3.0.3)
rabbitmq_http_api_client (1.12.0)
faraday (~> 0.15.4)
faraday_middleware (~> 0.13.0)
public_suffix (4.0.3)
rabbitmq_http_api_client (1.13.0)
faraday (>= 0.15, < 1)
faraday_middleware (>= 0.13.0, < 1)
hashie (~> 3.6)
multi_json (~> 1.13.1)
rack (2.0.7)
rack-attack (5.4.2)
rack (2.2.2)
rack-attack (6.2.2)
rack (>= 1.0, < 3)
rack-cors (1.0.3)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
rails (6.0.2.2)
actioncable (= 6.0.2.2)
actionmailbox (= 6.0.2.2)
actionmailer (= 6.0.2.2)
actionpack (= 6.0.2.2)
actiontext (= 6.0.2.2)
actionview (= 6.0.2.2)
activejob (= 6.0.2.2)
activemodel (= 6.0.2.2)
activerecord (= 6.0.2.2)
activestorage (= 6.0.2.2)
activesupport (= 6.0.2.2)
bundler (>= 1.3.0)
railties (= 5.2.3)
railties (= 6.0.2.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-erd (1.5.2)
activerecord (>= 3.2)
activesupport (>= 3.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
railties (6.0.2.2)
actionpack (= 6.0.2.2)
activesupport (= 6.0.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.2)
redis (4.1.0)
thor (>= 0.20.3, < 2.0)
rake (13.0.1)
redis (4.1.3)
representable (3.0.4)
declarative (< 0.1.0)
declarative-option (< 0.2.0)
uber (< 0.2.0)
request_store (1.4.1)
request_store (1.5.0)
rack (>= 1.4)
responders (2.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
responders (3.0.0)
actionpack (>= 5.0)
railties (>= 5.0)
retriable (3.1.2)
rollbar (2.19.3)
multi_json
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.0)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.2)
rollbar (2.24.0)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-mocks (3.8.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.8.0)
rspec-rails (3.8.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-support (~> 3.8.0)
rspec-support (3.8.0)
ruby-graphviz (1.2.4)
rubyzip (1.2.2)
scenic (1.5.1)
rspec-support (~> 3.9.0)
rspec-rails (4.0.0)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.9)
rspec-expectations (~> 3.9)
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.9.2)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
scenic (1.5.2)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
secure_headers (6.1.0)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
signet (0.11.0)
secure_headers (6.3.0)
signet (0.13.0)
addressable (~> 2.3)
faraday (~> 0.9)
faraday (>= 0.17.3, < 2.0)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simplecov (0.16.1)
simplecov (0.18.5)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
skylight (3.1.5)
skylight-core (= 3.1.5)
skylight-core (3.1.5)
activesupport (>= 4.2.0)
sprockets (3.7.2)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.19.4)
thor (1.0.1)
thread_safe (0.3.6)
tzinfo (1.2.5)
tzinfo (1.2.7)
thread_safe (~> 0.1)
uber (0.1.0)
url (0.3.2)
@ -334,11 +309,10 @@ GEM
rails
warden (1.2.8)
rack (>= 2.0.6)
websocket-driver (0.7.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
zero_downtime_migrations (0.0.7)
activerecord
websocket-extensions (0.1.4)
zeitwerk (2.3.0)
PLATFORMS
ruby
@ -355,45 +329,36 @@ DEPENDENCIES
discard
factory_bot_rails
faker
figaro
fog-google
font-awesome-rails
foreman
google-cloud-storage (~> 1.11)
hashdiff
jwt
letter_opener
lol_dba
kaminari
mutations
paperclip
passenger
pg
polymorphic_constraints
pry
pry-rails
rabbitmq_http_api_client
rack-attack
rack-cors
rails
rails-erd
rails_12factor
redis (~> 4.0)
request_store
rollbar
rspec
rspec-rails
rspec_junit_formatter
scenic
secure_headers
selenium-webdriver
simplecov
skylight
smarf_doc!
thin
tzinfo
valid_url
zero_downtime_migrations
RUBY VERSION
ruby 2.6.1p33
ruby 2.6.5p114
BUNDLED WITH
1.17.2
2.1.4

View File

@ -2,4 +2,4 @@ worker: bundle exec rake jobs:work
rabbit_workers: bin/rails r lib/rabbit_workers.rb
web: bundle exec passenger start -p $PORT -e $RAILS_ENV --max-pool-size 2
# This will perform a hard refresh on all connected browsers.
release: rails r User.refresh_everyones_ui
release: rails r "User.refresh_everyones_ui"

View File

@ -18,7 +18,7 @@ There are only a handful of use cases where running a third party server is advi
FarmBot, Inc. provides a publicly accessible server at [https://my.farm.bot/](https://my.farm.bot/) for end users that are not familiar with Ruby on Rails application development. Hosting your own server will require an understanding of how Ruby on Rails applications (and databases) operate. It is designed for use by software engineers. Self-hosting the Web App will not provide you with a more stable user experience and may result in accidental security issues or data loss.
**If you are not a Ruby on Rails developer**, or you have never written a Ruby on Rails application, you are encouraged to use [the publicly available web app](http://my.farmbot.io/). Running a server is *a non-trivial task with security implications*. Data loss and security issues are possible in some circumstances. Self hosting requires an intermediate background in Ruby, SQL and Linux system administration.
**If you are not a Ruby on Rails developer**, or you have never written a Ruby on Rails application, you are encouraged to use [the publicly available web app](http://my.farm.bot/). Running a server is *a non-trivial task with security implications*. Data loss and security issues are possible in some circumstances. Self hosting requires an intermediate background in Ruby, SQL and Linux system administration.
We do not have the resources available to help novice developers learn to setup servers, environments, configurations, or perform basic Linux command line instructions.

9
SECURITY.md 100644
View File

@ -0,0 +1,9 @@
# Security Policy
## Supported Versions
Please see our [official support policy](http://support-policy.farm.bot).
## Reporting a Vulnerability
Please see our [guidelines for responsibly disclosing security vulnerabilities](http://vulnerabilities.farm.bot/).

View File

@ -0,0 +1 @@
//= link application.css

View File

@ -11,11 +11,12 @@ module Api
CONSENT_REQUIRED =
"all device users must agree to terms of service."
NOT_JSON = "That request was not valid JSON. Consider checking the" \
" request body with a JSON validator.."
" request body with a JSON validator."
NULL = Gem::Version.new("0.0.0")
NOT_FBOS = Gem::Version.new("999.999.999")
respond_to :json
before_action :raw_json, only: [:update, :create]
before_action :check_fbos_version
before_action :set_default_stuff
before_action :authenticate_user!
@ -23,7 +24,7 @@ module Api
after_action :skip_set_cookies_header
rescue_from(CeleryScript::TypeCheckError) do |err|
sorry err.message, 422
sorry err.message
end
rescue_from(ActionController::RoutingError) { sorry "Not found", 404 }
@ -31,22 +32,26 @@ module Api
rescue_from(JWT::VerificationError) { |e| auth_err }
rescue_from(ActionDispatch::Http::Parameters::ParseError) { sorry NOT_JSON, 422 }
rescue_from(ActionDispatch::Http::Parameters::ParseError) { sorry NOT_JSON }
rescue_from(JSON::ParserError) { sorry NOT_JSON }
rescue_from(ActiveRecord::ValueTooLong) do
sorry "Please use reasonable lengths on string inputs", 422
sorry "Please use reasonable lengths on string inputs"
end
rescue_from Errors::Forbidden do |exc|
sorry "You can't perform that action. #{exc.message}", 403
end
ONLY_JSON = "This is a JSON API. " \
"Please use a _valid_ JSON object or array. " \
"Validate JSON objects at https://jsonlint.com/"
rescue_from OnlyJson do |e|
sorry "This is a JSON API. Please use _valid_ JSON.", 422
sorry ONLY_JSON
end
rescue_from Errors::NoBot do |exc|
sorry "You need to register a device first.", 422
sorry "You need to register a device first."
end
rescue_from ActiveRecord::RecordNotFound do |exc|
@ -63,34 +68,53 @@ module Api
rescue_from ActiveModel::RangeError do |_|
sorry "One of those numbers was too big/small. " +
"If you need larger numbers, let us know.", 422
"If you need larger numbers, let us know."
end
TOO_MUCH_DATA = "The resource exceeds database limits. " \
"Please reduce the amount of data stored in a single resource"
rescue_from(PG::ProgramLimitExceeded) { sorry TOO_MUCH_DATA }
def default_serializer_options
{ root: false, user: current_user }
end
def maybe_paginate(collection)
page = params[:page]
per = params[:per]
if page && per
render json: collection.page(page).per(per)
else
render json: collection
end
end
private
def clean_expired_farm_events
FarmEvents::CleanExpired.run!(device: current_device)
# TODO: The app is leaking `Fragment` records, creating
# orphaned DB entries. This should be fixable via
# ActiveRecord config. Most likely a misconfiguration.
# - RC 4 OCT 19
Fragment.remove_old_fragments_for_device(current_device)
end
# Rails 5 params are no longer simple hashes. This was for security reasons.
# Our API does not do things the "Rails way" (we use Mutations for input
# sanitation) so we can ignore this and grab the raw input.
def raw_json
@raw_json ||= JSON.parse(request.body.read).tap { |x| symbolize(x) }
@raw_json ||= parse_json
rescue JSON::ParserError
raise OnlyJson
end
# PROBLEM: We want to deep_symbolize_keys! on all JSON inputs, but what if
# the user POSTs an Array? It will crash because [] does not respond_to
# deep_symbolize_keys! This is the workaround. I could probably use a
# refinement.
def symbolize(x)
x.is_a?(Array) ? x.map(&:deep_symbolize_keys!) : x.deep_symbolize_keys!
def parse_json
body = request.body.read
json = body.present? ? JSON.parse(body, symbolize_names: true) : nil
raise OnlyJson unless json.is_a?(Hash) || json.is_a?(Array)
json
end
REQ_ID = "X-Farmbot-Rpc-Id"
@ -123,7 +147,7 @@ module Api
strategy = Auth::DetermineAuthStrategy.run!(context)
case strategy
when :jwt
sign_in(Auth::FromJWT.run!(context).require_consent!)
sign_in(Auth::FromJwt.run!(context).require_consent!)
when :already_connected
# Probably provided a cookie.
# 9 times out of 10, it's a unit test.
@ -144,7 +168,7 @@ module Api
" provide a JSON Web Token in the `Authorization:` header.", 401)
end
def sorry(msg, status)
def sorry(msg, status = 422)
render json: { error: msg }, status: status
end

View File

@ -0,0 +1,17 @@
module Api
class AlertsController < Api::AbstractController
def index
maybe_paginate current_device.alerts
end
def destroy
mutate Alerts::Destroy.run(alert: alert)
end
private
def alert
@alert ||= current_device.alerts.find(params[:id])
end
end
end

View File

@ -0,0 +1,70 @@
module Api
class DemoAccountsController < Api::AbstractController
skip_before_action :authenticate_user!, only: :create
# Usually mutations go in seperate files.
# In the case of demo accounts, I want the
# feature to be easy to delete. If we decide
# that things are working fine later on, we
# can move this out.
class CreateDemo < Mutations::Command
required { string :secret }
def execute
self.delay.doing_it_asap
{}
end
def doing_it_asap
create_user
update_fields
seed_user
broadcast_the_token
end
private
def email
@email ||= ["guest_",
SecureRandom.alphanumeric.downcase,
"@farmbot.guest"].join("")
end
def user
@user ||= User.find_by!(email: email)
end
def create_user
Users::Create.run!(name: "Guest",
email: email,
password: secret,
password_confirmation: secret,
agree_to_terms: true,
skip_email: true)
end
def update_fields
user.update!(confirmed_at: Time.now)
end
def seed_user
Devices::CreateSeedData.run!(device: user.device,
product_line: "demo_account")
end
def broadcast_the_token
Transport.current.send_demo_token_to(user, secret)
end
end
def create
mutate CreateDemo.run(create_params)
end
private
def create_params
@create_params ||= { secret: raw_json.fetch(:secret) }
end
end
end

View File

@ -12,12 +12,12 @@ module Api
# POST /api/device
def create
mutate Devices::Create.run(params.as_json, user: current_user)
mutate Devices::Create.run(raw_json, user: current_user)
end
# PATCH/PUT /api/device
def update
mutate Devices::Update.run(params.as_json, device: current_device)
mutate Devices::Update.run(raw_json, device: current_device)
end
# DELETE /api/devices/1
@ -34,7 +34,15 @@ module Api
mutate Devices::Sync.run(device: current_device)
end
private
def seed
mutate Devices::CreateSeedData.run raw_json, device: current_device
end
def reset
mutate Devices::Reset.run(raw_json, device: current_device)
end
private
# Store the JSON on the local filesystem for self hosted users that don't
# have email set up.

View File

@ -1,28 +0,0 @@
module Api
class DiagnosticDumpsController < Api::AbstractController
def index
render json: diagnostic_dumps
end
def create
Rollbar.info("Device #{current_device.id} created a diagnostic")
mutate DiagnosticDumps::Create.run(raw_json, device: current_device)
end
def destroy
diagnostic_dump.destroy!
render json: ""
end
private
def diagnostic_dumps
current_device.diagnostic_dumps
end
def diagnostic_dump
@diagnostic_dump ||= diagnostic_dumps.find(params[:id])
end
end
end

View File

@ -3,7 +3,7 @@ module Api
before_action :clean_expired_farm_events, only: [:index]
def index
render json: current_device.farm_events
maybe_paginate current_device.farm_events
end
def show

View File

@ -6,11 +6,11 @@ module Api
class FarmwareEnvsController < Api::AbstractController
def create
mutate FarmwareEnvs::Create.run(params.as_json, device: current_device)
mutate FarmwareEnvs::Create.run(raw_json, device: current_device)
end
def index
render json: farmware_envs
maybe_paginate farmware_envs
end
def show

View File

@ -1,7 +1,7 @@
module Api
class FarmwareInstallationsController < Api::AbstractController
def index
render json: farmware_installations
maybe_paginate farmware_installations
end
def show

View File

@ -0,0 +1,32 @@
module Api
class FirstPartyFarmwaresController < Api::AbstractController
UPDATED_AT = "2019-08-14 18:33:08.428306"
STUBS = {
"take-photo" => "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/packages/take-photo/manifest_v2.json",
"camera-calibration" => "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/packages/camera-calibration/manifest_v2.json",
"plant-detection" => "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/packages/plant-detection/manifest_v2.json",
"historical-camera-calibration" => "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/packages/historical-camera-calibration/manifest_v2.json",
"historical-plant-detection" => "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/packages/historical-plant-detection/manifest_v2.json",
}
.to_a
.each_with_index
.map do |(package, url), id|
{
id: (id + 1),
created_at: UPDATED_AT,
updated_at: UPDATED_AT,
url: url,
package: package,
package_error: nil,
}.with_indifferent_access
end.index_by { |x| x.fetch(:id).to_s }
def index
render json: STUBS.values
end
def show
render json: STUBS.fetch(params[:id])
end
end
end

View File

@ -0,0 +1,35 @@
module Api
class FoldersController < Api::AbstractController
def create
mutate Folders::Create.run(raw_json, device: current_device)
end
def index
render json: folders
end
def show
render json: folder
end
def update
mutate Folders::Update.run(raw_json,
folder: folder,
device: current_device)
end
def destroy
mutate Folders::Destroy.run(folder: folder, device: current_device)
end
private
def folder
folders.find(params[:id])
end
def folders
current_device.folders
end
end
end

View File

@ -0,0 +1,16 @@
module Api
class GlobalBulletinsController < Api::AbstractController
skip_before_action :authenticate_user!
skip_before_action :check_fbos_version
def show
render json: search_results
end
private
def search_results
@search_results ||= GlobalBulletin.find_by(slug: params[:id])
end
end
end

View File

@ -2,21 +2,31 @@ module Api
class LogsController < Api::AbstractController
before_action :trim_logs
SEARCH_FIELDS = {
message: :to_s,
type: :to_s,
verbosity: :to_i,
x: :to_f,
y: :to_f,
z: :to_f,
}
def search
conf = current_device.web_app_config
mt = CeleryScriptSettingsBag::ALLOWED_MESSAGE_TYPES
query = mt
.map { |x| "(type = '#{x}' AND verbosity <= ?)" }
.join(" OR ")
conditions = mt.map { |x| "#{x}_log" }.map{|x| conf.send(x) }
args_ = conditions.unshift(query)
limit = current_device.max_log_count || Device::DEFAULT_MAX_LOGS
conf = current_device.web_app_config
mt = CeleryScriptSettingsBag::ALLOWED_MESSAGE_TYPES
query = mt
.map { |x| "(type = '#{x}' AND verbosity <= ?)" }
.join(" OR ")
conditions = mt.map { |x| "#{x}_log" }.map { |x| conf.send(x) }
args_ = conditions.unshift(query)
limit = current_device.max_log_count || Device::DEFAULT_MAX_LOGS
render json: current_device
.logs
.order(created_at: :desc)
.where(*args_)
.limit(limit)
.logs
.order(created_at: :desc)
.where(*args_)
.limit(limit)
.where(search_params)
end
def create
@ -32,7 +42,7 @@ module Api
render json: current_device.logs.destroy_all && ""
end
private
private
def trim_logs
# WARNING: Calls to `destroy_all` rather than
@ -40,5 +50,15 @@ module Api
# a big table! RC
current_device.excess_logs.delete_all
end
def search_params
SEARCH_FIELDS.reduce({}) do |acc, (k, v)|
search_term = params[k]
if search_term
acc[k] = search_term.send(v)
end
acc
end
end
end
end

View File

@ -3,14 +3,15 @@ module Api
skip_before_action :authenticate_user!, only: [:create, :update]
def create
mutate PasswordResets::Create.run(email: params[:email])
mutate PasswordResets::Create.run(email: raw_json[:email])
end
def update
mutate PasswordResets::Update.run(
password: params[:password],
password_confirmation: params[:password_confirmation],
token: params[:id])
password: raw_json[:password],
password_confirmation: raw_json[:password_confirmation],
token: raw_json[:id],
)
end
end
end

View File

@ -1,7 +1,7 @@
module Api
class PeripheralsController < Api::AbstractController
def index
render json: current_device.peripherals
maybe_paginate current_device.peripherals
end
def show

View File

@ -1,7 +1,7 @@
module Api
class PinBindingsController < Api::AbstractController
def index
render json: pin_bindings
maybe_paginate pin_bindings
end
def show

View File

@ -1,7 +1,7 @@
module Api
class PlantTemplatesController < Api::AbstractController
def index
render json: current_device.plant_templates
maybe_paginate current_device.plant_templates
end
def create

View File

@ -0,0 +1,39 @@
module Api
class PointGroupsController < Api::AbstractController
before_action :clean_expired_farm_events, only: [:destroy]
def index
maybe_paginate your_point_groups
end
def show
render json: the_point_group
end
def create
mutate PointGroups::Create.run(raw_json, point_group_params)
end
def update
mutate PointGroups::Update.run(raw_json, point_group_params, point_group: the_point_group)
end
def destroy
mutate PointGroups::Destroy.run(point_group: the_point_group, device: current_device)
end
private
def the_point_group
your_point_groups.find(params[:id])
end
def your_point_groups
PointGroup.preload(:point_group_items).where(point_group_params)
end
def point_group_params
@point_group_params ||= { device: current_device }
end
end
end

View File

@ -1,4 +1,4 @@
require_relative "../../lib/hstore_filter"
# require_relative "../../lib/mutations/hstore_filter"
module Api
class PointsController < Api::AbstractController
@ -7,12 +7,20 @@ module Api
# Points::Create::POINT_SOFT_LIMIT
HARD_DELETE_AFTER = 2.months
# "?filter=all", "?filter=old", "?filter=kept"
ARCHIVAL_SCOPES = {
"all" => Point.all,
"old" => Point.discarded,
"kept" => Point.kept,
}
def index
Point
.discarded
.where("discarded_at < ?", Time.now - HARD_DELETE_AFTER)
.destroy_all
render json: points
maybe_paginate points(params.fetch(:filter) { "kept" })
end
def show
@ -35,30 +43,22 @@ module Api
# TODO: We don't need to do batch requests like this any more.
# This should be removed when possible. -RC 1 AUG 2018
ids = params[:id].to_s.split(",").map(&:to_i)
mutate Points::Destroy.run({point_ids: ids}, device_params)
mutate Points::Destroy.run({ point_ids: ids }, device_params)
end
private
private
def point
@point ||= points.find(params[:id])
end
def points
@points ||= unrestricted_archival_scope.where(device_params)
end
def unrestricted_archival_scope
case params[:filter]
when "all" then return Point.all
when "old" then return Point.discarded
else
return Point.kept
end
def points(filter = params[:filter])
@points ||=
(ARCHIVAL_SCOPES[filter] || ARCHIVAL_SCOPES["all"]).where(device_params)
end
def device_params
@device_params ||= {device: current_device}
@device_params ||= { device: current_device }
end
end
end

View File

@ -3,7 +3,7 @@ module Api
before_action :clean_expired_farm_events, only: [:destroy]
def index
render json: your_regimens
maybe_paginate your_regimens
end
def show

View File

@ -5,25 +5,66 @@ module Api
# Any other response results in denial.
# Results are cached for 10 minutes to prevent too many requests to the API.
class RmqUtilsController < Api::AbstractController
class BrokerConnectionLimiter
attr_reader :cache
CACHE_KEY_TPL = "mqtt_limiter:%s"
TTL = 60 * 5 # Five Minutes
PER_DEVICE_MAX = 20
MAX_GUEST_COUNT = 256
WARNING = "'%s' was rate limited."
class RateLimit < StandardError; end
def self.current(cache = Rails.cache.redis)
self.new(cache)
end
def initialize(cache)
@cache = cache
end
def maybe_continue(username)
is_guest = (username == FARMBOT_DEMO_USER)
max = is_guest ? MAX_GUEST_COUNT : PER_DEVICE_MAX
key = CACHE_KEY_TPL % username
total = (cache.get(key) || "0").to_i
needs_ttl = cache.ttl(key) < 1
if total < max
cache.incr(key)
cache.expire(key, TTL) if needs_ttl
yield
else
Device
.delay
.connection_warning(username) if !is_guest
raise RateLimit, username
end
end
end
# List of AMQP/MQTT topics we support in the following format:
# "bot.device_123.<MAIN TOPIC HERE>"
BOT_CHANNELS = %w(
nerves_hub
from_api
from_clients
from_device
logs
nerves_hub
ping
pong
resources_v0
status
status_v8
sync
resources_v0
from_api
telemetry
\\#
\\*
).map { |x| x + "(\\.|\\z)" }.join("|")
# The only valid format for AMQP / MQTT topics.
# Prevents a whole host of abuse / security issues.
DEVICE_SPECIFIC_CHANNELS = \
DEVICE_SPECIFIC_CHANNELS =
Regexp.new("bot\\.device_\\d*\\.(#{BOT_CHANNELS})")
PUBLIC_BROADCAST = "public_broadcast"
PUBLIC_CHANNELS = ["", ".*", ".#"].map { |x| PUBLIC_BROADCAST + x }
@ -32,6 +73,14 @@ module Api
VHOST = ENV.fetch("MQTT_VHOST") { "/" }
RESOURCES = ["queue", "exchange"]
PERMISSIONS = ["configure", "read", "write"]
FARMBOT_DEMO_USER = "farmbot_demo"
DEMO_REGISTRY_ROOT = "demos"
class PasswordFailure < Exception; end
rescue_from PasswordFailure, with: :report_suspicious_behavior
rescue_from BrokerConnectionLimiter::RateLimit, with: :do_rate_limit
skip_before_action :check_fbos_version, except: []
skip_before_action :authenticate_user!, except: []
@ -44,10 +93,17 @@ module Api
# "vhost" => "/",
# "client_id" => "MQTT_FX_Client",
case username_param
when "guest" then deny
# NOTE: "guest" is not the same as
# "farmbot_demo". We intentionally
# differentiate to avoid accidental
# security issues. -RC
when "guest" then deny("Can't use guest account on this server.")
when "admin" then authenticate_admin
when FARMBOT_DEMO_USER
with_rate_limit { allow }
else
device_id_in_username == current_device.id ? allow : deny
is_ok = device_id_in_username == current_device.id
is_ok ? (with_rate_limit { allow }) : deny("Guests are rate limited")
end
end
@ -56,7 +112,7 @@ module Api
# "username" => "admin",
# "vhost" => "/",
# "ip" => "::ffff:172.23.0.1",
vhost_param == VHOST ? allow : deny
vhost_param == VHOST ? allow : deny("Bad vhost")
end
def resource_action
@ -67,7 +123,7 @@ module Api
# "name" => "mqtt-subscription-MQTT_FX_Clientqos0",
# "permission" => "configure",
ok = RESOURCES.include?(resource_param) && PERMISSIONS.include?(permission_param)
ok ? allow : deny
ok ? allow : deny("Bad resource action")
end
def topic_action # Called during subscribe
@ -80,10 +136,14 @@ module Api
# "vhost" => "/",
case routing_key_param
when *PUBLIC_CHANNELS
permission_param == "read" ? allow : deny
permission_param == "read" ? allow : deny("Topic is read only")
else
if_topic_is_safe do
device_id_in_topic == device_id_in_username ? allow : deny
if device_id_in_topic == device_id_in_username
allow
else
deny("Unsafe topic")
end
end
end
end
@ -95,17 +155,41 @@ module Api
allow if admin?
end
def farmbot_demo?
username_param == FARMBOT_DEMO_USER
end
def admin?
username_param == "admin"
end
def authenticate_admin
correct_pw = password_param == ENV.fetch("ADMIN_PASSWORD")
correct_pw = password_param == admin_password
ok = admin? && correct_pw
ok ? allow("management", "administrator") : deny
if ok
allow("management", "administrator")
else
raise PasswordFailure
end
end
def deny
def admin_password
@admin_password ||= ENV.fetch("ADMIN_PASSWORD")
rescue KeyError
raise PasswordFailure
end
def report_suspicious_behavior
Rollbar.error("Failed password attempt on RMQ: " + password_param)
deny("Failed password attempt")
end
def do_rate_limit
deny("Device is rate limited")
end
def deny(reason)
maybe_alert_user(reason)
render json: "deny", status: 403
end
@ -114,35 +198,76 @@ module Api
end
def username_param
@username ||= params["username"]
@username ||= params.fetch("username")
end
def password_param
@password ||= params["password"]
@password ||= params.fetch("password")
end
def routing_key_param
@routing_key ||= params["routing_key"]
@routing_key ||= params.fetch("routing_key")
end
def vhost_param
@vhost ||= params["vhost"]
@vhost ||= params.fetch("vhost")
end
def resource_param
@resource ||= params["resource"]
@resource ||= params.fetch("resource")
end
def permission_param
@permission ||= params["permission"]
@permission ||= params.fetch("permission")
end
def if_topic_is_safe
if farmbot_demo?
a, b, c = (routing_key_param || "").split(".")
if !(permission_param == "read")
deny("!(permission_param == read)")
return
end
if !(a == DEMO_REGISTRY_ROOT)
deny("!(a == DEMO_REGISTRY_ROOT)")
return
end
if b.nil?
deny("b.nil?")
return
end
if b.include?("*")
deny("b.include?(*)")
return
end
if b.include?("#")
deny("b.include?(#)")
return
end
if c.present?
deny("c.present?")
return
end
yield
return
end
if !!DEVICE_SPECIFIC_CHANNELS.match(routing_key_param)
yield
else
render json: MALFORMED_TOPIC, status: 422
return
end
msg = "Subscribed to illegal topic #{routing_key_param || ""}"
maybe_alert_user(msg)
render json: MALFORMED_TOPIC, status: 422
end
def device_id_in_topic
@ -153,8 +278,15 @@ module Api
.to_i || 0 # 9
end
def with_rate_limit
# TODO: Replace this with `ThrottlePolicy`.
BrokerConnectionLimiter
.current
.maybe_continue(username_param) { yield }
end
def current_device
@current_device ||= Auth::FromJWT.run!(jwt: password_param).device
@current_device ||= Auth::FromJwt.run!(jwt: password_param).device
rescue Mutations::ValidationException => e
raise JWT::VerificationError, "RMQ Provided bad token"
end
@ -162,5 +294,13 @@ module Api
def device_id_in_username
@device_id ||= username_param.gsub("device_", "").to_i
end
def maybe_alert_user(reason)
msg = "MQTT ACCESS DENIED #{reason}"
puts msg unless Rails.env.test?
if device_id_in_username > 0
Device.find(device_id_in_username).delay.tell(msg)
end
end
end
end

View File

@ -1,7 +1,7 @@
module Api
class SavedGardensController < Api::AbstractController
def index
render json: current_device.saved_gardens
maybe_paginate current_device.saved_gardens
end
def create
@ -19,13 +19,13 @@ module Api
end
def snapshot
mutate SavedGardens::Snapshot.run(params.as_json, device: current_device)
mutate SavedGardens::Snapshot.run(raw_json, device: current_device)
end
def apply
params = { garden: garden,
device: current_device,
destructive: (request.method == "POST") }
params = { garden: garden,
device: current_device,
destructive: (request.method == "POST") }
mutate SavedGardens::Apply.run(params)
end

View File

@ -1,11 +1,14 @@
module Api
class SensorReadingsController < Api::AbstractController
LIMIT = 5000
before_action :clean_old
def create
mutate SensorReadings::Create.run(raw_json, device: current_device)
mutate SensorReadings::Create.run(raw_json, device: current_device)
end
def index
render json: readings
maybe_paginate(readings)
end
def show
@ -17,10 +20,23 @@ module Api
render json: ""
end
private
private
def clean_old
if current_device.sensor_readings.count > LIMIT
current_device
.sensor_readings
.where
.not(id: readings.pluck(:id))
.delete_all
end
end
def readings
SensorReading.where(device: current_device)
@readings ||= SensorReading
.where(device: current_device)
.order(created_at: :desc)
.limit(LIMIT)
end
def reading

View File

@ -1,7 +1,7 @@
module Api
class SensorsController < Api::AbstractController
def index
render json: current_device.sensors
maybe_paginate current_device.sensors
end
def show

View File

@ -4,8 +4,8 @@ module Api
def index
render json: sequences
.to_a
.map { |s| CeleryScript::FetchCelery.run!(sequence: s) }
.to_a
.map { |s| CeleryScript::FetchCelery.run!(sequence: s) }
end
def show
@ -18,8 +18,8 @@ module Api
def update
mutate Sequences::Update.run(sequence_params,
device: current_device,
sequence: sequence)
device: current_device,
sequence: sequence)
end
def destroy
@ -29,7 +29,7 @@ module Api
private
def sequence_params
@sequence_params ||= raw_json[:sequence] || raw_json || {}
@sequence_params ||= raw_json[:sequence] || raw_json || {}
end
def sequences

View File

@ -48,7 +48,7 @@ module Api
end
def if_properly_formatted
user = params.as_json.deep_symbolize_keys.fetch(:user, {})
user = raw_json.fetch(:user, {})
# If data handling for this method gets any more complicated,
# extract into a mutation.
if(user.is_a?(Hash))

View File

@ -2,7 +2,7 @@ module Api
class ToolsController < Api::AbstractController
def index
render json: tools
maybe_paginate tools
end
def show

View File

@ -22,7 +22,7 @@ module Api
def resend_verification
mutate Users::ResendVerification
.run(user: User.find_by!(email: params[:email]))
.run(user: User.find_by!(email: raw_json[:email]))
end
def control_certificate
@ -32,17 +32,17 @@ module Api
private
def user_params
user = params
.as_json
.merge!(params.as_json["user"] || {})
user = raw_json
.merge!(raw_json[:user] || {})
.deep_symbolize_keys
{email: user[:email],
name: user[:name],
password: user[:password],
password_confirmation: user[:password_confirmation],
new_password: user[:new_password],
{ email: user[:email],
name: user[:name],
password: user[:password],
password_confirmation: user[:password_confirmation],
new_password: user[:new_password],
new_password_confirmation: user[:new_password_confirmation],
agree_to_terms: user[:agree_to_terms]}
agree_to_terms: user[:agree_to_terms],
skip_email: User::SKIP_EMAIL_VALIDATION }
end
end
end

View File

@ -3,11 +3,11 @@
module Api
class WebcamFeedsController < Api::AbstractController
def create
mutate WebcamFeeds::Create.run(params.as_json, device: current_device)
mutate WebcamFeeds::Create.run(raw_json, device: current_device)
end
def index
render json: webcams
maybe_paginate webcams
end
def show
@ -15,14 +15,14 @@ module Api
end
def update
mutate WebcamFeeds::Update.run(params.as_json, webcam_feed: webcam)
mutate WebcamFeeds::Update.run(raw_json, webcam_feed: webcam)
end
def destroy
render json: webcam.destroy! && ""
end
private
private
def webcam
webcams.find(params[:id])

View File

@ -7,7 +7,8 @@ class ApplicationController < ActionController::Base
@current_device
else
@current_device = (current_user.try(:device) || no_device)
Device.current = @current_device # Mutable state eww
# Mutable state eww
Device.send(:current=, @current_device)
@current_device
end
end

View File

@ -3,43 +3,47 @@ class DashboardController < ApplicationController
layout "dashboard"
# === THESE CONSTANTS ARE CONFIGURABLE: ===
EVERY_STATIC_PAGE = [ :front_page,
:main_app,
:password_reset,
:tos_update, ]
EVERY_STATIC_PAGE = [:front_page,
:main_app,
:password_reset,
:tos_update,
:os_download,
:demo]
OUTPUT_URL = "/" + File.join("assets", "parcel") # <= served from public/ dir
# <= See PUBLIC_OUTPUT_DIR
CACHE_DIR = File.join(".cache")
CACHE_DIR = File.join(".cache")
CSS_INPUTS = {
CSS_INPUTS = {
front_page: "/css/laptop_splash.scss",
default: "/css/_index.scss",
default: "/css/_index.scss",
}.with_indifferent_access
JS_INPUTS = {
main_app: "/entry.tsx",
front_page: "/front_page/index.tsx",
JS_INPUTS = {
main_app: "/entry.tsx",
front_page: "/front_page/index.tsx",
password_reset: "/password_reset/index.tsx",
tos_update: "/tos_update/index.tsx",
tos_update: "/tos_update/index.tsx",
demo: "/demo/index.tsx",
os_download: "/os_download/index.tsx"
}.with_indifferent_access
# === THESE CONSTANTS ARE NON-CONFIGURABLE. ===
# They are calculated based on config above.
RELEASE_CHUNK = GlobalConfig::LONG_REVISION == "NONE" ?
RELEASE_CHUNK = GlobalConfig::LONG_REVISION == "NONE" ?
SecureRandom.hex.first(5) : GlobalConfig::LONG_REVISION
CACHE_BUST_STRING = "?version=#{RELEASE_CHUNK}"
PUBLIC_OUTPUT_DIR = File.join("public", OUTPUT_URL)
CSS_OUTPUTS = CSS_INPUTS.reduce({}) do |acc, (k, v)|
file = v.gsub(/\.scss$/, ".css")
file = v.gsub(/\.scss$/, ".css")
acc[k] = File.join(OUTPUT_URL, file)
acc
end.with_indifferent_access
JS_OUTPUTS = JS_INPUTS.reduce({}) do |acc, (k, v)|
file = v.gsub(/\.tsx?$/, ".js")
file = v.gsub(/\.tsx?$/, ".js")
acc[k] = File.join(OUTPUT_URL, file)
acc
end.with_indifferent_access
@ -50,9 +54,9 @@ class DashboardController < ApplicationController
.map { |x| File.join("frontend", x) }
.join(" ")
PARCEL_HMR_OPTS = [
PARCEL_HMR_OPTS = [
"--no-hmr",
"--no-cache"
"--no-cache",
].join(" ")
EVERY_STATIC_PAGE.map do |actn|
@ -61,22 +65,22 @@ class DashboardController < ApplicationController
# If you don't do this, you will hit hard to debug
# CSP errors on local when changing API_HOST.
response.headers["Cache-Control"] = "no-cache, no-store"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "0"
response.headers["Pragma"] = "no-cache"
response.headers["Expires"] = "0"
load_css_assets
load_js_assets
render actn
rescue ActionView::MissingTemplate => q
raise ActionController::RoutingError, "Bad URL in dashboard"
raise ActionController::RoutingError, "Bad URL in dashboard. -Rick"
end
end
end
def confirmation_page
load_css_assets
user = User.find_by!(confirmation_token: params.fetch(:token))
user = User.find_by!(confirmation_token: params.fetch(:token))
# Two use cases: re-confirmation Email change
klass = user.unconfirmed_email? ? Users::Reverify : Users::Verify
klass = user.unconfirmed_email? ? Users::Reverify : Users::Verify
@token = klass.run!(user: user).to_json
render :confirmation_page
rescue User::AlreadyVerified
@ -90,10 +94,8 @@ class DashboardController < ApplicationController
begin
report = JSON.parse(payload)
rescue
report = {problem: "Crashed while parsing report"}
report = { problem: "Crashed while parsing report" }
end
Rollbar.info("CSP Violation", report)
render json: report
end
@ -101,13 +103,17 @@ class DashboardController < ApplicationController
# Do not use this if you use GCS- it will slow your app down.
def direct_upload
raise "No." unless Api::ImagesController.store_locally
name = params.fetch(:key).split("/").last
path = File.join("public", "direct_upload", "temp", name)
name = params.fetch(:key).split("/").last
path = File.join("public", "direct_upload", "temp", name)
File.open(path, "wb") { |f| f.write(params[:file]) }
render json: ""
end
private
def logout
end
private
def load_css_assets
@css_assets ||= [action_name, :default].reduce([]) do |list, action|
asset = CSS_OUTPUTS[action] # Not every endpoint has custom CSS.
@ -118,8 +124,8 @@ private
def load_js_assets
# Every DashboardController has a JS SBundle.
@js_assets ||= \
[ JS_OUTPUTS.fetch(action_name) ].map { |x| x + CACHE_BUST_STRING }
@js_assets ||=
[JS_OUTPUTS.fetch(action_name)].map { |x| x + CACHE_BUST_STRING }
end
def set_global_config

View File

@ -0,0 +1,72 @@
# Recurring task that deletes inactive accounts.
class InactiveAccountJob < ApplicationJob
queue_as :default
LIMIT = 1000
ORDER = "RANDOM()"
INACTIVE_WITH_DEVICE = 11.months + 15.days
INACTIVE_NO_DEVICE = 2.months + 15.days
WARNING_TIME = 14.days
def users
User.includes(:device)
end
# They signed up for an account, but never configured a device.
def no_device
users
.where("devices.fbos_version" => nil)
.references(:devices)
end
# They signed up for an account and once had a working device.
def ok_device
users
.where
.not("devices.fbos_version" => nil)
.references(:devices)
end
def inactive_3mo
no_device
.where("last_sign_in_at < ?", INACTIVE_NO_DEVICE.ago)
end
def inactive_11mo
ok_device
.where("last_sign_in_at < ?", INACTIVE_WITH_DEVICE.ago)
end
# Returns a Map. Key is the number of warnings sent, value is a User object
# (not a device, but device is preloaded)
def all_inactive
@all_inactive ||= inactive_11mo.or(inactive_3mo).order(ORDER).limit(LIMIT)
end
def notify_old_accounts
all_inactive
.where(inactivity_warning_sent_at: nil)
.map(&:send_inactivity_warning)
end
def delete_old_accounts
all_inactive
.where
.not(inactivity_warning_sent_at: nil)
.where("inactivity_warning_sent_at < ?", WARNING_TIME.ago)
.map(&:deactivate_account)
end
# EDGE CASE: Accounts that register but never sign in.
def cleanup_nils
User
.where(last_sign_in_at: nil)
.limit(LIMIT)
.map { |x| x.update!(last_sign_in_at: x.created_at) }
end
def perform
cleanup_nils
notify_old_accounts
delete_old_accounts
end
end

View File

@ -0,0 +1,19 @@
class AbstractServiceRunner
WAIT_TIME = Rails.env.test? ? 0.01 : 5
OFFLINE_ERROR = Bunny::TCPConnectionFailedForAllHosts
CRASH_MSG = Rails.env.test? ?
"\e[32m.\e[0m" : "Something caused the broker to crash...\n"
def go!(channel)
channel.subscribe(block: true) do |info, _, payl|
self.process(info, payl.force_encoding("UTF-8"))
end
rescue OFFLINE_ERROR, StandardError => e
unless e.is_a?(OFFLINE_ERROR)
Rollbar.error(e)
print CRASH_MSG
end
sleep WAIT_TIME
retry
end
end

View File

@ -7,20 +7,22 @@ class AmqpLogParser < Mutations::Command
TOO_OLD = "fbos version is out of date"
DISCARD = "message type field is not the kind that gets saved in the DB"
NOT_HASH = "logs must be a hash"
NOT_JSON = "Invalid JSON. Use a JSON validator."
# I keep a Ruby copy of the JSON here for reference.
# This is what a log will look like after JSON.parse()
EXAMPLE_JSON = {
"meta" => {
"x" => 0,
"y" => 0,
"z" => 0,
"type" => "info",
},
"major_version" => 6, # <= up-to-date bots do this
"message" => "HQ FarmBot TEST 123 Pin 13 is 0",
"created_at" => 1512585641,
"channels" => [],
"created_at" => 1572015955,
"major_version" => 8,
"message" => "Syncing",
"meta" => {},
"minor_version" => 1,
"patch_version" => 1,
"type" => "info",
"verbosity" => 3,
"x" => 0.0,
"y" => 0.0,
"z" => 0.0,
}
required do
@ -48,7 +50,7 @@ class AmqpLogParser < Mutations::Command
# Prevents "runaway" bots from flooding the server with frivolous database
# hits by using in memory cache of results for 150 seconds.
def device
Device.cached_find(device_id)
Device.find(device_id)
end
end
@ -75,6 +77,8 @@ class AmqpLogParser < Mutations::Command
def set_payload!
# Parse from string to a Ruby hash (JSON)
@output.payload = JSON.parse(payload)
rescue JSON::ParserError
add_error :json, :not_json, NOT_JSON
end
def log
@ -100,8 +104,19 @@ class AmqpLogParser < Mutations::Command
end
def find_problems!
@output.problems.push(NOT_HASH) and return if not_hash?
@output.problems.push(TOO_OLD) and return if major_version < 6
@output.problems.push(DISCARD) and return if discard?
if not_hash?
@output.problems.push(NOT_HASH)
return
end
if (major_version || 0) < 7
@output.problems.push(TOO_OLD)
return
end
if discard?
@output.problems.push(DISCARD)
return
end
end
end

View File

@ -6,9 +6,10 @@
module CeleryScript
class AstLeaf < AstBase
FRIENDLY_ERRORS = CeleryScript::Checker::FRIENDLY_ERRORS
BAD_LEAF = CeleryScript::Checker::BAD_LEAF
BAD_LEAF = CeleryScript::Checker::BAD_LEAF
attr_reader :kind, :value, :parent
def initialize(parent, value, kind)
@parent, @value, @kind = parent, value, kind
end
@ -17,14 +18,13 @@ module CeleryScript
allowed = corpus.fetchArg(kind).allowed_values
unless allowed.any? { |spec| spec.valid?(self, corpus) }
message = (FRIENDLY_ERRORS.dig(kind, parent.kind) || BAD_LEAF) % {
kind: kind,
kind: kind,
parent_kind: parent.kind,
allowed: "[#{allowed.map(&:name).join(", ")}]",
actual: value.class
allowed: "[#{allowed.map(&:name).join(", ")}]",
actual: value.class,
}
raise TypeCheckError, message
end
end
end
end

View File

@ -3,102 +3,102 @@
# other nodes (*always* optional).
module CeleryScript
class AstNode < AstBase
attr_reader :args, :body, :comment, :kind, :parent
BODY_HAS_NON_NODES = "The `body` of a node can only contain nodes- " \
"no leaves here."
LEAVES_NEED_KEYS = "Tried to initialize a leaf without a key."
NEVER = :__NEVER__
FRIENDLY_ERRORS = CeleryScript::Checker::FRIENDLY_ERRORS
BAD_LEAF = CeleryScript::Checker::BAD_LEAF
attr_reader :args, :body, :comment, :kind, :parent
BODY_HAS_NON_NODES = "The `body` of a node can only contain nodes- " \
"no leaves here."
LEAVES_NEED_KEYS = "Tried to initialize a leaf without a key."
NEVER = :__NEVER__
FRIENDLY_ERRORS = CeleryScript::Checker::FRIENDLY_ERRORS
BAD_LEAF = CeleryScript::Checker::BAD_LEAF
def initialize(parent = nil, args:, body: nil, comment: "", kind:, uuid: nil)
@comment, @kind, @parent = comment, kind, parent
def initialize(parent = nil, args:, body: nil, comment: "", kind:, uuid: nil)
@comment, @kind, @parent = comment, kind, parent
@args = args.map do |key, value|
[key.to_sym, maybe_initialize(self, value, key)]
end.to_h if args
@args = args.map do |key, value|
[key.to_sym, maybe_initialize(self, value, key)]
end.to_h if args
@body = body.map do |e|
raise TypeCheckError, BODY_HAS_NON_NODES unless is_node?(e)
maybe_initialize(self, e)
end if body
@body = body.map do |e|
raise TypeCheckError, BODY_HAS_NON_NODES unless is_node?(e)
maybe_initialize(self, e)
end if body
end
def maybe_initialize(parent, leaf_or_node, key = NEVER)
if is_node?(leaf_or_node)
AstNode.new(parent, **leaf_or_node)
else
raise TypeCheckError, LEAVES_NEED_KEYS if key == NEVER
AstLeaf.new(parent, leaf_or_node, key)
end
end
def is_node?(hash)
hash.is_a?(Hash) &&
hash.symbolize_keys! &&
hash.has_key?(:kind) &&
hash.has_key?(:args) &&
(hash[:body].is_a?(Array) || hash[:body] == nil) &&
(hash[:comment].is_a?(String) || hash[:comment] == nil) &&
(hash[:args].is_a?(Hash)) &&
(hash[:kind].is_a?(String))
end
# Calling this method with only one parameter
# indicates a starting condition 🏁
def resolve_variable!(origin = self)
locals = args[:locals]
if locals&.kind === "scope_declaration"
label = origin.args[:label]&.value
result = (locals.body || []).select do |x|
x.args[:label]&.value == label
end.first
return result if result
end
def maybe_initialize(parent, leaf_or_node, key = NEVER)
if is_node?(leaf_or_node)
AstNode.new(parent, leaf_or_node)
else
raise TypeCheckError, LEAVES_NEED_KEYS if key == NEVER
AstLeaf.new(parent, leaf_or_node, key)
end
case parent
when AstNode
# sequence: Check the `scope` arg
# Keep recursing if we can't find a scope on this node
parent.resolve_variable!(origin)
when nil # We've got an unbound variable.
origin.invalidate!(UNBOUND_VAR % origin.args[:label].value)
end
end
def is_node?(hash)
hash.is_a?(Hash) &&
hash.symbolize_keys! &&
hash.has_key?(:kind) &&
hash.has_key?(:args) &&
(hash[:body].is_a?(Array) || hash[:body] == nil) &&
(hash[:comment].is_a?(String) || hash[:comment] == nil) &&
(hash[:args].is_a?(Hash)) &&
(hash[:kind].is_a?(String))
end
# Calling this method with only one parameter
# indicates a starting condition 🏁
def resolve_variable!(origin = self)
locals = args[:locals]
if locals&.kind === "scope_declaration"
label = origin.args[:label]&.value
result = (locals.body || []).select do |x|
x.args[:label]&.value == label
end.first
return result if result
end
case parent
when AstNode
# sequence: Check the `scope` arg
# Keep recursing if we can't find a scope on this node
parent.resolve_variable!(origin)
when nil # We've got an unbound variable.
origin.invalidate!(UNBOUND_VAR % origin.args[:label].value)
end
end
def todo
def todo
# Don't delete this- it is currently unreachable code, but as soon as we
# allow identifiers other than `point`, `tool` and `coordinate` we will
# need it again (and can write tests)
end
end
def cross_check(corpus, key)
actual = kind
allowed = corpus.fetchArg(key).allowed_values
# It would be safe to run type checking here.
if (actual == "identifier")
allowed_types = allowed.filter { |x| x.tag == :identifier }
var = resolve_variable!
case var.kind
when "parameter_declaration" then todo
when "variable_declaration"
# REASSIGNMENT WARNING!:
actual = var.args[:data_value].kind
end
end
unless allowed.map(&:name).include?(actual)
message = (FRIENDLY_ERRORS.dig(kind, parent.kind) || BAD_LEAF) % {
kind: kind,
parent_kind: parent.kind,
allowed: allowed.map(&:name),
actual: actual
}
raise TypeCheckError, message
def cross_check(corpus, key)
actual = kind
allowed = corpus.fetchArg(key).allowed_values
# It would be safe to run type checking here.
if (actual == "identifier")
allowed_types = allowed.filter { |x| x.tag == :identifier }
var = resolve_variable!
case var.kind
when "parameter_declaration" then todo
when "variable_declaration"
# REASSIGNMENT WARNING!:
actual = var.args[:data_value].kind
end
end
unless allowed.map(&:name).include?(actual)
message = (FRIENDLY_ERRORS.dig(kind, parent.kind) || BAD_LEAF) % {
kind: kind,
parent_kind: parent.kind,
allowed: allowed.map(&:name),
actual: actual,
}
raise TypeCheckError, message
end
end
end
end

View File

@ -3,17 +3,20 @@
# this part last
module CeleryScript
UNBOUND_VAR = "Unbound variable: %s"
class TypeCheckError < StandardError; end
class Checker
MISSING_ARG = "Expected node '%s' to have a '%s', but got: %s."
EXTRA_ARGS = "'%s' has unexpected arguments: %s. Allowed arguments: %s"
BAD_LEAF = "Expected leaf '%{kind}' within '%{parent_kind}'"\
" to be one of: %{allowed} but got %{actual}"
MALFORMED = "Expected '%s' to be a node or leaf, but it was neither"
BAD_BODY = "Body of '%s' node contains '%s' node. "\
"Expected one of: %s"
T_MISMATCH = "Type mismatch. %s must be one of: %s. Got: %s"
EXTRA_ARGS = "'%s' has unexpected arguments: %s. Allowed arguments: %s"
BAD_LEAF = "Expected leaf '%{kind}' within '%{parent_kind}'" \
" to be one of: %{allowed} but got %{actual}"
MALFORMED = "Expected '%s' to be a node or leaf, but it was neither"
BAD_BODY = "Body of '%s' node contains '%s' node. " \
"Expected one of: %s"
T_MISMATCH = "Type mismatch. %s must be one of: %s. Got: %s"
MISSING_VAR = "You must select a Location for the Location Variable."
MISSING_PARAM = "You must select a Default Value for the Location Variable."
# Certain CeleryScript pairing errors are more than just a syntax error.
# For instance, A `nothing` node in a `parameter_declaration` is often an
@ -22,8 +25,13 @@ module CeleryScript
# BAD_LEAF template.
FRIENDLY_ERRORS = {
nothing: {
variable_declaration: "You must provide a value for all parameters",
parameter_declaration: "You must provide a value for all parameters",
write_pin: "You must select a Peripheral in the Control Peripheral step.",
toggle_pin: "You must select a Peripheral in the Toggle Peripheral step.",
variable_declaration: MISSING_VAR,
parameter_declaration: MISSING_PARAM,
read_pin: "You must select a Sensor in the Read Sensor step.",
move_absolute: "You must select a Location in the Move To step.",
execute: CeleryScriptSettingsBag::NO_SUB_SEQ,
},
}.with_indifferent_access
@ -37,7 +45,12 @@ module CeleryScript
# This is the type checker entry point after initialization.
def run!
CeleryScript::TreeClimber.travel(tree, method(:validate).to_proc)
# NOTE: Some nodes require knowledge of
# `Device.current` in order to validate
# properly
device.auto_sync_transaction do
CeleryScript::TreeClimber.travel(tree, method(:validate).to_proc)
end
tree
end
@ -89,7 +102,7 @@ module CeleryScript
unless has_key
msgs = node.args.keys.join(", ")
msgs = "nothing" if msgs.length < 1
msg = MISSING_ARG % [node.kind, arg, msgs]
msg = MISSING_ARG % [node.kind, arg, msgs]
raise TypeCheckError, msg
end
end

View File

@ -9,8 +9,8 @@
# * You need to create "traces" of where you are in a sequence (using numbers)
# MORE INFO: https://github.com/FarmBot-Labs/Celery-Slicer
module CeleryScript
# Supporting class for CSHeap (below this class)
# PROBLEM: CSHeap uses numbers to address sibling/parent nodes.
# Supporting class for CsHeap (below this class)
# PROBLEM: CsHeap uses numbers to address sibling/parent nodes.
# PROBLEM: Numbers are very easy to mix up. Is it an array index? A SQL
# primary key? A primitive value? It's not always easy to say.
# SOLUTION: Create a `HeapAddress` value type to remove ambiguity.
@ -60,21 +60,22 @@ module CeleryScript
end
end
class CSHeap
class BadAddress < Exception; end;
class CsHeap
class BadAddress < Exception; end
BAD_ADDR = "Bad node address: "
# Nodes that point to other nodes rather than primitive data types (eg:
# `locals` and friends) will be prepended with a LINK.
LINK = "__"
LINK = "__"
# Points to the originator (parent) of an `arg` or `body` node.
PARENT = (LINK + "parent").to_sym
PARENT = (LINK + "parent").to_sym
# Points to the first element in the `body``
BODY = (LINK + "body").to_sym
BODY = (LINK + "body").to_sym
# Points to the next node in the body chain. Pointing to NOTHING indicates
# the end of the body linked list.
NEXT = (LINK + "next").to_sym
NEXT = (LINK + "next").to_sym
# Unique key name. See `celery_script_settings_bag.rb`
KIND = :__KIND__
KIND = :__KIND__
COMMENT = :__COMMENT__
# Keys that primary nodes must have
@ -82,17 +83,16 @@ module CeleryScript
# Index 0 of the heap represents a null pointer of sorts.
# If a field points to this address, it is considered empty.
NULL = HeapAddress[0]
NULL = HeapAddress[0]
# What you will find at index 0 of the heap:
NOTHING = {
KIND => "nothing",
KIND => "nothing",
PARENT => NULL,
BODY => NULL,
NEXT => NULL
BODY => NULL,
NEXT => NULL,
}
# A dictionary of nodes in the CeleryScript tree, as stored in the heap.
# Nodes will have:
# * A `KIND` field - What kind of node is it?
@ -113,7 +113,7 @@ module CeleryScript
# Set "here" to "null". Prepopulates "here" with an empty entry.
def initialize
@here = NULL
@here = NULL
@entries = { @here => NOTHING }
end

View File

@ -1,4 +1,4 @@
require_relative "./csheap"
require_relative "./cs_heap"
# Service object that:
# 1. Pulls out all PrimaryNodes and EdgeNodes for a sequence node (AST Flat IR form)
@ -8,7 +8,7 @@ require_relative "./csheap"
# DEFAULT.
module CeleryScript
class FetchCelery < Mutations::Command
private # = = = = = = =
private # = = = = = = =
# This class is too CPU intensive to make multiple SQL requests.
# To speed up querying, we create an in-memory index for frequently
# looked up attributes such as :id, :kind, :parent_id, :primary_node_id
@ -60,7 +60,7 @@ module CeleryScript
# that node's children (or an empty array, since body is always optional).
def get_body_elements(origin)
next_node = find_by_id_in_memory(origin.body_id)
results = []
results = []
until next_node.kind == "nothing"
results.push(next_node)
next_node = find_by_id_in_memory(next_node[:next_id])
@ -71,7 +71,7 @@ module CeleryScript
# Top level function call for converting a single EdgeNode into a JSON
# document. Returns Ruby hash that conforms to CeleryScript semantics.
def recurse_into_node(node)
out = { kind: node.kind, args: recurse_into_args(node) }
out = { kind: node.kind, args: recurse_into_args(node) }
body = get_body_elements(node)
if body.empty?
# Legacy sequences *must* have body on sequence. Others are fine.
@ -87,16 +87,18 @@ module CeleryScript
# Eg: color, id, etc.
def misc_fields
return {
id: sequence.id,
created_at: sequence.created_at,
updated_at: sequence.updated_at,
args: Sequence::DEFAULT_ARGS,
color: sequence.color,
name: sequence.name
}
id: sequence.id,
created_at: sequence.created_at,
updated_at: sequence.updated_at,
folder_id: sequence.folder_id,
args: Sequence::DEFAULT_ARGS,
color: sequence.color,
name: sequence.name,
}
end
public # = = = = = = =
public # = = = = = = =
NO_SEQUENCE = "You must have a root node `sequence` at a minimum."
required do

View File

@ -1,7 +1,7 @@
require_relative "./csheap"
require_relative "./cs_heap"
# ABOUT THIS CLASS:
# CSHeap creates an in memory representation of a Flat IR tree using array
# CsHeap creates an in memory representation of a Flat IR tree using array
# indexes (HeapAddress instances, really). This class takes a flat IR tree
# from memory and converts `HeapAddress`es to SQL primary/foreign keys.
module CeleryScript
@ -10,14 +10,14 @@ module CeleryScript
# The following constants are abbreviations of the full name, since the
# full name is quite long and they are referenced frequently in the code.
# Just remember that "B" is "BODY", "K" is "KIND", etc...
B = CeleryScript::CSHeap::BODY
C = CeleryScript::CSHeap::COMMENT
K = CeleryScript::CSHeap::KIND
L = CeleryScript::CSHeap::LINK
N = CeleryScript::CSHeap::NEXT
P = CeleryScript::CSHeap::PARENT
NULL = CeleryScript::CSHeap::NULL
I = :instance
B = CeleryScript::CsHeap::BODY
C = CeleryScript::CsHeap::COMMENT
K = CeleryScript::CsHeap::KIND
L = CeleryScript::CsHeap::LINK
N = CeleryScript::CsHeap::NEXT
P = CeleryScript::CsHeap::PARENT
NULL = CeleryScript::CsHeap::NULL
I = :instance
required do
model :sequence, class: Sequence
@ -28,7 +28,7 @@ module CeleryScript
def validate
# IF YOU REMOVE THIS BAD STUFF WILL HAPPEN:
# version is never user definable!
sequence_hash[:args] = \
sequence_hash[:args] =
Sequence::DEFAULT_ARGS.merge(sequence_hash[:args] || {})
# See comment above ^ TODO: Investigate removal now that EdgeNodes exist.
end
@ -37,67 +37,67 @@ module CeleryScript
Sequence.transaction do
flat_ir
.each do |node|
# Step 1- instantiate records.
node[I] = PrimaryNode.create!(kind: node[K],
sequence: sequence,
comment: node[C] || nil)
end
# Step 1- instantiate records.
node[I] = PrimaryNode.create!(kind: node[K],
sequence: sequence,
comment: node[C] || nil)
end
.each_with_index do |node, index|
# Step 2- Assign SQL ids (not to be confused with array index IDs or
# instances of HeapAddress), also sets parent_arg_name
model = node[I]
model.parent_arg_name = parent_arg_name_for(node, index)
model.body_id = fetch_sql_id_for(B, node)
model.parent_id = fetch_sql_id_for(P, node)
model.next_id = fetch_sql_id_for(N, node)
node
end
# Step 2- Assign SQL ids (not to be confused with array index IDs or
# instances of HeapAddress), also sets parent_arg_name
model = node[I]
model.parent_arg_name = parent_arg_name_for(node, index)
model.body_id = fetch_sql_id_for(B, node)
model.parent_id = fetch_sql_id_for(P, node)
model.next_id = fetch_sql_id_for(N, node)
node
end
.map do |node|
# Step 3- Set edge nodes
pairs = node
.to_a
.select do |x|
key = x.first.to_s
(x.first != I) && !key.starts_with?(L)
end
.map do |(key, value)|
EdgeNode.create!(kind: key,
value: value,
sequence_id: sequence.id,
primary_node_id: node[:instance].id)
end
node[:instance]
# Step 3- Set edge nodes
pairs = node
.to_a
.select do |x|
key = x.first.to_s
(x.first != I) && !key.starts_with?(L)
end
.tap { |x| sequence.update_attributes(migrated_nodes: true) unless sequence.migrated_nodes }
.map do |(key, value)|
EdgeNode.create!(kind: key,
value: value,
sequence_id: sequence.id,
primary_node_id: node[:instance].id)
end
node[:instance]
end
.tap { |x| sequence.update(migrated_nodes: true) unless sequence.migrated_nodes }
.map { |x|
x.save! if x.changed?
x
}
x.save! if x.changed?
x
}
end
end
private
private
# Index every primary node in memory by its `HeapAddress`.
# We need this info in order to fill out the `parent_arg_name` of a node.
def every_primary_link
@every_primary_link ||= flat_ir
.map do |x|
x
.except(B,C,I,K,L,N,P)
.invert
.to_a
.select{|(k,v)| k.is_a?(HeapAddress)}
end
x
.except(B, C, I, K, L, N, P)
.invert
.to_a
.select { |(k, v)| k.is_a?(HeapAddress) }
end
.map(&:to_h)
.reduce({}, :merge)
end
def parent_arg_name_for(node, index)
resides_in_args = (node[N] == NULL) && (node[P] != NULL)
link_symbol = every_primary_link[HeapAddress[index]]
resides_in_args = (node[N] == NULL) && (node[P] != NULL)
link_symbol = every_primary_link[HeapAddress[index]]
needs_p_arg_name = (resides_in_args && link_symbol)
parent_arg_name = (needs_p_arg_name ? link_symbol.to_s.gsub(L, "") : nil)
parent_arg_name = (needs_p_arg_name ? link_symbol.to_s.gsub(L, "") : nil)
return parent_arg_name
end
@ -107,7 +107,7 @@ private
end
def sequence_hash
@sequence_hash ||= \
@sequence_hash ||=
HashWithIndifferentAccess.new(kind: "sequence", args: args, body: body)
end

View File

@ -2,18 +2,18 @@ module CeleryScript
# THIS IS A MORE MINIMAL VERSION OF CeleryScript::TreeClimber.
# It is a NON-VALIDATING tree climber.
# Don't use this on unverified data structures.
class JSONClimber
class JsonClimber
HASH_ONLY = "Expected a Hash."
NOT_NODE = "Expected hash with at least a `kind` and `args` prop."
NOT_NODE = "Expected hash with at least a `kind` and `args` prop."
def self.climb(thing, &callable)
raise HASH_ONLY unless thing.is_a?(Hash)
raise NOT_NODE unless is_node?(thing)
raise NOT_NODE unless is_node?(thing)
go(thing, callable)
thing
end
private
private
def self.is_node?(maybe)
maybe.is_a?(Hash) &&

View File

@ -1,4 +1,4 @@
require_relative "./csheap.rb"
require_relative "./cs_heap.rb"
# ORIGINAL IMPLEMENTATION HERE: https://github.com/FarmBot-Labs/Celery-Slicer
# Take a nested ("canonical") representation of a CeleryScript sequence and
# transforms it to a flat/homogenous intermediate representation which is better
@ -11,12 +11,12 @@ module CeleryScript
raise "Not a hash" unless node.is_a?(Hash)
@nesting_level = 0
@root_node = node
heap = CSHeap.new()
allocate(heap, node, CSHeap::NULL)
heap = CsHeap.new()
allocate(heap, node, CsHeap::NULL)
@heap_values = heap.values
@heap_values.map do |x|
x[CSHeap::BODY] ||= CSHeap::NULL
x[CSHeap::NEXT] ||= CSHeap::NULL
x[CsHeap::BODY] ||= CsHeap::NULL
x[CsHeap::NEXT] ||= CsHeap::NULL
end
heap.dump()
end
@ -31,8 +31,8 @@ module CeleryScript
def allocate(h, s, parentAddr)
addr = h.allot(s[:kind])
h.put(addr, CSHeap::PARENT, parentAddr)
h.put(addr, CSHeap::COMMENT, s[:comment]) if s[:comment]
h.put(addr, CsHeap::PARENT, parentAddr)
h.put(addr, CsHeap::COMMENT, s[:comment]) if s[:comment]
iterate_over_body(h, s, addr)
iterate_over_args(h, s, addr)
addr
@ -44,7 +44,7 @@ module CeleryScript
.map do |key|
v = s[:args][key]
if (is_celery_script(v))
k = CSHeap::LINK + key.to_s
k = CsHeap::LINK + key.to_s
h.put(parentAddr, k, allocate(h, v, parentAddr))
else
h.put(parentAddr, key, v)
@ -64,12 +64,12 @@ module CeleryScript
is_head = index == 0
# BE CAREFUL EDITING THIS LINE, YOU MIGHT BREAK `BODY` NODES:
heap # See note above!
.put(previous_address, CSHeap::BODY, previous_address + 1) if is_head
.put(previous_address, CsHeap::BODY, previous_address + 1) if is_head
my_heap_address = allocate(heap, canonical_list[index], previous_address)
prev_next_key = is_head ? CSHeap::NULL : my_heap_address
heap.put(previous_address, CSHeap::NEXT, prev_next_key)
prev_next_key = is_head ? CsHeap::NULL : my_heap_address
heap.put(previous_address, CsHeap::NEXT, prev_next_key)
recurse_into_body(heap, canonical_list, my_heap_address, index + 1)
end

View File

@ -1,36 +1,54 @@
# A singleton that runs on a separate process than the web server.
# Listens to *ALL* incoming logs and stores them to the DB.
# Also handles throttling.
class LogService
T = ThrottlePolicy::TimePeriod
THROTTLE_POLICY = ThrottlePolicy.new T.new(1.minute) => 0.5 * 1_000,
T.new(1.hour) => 0.5 * 10_000,
T.new(1.day) => 0.5 * 100_000
class LogService < AbstractServiceRunner
THROTTLE_POLICY = ThrottlePolicy.new(name, min: 250, hour: 5_000, day: 25_000)
def self.process(delivery_info, payload)
LOG_TPL = Rails.env.test? ?
"\e[32m.\e[0m" : "FBOS LOG (device_%s) [v%s]: %s\n"
ERR_TPL = "MALFORMED LOG CAPTURE: %s"
# Clean up excess logs in a non-deterministic manner.
# Performs the slow DB query every nth request.
TIDY_RATE = Rails.env.test? ? 0 : 10
def process(delivery_info, payload)
params = { routing_key: delivery_info.routing_key, payload: payload }
data = AmqpLogParser.run!(params)
puts data.payload["message"] if Rails.env.production?
THROTTLE_POLICY.track(data.device_id)
maybe_deliver(data)
m = AmqpLogParser.run!(params)
THROTTLE_POLICY.track(m.device_id)
m.device.excess_logs.delete_all if rand(0..TIDY_RATE) == TIDY_RATE
maybe_deliver(m)
rescue Mutations::ValidationException => e
msg = ERR_TPL % [params.merge({ e: e }).to_json]
puts msg unless Rails.env.test?
raise e
end
def self.maybe_deliver(data)
violation = THROTTLE_POLICY.is_throttled(data.device_id)
ok = data.valid? && !violation
def maybe_deliver(data)
return unless data.valid?
violation = THROTTLE_POLICY.violation_for(data.device_id)
if violation
return warn_user(data, violation)
end
data.device.auto_sync_transaction do
ok ? deliver(data) : warn_user(data, violation)
deliver(data)
end
end
def self.deliver(data)
def deliver(data)
dev, log = [data.device, data.payload]
dev.maybe_unthrottle
Log.deliver(dev, Logs::Create.run!(log, device: dev))
Log.deliver(Logs::Create.run!(log, device: dev).id)
print LOG_TPL % [data.device_id,
dev.fbos_version || "?",
data.payload["message"] || "??"]
rescue => x
Rollbar.error(x)
end
def self.warn_user(data, violation)
def warn_user(data, violation)
data.device.maybe_throttle(violation)
end
end

View File

@ -46,6 +46,7 @@ class NervesHub
NERVES_HUB_HOST = ENV.fetch("NERVES_HUB_HOST") { "api.nerves-hub.org" }
NERVES_HUB_PORT = ENV.fetch("NERVES_HUB_PORT") { 443 }
NERVES_HUB_ORG = ENV.fetch("NERVES_HUB_ORG") { "farmbot" }
NERVES_HUB_PRODUCT = ENV.fetch("NERVES_HUB_PRODUCT") { "farmbot" }
NERVES_HUB_BASE_URL = "https://#{NERVES_HUB_HOST}:#{NERVES_HUB_PORT}"
NERVES_HUB_URI = URI.parse(NERVES_HUB_BASE_URL)
@ -96,7 +97,6 @@ class NervesHub
# It's really hard to debug malformed tags; Catch them here:
if tags.detect { |x| !x.include?(COLON) }
report_problem(error: BAD_TAG, serial_number: serial_number, tags: tags)
return
end
if current_nerves_hub_device
@ -187,7 +187,7 @@ class NervesHub
# Helper for making requests to a device url on NervesHub
def self.devices_path(*chunks)
["/orgs", NERVES_HUB_ORG, "devices"].concat(chunks).join("/")
["/orgs", NERVES_HUB_ORG, "products", NERVES_HUB_PRODUCT, "devices"].concat(chunks).join("/")
end
# Helper for making requests to a particular device on NervesHub

View File

@ -46,5 +46,6 @@ module Resources
Plant => Points,
Point => Points,
ToolSlot => Points,
Weed => Points,
}
end # Resources

View File

@ -1,55 +1,60 @@
module Resources
MQTT_CHAN = "from_api"
CHANNEL_TPL =
MQTT_CHAN = "from_api"
CHANNEL_TPL =
"bot.device_%{device_id}.resources_v0.%{action}.%{klass}.%{uuid}.%{id}"
INDEX_OF_USERNAME = 1
INDEX_OF_OP = 3
INDEX_OF_KIND = 4
INDEX_OF_UUID = 5
INDEX_OF_ID = 6
INDEX_OF_OP = 3
INDEX_OF_KIND = 4
INDEX_OF_UUID = 5
INDEX_OF_ID = 6
class Service
def self.ok(uuid)
class Service < AbstractServiceRunner
def ok(uuid)
{ kind: "rpc_ok", args: { label: uuid } }.to_json
end
def self.rpc_err(uuid, error)
def rpc_err(uuid, error)
{
kind: "rpc_error",
args: { label: uuid },
body: (error
.errors
.values
.map { |err| { kind: "explanation", args: { message: err.message }} })
.errors
.values
.map { |err| { kind: "explanation", args: { message: err.message } } }),
}.to_json
end
def self.step1(delivery_info, body) # Returns params or nil
def step1(delivery_info, body) # Returns params or nil
Preprocessor.from_amqp(delivery_info, body)
rescue Mutations::ValidationException => q
Rollbar.error(q)
# AUTHORS NOTE: Some of the Bunny data structures have circular
# references that will cause the JSON serializer
# to crash. the safe_attrs var reduces the risk of
# stack overflow during serialization.
safe_attrs = [:consumer_tag, :redelivered, :exchange, :routing_key]
x = delivery_info.to_h.slice(*safe_attrs).merge(body: body)
Rollbar.error(q, x)
raw_chan = delivery_info&.routing_key&.split(".") || []
id = raw_chan[INDEX_OF_USERNAME]&.gsub("device_", "")&.to_i
uuid = raw_chan[INDEX_OF_UUID] || "NONE"
id = raw_chan[INDEX_OF_USERNAME]&.gsub("device_", "")&.to_i
uuid = raw_chan[INDEX_OF_UUID] || "NONE"
Transport.current.amqp_send(rpc_err(uuid, q), id, MQTT_CHAN) if id
nil
end
def self.step2(params)
dev = params[:device]
def step2(params)
dev = params[:device]
dev.auto_sync_transaction do
Job.run!(params)
uuid = (params[:uuid] || "NONE")
uuid = (params[:uuid] || "NONE")
Transport.current.amqp_send(ok(uuid), dev.id, MQTT_CHAN)
end
rescue Mutations::ValidationException => q
device = params.fetch(:device)
Rollbar.info("device_#{device.id} using AMQP resource mgmt")
uuid = params.fetch(:uuid)
uuid = params.fetch(:uuid)
errors = q.errors.values.map do |err|
{ kind: "explanation", args: { message: err.message }}
{ kind: "explanation", args: { message: err.message } }
end
message = { kind: "rpc_error",
args: { label: uuid },
@ -57,7 +62,7 @@ module Resources
Transport.current.amqp_send(message, device.id, MQTT_CHAN)
end
def self.process(delivery_info, body)
def process(delivery_info, body)
params = step1(delivery_info, body)
params && step2(params)
end

View File

@ -1,28 +0,0 @@
class ServiceRunner
WAIT_TIME = Rails.env.test? ? 0.01 : 5
OFFLINE_ERROR = Bunny::TCPConnectionFailedForAllHosts
CRASH_MSG = Rails.env.test? ?
"\e[32m.\e[0m" : "Something caused the broker to crash...\n"
def self.go!(channel, worker_klass)
self.new(channel, worker_klass).run!
end
def initialize(channel, worker_klass)
@channel = channel
@worker = worker_klass
end
def run!
@channel.subscribe(block: true) do |info, _, payl|
@worker.process(info, payl.force_encoding("UTF-8"))
end
rescue OFFLINE_ERROR, StandardError => e
unless e.is_a?(OFFLINE_ERROR)
Rollbar.error(e)
print CRASH_MSG
end
sleep WAIT_TIME
retry
end
end

View File

@ -0,0 +1,30 @@
# A singleton that runs on a separate process than the web server.
# Listens to *ALL* incoming logs and stores them to the DB.
# Also handles throttling.
class TelemetryService < AbstractServiceRunner
MESSAGE = "TELEMETRY MESSAGE FROM %s"
FAILURE = "FAILED TELEMETRY MESSAGE FROM %s"
THROTTLE_POLICY = ThrottlePolicy.new(name, min: 25,
hour: 250,
day: 1500)
def process(delivery_info, payload)
device_key = delivery_info
.routing_key
.split(".")[1]
json = JSON.parse(payload)
other_stuff = { device: device_key,
is_telemetry: true,
message: MESSAGE % device_key }
THROTTLE_POLICY.track(device_key)
violation = THROTTLE_POLICY.violation_for(device_key)
unless violation
puts json.merge(other_stuff).to_json
end
rescue JSON::ParserError
puts ({ device: device_key,
is_telemetry: true,
bad_json: payload,
message: FAILURE % device_key }).to_json
end
end

View File

@ -1,28 +1,81 @@
# Handles devices that spin out of control and send too many logs to the server.
# Class Hierarchy:
# ThrottlePolicy has => Rules creates => Violation
# Violation has => Rule has => TimePeriod
class ThrottlePolicy
attr_reader :rules
TTL = { min: 60,
hour: 60 * 60,
day: 60 * 60 * 24 }
ROUNDING_HELPERS = { min: :beginning_of_minute,
hour: :beginning_of_hour,
day: :beginning_of_day }
# Dictionary<TimePeriod, Integer>
def initialize(policy_rules)
@rules = policy_rules.map { |rule_set| Rule.new(*rule_set) }
TIME_UNITS = TTL.keys
VIOLATION_TPL = "more than %{limit} / %{period}"
Violation = Struct.new(:ends_at, :explanation)
attr_reader :rule_map, :namespace
def initialize(namespace, rule_map)
@namespace = namespace
@rule_map = rule_map
each_rule { |unit| validate_unit!(unit) }
end
def track(unique_id, now = Time.now)
rules.each { |r| r.time_period.record_event(unique_id, now) }
def track(id)
each_rule { |unit| incr(id, unit) }
end
# If throttled, returns the timeperiod when device will be unthrottled
# returns nil if not throttled
def is_throttled(unique_id)
rules
.map do |rule|
is_violation = rule.time_period.usage_count_for(unique_id) > rule.limit
is_violation ? Violation.new(rule) : nil
end
.compact
.max
def violation_for(id)
v = all_violations(id)
if v.empty?
return nil
else
period, limit = v.max_by { |(unit)| TTL.fetch(unit) }
message = VIOLATION_TPL % { period: period, limit: limit }
return Violation.new(next_window(period), message)
end
end
private
def validate_unit!(unit)
raise "BAD TIME UNIT" unless TIME_UNITS.include?(unit)
end
def each_rule
rule_map.map { |(k, v)| yield(k, v) }
end
def redis
Rails.cache.redis
end
def the_time_part(period, now = Time.now)
[period, next_window(period).to_i].map(&:to_s).join()
end
def cache_key(id, period)
[namespace, the_time_part(period), id].join(":")
end
def get(id, period)
(redis.get(cache_key(id, period)) || "0").to_i
end
def next_window(period, now = Time.now)
helper = ROUNDING_HELPERS.fetch(period)
offset = TTL.fetch(period).seconds
(now + offset).send(helper)
end
def incr(id, period)
key = cache_key(id, period)
redis.incr(key)
if (redis.ttl(key) < 0)
ttl = (next_window(period) - Time.now).seconds.to_i
redis.expire(key, ttl)
end
end
def all_violations(id)
each_rule { |k, v| (get(id, k) > v) ? [k, v] : nil }.compact
end
end

View File

@ -1,10 +0,0 @@
class ThrottlePolicy
# A time_period object paired with a max limit
class Rule
attr_reader :time_period, :limit
def initialize(time_period, limit)
@time_period, @limit = time_period, limit
end
end
end

View File

@ -1,57 +0,0 @@
# Track the number of occurrences of an event over time.
#
# Given:
# * A fixed size duration (1 minute, 1 week etc)
# * An event (In our case, log creation)
# * An initiator id (eg: device_id)
#
# Produces:
# * A table of event counts for the current time period, indexed by
# the initiator ID.
class ThrottlePolicy
class TimePeriod
attr_reader :time_unit,
:current_period, # Slice time into fixed size windows
:entries
def initialize(active_support_duration, now = Time.now)
@time_unit = active_support_duration
reset_everything now
end
def record_event(unique_id, now = Time.now)
period = calculate_period(now)
case period <=> current_period
when -1 then return # Out of date- don't record.
when 0 then increment_count_for(unique_id) # Right on schedule.
when 1 then reset_everything(now) # Clear out old data.
end
end
def usage_count_for(unique_id)
@entries[unique_id] || 0
end
def when_does_next_period_start?
Time.at(current_period * time_unit.to_i) + time_unit
end
private
def reset_everything(now)
@current_period = calculate_period(now)
@entries = {}
end
def increment_count_for(unique_id)
@entries[unique_id] ||= 0
@entries[unique_id] += 1
end
# Returns integer representation of current clock period
def calculate_period(time)
(time.to_i / @time_unit)
end
end
end

View File

@ -1,29 +0,0 @@
class ThrottlePolicy
class Violation
attr_reader :rule
def initialize(rule)
@rule = rule
end
def ends_at
@rule.time_period.when_does_next_period_start?
end
def <=>(other)
self.timeframe <=> other.timeframe
end
def timeframe
rule.time_period.time_unit
end
def limit
rule.limit.to_i
end
def explanation
"more than #{limit} logs in #{timeframe.inspect}"
end
end
end

View File

@ -13,7 +13,7 @@ class FatalErrorMailer < ApplicationMailer
.map{|(t,m)| [t.in_time_zone(device.timezone || "UTC"), m] }
.map{|(x,y)| "[#{x}]: #{y}"}
.join("\n\n")
@device_name = device.name || "Farmbot"
@device_name = device.name || "FarmBot"
mail(to: @emails, subject: "🚨 New error reported by #{@device_name}!")
@logs.update_all(sent_at: Time.now)
end

View File

@ -0,0 +1,11 @@
class InactivityMailer < ApplicationMailer
attr_reader :user
SUBJECT = "[ACTION REQUIRED] Your FarmBot account " \
"will be deleted due to inactivity unless you login"
ORDER = { 1 => "First", 2 => "Second", 3 => "Final" }
def send_warning(user)
@user = user
mail to: user.email, subject: SUBJECT
end
end

View File

@ -1,35 +1,44 @@
class UserMailer < ApplicationMailer
RESET_PATH = "http:%s/verify/%s"
NOTHING_TO_CONFIRM = "FAILED EMAIL CHANGE"
URI_KLASS = ENV["FORCE_SSL"] ? URI::HTTPS : URI::HTTP
# Make sure the user gave us a valid email.
def welcome_email(user)
@user = user
@user = user
@user_name = user.name
@the_url = UserMailer.reset_url(user)
mail(to: @user.email, subject: 'Welcome to The FarmBot Web App!')
@the_url = UserMailer.reset_url(user)
mail(to: @user.email, subject: "Welcome to The FarmBot Web App!")
end
def password_reset(user, raw_token)
@user = user
@token = raw_token
@host = $API_URL
mail(to: @user.email, subject: 'FarmBot Password Reset Instructions')
@user = user
url = UserMailer.url_object
url.path = "/password_reset/#{raw_token}"
@password_reset_url = url.to_s
mail(to: @user.email, subject: "FarmBot Password Reset Instructions")
end
# Much like welcome_email, it is used to check email validity.
# Triggered after the user tries update the `email` attr in Users#update.
def email_update(user)
raise NOTHING_TO_CONFIRM unless user.unconfirmed_email.present?
@user = user
@user = user
@the_url = UserMailer.reset_url(user)
mail(to: @user.unconfirmed_email,
subject: 'FarmBot Email Update Instructions')
mail(to: @user.unconfirmed_email,
subject: "FarmBot Email Update Instructions")
end
def self.reset_url(user)
x = URI(RESET_PATH % [$API_URL, user.confirmation_token])
(x.port = nil) if (x.port === 443) # Sendgrid does not like :443 in URLs.
x = UserMailer.url_object
x.path = "/verify/#{user.confirmation_token}"
x.to_s
end
def self.url_object(host = ENV.fetch("API_HOST"), port = ENV.fetch("API_PORT"))
output = {}
output[:host] = host
output[:port] = port unless [nil, "443", "80"].include?(port)
URI_KLASS.build(output)
end
end

View File

@ -0,0 +1,15 @@
class Alert < ApplicationRecord
belongs_to :device
DEFAULTS = [
SEED_DATA = { problem_tag: "api.seed_data.missing", priority: 400 },
DOCUMENTATION = { problem_tag: "api.documentation.unread", priority: 300 },
TOUR = { problem_tag: "api.tour.not_taken", priority: 200 },
USER = { problem_tag: "api.user.not_welcomed", priority: 100 },
BULLETIN = { problem_tag: "api.bulletin.unread", priority: 100 },
DEMO = { problem_tag: "api.demo_account.in_use", priority: 100 },
]
PROBLEM_TAGS = DEFAULTS.map { |x| x.fetch(:problem_tag) }
validates_inclusion_of :problem_tag, in: PROBLEM_TAGS
end

View File

@ -1,18 +1,24 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
after_save :maybe_broadcast, on: [:create, :update]
after_create :maybe_broadcast
after_update :maybe_broadcast
after_destroy :maybe_broadcast
DONT_BROADCAST = [ "created_at",
"last_saw_api",
"last_saw_mq",
"last_sign_in_at",
"last_sign_in_ip",
"sign_in_count",
"updated_at",
"current_sign_in_ip",
"current_sign_in_at",
"fbos_version" ]
class << self
attr_reader :auto_sync_paused
end
DONT_BROADCAST = ["created_at",
"last_saw_api",
"last_saw_mq",
"last_sign_in_at",
"last_sign_in_ip",
"sign_in_count",
"updated_at",
"current_sign_in_ip",
"current_sign_in_at",
"fbos_version"]
def gone?
destroyed? || self.try(:discarded?)
end
@ -27,8 +33,22 @@ class ApplicationRecord < ActiveRecord::Base
!the_changes.empty?
end
# Perform table operations without triggering
# echo-ey auto_syncs.
def self.auto_sync_debounce
@auto_sync_paused = true
result = yield
result.update!(updated_at: Time.now)
@auto_sync_paused = false
result.broadcast!
result
end
def broadcast?
current_device && (gone? || notable_changes?)
return false if self.class.auto_sync_paused
return false unless current_device
return false unless (gone? || notable_changes?)
return true
end
def maybe_broadcast
@ -70,5 +90,13 @@ class ApplicationRecord < ActiveRecord::Base
current_device.id,
chan_name,
Time.now.utc.to_i) if current_device
self
end
def manually_sync!
device && (device.auto_sync_transaction do
update!(updated_at: Time.now)
end)
self
end
end

View File

@ -1,20 +1,24 @@
# Support class for Fragment. Please see fragment.rb for documentation.
class ArgName < ApplicationRecord
EXPIRY = Rails.env.test? ? 1.second : 2.hours
KEY = "arg_names/%s"
KEY = "arg_names:%s"
validates_uniqueness_of :value
has_many :primitive_pairs, autosave: true
has_many :standard_pairs, autosave: true
has_many :standard_pairs, autosave: true
def self.cached_by_value(v)
key = KEY % v
Rails.cache.fetch(key, expires_in: EXPIRY) { find_or_create_by(value: v) }
Rails.cache.fetch(key, expires_in: EXPIRY) do
find_or_create_by!(value: v)
end
end
def self.cached_by_id(id)
Rails.cache.fetch(KEY % id, expires_in: EXPIRY) { find(id) }
Rails.cache.fetch(KEY % id, expires_in: EXPIRY) do
find(id)
end
end
def broadcast?

View File

@ -16,36 +16,37 @@ module CeleryScriptSettingsBag
end
PIN_TYPE_MAP = { "Peripheral" => Peripheral,
"Sensor" => Sensor,
"BoxLed3" => BoxLed,
"BoxLed4" => BoxLed }
"Sensor" => Sensor,
"BoxLed3" => BoxLed,
"BoxLed4" => BoxLed }
ALLOWED_AXIS = %w(x y z all)
ALLOWED_CHAGES = %w(add remove update)
ALLOWED_ASSERTION_TYPES = %w(abort recover abort_recover continue)
ALLOWED_CHANGES = %w(add remove update)
ALLOWED_CHANNEL_NAMES = %w(ticker toast email espeak)
ALLOWED_LHS_STRINGS = [*(0..69)].map { |x| "pin#{x}" }.concat(%w(x y z))
ALLOWED_LHS_TYPES = [String, :named_pin]
ALLOWED_MESSAGE_TYPES = %w(success busy warn error info fun debug)
ALLOWED_MESSAGE_TYPES = %w(assertion busy debug error fun info success warn)
ALLOWED_OPS = %w(< > is not is_undefined)
ALLOWED_PACKAGES = %w(farmbot_os arduino_firmware)
ALLOWED_PIN_MODES = [DIGITAL = 0, ANALOG = 1]
ALLOWED_PIN_TYPES = PIN_TYPE_MAP.keys
ALLOWED_POINTER_TYPE = %w(GenericPointer ToolSlot Plant)
ALLOWED_RESOURCE_TYPE = %w(Device FarmEvent Image Log Peripheral Plant Point
Regimen Sequence Tool ToolSlot User GenericPointer)
ALLOWED_RPC_NODES = %w(calibrate change_ownership
check_updates dump_info emergency_lock
ALLOWED_POINTER_TYPE = %w(GenericPointer ToolSlot Plant Weed)
ALLOWED_RESOURCE_TYPE = %w(Device Point Plant ToolSlot Weed GenericPointer)
ALLOWED_RPC_NODES = %w(assertion calibrate change_ownership
check_updates emergency_lock
emergency_unlock execute execute_script
factory_reset find_home flash_firmware home
install_farmware install_first_party_farmware _if
move_absolute move_relative power_off read_pin
read_status reboot remove_farmware resource_update
read_status reboot remove_farmware update_resource
send_message set_servo_angle set_user_env sync
take_photo toggle_pin update_farmware wait
write_pin zero)
ALLOWED_SPEC_ACTION = %w(dump_info emergency_lock emergency_unlock power_off
ALLOWED_SPEC_ACTION = %w(emergency_lock emergency_unlock power_off
read_status reboot sync take_photo)
ANY_VARIABLE = %i(tool coordinate point identifier)
BAD_ALLOWED_PIN_MODES = '"%s" is not a valid pin_mode. Allowed values: %s'
BAD_ASSERTION_TYPE = '"%s" is not a valid assertion type. Try these instead: %s'
BAD_AXIS = '"%s" is not a valid axis. Allowed values: %s'
BAD_CHANNEL_NAME = '"%s" is not a valid channel_name. Allowed values: %s'
BAD_LHS = 'Can not put "%s" into a left hand side (LHS)' \
@ -59,6 +60,7 @@ module CeleryScriptSettingsBag
BAD_PIN_TYPE = '"%s" is not a type of pin. Allowed values: %s'
BAD_POINTER_ID = "Bad point ID: %s"
BAD_POINTER_TYPE = '"%s" is not a type of point. Allowed values: %s'
BAD_POINT_GROUP_ID = "Can't find PointGroup with id of %s"
BAD_REGIMEN = "Regimen #%s does not exist."
BAD_RESOURCE_ID = "Can't find %s with id of %s"
BAD_RESOURCE_TYPE = '"%s" is not a valid resource_type. Allowed values: %s'
@ -67,16 +69,25 @@ module CeleryScriptSettingsBag
BAD_TOOL_ID = "Tool #%s does not exist."
CANT_ANALOG = "Analog modes are not supported for Box LEDs"
NO_PIN_ID = "%s requires a valid pin number"
NO_SUB_SEQ = "missing a sequence selection for `execute` block."
NO_SUB_SEQ = "You must select a Sequence in the Execute step."
ONLY_ONE_COORD = "Move Absolute does not accept a group of locations " \
"as input. Please change your selection to a single" \
" location."
PLANT_STAGES = %w(planned planted harvested sprouted)
RESOURCE_UPDATE_ARGS = [:resource_type, :resource_id, :label, :value]
PLANT_STAGES = %w(planned planted harvested sprouted removed)
SCOPE_DECLARATIONS = [:variable_declaration, :parameter_declaration]
MISC_ENUM_ERR = '"%s" is not valid. Allowed values: %s'
MAX_WAIT_MS = 1000 * 60 * 3 # Three Minutes
MAX_WAIT_MS_EXCEEDED =
"A single wait node cannot exceed #{MAX_WAIT_MS / 1000 / 60} minutes. " +
"Consider lowering the wait time or using multiple WAIT blocks."
Corpus = CeleryScript::Corpus.new
THIS_IS_DEPRECATED = {
args: [:resource_type, :resource_id, :label, :value],
tags: [:function, :api_writer, :network_user],
blk: ->(n) do
n.invalidate!("Deprecated `mark_as` detected. Delete it and re-add")
end,
}
CORPUS_VALUES = {
boolean: [TrueClass, FalseClass],
@ -92,9 +103,10 @@ module CeleryScriptSettingsBag
ALLOWED_OPS: [ALLOWED_OPS, BAD_OP],
ALLOWED_PACKAGES: [ALLOWED_PACKAGES, BAD_PACKAGE],
ALLOWED_PIN_MODES: [ALLOWED_PIN_MODES, BAD_ALLOWED_PIN_MODES],
ALLOWED_ASSERTION_TYPES: [ALLOWED_ASSERTION_TYPES, BAD_ASSERTION_TYPE],
AllowedPinTypes: [ALLOWED_PIN_TYPES, BAD_PIN_TYPE],
Color: [Sequence::COLORS, MISC_ENUM_ERR],
DataChangeType: [ALLOWED_CHAGES, MISC_ENUM_ERR],
DataChangeType: [ALLOWED_CHANGES, MISC_ENUM_ERR],
LegalSequenceKind: [ALLOWED_RPC_NODES.sort, MISC_ENUM_ERR],
lhs: [ALLOWED_LHS_STRINGS, BAD_LHS],
PlantStage: [PLANT_STAGES, MISC_ENUM_ERR],
@ -125,7 +137,7 @@ module CeleryScriptSettingsBag
defn: [n(:execute), n(:nothing)],
},
data_value: {
defn: ANY_VAR_TOKENIZED,
defn: ANY_VAR_TOKENIZED + [n(:point_group)],
},
default_value: {
defn: ANY_VAR_TOKENIZED,
@ -189,6 +201,13 @@ module CeleryScriptSettingsBag
node.invalidate!(BAD_POINTER_ID % node.value) if bad_node
end,
},
point_group_id: {
defn: [v(:integer)],
blk: ->(node, device) do
bad_node = !PointGroup.where(id: node.value, device_id: device.id).exists?
node.invalidate!(BAD_POINT_GROUP_ID % node.value) if bad_node
end,
},
pointer_type: {
defn: [e(:PointType)],
},
@ -211,13 +230,14 @@ module CeleryScriptSettingsBag
blk: ->(node) do
x = [ALLOWED_LHS_STRINGS, node, BAD_LHS]
# This would never have happened if we hadn't allowed
# heterogenus args :(
# heterogenous args :(
manual_enum(*x) unless node.is_a?(CeleryScript::AstNode)
end,
},
op: {
defn: [e(:ALLOWED_OPS)],
},
priority: { defn: [v(:integer)] },
channel_name: {
defn: [e(:ALLOWED_CHANNEL_NAMES)],
},
@ -258,6 +278,15 @@ module CeleryScriptSettingsBag
resource_type: {
defn: [e(:resource_type)],
},
assertion_type: {
defn: [e(:ALLOWED_ASSERTION_TYPES)],
},
lua: {
defn: [v(:string)],
},
resource: {
defn: [n(:identifier), n(:resource)],
},
}.map do |(name, conf)|
blk = conf[:blk]
defn = conf.fetch(:defn)
@ -265,6 +294,10 @@ module CeleryScriptSettingsBag
end
CORPUS_NODES = {
assertion: {
args: [:assertion_type, :_then, :lua],
tags: [:*],
},
_if: {
args: [:lhs, :op, :rhs, :_then, :_else],
body: [:pair],
@ -293,10 +326,6 @@ module CeleryScriptSettingsBag
args: [:x, :y, :z],
tags: [:data, :location_like],
},
dump_info: {
tags: [:function, :network_user, :disk_user, :api_writer],
docs: "Sends an info dump to server administrators for troubleshooting.",
},
emergency_lock: {
tags: [:function, :firmware_user, :control_flow],
},
@ -402,7 +431,7 @@ module CeleryScriptSettingsBag
tags: [:data],
},
rpc_request: {
args: [:label],
args: [:label, :priority],
body: ALLOWED_RPC_NODES,
tags: [:*],
},
@ -453,6 +482,11 @@ module CeleryScriptSettingsBag
wait: {
args: [:milliseconds],
tags: [:function],
blk: ->(node) do
ms_arg = node.args[:milliseconds]
ms = (ms_arg && ms_arg.value) || 0
node.invalidate!(MAX_WAIT_MS_EXCEEDED) if ms > MAX_WAIT_MS
end,
},
zero: {
args: [:axis],
@ -484,13 +518,28 @@ module CeleryScriptSettingsBag
tags: [:function, :firmware_user, :rpi_user],
blk: ->(n) { no_rpi_analog(n) },
},
resource_update: {
args: RESOURCE_UPDATE_ARGS,
# DEPRECATED- Get rid of this node ASAP -RC 15 APR 2020
resource_update: THIS_IS_DEPRECATED,
resource: {
args: [:resource_type, :resource_id],
tags: [:network_user],
blk: ->(n) do
resource_type = n.args.fetch(:resource_type).value
resource_id = n.args.fetch(:resource_id).value
check_resource_type(n, resource_type, resource_id, Device.current)
end,
},
update_resource: {
args: [:resource],
body: [:pair],
tags: [:function, :api_writer, :network_user],
blk: ->(x) do
resource_type = x.args.fetch(:resource_type).value
resource_id = x.args.fetch(:resource_id).value
check_resource_type(x, resource_type, resource_id)
},
point_group: {
args: [:point_group_id],
tags: [:data, :list_like],
blk: ->(n) do
resource_id = n.args.fetch(:point_group_id).value
check_resource_type(n, "PointGroup", resource_id, Device.current)
end,
},
}.map { |(name, list)| Corpus.node(name, **list) }
@ -506,13 +555,16 @@ module CeleryScriptSettingsBag
node.invalidate!(BAD_RESOURCE_ID % [klass.name, resource_id])
end
def self.check_resource_type(node, resource_type, resource_id)
def self.check_resource_type(node, resource_type, resource_id, owner)
raise "OPPS!" unless owner
case resource_type # <= Security critical code (for const_get'ing)
when "Device"
# When "resource_type" is "Device", resource_id always refers to
# the current_device.
# For convenience, we try to set it here, defaulting to 0
node.args[:resource_id].instance_variable_set("@value", 0)
node.args[:resource_id].instance_variable_set("@value", owner.id)
when "PointGroup"
no_resource(node, PointGroup, resource_id) unless PointGroup.exists?(resource_id)
when *ALLOWED_RESOURCE_TYPE.without("Device")
klass = Kernel.const_get(resource_type)
resource_ok = klass.exists?(resource_id)

View File

@ -1,50 +1,50 @@
# Farmbot Device models all data related to an actual FarmBot in the real world.
class Device < ApplicationRecord
DEFAULT_MAX_CONFIGS = 100
DEFAULT_MAX_CONFIGS = 300
DEFAULT_MAX_IMAGES = 100
DEFAULT_MAX_LOGS = 1000
TIMEZONES = TZInfo::Timezone.all_identifiers
BAD_TZ = "%{value} is not a valid timezone"
BAD_OTA_HOUR = "must be a value from 0 to 23."
THROTTLE_ON = "Device is sending too many logs (%s). " \
"Suspending log storage and display until %s."
THROTTLE_OFF = "Cooldown period has ended. " \
"Resuming log storage."
CACHE_KEY = "devices.%s"
has_many :farmware_envs, dependent: :destroy
has_many :farm_events, dependent: :destroy
has_many :farmware_installations, dependent: :destroy
has_many :images, dependent: :destroy
has_many :logs, dependent: :destroy
has_many :peripherals, dependent: :destroy
has_many :pin_bindings, dependent: :destroy
has_many :plant_templates, dependent: :destroy
has_many :points, dependent: :destroy
has_many :regimens, dependent: :destroy
has_many :saved_gardens, dependent: :destroy
has_many :sensor_readings, dependent: :destroy
has_many :sensors, dependent: :destroy
has_many :sequences, dependent: :destroy
has_many :token_issuances, dependent: :destroy
has_many :tools, dependent: :destroy
has_many :webcam_feeds, dependent: :destroy
has_many :diagnostic_dumps, dependent: :destroy
has_many :fragments, dependent: :destroy
has_one :fbos_config, dependent: :destroy
has_many :in_use_tools
has_many :in_use_points
has_many :users
PLURAL_RESOURCES = %i(alerts farmware_envs farm_events farmware_installations
images logs peripherals pin_bindings plant_templates
points point_groups regimens saved_gardens
sensor_readings sensors sequences token_issuances tools
webcam_feeds fragments)
validates_presence_of :name
validates :timezone,
inclusion: { in: TIMEZONES, message: BAD_TZ, allow_nil: true }
[FbosConfig, FirmwareConfig, WebAppConfig].map do |klass|
name = klass.table_name.singularize.to_sym
PLURAL_RESOURCES.map { |resources| has_many resources, dependent: :destroy }
SINGULAR_RESOURCES = {
fbos_config: FbosConfig,
firmware_config: FirmwareConfig,
web_app_config: WebAppConfig,
}
SINGULAR_RESOURCES.map do |(name, klass)|
has_one name, dependent: :destroy
define_method(name) { super() || klass.create!(device: self) }
end
has_many :in_use_tools
has_many :in_use_points
has_many :users
has_many :folders
validates_presence_of :name
validates :timezone, inclusion: {
in: TIMEZONES,
message: BAD_TZ,
allow_nil: true,
}
validates :ota_hour,
inclusion: { in: [*0..23], message: BAD_OTA_HOUR, allow_nil: true }
# Give the user back the amount of logs they are allowed to view.
def limited_log_list
Log
@ -67,7 +67,6 @@ class Device < ApplicationRecord
def self.current=(dev)
RequestStore.store[:device] = dev
end
# Sets Device.current to `self` and returns it to the previous value when
# finished running block. Usually this is unnecessary, but may be required in
# background jobs. If you are not receiving auto_sync data on your client,
@ -87,47 +86,31 @@ class Device < ApplicationRecord
points.where(pointer_type: "Plant")
end
TIMEOUT = 150.seconds
# Like Device.find, but with 150 seconds of caching to avoid DB calls.
def self.cached_find(id)
Rails
.cache
.fetch(CACHE_KEY % id, expires_in: TIMEOUT) { Device.find(id) }
def tool_slots
points.where(pointer_type: "ToolSlot")
end
def refresh_cache
# Why? Device.new(self.as_json)???
#
# "Some objects cannot be dumped: if the objects to be dumped include
# bindings, procedure or method objects, instances of class IO, or singleton
# objects, a TypeError will be raised."
# https://ruby-doc.org/core-2.3.1/Marshal.html
# TODO: Someone plz send help! - RC
Rails.cache.write(CACHE_KEY % self.id, Device.new(self.as_json))
def generic_pointers
points.where(pointer_type: "GenericPointer")
end
# Sets the `throttled_at` field, but only if it is unpopulated.
# Performs no-op if `throttled_at` was already set.
# Sets the `throttled_until` and `throttled_at` fields if unpopulated or
# the throttle time period increases. Notifies user of cooldown period.
def maybe_throttle(violation)
end_t = violation.ends_at
# Some log validation errors will result in until_time being `nil`.
if (violation && throttled_until.nil?)
et = violation.ends_at
reload.update_attributes!(throttled_until: et,
throttled_at: Time.now)
refresh_cache
cooldown = et.in_time_zone(self.timezone || "UTC").strftime("%I:%M%p")
if (throttled_until.nil? || (end_t > throttled_until))
reload.update!(throttled_until: end_t, throttled_at: Time.now)
cooldown = end_t.in_time_zone(self.timezone || "UTC").strftime("%I:%M%p")
info = [violation.explanation, cooldown]
cooldown_notice(THROTTLE_ON % info, et, "warn")
cooldown_notice(THROTTLE_ON % info, end_t, "warn")
end
end
def maybe_unthrottle
if throttled_until.present?
old_time = throttled_until
reload # <= WHY!?! TODO: Find out why it crashes without this.
.update_attributes!(throttled_until: nil, throttled_at: nil)
refresh_cache
update!(throttled_until: nil, throttled_at: nil)
cooldown_notice(THROTTLE_OFF, old_time, "info")
end
end
@ -181,13 +164,26 @@ class Device < ApplicationRecord
# Helper method to create an auth token.
# Used by sys admins to debug problems without performing a password reset.
def create_token
# If something manages to call this method, I'd like to be alerted of it.
def help_customer
Rollbar.error("Someone is creating a debug user token", { device: self.id })
fbos_version = Api::AbstractController::EXPECTED_VER
SessionToken
.as_json(users.first, "SUPER", fbos_version)
.fetch(:token)
.encoded
token = SessionToken.as_json(users.first, "staff", fbos_version).to_json
return "localStorage['session'] = JSON.stringify(#{token});"
end
TOO_MANY_CONNECTIONS =
"Your device is reconnecting to the server too often. " +
"This may be a sign of local network issues. " +
"Please review the documentation provided at " +
"https://software.farm.bot/docs/connecting-farmbot-to-the-internet"
def self.connection_warning(username)
device_id = username.split("_").last.to_i || 0
device = self.find_by(id: device_id)
return unless device
last_sent_at = device.mqtt_rate_limit_email_sent_at || 4.years.ago
if last_sent_at < 1.day.ago
device.update!(mqtt_rate_limit_email_sent_at: Time.now)
device.tell(TOO_MANY_CONNECTIONS, ["fatal_email"])
end
end
end

View File

@ -1,3 +0,0 @@
class DiagnosticDump < ApplicationRecord
belongs_to :device
end

View File

@ -1,16 +1,5 @@
# User definable key/value pairs, usually used for Farmware authorship.
class FarmwareEnv < ApplicationRecord
belongs_to :device
serialize :value
validate :primitives_only
PRIMITIVES_ONLY = "`value` must be a string, number or boolean"
def primitives_only
errors.add(:value, PRIMITIVES_ONLY) unless is_primitve
end
def is_primitve
[String, Integer, Float, TrueClass, FalseClass].include?(value.class)
end
serialize :value
end

View File

@ -40,7 +40,7 @@ class FarmwareInstallation < ApplicationRecord
known_error = KNOWN_PROBLEMS[error.class]
description = \
known_error || (OTHER_PROBLEM % error.class)
update_attributes!(package_error: description,
update!(package_error: description,
package: nil)
unless known_error.present?
raise error
@ -54,7 +54,7 @@ class FarmwareInstallation < ApplicationRecord
string = string_io.read(MAX_JSON_SIZE)
json = JSON.parse(string)
pkg_name = json.fetch("package")
update_attributes!(package: pkg_name, package_error: nil)
update!(package: pkg_name, package_error: nil)
rescue => error
maybe_recover_from_fetch_error(error)
end

View File

@ -3,7 +3,18 @@ class FbosConfig < ApplicationRecord
class MissingSerial < StandardError; end
belongs_to :device
after_save :maybe_sync_nerves, on: [:create, :update]
after_create :maybe_sync_nerves
after_update :maybe_sync_nerves
FIRMWARE_HARDWARE = [
NOT_SET = nil,
NONE = "none",
ARDUINO = "arduino",
FARMDUINO = "farmduino",
FARMDUINO_K14 = "farmduino_k14",
FARMDUINO_K15 = "farmduino_k15",
EXPRESS_K10 = "express_k10",
]
NERVES_FIELD = "update_channel"

View File

@ -0,0 +1,8 @@
class Folder < ApplicationRecord
belongs_to :device
has_many :sub_folders, class_name: "Folder",
foreign_key: "parent_id"
belongs_to :parent, class_name: "Folder", optional: true
end

View File

@ -53,11 +53,8 @@
class Fragment < ApplicationRecord
# Avoid N+1s: Fragment.includes(Fragment::EVERYTHING)
EVERYTHING = { nodes: Node::EVERYTHING }
SERIALIZER = "serialized"
belongs_to :device
belongs_to :owner,
polymorphic: true,
inverse_of: :fragment
belongs_to :owner, polymorphic: true, inverse_of: :fragment
has_many :primitives, dependent: :destroy
has_many :nodes
has_many :primitive_pairs
@ -76,18 +73,22 @@ class Fragment < ApplicationRecord
end
def json_cache_key
[cache_key_with_version, SERIALIZER].join("/")
["fragments", id, updated_at.to_i].join(":")
end
def self.from_celery(device:, kind:, args:, body:, owner:)
p = { device: device, kind: kind, args: args, body: body }
flat_ast = Fragments::Preprocessor.run!(p)
Fragments::Create.run!(device: device,
p = { device: device, kind: kind, args: args, body: body }
flat_ast = Fragments::Preprocessor.run!(**p)
Fragments::Create.run!(device: device,
flat_ast: flat_ast,
owner: owner)
owner: owner)
end
def broadcast?
false
end
def self.remove_old_fragments_for_device(dev)
dev.fragments.select { |x| x.owner == nil }.map { |x| x.destroy! }
end
end

View File

@ -0,0 +1,5 @@
class GlobalBulletin < ActiveRecord::Base
self.inheritance_column = "none"
validates_uniqueness_of :slug
validates_presence_of :content, :slug, :type
end

View File

@ -5,14 +5,14 @@
# 4. Are not security sensitive (If not, use ENV vars or secrets mgmt)
class GlobalConfig < ApplicationRecord
validates_uniqueness_of :key
validates_presence_of :key
validates_presence_of :key
# Bootstrap these values, but NEVER clobber pre-existing ones:
{
"FBOS_END_OF_LIFE_VERSION" => "6.4.11",
"MINIMUM_FBOS_VERSION" => "6.3.0",
"TOS_URL" => ENV.fetch("TOS_URL", ""),
"PRIV_URL" => ENV.fetch("PRIV_URL", "")
"MINIMUM_FBOS_VERSION" => "6.3.0",
"TOS_URL" => ENV.fetch("TOS_URL", ""),
"PRIV_URL" => ENV.fetch("PRIV_URL", ""),
}.map do |(key, value)|
x = self.find_by(key: key)
self.create!(key: key, value: value) unless x
@ -21,11 +21,14 @@ class GlobalConfig < ApplicationRecord
LONG_REVISION = ENV["BUILT_AT"] || ENV["HEROKU_SLUG_COMMIT"] || "NONE"
# Bootstrap these values, and ALWAYS clobber pre-existing ones:
{
"NODE_ENV" => Rails.env || "development",
"LONG_REVISION" => LONG_REVISION,
"SHORT_REVISION" => LONG_REVISION.first(8),
"NODE_ENV" => Rails.env || "development",
"LONG_REVISION" => LONG_REVISION,
"SHORT_REVISION" => LONG_REVISION.first(8),
# We only need this for the demo tour.
# Remove it if the demo tour does not require it.
"MQTT_WS" => SessionToken::MQTT_WS,
}.map do |(key, value)|
self.find_or_create_by(key: key).update_attributes(key: key, value: value)
self.find_or_create_by(key: key).update(key: key, value: value)
end
# Memoized version of every GlobalConfig, with key/values layed out in a hash.

View File

@ -2,8 +2,8 @@ require "open-uri"
# A set of image URLs (thumbs) + Associated meta data.
class Image < ApplicationRecord
belongs_to :device
validates :device, presence: true
serialize :meta
validates :device, presence: true
serialize :meta
# http://stackoverflow.com/a/5127684/1064917
after_initialize :set_defaults
@ -12,37 +12,38 @@ class Image < ApplicationRecord
self.meta ||= {}
end
PROTO = ENV["FORCE_SSL"] ? "https:" : "http:"
PLACEHOLDER = "/placeholder_farmbot.jpg\?text=Processing..."
CONFIG = {
default_url: "#{PROTO}#{$API_URL}#{PLACEHOLDER}",
styles: { x1280: "1280x1280>",
x640: "640x640>",
x320: "320x320>",
x160: "160x160>",
x80: "80x80>" },
size: { in: 0..7.megabytes } # Worst case scenario for 1280x1280 BMP.
PROTO = ENV["FORCE_SSL"] ? "https:" : "http:"
DEFAULT_URL = "#{PROTO}#{$API_URL}#{PLACEHOLDER}"
RMAGICK_STYLES = {
x1280: "1280x1280>",
x640: "640x640>",
x320: "320x320>",
x160: "160x160>",
x80: "80x80>",
}
MAX_IMAGE_SIZE = 7.megabytes
CONFIG = { default_url: DEFAULT_URL,
styles: RMAGICK_STYLES,
size: { in: 0..MAX_IMAGE_SIZE } }
BUCKET = ENV["GCS_BUCKET"]
bucket = ENV["GCS_BUCKET"]
CONFIG.merge!({
storage: :fog,
fog_host: "http://#{bucket}.storage.googleapis.com",
fog_directory: bucket,
fog_credentials: { provider: "Google",
google_storage_access_key_id: ENV.fetch("GCS_KEY"),
google_storage_secret_access_key: ENV.fetch("GCS_ID")}
}) if bucket
ROOT_PATH = BUCKET ?
"https://#{BUCKET}.storage.googleapis.com" : "/system"
IMAGE_URL_TPL =
ROOT_PATH + "/images/attachments/%{chunks}/%{size}/%{filename}?%{timestamp}"
has_attached_file :attachment, CONFIG
CONTENT_TYPES = ["image/jpg", "image/jpeg", "image/png", "image/gif"]
GCS_ACCESS_KEY_ID = ENV.fetch("GCS_KEY") { puts "Not using Google Cloud" }
GCS_HOST = "http://#{BUCKET}.storage.googleapis.com"
GCS_SECRET_ACCESS_KEY = ENV.fetch("GCS_ID") { puts "Not using Google Cloud" }
# Worst case scenario for 1280x1280 BMP.
GCS_BUCKET_NAME = ENV["GCS_BUCKET"]
validates_attachment_content_type :attachment,
content_type: ["image/jpg", "image/jpeg", "image/png", "image/gif"]
has_one_attached :attachment
def set_attachment_by_url(url)
# File
# URI::HTTPS
self.attachment = open(url)
attachment.attach(io: URI.open(url), filename: "image_#{self.id}")
self.attachment_processed_at = Time.now
self
end
@ -59,4 +60,47 @@ class Image < ApplicationRecord
image = find_by(id: id)
image.destroy! if image
end
def legacy_image?
!!self.attachment_file_size # This is a now-unused legacy field.
end
def regular_image?
attachment && attachment.attached?
end
def regular_url
if BUCKET
# Not sure why. TODO: Investigate why Rails URL helpers don't work here.
"https://storage.googleapis.com/#{BUCKET}/#{attachment.key}"
else
Rails
.application
.routes
.url_helpers
.rails_blob_url(attachment)
end
end
def legacy_url(size)
url = IMAGE_URL_TPL % {
chunks: id.to_s.rjust(9, "0").scan(/.{3}/).join("/"),
filename: attachment_file_name,
size: size,
timestamp: attachment_updated_at.to_i,
}
return ENV["GCS_KEY"].present? ? url.gsub("http://", "https://") : url
end
def attachment_url(size = "x640")
# Detect legacy attachments by way of
# superceded PaperClip-related field.
# If it has an `attachment_file_size`,
# it was made with paperclip.
return regular_url if regular_image?
return legacy_url(size) if legacy_image?
return DEFAULT_URL
end
end

View File

@ -4,10 +4,11 @@ class InUsePoint < ApplicationRecord
belongs_to :device
DEFAULT_NAME = "point"
FANCY_NAMES = {
FANCY_NAMES = {
GenericPointer.name => DEFAULT_NAME,
ToolSlot.name => "tool slot",
Plant.name => "plant",
ToolSlot.name => "slot",
Plant.name => "plant",
Weed.name => "weed"
}
def readonly?
@ -15,6 +16,6 @@ class InUsePoint < ApplicationRecord
end
def fancy_name
"#{FANCY_NAMES[pointer_type] || DEFAULT_NAME} at (#{x}, #{y}, #{z})"
"#{InUsePoint::FANCY_NAMES[pointer_type] || DEFAULT_NAME} at (#{x}, #{y}, #{z})"
end
end

View File

@ -1,7 +1,7 @@
# Support class for Fragment. Please see fragment.rb for documentation.
class Kind < ApplicationRecord
EXPIRY = Rails.env.test? ? 1.second : 2.hours
KEY = "kinds/%s"
KEY = "kinds:%s"
has_many :nodes
def self.cached_by_value(v)

View File

@ -23,8 +23,6 @@ class Log < ApplicationRecord
validates :device, presence: true
validates :type, presence: true
serialize :meta
validates :meta, presence: true
# http://stackoverflow.com/a/5127684/1064917
before_validation :set_defaults
@ -32,27 +30,6 @@ class Log < ApplicationRecord
self.channels ||= []
end
# Legacy shims ===============================================================
# TODO: Remove these once FBOS stops using the `meta` field (FBOS < v6.4.0).
def meta
{
type: self.type,
major_version: self.major_version,
minor_version: self.minor_version,
verbosity: self.verbosity,
x: self.x,
y: self.y,
z: self.z,
}
end
def meta=(hash)
hash.map { |(key, value)| self.send("#{key}=", value) }
self.meta
end
# End Legacy shims ===========================================================
def broadcast? # Logs get their own special channel. Don't echo twice!
false
end

View File

@ -3,10 +3,12 @@
# Also helps group "fast" messages into a digest.
module LogDeliveryStuff
class RateLimitError < StandardError; end
module ClassMethods
# If this method grows, create a mutation.
def deliver(device, log)
send_fatal_emails(log, device)
def deliver(log_id)
log = Log.find_by(id: log_id)
send_fatal_emails(log, log.device) if log
end
def send_fatal_emails(log, device)

View File

@ -1,18 +1,18 @@
class PinBinding < ApplicationRecord
OFF_LIMITS = [ 6, 12, 13, 17, 21, 23, 24, 25, 27 ]
BAD_PIN_NUM = \
"The following pin numbers cannot be used: %s" % OFF_LIMITS.join(", ")
OFF_LIMITS = [
2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 27,
]
BAD_PIN_NUM = "The following pin numbers cannot be used: %s" % OFF_LIMITS.join(", ")
belongs_to :device
belongs_to :sequence
enum special_action: { dump_info: "dump_info",
emergency_lock: "emergency_lock",
enum special_action: { emergency_lock: "emergency_lock",
emergency_unlock: "emergency_unlock",
power_off: "power_off",
read_status: "read_status",
reboot: "reboot",
sync: "sync",
take_photo: "take_photo" }
power_off: "power_off",
read_status: "read_status",
reboot: "reboot",
sync: "sync",
take_photo: "take_photo" }
validates :pin_num, uniqueness: { scope: :device }
def fancy_name
@ -20,7 +20,7 @@ class PinBinding < ApplicationRecord
end
def random_pin_num
[*(0..69)]
[*(0..27)]
.without(*OFF_LIMITS)
.without(*device.pin_bindings.pluck(:pin_num))
.sample

View File

@ -1,4 +1,14 @@
# A single organism living in the ground.
class Plant < Point
DEFAULT_ICON = "/app-resources/img/icons/generic-plant.svg"
ATTRS = %w(meta
name
openfarm_slug
plant_stage
planted_at
pointer_type
radius
x
y
z)
end

View File

@ -4,11 +4,12 @@ class Point < ApplicationRecord
# axis value > 21k right now - RC
# Using real constants instead of strings results
# in circular dep. errors.
POINTER_KINDS = ["GenericPointer", "Plant", "ToolSlot"]
POINTER_KINDS = ["GenericPointer", "Plant", "ToolSlot", "Weed"]
self.inheritance_column = "pointer_type"
belongs_to :device
validates_presence_of :device
has_many :point_group_items, dependent: :destroy
after_discard :maybe_broadcast
@ -19,4 +20,10 @@ class Point < ApplicationRecord
def name_used_when_syncing
"Point"
end
def fancy_name
n = InUsePoint::FANCY_NAMES[pointer_type] ||
InUsePoint::DEFAULT_NAME
"#{n} at (#{x}, #{y}, #{z})"
end
end

View File

@ -0,0 +1,19 @@
class PointGroup < ApplicationRecord
SORT_TYPES =
%w(xy_ascending xy_descending yx_ascending yx_descending random).sort
BAD_SORT = "%{value} is not valid. Valid options are: " +
SORT_TYPES.map(&:inspect).join(", ")
DEFAULT_CRITERIA = {
day: { op: "<", days_ago: 0 },
string_eq: {},
number_eq: {},
number_lt: {},
number_gt: {},
}
belongs_to :device
has_many :point_group_items, dependent: :destroy
validates_inclusion_of :sort_type, in: SORT_TYPES,
message: BAD_SORT
serialize :criteria
end

View File

@ -0,0 +1,8 @@
class PointGroupItem < ApplicationRecord
belongs_to :point_group
belongs_to :point
def broadcast?
false
end
end

View File

@ -6,23 +6,23 @@
# CeleryScript is a tree of PrimaryNode objects in the center and primitive
# "EdgeNode" types on the edge of the tree.
class PrimaryNode < ApplicationRecord
belongs_to :sequence
belongs_to :sequence
validates_presence_of :sequence
has_many :edge_nodes
has_many :edge_nodes
BAD_KIND = "`kind` must be one of: " +
CeleryScriptSettingsBag::ANY_NODE_NAME.join(", ")
CeleryScriptSettingsBag::ANY_NODE_NAME.join(", ")
validates :kind, inclusion: { in: CeleryScriptSettingsBag::ANY_NODE_NAME,
message: BAD_KIND,
allow_nil: false }
validates :parent_arg_name,
inclusion: {in: CeleryScriptSettingsBag::ANY_ARG_NAME,
message: BAD_KIND,
allow_nil: true}
inclusion: { in: CeleryScriptSettingsBag::ANY_ARG_NAME,
message: BAD_KIND,
allow_nil: true }
before_save :next_must_be_body_node
def next_must_be_body_node
raise "NO!" if(next_id && self.class.find(next_id).parent_arg_name)
raise "NO!" if (next_id && self.class.find(next_id).parent_arg_name)
end
def parent

View File

@ -0,0 +1,21 @@
# If you create a "Mark As.." (resource_update) step
# and accidentally delete the resource that it modifies,
# referential integrity issues will emerge.
#
# The Model below is a SQL VIEW.
# It is NOT A TABLE.
#
# It simplifies the process of finding Points that
# are in use by the `resource_update` step.
class ResourceUpdateStep < ApplicationRecord
belongs_to :point
def readonly?
true
end
# Make sure you preload `self.point` before calling this.
def fancy_name
@fancy_name ||= point.fancy_name
end
end

View File

@ -6,34 +6,37 @@ class Sequence < ApplicationRecord
# This number (YYYYMMDD) helps us prepare for the future by keeping things
# versioned. We can use it as a means of identifying legacy sequences when
# breaking changes happen.
LATEST_VERSION = 20180209
NOTHING = { kind: "nothing", args: {} }
LATEST_VERSION = 20180209
NOTHING = { kind: "nothing", args: {} }
SCOPE_DECLARATION = { kind: "scope_declaration", args: {} }
DEFAULT_ARGS = { locals: SCOPE_DECLARATION,
version: LATEST_VERSION }
DEFAULT_ARGS = { locals: SCOPE_DECLARATION,
version: LATEST_VERSION }
COLORS = %w(blue green yellow orange purple pink gray red)
include CeleryScriptSettingsBag
belongs_to :device
has_one :sequence_usage_report
has_many :farm_events, as: :executable
has_many :regimen_items
has_many :primary_nodes, dependent: :destroy
has_many :edge_nodes, dependent: :destroy
belongs_to :folder
belongs_to :fbos_config, foreign_key: :boot_sequence_id
has_one :sequence_usage_report
has_many :farm_events, as: :executable
has_many :regimen_items
has_many :primary_nodes, dependent: :destroy
has_many :edge_nodes, dependent: :destroy
# allowable label colors for the frontend.
[ :name, :kind ].each { |n| validates n, presence: true }
[:name, :kind].each { |n| validates n, presence: true }
validates :color, inclusion: { in: COLORS }
validates :name, uniqueness: { scope: :device }
validates :device, presence: true
validates :device, presence: true
# http://stackoverflow.com/a/5127684/1064917
before_validation :set_defaults
around_destroy :delete_nodes_too
def set_defaults
self.color ||= "gray"
self.kind ||= "sequence"
self.kind ||= "sequence"
end
def delete_nodes_too
@ -46,21 +49,14 @@ class Sequence < ApplicationRecord
def self.if_still_using(pin)
# TODO: Perform SQL UNION query here for teh performance
pins = EdgeNode.where(kind: "pin_id", value: pin.id).pluck(:primary_node_id)
pins = EdgeNode.where(kind: "pin_id", value: pin.id).pluck(:primary_node_id)
types = EdgeNode.where(kind: "pin_type", value: pin.class.name).pluck(:primary_node_id)
union = pins & types # DO NOT USE &&, I ACTUALLY MEANT TO `&` not `&&`!
all = PrimaryNode.includes(:sequence).where(id: union).pluck(:sequence_id)
all = PrimaryNode.includes(:sequence).where(id: union).pluck(:sequence_id)
sequences = Sequence.where(id: all)
yield(sequences) if sequences.count > 0
end
def manually_sync!
device.auto_sync_transaction do
update_attributes!(updated_at: Time.now)
broadcast!
end if device
end
# THIS IS AN OVERRIDE - See Sequence#body_as_json
# Use `#manually_sync!` for most use cases.
def broadcast?

View File

@ -4,6 +4,7 @@ class TokenIssuance < ApplicationRecord
belongs_to :device
# Number of ms Rails will wait for the API.
API_TIMEOUT = Rails.env.test? ? 0.01 : 2.5
after_create :reset_inactivity_timer
def broadcast?
false
@ -40,4 +41,8 @@ class TokenIssuance < ApplicationRecord
def self.clean_old_tokens
expired.destroy_all
end
def reset_inactivity_timer
device.users.map(&:reset_inactivity_tracking!)
end
end

View File

@ -11,7 +11,9 @@ class ToolSlot < Point
MIN_PULLOUT = PULLOUT_DIRECTIONS.min
PULLOUT_ERR = "must be a value between #{MIN_PULLOUT} and #{MAX_PULLOUT}. "\
"%{value} is not valid."
IN_USE = "already in use by another tool slot"
IN_USE = "already in use by another slot. "\
"Please un-assign the tool from its current slot"\
" before reassigning."
belongs_to :tool
validates_uniqueness_of :tool,

View File

@ -3,11 +3,12 @@ require "bunny"
# A wrapper around AMQP to stay DRY. Will make life easier if we ever need to
# change protocols
class Transport
OPTS = { read_timeout: 10, heartbeat: 10, log_level: "info" }
OPTS = { read_timeout: 10, heartbeat: 10, log_level: "warn" }
RESOURCE_ROUTING_KEY = "bot.*.resources_v0.*.*.*.*"
def self.amqp_url
@amqp_url ||= ENV['CLOUDAMQP_URL'] ||
ENV['RABBITMQ_URL'] ||
@amqp_url ||= ENV["CLOUDAMQP_URL"] ||
ENV["RABBITMQ_URL"] ||
"amqp://admin:#{ENV.fetch("ADMIN_PASSWORD")}@mqtt:5672"
end
@ -31,7 +32,7 @@ class Transport
def connection
@connection ||= Transport
.default_amqp_adapter.new(Transport.amqp_url, OPTS).start
.default_amqp_adapter.new(Transport.amqp_url, OPTS).start
end
def log_channel
@ -41,18 +42,36 @@ class Transport
.bind("amq.topic", routing_key: "bot.*.logs")
end
def telemetry_channel
@telemetry_channel ||= self
.connection
.create_channel
.queue("api_telemetry_workers")
.bind("amq.topic", routing_key: "bot.*.telemetry")
end
def resource_channel
@resource_channel ||= self.connection
.create_channel
.queue("resource_workers")
.bind("amq.topic", routing_key: "bot.*.resources_v0.#")
@resource_channel ||= self
.connection
.create_channel
.queue("resource_workers")
.bind("amq.topic", routing_key: RESOURCE_ROUTING_KEY)
end
def amqp_topic
@amqp_topic ||= self
.connection
.create_channel
.topic("amq.topic", auto_delete: true)
.connection
.create_channel
.topic("amq.topic", auto_delete: true)
end
def send_demo_token_to(user, secret)
fbos_version = Api::AbstractController::EXPECTED_VER
routing_key =
[Api::RmqUtilsController::DEMO_REGISTRY_ROOT, secret].join(".")
payload =
SessionToken.as_json(user, "GUEST", fbos_version).to_json
raw_amqp_send(payload, routing_key)
end
def amqp_send(message, id, channel)
@ -88,10 +107,10 @@ class Transport
end
def self.api_url
uri = URI(Transport.amqp_url)
uri = URI(Transport.amqp_url)
uri.scheme = ENV["FORCE_SSL"] ? "https" : "http"
uri.user = nil
uri.port = 15672
uri.user = nil
uri.port = 15672
uri.to_s
end

View File

@ -45,10 +45,43 @@ class User < ApplicationRecord
end
def self.refresh_everyones_ui
Rollbar.error("Global UI refresh triggered")
msg = {
"type" => "reload",
"commit" => (ENV["HEROKU_SLUG_COMMIT"] || "NONE").first(8),
}
Transport
.current
.raw_amqp_send("X", Api::RmqUtilsController::PUBLIC_BROADCAST)
.raw_amqp_send(msg.to_json, Api::RmqUtilsController::PUBLIC_BROADCAST)
end
# The web app deletes account that go inactive for long periods.
# It is called when the user logs in to the app.
def reset_inactivity_tracking!
update!(inactivity_warning_sent_at: nil)
end
def send_inactivity_warning
User.transaction do
update!(inactivity_warning_sent_at: Time.now)
InactivityMailer.send_warning(self).deliver_later
puts "INACTIVITY WARNING FOR #{email}" unless Rails.env.test?
end
end
def deactivate_account
User.transaction do
email = self.email
if reload.last_sign_in_at > 3.months.ago
puts "CANCEL DEACTIVATION FOR #{email}" unless Rails.env.test?
update!(inactivity_warning_sent_at: nil)
return # <== DON'T DELETE THIS LINE!!!
else
# Prevent double deletion / race conditions.
update!(last_sign_in_at: Time.now, inactivity_warning_sent_at: nil)
delay.destroy!
puts "INACTIVITY DELETION FOR #{email}" unless Rails.env.test?
end
end
end
end

View File

@ -2,16 +2,6 @@
class WebAppConfig < ApplicationRecord
belongs_to :device
def internal_use=(data)
unless [nil, "null"].include?(data)
Rollbar.error("Internal data update use", {
self_id: self.id,
device_id: self.device_id,
})
end
super(data)
end
def broadcast?
false
end

View File

@ -0,0 +1,2 @@
class Weed < Point
end

View File

@ -0,0 +1,17 @@
module Alerts
class Create < Mutations::Command
required do
model :device
string :problem_tag, in: Alert::PROBLEM_TAGS
end
optional do
string :slug # Default is `SecureRandom.uuid`
integer :priority, default: 99
end
def execute
Alert.create!({ slug: slug || SecureRandom.uuid }.merge(inputs))
end
end
end

View File

@ -0,0 +1,11 @@
module Alerts
class Destroy < Mutations::Command
required do
model :alert
end
def execute
alert.destroy!
end
end
end

Some files were not shown because too many files have changed in this diff Show More