Compare commits

...

983 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 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 576c27c9c5
Merge pull request #1423 from FarmBot/staging
v8.0.3 - Iridescent Iris
2019-09-10 12:11:38 -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
Ascend 51216e0bc3 Issue #1378 Sequence step 'move to' more compact 2019-09-07 13:01:44 +02:00
AscendFB 7bbc5dcccd
Merge pull request #3 from FarmBot/staging
Update branch
2019-09-06 17:22:39 +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
1334 changed files with 38506 additions and 15510 deletions

View File

@ -1,34 +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: After cache restore
command: |
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
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
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: After cache update
command: |
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 Ruby Tests
command: |
sudo docker-compose run web rspec spec
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-very-slow -- -c .circleci/jest-ci.config.js
echo 'export COVERAGE_AVAILABLE=true' >> $BASH_ENV
lint-commands:
steps:
- run:
name: Run JS Linters
command: |
sudo docker-compose run web npm run linters
when: always
coverage-commands:
steps:
- run:
name: Run JS Tests
name: Check coverage status
command: |
sudo docker-compose run web npm run test-very-slow
echo 'export COVERAGE_AVAILABLE=true' >> $BASH_ENV
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
no_output_timeout: 15m
when: always
- run:
name: Report coverage to Coveralls
command: |
@ -37,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;

2
.gitignore vendored
View File

@ -1,6 +1,7 @@
.cache
.env
.vscode
.idea
*.log
*.pem
coverage_api
@ -18,7 +19,6 @@ api_docs.md
erd_diagram.png
erd.pdf
*scratchpad*
scratchpad.rb
/config/master.key
config/credentials.yml.enc
# ActiveStorage blobs:

View File

@ -1 +1 @@
2.6.3
2.6.5

View File

@ -1,6 +1,7 @@
source "https://rubygems.org"
ruby "~> 2.6.3"
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
@ -16,7 +17,6 @@ gem "rabbitmq_http_api_client"
gem "rack-attack"
gem "rack-cors"
gem "rails_12factor"
gem "rails", "5.2.3" # TODO: Upgrade to Rails 6
gem "redis", "~> 4.0"
gem "request_store"
gem "rollbar"
@ -24,7 +24,7 @@ gem "scenic"
gem "secure_headers"
gem "tzinfo" # For validation of user selected timezone names
gem "valid_url"
gem "zero_downtime_migrations"
gem "kaminari"
group :development, :test do
gem "climate_control"
@ -37,6 +37,7 @@ group :development, :test do
gem "pry"
gem "rspec-rails"
gem "rspec"
gem 'rspec_junit_formatter'
gem "simplecov"
gem "smarf_doc", git: "https://github.com/RickCarlino/smarf_doc.git"
end

View File

@ -7,71 +7,84 @@ 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)
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)
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.3)
bunny (2.14.2)
amq-protocol (~> 2.3, >= 2.3.0)
builder (3.2.4)
bunny (2.15.0)
amq-protocol (~> 2.3, >= 2.3.1)
case_transform (0.2)
activesupport
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)
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.8)
@ -86,190 +99,208 @@ GEM
responders
warden (~> 1.2.3)
diff-lcs (1.3)
digest-crc (0.4.1)
discard (1.1.0)
digest-crc (0.5.1)
discard (1.2.0)
activerecord (>= 4.2, < 7)
docile (1.3.2)
erubi (1.8.0)
factory_bot (5.0.2)
erubi (1.9.0)
factory_bot (5.1.2)
activesupport (>= 4.2.0)
factory_bot_rails (5.0.2)
factory_bot (~> 5.0.2)
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faker (2.3.0)
i18n (~> 1.6.0)
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)
font-awesome-rails (4.7.0.5)
railties (>= 3.2, < 6.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
google-api-client (0.30.8)
google-api-client (0.37.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.5, < 0.10.0)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.10)
google-cloud-core (1.3.0)
signet (~> 0.12)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.2.0)
faraday (~> 0.11)
google-cloud-storage (1.21.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.26)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (>= 0.6.2, < 0.10.0)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.9.0)
faraday (~> 0.12)
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 (1.0.0)
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)
json (2.3.0)
jsonapi-renderer (0.2.2)
jwt (2.2.1)
loofah (2.2.3)
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)
mimemagic (0.3.3)
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.1.1)
mutations (0.9.0)
mutations (0.9.1)
activesupport
nio4r (2.4.0)
nokogiri (1.10.4)
nio4r (2.5.2)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
os (1.0.1)
passenger (6.0.2)
passenger (6.0.4)
rack
rake (>= 0.8.1)
pg (1.1.4)
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.1.1)
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 (6.1.0)
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-html-sanitizer (1.2.0)
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.3)
redis (4.1.2)
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 (3.0.0)
actionpack (>= 5.0)
railties (>= 5.0)
retriable (3.1.2)
rollbar (2.22.1)
rspec (3.8.0)
rspec-core (~> 3.8.0)
rspec-expectations (~> 3.8.0)
rspec-mocks (~> 3.8.0)
rspec-core (3.8.2)
rspec-support (~> 3.8.0)
rspec-expectations (3.8.4)
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.1)
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.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.1)
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.17.0)
simplecov (0.18.5)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
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)
thor (0.20.3)
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)
@ -281,8 +312,7 @@ GEM
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
zero_downtime_migrations (0.0.7)
activerecord
zeitwerk (2.3.0)
PLATFORMS
ruby
@ -303,6 +333,7 @@ DEPENDENCIES
google-cloud-storage (~> 1.11)
hashdiff
jwt
kaminari
mutations
passenger
pg
@ -311,23 +342,23 @@ DEPENDENCIES
rabbitmq_http_api_client
rack-attack
rack-cors
rails (= 5.2.3)
rails
rails_12factor
redis (~> 4.0)
request_store
rollbar
rspec
rspec-rails
rspec_junit_formatter
scenic
secure_headers
simplecov
smarf_doc!
tzinfo
valid_url
zero_downtime_migrations
RUBY VERSION
ruby 2.6.3p62
ruby 2.6.5p114
BUNDLED WITH
1.17.2
2.1.4

View File

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

View File

@ -33,6 +33,7 @@ module Api
rescue_from(JWT::VerificationError) { |e| auth_err }
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"
@ -79,10 +80,25 @@ module Api
{ 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.
@ -131,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.

View File

@ -1,7 +1,7 @@
module Api
class AlertsController < Api::AbstractController
def index
render json: current_device.alerts
maybe_paginate current_device.alerts
end
def destroy

View File

@ -44,7 +44,7 @@ module Api
end
def update_fields
user.update_attributes!(confirmed_at: Time.now)
user.update!(confirmed_at: Time.now)
end
def seed_user

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

@ -10,7 +10,7 @@ module Api
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,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

@ -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

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

View File

@ -1,4 +1,4 @@
require_relative "../../lib/hstore_filter"
# require_relative "../../lib/mutations/hstore_filter"
module Api
class PointsController < Api::AbstractController
@ -20,7 +20,7 @@ module Api
.where("discarded_at < ?", Time.now - HARD_DELETE_AFTER)
.destroy_all
render json: points(params.fetch(:filter) { "kept" })
maybe_paginate points(params.fetch(:filter) { "kept" })
end
def show

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

@ -57,6 +57,7 @@ module Api
status
status_v8
sync
telemetry
\\#
\\*
).map { |x| x + "(\\.|\\z)" }.join("|")
@ -78,7 +79,7 @@ module Api
class PasswordFailure < Exception; end
rescue_from PasswordFailure, with: :report_suspicious_behavior
rescue_from BrokerConnectionLimiter::RateLimit, with: :deny
rescue_from BrokerConnectionLimiter::RateLimit, with: :do_rate_limit
skip_before_action :check_fbos_version, except: []
skip_before_action :authenticate_user!, except: []
@ -96,13 +97,13 @@ module Api
# "farmbot_demo". We intentionally
# differentiate to avoid accidental
# security issues. -RC
when "guest" then deny
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
is_ok = device_id_in_username == current_device.id
is_ok ? (with_rate_limit { allow }) : deny
is_ok ? (with_rate_limit { allow }) : deny("Guests are rate limited")
end
end
@ -111,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
@ -122,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
@ -135,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
@ -176,10 +181,15 @@ module Api
def report_suspicious_behavior
Rollbar.error("Failed password attempt on RMQ: " + password_param)
deny
deny("Failed password attempt")
end
def deny
def do_rate_limit
deny("Device is rate limited")
end
def deny(reason)
maybe_alert_user(reason)
render json: "deny", status: 403
end
@ -216,32 +226,32 @@ module Api
a, b, c = (routing_key_param || "").split(".")
if !(permission_param == "read")
deny
deny("!(permission_param == read)")
return
end
if !(a == DEMO_REGISTRY_ROOT)
deny
deny("!(a == DEMO_REGISTRY_ROOT)")
return
end
if b.nil?
deny
deny("b.nil?")
return
end
if b.include?("*")
deny
deny("b.include?(*)")
return
end
if b.include?("#")
deny
deny("b.include?(#)")
return
end
if c.present?
deny
deny("c.present?")
return
end
@ -254,6 +264,9 @@ module Api
return
end
msg = "Subscribed to illegal topic #{routing_key_param || ""}"
maybe_alert_user(msg)
render json: MALFORMED_TOPIC, status: 422
end
@ -266,13 +279,14 @@ module Api
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
@ -280,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,7 +19,7 @@ module Api
end
def snapshot
mutate SavedGardens::Snapshot.run(device: current_device)
mutate SavedGardens::Snapshot.run(raw_json, device: current_device)
end
def apply

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

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

View File

@ -7,7 +7,7 @@ module Api
end
def index
render json: webcams
maybe_paginate webcams
end
def show

View File

@ -7,6 +7,7 @@ class DashboardController < ApplicationController
:main_app,
:password_reset,
:tos_update,
:os_download,
:demo]
OUTPUT_URL = "/" + File.join("assets", "parcel") # <= served from public/ dir
@ -24,6 +25,7 @@ class DashboardController < ApplicationController
password_reset: "/password_reset/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. ===
@ -94,9 +96,6 @@ class DashboardController < ApplicationController
rescue
report = { problem: "Crashed while parsing report" }
end
# We get too many CSP reports.
# Rollbar.info("CSP Violation", report)
render json: report
end
@ -110,6 +109,9 @@ class DashboardController < ApplicationController
render json: ""
end
def logout
end
private
def load_css_assets

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

@ -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

@ -26,7 +26,7 @@ module CeleryScript
def maybe_initialize(parent, leaf_or_node, key = NEVER)
if is_node?(leaf_or_node)
AstNode.new(parent, 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)

View File

@ -26,6 +26,7 @@ module CeleryScript
FRIENDLY_ERRORS = {
nothing: {
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.",

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

@ -2,18 +2,20 @@
# Listens to *ALL* incoming logs and stores them to the DB.
# Also handles throttling.
class LogService < AbstractServiceRunner
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
THROTTLE_POLICY = ThrottlePolicy.new(name, min: 250, hour: 5_000, day: 25_000)
LOG_TPL = "FBOS LOG (device_%s): %s"
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 }
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]
@ -22,19 +24,26 @@ class LogService < AbstractServiceRunner
end
def maybe_deliver(data)
violation = THROTTLE_POLICY.is_throttled(data.device_id)
ok = data.valid? && !violation
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 deliver(data)
dev, log = [data.device, data.payload]
dev.maybe_unthrottle
Log.deliver(dev, Logs::Create.run!(log, device: dev))
puts LOG_TPL % [data.device_id, data.payload["message"] || "??"]
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

View File

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

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

@ -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,6 +1,7 @@
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
class << self
@ -37,16 +38,17 @@ class ApplicationRecord < ActiveRecord::Base
def self.auto_sync_debounce
@auto_sync_paused = true
result = yield
result.update_attributes!(updated_at: Time.now)
result.update!(updated_at: Time.now)
@auto_sync_paused = false
result.broadcast!
result
end
def broadcast?
!self.class.auto_sync_paused &&
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
@ -88,12 +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.auto_sync_transaction do
update_attributes!(updated_at: Time.now)
end if device
device && (device.auto_sync_transaction do
update!(updated_at: Time.now)
end)
self
end
end

View File

@ -10,11 +10,15 @@ class ArgName < ApplicationRecord
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,9 +16,9 @@ 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_ASSERTION_TYPES = %w(abort recover abort_recover continue)
ALLOWED_CHANGES = %w(add remove update)
@ -30,19 +30,19 @@ module CeleryScriptSettingsBag
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 Point Plant ToolSlot GenericPointer)
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 dump_info emergency_lock
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'
@ -60,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'
@ -72,8 +73,7 @@ module CeleryScriptSettingsBag
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
@ -81,6 +81,13 @@ module CeleryScriptSettingsBag
"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],
@ -130,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,
@ -194,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)],
},
@ -270,6 +284,9 @@ module CeleryScriptSettingsBag
lua: {
defn: [v(:string)],
},
resource: {
defn: [n(:identifier), n(:resource)],
},
}.map do |(name, conf)|
blk = conf[:blk]
defn = conf.fetch(:defn)
@ -309,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],
},
@ -505,15 +518,30 @@ module CeleryScriptSettingsBag
tags: [:function, :firmware_user, :rpi_user],
blk: ->(n) { no_rpi_analog(n) },
},
resource_update: {
args: RESOURCE_UPDATE_ARGS,
tags: [:function, :api_writer, :network_user],
# 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],
},
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) }
HASH = Corpus.as_json
@ -535,6 +563,8 @@ module CeleryScriptSettingsBag
# the current_device.
# For convenience, we try to set it here, defaulting to 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

@ -6,17 +6,17 @@ class Device < ApplicationRecord
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"
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 diagnostic_dumps fragments)
webcam_feeds fragments)
PLURAL_RESOURCES.map { |resources| has_many resources, dependent: :destroy }
@ -34,6 +34,7 @@ class Device < ApplicationRecord
has_many :in_use_tools
has_many :in_use_points
has_many :users
has_many :folders
validates_presence_of :name
validates :timezone, inclusion: {
@ -41,6 +42,8 @@ class Device < ApplicationRecord
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
@ -91,47 +94,23 @@ class Device < ApplicationRecord
points.where(pointer_type: "GenericPointer")
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) }
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))
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
@ -185,20 +164,17 @@ 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. Please " +
"see https://developer.farm.bot/docs/connectivity-issues"
"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)
@ -206,7 +182,7 @@ class Device < ApplicationRecord
last_sent_at = device.mqtt_rate_limit_email_sent_at || 4.years.ago
if last_sent_at < 1.day.ago
device.update_attributes!(mqtt_rate_limit_email_sent_at: Time.now)
device.update!(mqtt_rate_limit_email_sent_at: Time.now)
device.tell(TOO_MANY_CONNECTIONS, ["fatal_email"])
end
end

View File

@ -1,3 +0,0 @@
class DiagnosticDump < ApplicationRecord
belongs_to :device
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,8 @@ 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,
@ -11,6 +12,7 @@ class FbosConfig < ApplicationRecord
ARDUINO = "arduino",
FARMDUINO = "farmduino",
FARMDUINO_K14 = "farmduino_k14",
FARMDUINO_K15 = "farmduino_k15",
EXPRESS_K10 = "express_k10",
]

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

@ -54,9 +54,7 @@ class Fragment < ApplicationRecord
# Avoid N+1s: Fragment.includes(Fragment::EVERYTHING)
EVERYTHING = { nodes: Node::EVERYTHING }
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
@ -80,7 +78,7 @@ class Fragment < ApplicationRecord
def self.from_celery(device:, kind:, args:, body:, owner:)
p = { device: device, kind: kind, args: args, body: body }
flat_ast = Fragments::Preprocessor.run!(p)
flat_ast = Fragments::Preprocessor.run!(**p)
Fragments::Create.run!(device: device,
flat_ast: flat_ast,
owner: owner)
@ -89,4 +87,8 @@ class Fragment < ApplicationRecord
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

@ -28,7 +28,7 @@ class GlobalConfig < ApplicationRecord
# 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

@ -40,17 +40,10 @@ class Image < ApplicationRecord
# Worst case scenario for 1280x1280 BMP.
GCS_BUCKET_NAME = ENV["GCS_BUCKET"]
# ========= DEPRECATED PAPERCLIP STUFF =========
# has_attached_file :attachment, CONFIG
# validates_attachment_content_type :attachment,
# content_type: CONTENT_TYPES
# ========= /DEPRECATED PAPERCLIP STUFF ========
has_one_attached :attachment
def set_attachment_by_url(url)
# File
# URI::HTTPS
attachment.attach(io: open(url), filename: "image_#{self.id}")
attachment.attach(io: URI.open(url), filename: "image_#{self.id}")
self.attachment_processed_at = Time.now
self
end

View File

@ -6,8 +6,9 @@ class InUsePoint < ApplicationRecord
DEFAULT_NAME = "point"
FANCY_NAMES = {
GenericPointer.name => DEFAULT_NAME,
ToolSlot.name => "tool slot",
ToolSlot.name => "slot",
Plant.name => "plant",
Weed.name => "weed"
}
def readonly?

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

@ -6,8 +6,9 @@ module LogDeliveryStuff
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

@ -4,12 +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
has_many :point_group_items, dependent: :destroy
after_discard :maybe_broadcast

View File

@ -1,4 +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

@ -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

@ -16,6 +16,8 @@ class Sequence < ApplicationRecord
include CeleryScriptSettingsBag
belongs_to :device
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

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

@ -42,6 +42,14 @@ 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

View File

@ -45,15 +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)
"commit" => (ENV["HEROKU_SLUG_COMMIT"] || "NONE").first(8),
}
Transport
.current
.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

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

View File

@ -26,7 +26,7 @@ module Auth
end
def execute
@user.update_attributes(agreed_to_terms_at: Time.now) if agree_to_terms
@user.update(agreed_to_terms_at: Time.now) if agree_to_terms
SessionToken.as_json(@user, aud, fbos_version)
end

View File

@ -1,7 +1,7 @@
module Auth
# The API supports a number of authentication strategies (Cookies, Bot token,
# JWT). This service helps determine which auth strategy to use.
class FromJWT < Mutations::Command
class FromJwt < Mutations::Command
required { string :jwt }
def execute

View File

@ -1,16 +1,17 @@
module Configs
class Update < Mutations::Command
HOTFIX = [ :encoder_scaling_x, :encoder_scaling_y, :encoder_scaling_z ]
BAD = 56
GOOD = 5556
HOTFIX = [:encoder_scaling_x, :encoder_scaling_y, :encoder_scaling_z]
BAD = 56
GOOD = 5556
required do
duck :target, methods: [:update_attributes!]
duck :target, methods: [:update!]
duck :update_attrs, methods: [:deep_symbolize_keys]
end
def execute
target.assign_attributes(sliced_attrs)
# Remove HOTFIX after November 12, 2019 - RC
HOTFIX.map do |attr|
target.assign_attributes(attr => GOOD) if target.try(attr) == BAD
end
@ -20,7 +21,7 @@ module Configs
def sliced_attrs
whitelist = target.class.column_names.map(&:to_sym)
updates = update_attrs
updates = update_attrs
.deep_symbolize_keys
.except(:device_id, :id, :created_at)
updates.slice(*whitelist)

View File

@ -10,7 +10,7 @@ module DeviceCerts
SendNervesHubInfoJob.perform_later(device_id: device.id,
serial_number: serial_number,
tags: tags)
return device.update_attributes!(serial_number: serial_number) && device
return device.update!(serial_number: serial_number) && device
end
end
end

View File

@ -24,7 +24,7 @@ module Devices
# when we were using MongoDB. This can be
# safely removed now. - RC 11-APR-19
old_device = user.device
user.update_attributes!(device_id: device.id) # Detach from old one.
user.update!(device_id: device.id) # Detach from old one.
# Remove userless devices.
old_device.destroy! if old_device && device.users.count < 1
end

View File

@ -7,7 +7,9 @@ module Devices
"genesis_1.2" => Devices::Seeders::GenesisOneTwo,
"genesis_1.3" => Devices::Seeders::GenesisOneThree,
"genesis_1.4" => Devices::Seeders::GenesisOneFour,
"genesis_1.5" => Devices::Seeders::GenesisOneFive,
"genesis_xl_1.4" => Devices::Seeders::GenesisXlOneFour,
"genesis_xl_1.5" => Devices::Seeders::GenesisXlOneFive,
"demo_account" => Devices::Seeders::DemoAccountSeeder,
"none" => Devices::Seeders::None,

View File

@ -7,7 +7,7 @@ module Devices
def execute
ActiveRecord::Base.transaction do
user.update_attributes!(device: Devices::Create.run!(user: user))
user.update!(device: Devices::Create.run!(user: user))
device.destroy! if device.reload.users.count < 1
end
true

View File

@ -20,7 +20,7 @@ module Devices
def run_it
ActiveRecord::Base.transaction do
device.update_attributes!(name: "FarmBot")
device.update!(name: "FarmBot")
Device::SINGULAR_RESOURCES.keys.map do |resource|
device.send(resource).destroy!
end

View File

@ -2,14 +2,17 @@ module Devices
module Seeders
class AbstractExpress < AbstractGenesis
def settings_device_name
device.update_attributes!(name: "FarmBot Express")
device.update!(name: "FarmBot Express")
end
def peripherals_peripheral_4; end
def peripherals_peripheral_5; end
def sensors_soil_sensor; end
def sensors_tool_verification; end
def settings_enable_encoders
device.firmware_config.update_attributes!(encoder_enabled_x: 0,
device.firmware_config.update!(encoder_enabled_x: 0,
encoder_enabled_y: 0,
encoder_enabled_z: 0)
end
@ -17,14 +20,14 @@ module Devices
def settings_firmware
device
.fbos_config
.update_attributes!(firmware_hardware: FbosConfig::EXPRESS_K10)
.update!(firmware_hardware: FbosConfig::EXPRESS_K10)
end
def tool_slots_slot_1
add_tool_slot(name: ToolNames::SEED_TROUGH_1,
x: 0,
y: 25,
z: -200,
z: 0,
tool: tools_seed_trough_1,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
@ -34,25 +37,18 @@ module Devices
add_tool_slot(name: ToolNames::SEED_TROUGH_2,
x: 0,
y: 50,
z: -200,
z: 0,
tool: tools_seed_trough_2,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
end
def tool_slots_slot_3
add_tool_slot(name: ToolNames::SEED_TROUGH_3,
x: 0,
y: 75,
z: -200,
tool: tools_seed_trough_3,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
end
def tool_slots_slot_3; end
def tool_slots_slot_4; end
def tool_slots_slot_5; end
def tool_slots_slot_6; end
def tool_slots_slot_7; end
def tool_slots_slot_8; end
def tools_seed_bin; end
def tools_seed_tray; end
@ -66,11 +62,6 @@ module Devices
add_tool(ToolNames::SEED_TROUGH_2)
end
def tools_seed_trough_3
@tools_seed_trough_3 ||=
add_tool(ToolNames::SEED_TROUGH_3)
end
def tools_seeder; end
def tools_soil_sensor; end
def tools_watering_nozzle; end
@ -91,11 +82,11 @@ module Devices
def sequences_unmount_tool; end
def settings_default_map_size_y
device.web_app_config.update_attributes!(map_size_y: 1_200)
device.web_app_config.update!(map_size_y: 1_200)
end
def settings_hide_sensors
device.web_app_config.update_attributes!(hide_sensors: true)
device.web_app_config.update!(hide_sensors: true)
end
private

View File

@ -18,11 +18,11 @@ module Devices
end
def settings_device_name
device.update_attributes!(name: "FarmBot Genesis")
device.update!(name: "FarmBot Genesis")
end
def settings_enable_encoders
device.firmware_config.update_attributes!(encoder_enabled_x: 1,
device.firmware_config.update!(encoder_enabled_x: 1,
encoder_enabled_y: 1,
encoder_enabled_z: 1)
end
@ -75,6 +75,9 @@ module Devices
tool: tools_weeder)
end
def tool_slots_slot_7; end
def tool_slots_slot_8; end
def tools_seed_bin
@tools_seed_bin ||=
add_tool(ToolNames::SEED_BIN)
@ -87,7 +90,6 @@ module Devices
def tools_seed_trough_1; end
def tools_seed_trough_2; end
def tools_seed_trough_3; end
def tools_seeder
@tools_seeder ||=
@ -146,15 +148,15 @@ module Devices
def settings_firmware
device
.fbos_config
.update_attributes!(firmware_hardware: FbosConfig::FARMDUINO)
.update!(firmware_hardware: FbosConfig::FARMDUINO)
end
def settings_default_map_size_x
device.web_app_config.update_attributes!(map_size_x: 2_900)
device.web_app_config.update!(map_size_x: 2_900)
end
def settings_default_map_size_y
device.web_app_config.update_attributes!(map_size_y: 1_400)
device.web_app_config.update!(map_size_y: 1_400)
end
def pin_bindings_button_1

View File

@ -37,7 +37,6 @@ module Devices
:tools_seed_tray,
:tools_seed_trough_1,
:tools_seed_trough_2,
:tools_seed_trough_3,
:tools_seeder,
:tools_soil_sensor,
:tools_watering_nozzle,
@ -50,6 +49,8 @@ module Devices
:tool_slots_slot_4,
:tool_slots_slot_5,
:tool_slots_slot_6,
:tool_slots_slot_7,
:tool_slots_slot_8,
# WEBCAM FEEDS ===========================
:webcam_feeds,
@ -72,7 +73,7 @@ module Devices
end
def settings_hide_sensors
device.web_app_config.update_attributes!(hide_sensors: false)
device.web_app_config.update!(hide_sensors: false)
end
def plants
@ -152,11 +153,12 @@ module Devices
def tool_slots_slot_4; end
def tool_slots_slot_5; end
def tool_slots_slot_6; end
def tool_slots_slot_7; end
def tool_slots_slot_8; end
def tools_seed_bin; end
def tools_seed_tray; end
def tools_seed_trough_1; end
def tools_seed_trough_2; end
def tools_seed_trough_3; end
def tools_seeder; end
def tools_soil_sensor; end
def tools_watering_nozzle; end

View File

@ -31,7 +31,6 @@ module Devices
LIGHTING = "Lighting"
SEED_TROUGH_1 = "Seed Trough 1"
SEED_TROUGH_2 = "Seed Trough 2"
SEED_TROUGH_3 = "Seed Trough 3"
end
# Stub plants ==============================

View File

@ -55,10 +55,10 @@ module Devices
.map { |p| p.merge(device: device) }
.map { |p| Alerts::Create.run!(p) }
device
.update_attributes!(fbos_version: READ_COMMENT_ABOVE)
.update!(fbos_version: READ_COMMENT_ABOVE)
device
.web_app_config
.update_attributes!(discard_unsaved: true)
.update!(discard_unsaved: true)
end
end
end

View File

@ -2,15 +2,15 @@ module Devices
module Seeders
class ExpressXlOneZero < AbstractExpress
def settings_device_name
device.update_attributes!(name: "FarmBot Express XL")
device.update!(name: "FarmBot Express XL")
end
def settings_default_map_size_x
device.web_app_config.update_attributes!(map_size_x: 6_000)
device.web_app_config.update!(map_size_x: 6_000)
end
def settings_default_map_size_y
device.web_app_config.update_attributes!(map_size_y: 2_400)
device.web_app_config.update!(map_size_y: 2_400)
end
end
end

View File

@ -0,0 +1,41 @@
module Devices
module Seeders
class GenesisOneFive < AbstractGenesis
def settings_firmware
device
.fbos_config
.update!(firmware_hardware: FbosConfig::FARMDUINO_K15)
end
def tool_slots_slot_7
add_tool_slot(name: ToolNames::SEED_TROUGH_1,
x: 0,
y: 25,
z: 0,
tool: tools_seed_trough_1,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
end
def tool_slots_slot_8
add_tool_slot(name: ToolNames::SEED_TROUGH_2,
x: 0,
y: 50,
z: 0,
tool: tools_seed_trough_2,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
end
def tools_seed_trough_1
@tools_seed_trough_1 ||=
add_tool(ToolNames::SEED_TROUGH_1)
end
def tools_seed_trough_2
@tools_seed_trough_2 ||=
add_tool(ToolNames::SEED_TROUGH_2)
end
end
end
end

View File

@ -4,7 +4,7 @@ module Devices
def settings_firmware
device
.fbos_config
.update_attributes!(firmware_hardware: FbosConfig::FARMDUINO_K14)
.update!(firmware_hardware: FbosConfig::FARMDUINO_K14)
end
end
end

View File

@ -12,7 +12,7 @@ module Devices
def settings_firmware
device
.fbos_config
.update_attributes!(firmware_hardware: FbosConfig::ARDUINO)
.update!(firmware_hardware: FbosConfig::ARDUINO)
end
def peripherals_lighting; end

View File

@ -0,0 +1,53 @@
module Devices
module Seeders
class GenesisXlOneFive < AbstractGenesis
def settings_firmware
device
.fbos_config
.update!(firmware_hardware: FbosConfig::FARMDUINO_K15)
end
def settings_device_name
device.update!(name: "FarmBot Genesis XL")
end
def settings_default_map_size_x
device.web_app_config.update!(map_size_x: 5_900)
end
def settings_default_map_size_y
device.web_app_config.update!(map_size_y: 2_900)
end
def tool_slots_slot_7
add_tool_slot(name: ToolNames::SEED_TROUGH_1,
x: 0,
y: 25,
z: 0,
tool: tools_seed_trough_1,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
end
def tool_slots_slot_8
add_tool_slot(name: ToolNames::SEED_TROUGH_2,
x: 0,
y: 50,
z: 0,
tool: tools_seed_trough_2,
pullout_direction: ToolSlot::NONE,
gantry_mounted: true)
end
def tools_seed_trough_1
@tools_seed_trough_1 ||=
add_tool(ToolNames::SEED_TROUGH_1)
end
def tools_seed_trough_2
@tools_seed_trough_2 ||=
add_tool(ToolNames::SEED_TROUGH_2)
end
end
end
end

View File

@ -4,19 +4,19 @@ module Devices
def settings_firmware
device
.fbos_config
.update_attributes!(firmware_hardware: FbosConfig::FARMDUINO_K14)
.update!(firmware_hardware: FbosConfig::FARMDUINO_K14)
end
def settings_device_name
device.update_attributes!(name: "FarmBot Genesis XL")
device.update!(name: "FarmBot Genesis XL")
end
def settings_default_map_size_x
device.web_app_config.update_attributes!(map_size_x: 5_900)
device.web_app_config.update!(map_size_x: 5_900)
end
def settings_default_map_size_y
device.web_app_config.update_attributes!(map_size_y: 2_900)
device.web_app_config.update!(map_size_y: 2_900)
end
end
end

View File

@ -28,11 +28,12 @@ module Devices
def tool_slots_slot_4; end
def tool_slots_slot_5; end
def tool_slots_slot_6; end
def tool_slots_slot_7; end
def tool_slots_slot_8; end
def tools_seed_bin; end
def tools_seed_tray; end
def tools_seed_trough_1; end
def tools_seed_trough_2; end
def tools_seed_trough_3; end
def tools_seeder; end
def tools_soil_sensor; end
def tools_watering_nozzle; end

View File

@ -8,7 +8,7 @@
pullout_direction: 0
radius: 25.0
x: 400.0
y: 200.0
y: 100.0
z: 0.0
- meta: {}
pointer_type: Plant
@ -19,7 +19,7 @@
pullout_direction: 0
radius: 25.0
x: 400.0
y: 400.0
y: 300.0
z: 0.0
- meta: {}
pointer_type: Plant
@ -30,7 +30,7 @@
pullout_direction: 0
radius: 25.0
x: 600.0
y: 200.0
y: 100.0
z: 0.0
- meta: {}
pointer_type: Plant
@ -41,7 +41,7 @@
pullout_direction: 0
radius: 25.0
x: 600.0
y: 400.0
y: 300.0
z: 0.0
- meta: {}
pointer_type: Plant
@ -52,7 +52,7 @@
pullout_direction: 0
radius: 25.0
x: 800.0
y: 400.0
y: 300.0
z: 0.0
- meta: {}
pointer_type: Plant
@ -63,7 +63,7 @@
pullout_direction: 0
radius: 25.0
x: 800.0
y: 200.0
y: 100.0
z: 0.0
- meta: {}
pointer_type: Plant
@ -74,49 +74,49 @@
pullout_direction: 0
radius: 25.0
x: 600.0
y: 800.0
y: 700.0
z: 0.0
- meta: {}
pointer_type: Plant
name: Beets
openfarm_slug: beets
openfarm_slug: beet
plant_stage: planned
planted_at:
pullout_direction: 0
radius: 25.0
x: 800.0
y: 1200.0
y: 1100.0
z: 0.0
- meta: {}
pointer_type: Plant
name: Beets
openfarm_slug: beets
openfarm_slug: beet
plant_stage: planned
planted_at:
pullout_direction: 0
radius: 25.0
x: 600.0
y: 1200.0
y: 1100.0
z: 0.0
- meta: {}
pointer_type: Plant
name: Beets
openfarm_slug: beets
openfarm_slug: beet
plant_stage: planned
planted_at:
pullout_direction: 0
radius: 25.0
x: 400.0
y: 1200.0
y: 1100.0
z: 0.0
- meta: {}
pointer_type: Plant
name: Beets
openfarm_slug: beets
openfarm_slug: beet
plant_stage: planned
planted_at:
pullout_direction: 0
radius: 25.0
x: 200.0
y: 1200.0
y: 1100.0
z: 0.0

View File

@ -2,22 +2,28 @@ module Devices
class Sync < Mutations::Command
SEL = "SELECT id, updated_at FROM"
WHERE = "WHERE device_id = "
WHERE2 = "devices WHERE id = "
FORMAT = "%Y-%m-%d %H:%M:%S.%5N"
def self.basic_query(plural_resource, where = WHERE)
[SEL, plural_resource, where].join(" ")
end
QUERIES = {
devices: [SEL, WHERE2].join(" "),
farm_events: [SEL, "farm_events", WHERE].join(" "),
farmware_envs: [SEL, "farmware_envs", WHERE].join(" "),
farmware_installations: [SEL, "farmware_installations", WHERE].join(" "),
peripherals: [SEL, "peripherals", WHERE].join(" "),
pin_bindings: [SEL, "pin_bindings", WHERE].join(" "),
points: [SEL, "points", WHERE].join(" "),
regimens: [SEL, "regimens", WHERE].join(" "),
sensor_readings: [SEL, "sensor_readings", WHERE].join(" "),
sensors: [SEL, "sensors", WHERE].join(" "),
sequences: [SEL, "sequences", WHERE].join(" "),
tools: [SEL, "tools", WHERE].join(" "),
fbos_configs: [SEL, "fbos_configs", WHERE].join(" "),
firmware_configs: [SEL, "firmware_configs", WHERE].join(" "),
devices: basic_query("devices", "WHERE id = "),
farm_events: basic_query("farm_events"),
farmware_envs: basic_query("farmware_envs"),
farmware_installations: basic_query("farmware_installations"),
peripherals: basic_query("peripherals"),
pin_bindings: basic_query("pin_bindings"),
points: basic_query("points"),
regimens: basic_query("regimens"),
sensor_readings: basic_query("sensor_readings"),
sensors: basic_query("sensors"),
sequences: basic_query("sequences"),
tools: basic_query("tools"),
fbos_configs: basic_query("fbos_configs"),
firmware_configs: basic_query("firmware_configs"),
point_groups: basic_query("point_groups"),
}
STUB_FARMWARES = Api::FirstPartyFarmwaresController::STUBS.values.map do |x|

View File

@ -7,10 +7,14 @@ module Devices
end
optional do
string :name
string :timezone#, in: Device::TIMEZONES
time :last_saw_mq
string :name
string :timezone
time :last_saw_mq
time :last_ota
time :last_ota_checkup
boolean :needs_reset
integer :mounted_tool_id, nils: true
integer :ota_hour, nils: true
end
def validate
@ -19,11 +23,11 @@ module Devices
def execute
p = inputs.except(:device).merge(mounted_tool_data)
device.update_attributes!(p)
device.update!(p)
device
end
private
private
def bad_tool_id
add_error :mounted_tool_id, :mounted_tool_id, BAD_TOOL_ID % better_tool_id
@ -38,7 +42,7 @@ module Devices
end
def mounted_tool_data
mounted_tool_id_present? ? {mounted_tool_id: better_tool_id} : {}
mounted_tool_id_present? ? { mounted_tool_id: better_tool_id } : {}
end
end
end

View File

@ -1,25 +0,0 @@
module DiagnosticDumps
class Create < Mutations::Command
required do
model :device, class: Device
string :fbos_version
string :fbos_commit
string :firmware_commit
string :network_interface
string :fbos_dmesg_dump
string :firmware_state
end
def execute
DiagnosticDump
.create!(device: device,
ticket_identifier: rand(36**5).to_s(36),
fbos_version: fbos_version,
fbos_commit: fbos_commit,
firmware_commit: firmware_commit,
network_interface: network_interface,
fbos_dmesg_dump: fbos_dmesg_dump,
firmware_state: firmware_state,)
end
end
end

View File

@ -1,3 +0,0 @@
module DiagnosticDumps
Destroy = CreateDestroyer.run!(resource: DiagnosticDump)
end

View File

@ -6,15 +6,15 @@ module FarmEvents
has_executable_fields
BACKWARDS_END_TIME = "This event starts before it ends. Did you flip the "\
BACKWARDS_END_TIME = "This event starts before it ends. Did you flip the " \
"start and end times?"
BAD_START_TIME = "FarmEvent start time needs to be in the future, not" +
" the past."
BAD_START_TIME = "FarmEvent start time needs to be in the future, not" +
" the past."
required do
model :device, class: Device
model :device, class: Device
integer :repeat, min: 1
string :time_unit, in: FarmEvent::UNITS_OF_TIME
string :time_unit, in: FarmEvent::UNITS_OF_TIME
end
optional do
@ -29,12 +29,14 @@ module FarmEvents
end
def execute
FarmEvent.transaction do
p = inputs.merge(executable: executable)
# Needs to be set this way for cleanup operations:
p[:end_time] = (p[:start_time] + 1.minute) if is_one_time_event
p.delete(:body)
wrap_fragment_with(FarmEvent.create!(p))
FarmEvent.auto_sync_debounce do
FarmEvent.transaction do
p = inputs.merge(executable: executable)
# Needs to be set this way for cleanup operations:
p[:end_time] = (p[:start_time] + 1.minute) if is_one_time_event
p.delete(:body)
wrap_fragment_with(FarmEvent.create!(p))
end
end
rescue CeleryScript::TypeCheckError => q
add_error :farm_event, :farm_event, q.message

View File

@ -16,7 +16,7 @@ module FarmEvents
kind: "internal_#{kind}",
args: {},
body: body }
flat_ast = Fragments::Preprocessor.run!(params)
flat_ast = Fragments::Preprocessor.run!(**params)
Fragments::Create.run!(device: device,
flat_ast: flat_ast,
owner: owner)
@ -56,7 +56,7 @@ module FarmEvents
FarmEvents => ->() { farm_event },
Regimens => ->() { regimen },
}
options.fetch(self.class.parent).call()
options.fetch(self.class.module_parent).call()
end
end
end

View File

@ -33,7 +33,7 @@ module FarmEvents
FarmEvent.auto_sync_debounce do
FarmEvent.transaction do
handle_body_field
farm_event.update_attributes!(p)
farm_event.update!(p)
farm_event
end
end

View File

@ -10,7 +10,7 @@ module FarmwareEnvs
end
def execute
farmware_env.update_attributes!(inputs.except(:farmware_env)) && farmware_env
farmware_env.update!(inputs.except(:farmware_env)) && farmware_env
end
end
end

View File

@ -0,0 +1,27 @@
module Folders
class Create < Mutations::Command
required do
model :device
string :color
string :name
end
optional do
integer :parent_id
end
def execute
Folder.create!(update_params)
end
private
def update_params
inputs.except(:parent_id).merge({ parent: parent })
end
def parent
@parent ||= device.folders.find_by(id: parent_id)
end
end
end

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