Compare commits

...

482 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 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 435273994a Bug fix: Duplicate key props for folderless sequences 2019-12-05 15:52:01 -06: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 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
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 2073d2022b WIP. Working on deleteFolder() tests 2019-12-02 19:54:43 -06: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
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 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 a1c2b16d67 Merge branch 'staging' of github.com:FarmBot/Farmbot-Web-App into folders 2019-11-25 15:44:31 -06:00
Rick Carlino 6b9209edad WIP 2019-11-25 12:18:22 -06:00
Rick Carlino c88abc010e Possible fix: normalize folder names 2019-11-25 10:08:51 -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 502edf6221 Initial data model probably complete. Next: actions. 2019-11-23 09:32:36 -06:00
Rick Carlino 86d0a9238b WIP 2019-11-22 11:43:30 -06:00
1031 changed files with 29705 additions and 12307 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;

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
.cache
.env
.vscode
.idea
*.log
*.pem
coverage_api

View File

@ -24,6 +24,7 @@ gem "scenic"
gem "secure_headers"
gem "tzinfo" # For validation of user selected timezone names
gem "valid_url"
gem "kaminari"
group :development, :test do
gem "climate_control"
@ -34,8 +35,9 @@ group :development, :test do
gem "hashdiff"
gem "pry-rails"
gem "pry"
gem "rspec-rails", "4.0.0.beta3"
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,38 +7,38 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.1)
actionpack (= 6.0.1)
actioncable (6.0.2.2)
actionpack (= 6.0.2.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.1)
actionpack (= 6.0.1)
activejob (= 6.0.1)
activerecord (= 6.0.1)
activestorage (= 6.0.1)
activesupport (= 6.0.1)
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.1)
actionpack (= 6.0.1)
actionview (= 6.0.1)
activejob (= 6.0.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 (6.0.1)
actionview (= 6.0.1)
activesupport (= 6.0.1)
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.2.0)
actiontext (6.0.1)
actionpack (= 6.0.1)
activerecord (= 6.0.1)
activestorage (= 6.0.1)
activesupport (= 6.0.1)
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.1)
activesupport (= 6.0.1)
actionview (6.0.2.2)
activesupport (= 6.0.2.2)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
@ -48,20 +48,20 @@ GEM
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (6.0.1)
activesupport (= 6.0.1)
activejob (6.0.2.2)
activesupport (= 6.0.2.2)
globalid (>= 0.3.6)
activemodel (6.0.1)
activesupport (= 6.0.1)
activerecord (6.0.1)
activemodel (= 6.0.1)
activesupport (= 6.0.1)
activestorage (6.0.1)
actionpack (= 6.0.1)
activejob (= 6.0.1)
activerecord (= 6.0.1)
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 (6.0.1)
activesupport (6.0.2.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
@ -69,11 +69,11 @@ GEM
zeitwerk (~> 2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
amq-protocol (2.3.0)
amq-protocol (2.3.1)
bcrypt (3.1.13)
builder (3.2.3)
bunny (2.14.3)
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)
@ -82,9 +82,9 @@ GEM
simplecov
url
coderay (1.1.2)
concurrent-ruby (1.1.5)
crass (1.0.5)
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)
@ -99,27 +99,27 @@ 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.9.0)
factory_bot (5.1.1)
factory_bot (5.1.2)
activesupport (>= 4.2.0)
factory_bot_rails (5.1.1)
factory_bot (~> 5.1.0)
railties (>= 4.2.0)
faker (2.7.0)
i18n (>= 1.6, < 1.8)
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.34.1)
google-api-client (0.37.2)
addressable (~> 2.5, >= 2.5.1)
googleauth (~> 0.9)
httpclient (>= 2.8.1, < 3.0)
@ -127,90 +127,104 @@ GEM
representable (~> 3.0)
retriable (>= 2.0, < 4.0)
signet (~> 0.12)
google-cloud-core (1.4.1)
google-cloud-core (1.5.0)
google-cloud-env (~> 1.0)
google-cloud-env (1.3.0)
faraday (~> 0.11)
google-cloud-storage (1.24.0)
google-cloud-errors (~> 1.0)
google-cloud-env (1.3.1)
faraday (>= 0.17.3, < 2.0)
google-cloud-errors (1.0.0)
google-cloud-storage (1.25.1)
addressable (~> 2.5)
digest-crc (~> 0.4)
google-api-client (~> 0.33)
google-cloud-core (~> 1.2)
googleauth (~> 0.9)
mini_mime (~> 1.0)
googleauth (0.10.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.12)
hashdiff (1.0.0)
hashdiff (1.0.1)
hashie (3.6.0)
httpclient (2.8.3)
i18n (1.7.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.3.1)
kaminari (1.2.0)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.0)
kaminari-activerecord (= 1.2.0)
kaminari-core (= 1.2.0)
kaminari-actionview (1.2.0)
actionview
kaminari-core (= 1.2.0)
kaminari-activerecord (1.2.0)
activerecord
kaminari-core (= 1.2.0)
kaminari-core (1.2.0)
loofah (2.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
memoist (0.16.1)
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.13.0)
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.5.2)
nokogiri (1.10.5)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
os (1.0.1)
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 (4.0.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.2.1)
rack (2.2.2)
rack-attack (6.2.2)
rack (>= 1.0, < 3)
rack-cors (1.0.6)
rack (>= 1.6.0)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.1)
actioncable (= 6.0.1)
actionmailbox (= 6.0.1)
actionmailer (= 6.0.1)
actionpack (= 6.0.1)
actiontext (= 6.0.1)
actionview (= 6.0.1)
activejob (= 6.0.1)
activemodel (= 6.0.1)
activerecord (= 6.0.1)
activestorage (= 6.0.1)
activesupport (= 6.0.1)
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 (= 6.0.1)
railties (= 6.0.2.2)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
@ -222,9 +236,9 @@ GEM
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (6.0.1)
actionpack (= 6.0.1)
activesupport (= 6.0.1)
railties (6.0.2.2)
actionpack (= 6.0.2.2)
activesupport (= 6.0.2.2)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
@ -234,48 +248,49 @@ GEM
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)
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.0)
rspec-support (~> 3.9.0)
rspec-expectations (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.9.0)
rspec-mocks (3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-rails (4.0.0.beta3)
rspec-rails (4.0.0)
actionpack (>= 4.2)
activesupport (>= 4.2)
railties (>= 4.2)
rspec-core (~> 3.8)
rspec-expectations (~> 3.8)
rspec-mocks (~> 3.8)
rspec-support (~> 3.8)
rspec-support (3.9.0)
scenic (1.5.1)
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.12.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.1)
simplecov (0.18.5)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
simplecov-html (~> 0.11)
simplecov-html (0.12.2)
sprockets (4.0.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
@ -283,9 +298,9 @@ GEM
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)
@ -297,7 +312,7 @@ GEM
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
zeitwerk (2.2.1)
zeitwerk (2.3.0)
PLATFORMS
ruby
@ -318,6 +333,7 @@ DEPENDENCIES
google-cloud-storage (~> 1.11)
hashdiff
jwt
kaminari
mutations
passenger
pg
@ -332,7 +348,8 @@ DEPENDENCIES
request_store
rollbar
rspec
rspec-rails (= 4.0.0.beta3)
rspec-rails
rspec_junit_formatter
scenic
secure_headers
simplecov
@ -344,4 +361,4 @@ RUBY VERSION
ruby 2.6.5p114
BUNDLED WITH
1.17.2
2.1.4

View File

@ -80,6 +80,16 @@ 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

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

@ -1,26 +0,0 @@
module Api
class DiagnosticDumpsController < Api::AbstractController
def index
render json: diagnostic_dumps
end
def create
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,7 @@ 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

View File

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

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

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. ===

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

@ -90,6 +90,7 @@ module CeleryScript
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,

View File

@ -5,7 +5,7 @@ class LogService < AbstractServiceRunner
THROTTLE_POLICY = ThrottlePolicy.new(name, min: 250, hour: 5_000, day: 25_000)
LOG_TPL = Rails.env.test? ?
"\e[32m.\e[0m" : "FBOS LOG (device_%s): %s\n"
"\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.
@ -41,7 +41,9 @@ class LogService < AbstractServiceRunner
dev, log = [data.device, data.payload]
dev.maybe_unthrottle
Log.deliver(Logs::Create.run!(log, device: dev).id)
print LOG_TPL % [data.device_id, data.payload["message"] || "??"]
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

@ -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'
@ -73,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
@ -82,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],
@ -278,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)
@ -317,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],
},
@ -513,15 +518,22 @@ 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],

View File

@ -16,7 +16,7 @@ class Device < ApplicationRecord
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: {
@ -170,9 +171,10 @@ class Device < ApplicationRecord
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)

View File

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

View File

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

@ -78,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)

View File

@ -43,7 +43,7 @@ class Image < ApplicationRecord
has_one_attached :attachment
def set_attachment_by_url(url)
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

@ -1,20 +1,18 @@
class PinBinding < ApplicationRecord
OFF_LIMITS = [
2, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 19, 21, 23, 24, 25, 27
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(", ")
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

View File

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

View File

@ -3,9 +3,17 @@ class PointGroup < ApplicationRecord
%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

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

View File

@ -11,7 +11,7 @@ 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."

View File

@ -71,14 +71,17 @@ class User < ApplicationRecord
def deactivate_account
User.transaction do
if reload.last_sign_in_at > 3.months.ago
raise "HALTING ERRONEOUS DELETION"
end
# Prevent double deletion / race conditions.
update!(last_sign_in_at: Time.now, inactivity_warning_sent_at: nil)
email = self.email
delay.destroy!
puts "INACTIVITY DELETION FOR #{email}" unless Rails.env.test?
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

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

@ -27,7 +27,7 @@ module Devices
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)
@ -37,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
@ -69,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

View File

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

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

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

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

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

@ -12,6 +12,7 @@ module Devices
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

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

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

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

View File

@ -0,0 +1,44 @@
module Folders
class Destroy < Mutations::Command
IN_USE = "This folder still contains %s %s(s). " \
"They must be removed prior to deletion"
required do
model :device
model :folder
end
def validate
check_subfolders
check_sequences
end
def execute
folder.destroy! && ""
end
private
def sequences
@sequences ||= Sequence.where(folder: folder)
end
def subfolders
@subfolders ||= Folder.where(parent: folder)
end
def check_sequences
count = sequences.count
if count > 0
add_error :in_use, :in_use, IN_USE % [count, "sequence"]
end
end
def check_subfolders
count = subfolders.count
if count > 0
add_error :in_use, :in_use, IN_USE % [count, "subfolder"]
end
end
end
end

View File

@ -0,0 +1,28 @@
module Folders
class Update < Mutations::Command
required do
model :device
model :folder
integer :parent_id, nils: true, empty_is_nil: true
end
optional do
string :name
string :color
end
def execute
folder.update!(update_params) && folder
end
private
def update_params
inputs.except(:device, :folder).merge({ parent: parent })
end
def parent
@parent ||= parent_id && device.folders.find_by(id: parent_id)
end
end
end

View File

@ -5,7 +5,7 @@ module Fragments
def self.run!(kind:, args:, body:, device:)
canonical = {kind: kind, args: args, body: body}
slicer = CeleryScript::Slicer.new
tree = CeleryScript::AstNode.new(canonical.deep_symbolize_keys)
tree = CeleryScript::AstNode.new(**canonical.deep_symbolize_keys)
checker = CeleryScript::Checker.new(tree, Corpus, device)
checker.run!
slicer.run!(canonical)

View File

@ -8,10 +8,13 @@ module PointGroups
array :point_ids, class: Integer
end
criteria
optional do
string :sort_type
end
def validate
validate_point_ids
validate_sort_type
@ -20,14 +23,21 @@ module PointGroups
def execute
PointGroup.transaction do
PointGroupItem.transaction do
pg = PointGroup.new(name: name, device: device)
point_ids.uniq.map do |id|
pg.point_group_items << PointGroupItem.new(point_id: id)
end
pg = PointGroup.new(name: name,
device: device,
criteria: PointGroup::DEFAULT_CRITERIA.merge(criteria || {})
)
add_point_group_items(pg)
pg.save!
pg
end
end
end
def add_point_group_items(pg)
point_ids.uniq.map do |id|
pg.point_group_items << PointGroupItem.new(point_id: id)
end
end
end
end

View File

@ -1,6 +1,26 @@
module PointGroups
module ClassLevelHelpers
def criteria
self.optional do
hash :criteria do
hash(:day) do
string :op, in: [">", "<"]
integer :days_ago
end
hash(:string_eq) { array :*, class: String }
hash(:number_eq) { array :*, class: Integer }
hash(:number_lt) { integer :* }
hash(:number_gt) { integer :* }
end
end
end
end
module Helpers
BAD_POINT_IDS = "The group contains invalid points."
def self.included(base)
base.extend PointGroups::ClassLevelHelpers
end
def points
@points ||= Point.where(id: point_ids, device: device)

View File

@ -8,6 +8,8 @@ module PointGroups
model :point_group, class: PointGroup
end
criteria
optional do
string :name
array :point_ids, class: Integer
@ -34,7 +36,9 @@ module PointGroups
private
def update_attributes
@update_attributes ||= inputs.except(*BLACKLISTED_FIELDS)
@update_attributes ||= inputs
.except(*BLACKLISTED_FIELDS)
.merge(criteria: criteria || point_group.criteria)
end
def maybe_reconcile_points

View File

@ -27,11 +27,19 @@ module Points
end
def execute
Point.transaction { point.update!(inputs.except(:point)) && point }
Point.transaction { point.update!(update_params) && point }
end
private
def merged_meta_fields
@merged_meta_fields ||= (point.meta || {}).merge(meta || {})
end
def update_params
@update_params ||= inputs.except(:point).merge(meta: merged_meta_fields)
end
def new_tool_id?
raw_inputs.key?("tool_id")
end

View File

@ -10,13 +10,14 @@ module SensorReadings
end
optional do
time :read_at
integer :mode,
in: CeleryScriptSettingsBag::ALLOWED_PIN_MODES,
default: CeleryScriptSettingsBag::DIGITAL
end
def execute
SensorReading.create!(inputs)
SensorReading.create!(inputs.merge(read_at: read_at || Time.now))
end
end
end

View File

@ -12,6 +12,7 @@ module Sequences
optional do
color
args
integer :folder_id
end
def validate
@ -25,6 +26,7 @@ module Sequences
p = inputs
.merge(migrated_nodes: true)
.without(:body, :args, "body", "args")
.merge(folder: device.folders.find_by(id: folder_id))
seq = Sequence.create!(p)
x = CeleryScript::FirstPass.run!(sequence: seq,
args: args || {},

View File

@ -2,7 +2,12 @@ module Sequences
class Update < Mutations::Command
include CeleryScriptValidators
using CanonicalCeleryHelpers
BLACKLIST = [:sequence, :device, :args, :body]
BLACKLIST = [:sequence, :device, :args, :body, :folder_id]
BASE = "Can't add 'parent' to sequence because "
EXPL = {
FarmEvent => BASE + "it is in use by FarmEvents on these dates: %{items}",
Regimen => BASE + "the following Regimen(s) are using it: %{items}",
}
required do
model :device, class: Device
@ -27,6 +32,7 @@ module Sequences
optional do
color
integer :folder_id
end
def validate
@ -40,7 +46,7 @@ module Sequences
Sequence.auto_sync_debounce do
ActiveRecord::Base.transaction do
sequence.migrated_nodes = true
sequence.update!(inputs.except(*BLACKLIST))
sequence.update!(inputs.except(*BLACKLIST).merge(folder_stuff))
CeleryScript::StoreCelery.run!(sequence: sequence,
args: args,
body: body)
@ -49,11 +55,12 @@ module Sequences
end
CeleryScript::FetchCelery.run!(sequence: sequence, args: args, body: body)
end
BASE = "Can't add 'parent' to sequence because "
EXPL = {
FarmEvent => BASE + "it is in use by FarmEvents on these dates: %{items}",
Regimen => BASE + "the following Regimen(s) are using it: %{items}",
}
def folder_stuff
if folder_id
return { folder: device.folders.find_by(id: folder_id) }
else
return {}
end
end
end
end

View File

@ -1,9 +1,9 @@
module Tools
class Destroy < Mutations::Command
STILL_IN_USE = "Can't delete tool because the following sequences are "\
"still using it: %s"
STILL_IN_SLOT = "Can't delete tool because it is still in a tool slot. "\
"Please remove it from the tool slot first."
STILL_IN_USE = "Can't delete tool or seed container because the " \
"following sequences are still using it: %s"
STILL_IN_SLOT = "Can't delete tool or seed container because it is " \
"still in a slot. Please remove it from the slot first."
required do
model :tool, class: Tool
@ -15,10 +15,11 @@ module Tools
end
def execute
maybe_unmount_tool
tool.destroy!
end
private
private
def slot
@slot ||= tool.tool_slot
@ -33,8 +34,14 @@ private
end
def names
@names ||= \
@names ||=
InUseTool.where(tool_id: tool.id).pluck(:sequence_name).join(", ")
end
def maybe_unmount_tool
if tool.device.mounted_tool_id == tool.id
tool.device.update!(mounted_tool_id: nil)
end
end
end
end

View File

@ -1,6 +1,24 @@
class BasePointSerializer < ApplicationSerializer
attributes :device_id, :name, :pointer_type, :meta, :x, :y, :z
# PROBLEM:
# * Users need a mutable way to mark a plant's creation time => `planted_at`
# * DB Admin needs to know the _real_ created_at time.
# * We can't change field names (or destroy data) that is in use by legacy devices
#
# SOLUTION:
# * Don't allow users to modify `created_at`
# * Provide `planted_at` if possible.
# * Always provide `planted_at` if it is available
# * Provide a read-only view of `created_at` if `planted_at` is `nil`
def planted_at
object.planted_at || object.created_at
end
def created_at
planted_at
end
def meta
object.meta || {}
end

View File

@ -6,6 +6,7 @@ class DeviceSerializer < ApplicationSerializer
:last_saw_mq,
:mounted_tool_id,
:name,
:needs_reset,
:ota_hour,
:serial_number,
:throttled_at,

View File

@ -1,5 +0,0 @@
class DiagnosticDumpSerializer < ApplicationSerializer
attributes :device_id, :ticket_identifier, :fbos_commit, :fbos_version,
:firmware_commit, :firmware_state, :network_interface,
:fbos_dmesg_dump
end

View File

@ -0,0 +1,3 @@
class FolderSerializer < ApplicationSerializer
attributes :id, :parent_id, :color, :name
end

View File

@ -1,7 +1,11 @@
class PointGroupSerializer < ApplicationSerializer
attributes :name, :point_ids, :sort_type
attributes :name, :point_ids, :sort_type, :criteria
def point_ids
object.point_group_items.pluck(:point_id)
end
def criteria
object.criteria || PointGroup::DEFAULT_CRITERIA
end
end

View File

@ -1,3 +1,10 @@
class SensorReadingSerializer < ApplicationSerializer
attributes :mode, :pin, :value, :x, :y, :z
attributes :mode, :pin, :value, :x, :y, :z, :read_at
# This is for legacy support reasons.
# Very old sensor_readings will have a
# read_at value of `nil`, so we pre-populate it
# to `created_at` for the convinience of API users.
def read_at
object.read_at || object.created_at
end
end

View File

@ -0,0 +1,3 @@
class WeedSerializer < BasePointSerializer
attributes :radius, :discarded_at, :plant_stage
end

View File

@ -0,0 +1 @@
<%# Intentionally blank template required by router for content generated by frontend. %>

View File

@ -8,7 +8,6 @@ FarmBot::Application.routes.draw do
# Standard API Resources:
{
alerts: [:create, :destroy, :index],
diagnostic_dumps: [:create, :destroy, :index],
farm_events: [:create, :destroy, :index, :show, :update],
farmware_envs: [:create, :destroy, :index, :show, :update],
first_party_farmwares: [:show, :index],
@ -25,6 +24,7 @@ FarmBot::Application.routes.draw do
sequences: [:create, :destroy, :index, :show, :update],
tools: [:create, :destroy, :index, :show, :update],
webcam_feeds: [:create, :destroy, :index, :show, :update],
folders: [:create, :destroy, :index, :show, :update],
}.to_a.map { |(name, only)| resources name, only: only }
# Singular API Resources:
@ -114,6 +114,7 @@ FarmBot::Application.routes.draw do
match "/app/*path", to: "dashboard#main_app", via: :all, constraints: { format: "html" }
get "/demo" => "dashboard#demo", as: :demo_main
get "/os" => "dashboard#os_download", as: :os_download
get "/password_reset/*token" => "dashboard#password_reset", as: :password_reset
get "/tos_update" => "dashboard#tos_update", as: :tos_update
get "/verify/:token" => "dashboard#confirmation_page", as: :confirmation_page

View File

@ -1,5 +1,4 @@
class MakeDefaulDeviceNameFarmbot < ActiveRecord::Migration[5.1]
def change
change_column_default(:devices, :name, "Farmbot")
end

View File

@ -0,0 +1,21 @@
class AddFolderColumns < ActiveRecord::Migration[6.0]
def change
create_table :folders do |t|
t.references :device, null: false
t.timestamps
# https://twitter.com/wesbos/status/719678818831757313?lang=en
t.string :color, limit: 20, null: false
t.string :name, limit: 40, null: false
end
add_column :folders,
:parent_id,
:integer,
null: true,
index: true
add_foreign_key :folders,
:folders,
column: :parent_id
add_reference :sequences, :folder, index: true
end
end

View File

@ -0,0 +1,8 @@
class AddNeedsResetToDevices < ActiveRecord::Migration[6.0]
def change
add_column :devices,
:needs_reset,
:boolean,
default: false
end
end

View File

@ -0,0 +1,5 @@
class AddReadAtToSensorReadings < ActiveRecord::Migration[6.0]
def change
add_column :sensor_readings, :read_at, :datetime, default: nil
end
end

View File

@ -0,0 +1,5 @@
class AddCriteriaToPointGroups < ActiveRecord::Migration[6.0]
def change
add_column :point_groups, :criteria, :text, limit: 1000
end
end

View File

@ -0,0 +1,20 @@
class DropDiagnosticDumps < ActiveRecord::Migration[6.0]
def change
drop_table :diagnostic_dumps do |t|
t.references :device, foreign_key: true, null: false
t.string :fbos_commit, null: false
t.string :fbos_version, null: false
t.string :firmware_commit, null: false
t.string :firmware_hardware, limit: 12
t.string :firmware_state, null: false
t.string :firmware_version, limit: 12
t.string :network_interface, null: false
t.string :soc_temp, limit: 12
t.string :sync_status, limit: 12
t.string :ticket_identifier, null: false, unique: true
t.string :wifi_level, limit: 12
t.text :fbos_dmesg_dump, null: false
t.timestamps
end
end
end

View File

@ -0,0 +1,8 @@
class AddShowZonesToWebAppConfig < ActiveRecord::Migration[6.0]
def change
add_column :web_app_configs,
:show_zones,
:boolean,
default: false
end
end

View File

@ -0,0 +1,8 @@
class AddShowWeedsToWebAppConfig < ActiveRecord::Migration[6.0]
def change
add_column :web_app_configs,
:show_weeds,
:boolean,
default: false
end
end

View File

@ -0,0 +1,5 @@
class UpdateMaxImageCount < ActiveRecord::Migration[6.0]
def change
change_column_default(:devices, :max_images_count, 450)
end
end

View File

@ -150,8 +150,8 @@ ALTER SEQUENCE public.alerts_id_seq OWNED BY public.alerts.id;
CREATE TABLE public.ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
@ -262,7 +262,7 @@ CREATE TABLE public.devices (
id integer NOT NULL,
name character varying DEFAULT 'FarmBot'::character varying,
max_log_count integer DEFAULT 1000,
max_images_count integer DEFAULT 100,
max_images_count integer DEFAULT 450,
timezone character varying(280),
last_saw_api timestamp without time zone,
last_saw_mq timestamp without time zone,
@ -276,7 +276,8 @@ CREATE TABLE public.devices (
mqtt_rate_limit_email_sent_at timestamp without time zone,
last_ota timestamp without time zone,
last_ota_checkup timestamp without time zone,
ota_hour integer DEFAULT 3
ota_hour integer DEFAULT 3,
needs_reset boolean DEFAULT false
);
@ -300,49 +301,6 @@ CREATE SEQUENCE public.devices_id_seq
ALTER SEQUENCE public.devices_id_seq OWNED BY public.devices.id;
--
-- Name: diagnostic_dumps; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.diagnostic_dumps (
id bigint NOT NULL,
device_id bigint NOT NULL,
ticket_identifier character varying NOT NULL,
fbos_commit character varying NOT NULL,
fbos_version character varying NOT NULL,
firmware_commit character varying NOT NULL,
firmware_state character varying NOT NULL,
network_interface character varying NOT NULL,
fbos_dmesg_dump text NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
sync_status character varying(12),
wifi_level character varying(12),
soc_temp character varying(12),
firmware_hardware character varying(12),
firmware_version character varying(12)
);
--
-- Name: diagnostic_dumps_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.diagnostic_dumps_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: diagnostic_dumps_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.diagnostic_dumps_id_seq OWNED BY public.diagnostic_dumps.id;
--
-- Name: edge_nodes; Type: TABLE; Schema: public; Owner: -
--
@ -663,6 +621,40 @@ CREATE SEQUENCE public.firmware_configs_id_seq
ALTER SEQUENCE public.firmware_configs_id_seq OWNED BY public.firmware_configs.id;
--
-- Name: folders; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.folders (
id bigint NOT NULL,
device_id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
color character varying(20) NOT NULL,
name character varying(40) NOT NULL,
parent_id integer
);
--
-- Name: folders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.folders_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: folders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.folders_id_seq OWNED BY public.folders.id;
--
-- Name: fragments; Type: TABLE; Schema: public; Owner: -
--
@ -841,7 +833,8 @@ CREATE TABLE public.sequences (
kind character varying(280) DEFAULT 'sequence'::character varying,
updated_at timestamp without time zone,
created_at timestamp without time zone,
migrated_nodes boolean DEFAULT false
migrated_nodes boolean DEFAULT false,
folder_id bigint
);
@ -1149,7 +1142,8 @@ CREATE TABLE public.point_groups (
device_id bigint NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
sort_type character varying(20) DEFAULT 'xy_ascending'::character varying
sort_type character varying(20) DEFAULT 'xy_ascending'::character varying,
criteria text
);
@ -1447,7 +1441,8 @@ CREATE TABLE public.sensor_readings (
pin integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
mode integer DEFAULT 0
mode integer DEFAULT 0,
read_at timestamp without time zone
);
@ -1733,7 +1728,9 @@ CREATE TABLE public.web_app_configs (
confirm_sequence_deletion boolean DEFAULT true,
discard_unsaved_sequences boolean DEFAULT false,
user_interface_read_only_mode boolean DEFAULT false,
assertion_log integer DEFAULT 1
assertion_log integer DEFAULT 1,
show_zones boolean DEFAULT false,
show_weeds boolean DEFAULT false
);
@ -1838,13 +1835,6 @@ ALTER TABLE ONLY public.delayed_jobs ALTER COLUMN id SET DEFAULT nextval('public
ALTER TABLE ONLY public.devices ALTER COLUMN id SET DEFAULT nextval('public.devices_id_seq'::regclass);
--
-- Name: diagnostic_dumps id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.diagnostic_dumps ALTER COLUMN id SET DEFAULT nextval('public.diagnostic_dumps_id_seq'::regclass);
--
-- Name: edge_nodes id; Type: DEFAULT; Schema: public; Owner: -
--
@ -1887,6 +1877,13 @@ ALTER TABLE ONLY public.fbos_configs ALTER COLUMN id SET DEFAULT nextval('public
ALTER TABLE ONLY public.firmware_configs ALTER COLUMN id SET DEFAULT nextval('public.firmware_configs_id_seq'::regclass);
--
-- Name: folders id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.folders ALTER COLUMN id SET DEFAULT nextval('public.folders_id_seq'::regclass);
--
-- Name: fragments id; Type: DEFAULT; Schema: public; Owner: -
--
@ -2147,14 +2144,6 @@ ALTER TABLE ONLY public.devices
ADD CONSTRAINT devices_pkey PRIMARY KEY (id);
--
-- Name: diagnostic_dumps diagnostic_dumps_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.diagnostic_dumps
ADD CONSTRAINT diagnostic_dumps_pkey PRIMARY KEY (id);
--
-- Name: edge_nodes edge_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -2203,6 +2192,14 @@ ALTER TABLE ONLY public.firmware_configs
ADD CONSTRAINT firmware_configs_pkey PRIMARY KEY (id);
--
-- Name: folders folders_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.folders
ADD CONSTRAINT folders_pkey PRIMARY KEY (id);
--
-- Name: fragments fragments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
@ -2498,13 +2495,6 @@ CREATE INDEX index_devices_on_mounted_tool_id ON public.devices USING btree (mou
CREATE INDEX index_devices_on_timezone ON public.devices USING btree (timezone);
--
-- Name: index_diagnostic_dumps_on_device_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_diagnostic_dumps_on_device_id ON public.diagnostic_dumps USING btree (device_id);
--
-- Name: index_edge_nodes_on_kind_and_value; Type: INDEX; Schema: public; Owner: -
--
@ -2575,6 +2565,13 @@ CREATE INDEX index_fbos_configs_on_device_id ON public.fbos_configs USING btree
CREATE INDEX index_firmware_configs_on_device_id ON public.firmware_configs USING btree (device_id);
--
-- Name: index_folders_on_device_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_folders_on_device_id ON public.folders USING btree (device_id);
--
-- Name: index_fragments_on_device_id; Type: INDEX; Schema: public; Owner: -
--
@ -2904,6 +2901,13 @@ CREATE INDEX index_sequences_on_created_at ON public.sequences USING btree (crea
CREATE INDEX index_sequences_on_device_id ON public.sequences USING btree (device_id);
--
-- Name: index_sequences_on_folder_id; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_sequences_on_folder_id ON public.sequences USING btree (folder_id);
--
-- Name: index_standard_pairs_on_arg_name_id; Type: INDEX; Schema: public; Owner: -
--
@ -3026,6 +3030,14 @@ ALTER TABLE ONLY public.pin_bindings
ADD CONSTRAINT fk_rails_1f1c3b6979 FOREIGN KEY (device_id) REFERENCES public.devices(id);
--
-- Name: folders fk_rails_58e285f76e; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.folders
ADD CONSTRAINT fk_rails_58e285f76e FOREIGN KEY (parent_id) REFERENCES public.folders(id);
--
-- Name: sensors fk_rails_92e56bf2fb; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -3074,14 +3086,6 @@ ALTER TABLE ONLY public.active_storage_attachments
ADD CONSTRAINT fk_rails_c3b3935057 FOREIGN KEY (blob_id) REFERENCES public.active_storage_blobs(id);
--
-- Name: diagnostic_dumps fk_rails_c5df7fdc83; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.diagnostic_dumps
ADD CONSTRAINT fk_rails_c5df7fdc83 FOREIGN KEY (device_id) REFERENCES public.devices(id);
--
-- Name: farmware_installations fk_rails_c72f38683f; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -3368,6 +3372,14 @@ INSERT INTO "schema_migrations" (version) VALUES
('20190930202839'),
('20191002125625'),
('20191107170431'),
('20191119204916');
('20191119204916'),
('20191203163621'),
('20191219212755'),
('20191220010646'),
('20200116140201'),
('20200204192005'),
('20200204230135'),
('20200323235926'),
('20200412152208');

90
debian_example.sh 100644
View File

@ -0,0 +1,90 @@
# How to install FarmBot Web API on a Debian Buster (10) Machine
# IMPORTANT NOTE: Resources are limited and Farmbot, inc. cannot provide
# longterm support to self-hosted users. If you have never administered a
# Ruby on Rails application, we highly advise stopping now. this presents an
# extremely high risk of data loss. Free hosting is provided at
# https://my.farm.bot and eliminates the risks and troubles of self-hosting.
#
# You are highly encouraged to use the my.farm.bot servers. Self hosted
# documentation is provided with the assumption that you have experience with
# Ruby/Javascript development.
#
# Self-hosting a Farmbot server is not a simple task.
# Remove old (possibly broke) docker versions
sudo apt-get remove docker docker-engine docker.io
# Install docker
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common gnupg2 --yes
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" --yes
sudo apt-get update --yes
sudo apt-get install docker-ce --yes
sudo docker run hello-world # Should run!
# Install docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
# Install FarmBot Web App
# âš  SKIP THIS STEP IF UPGRADING!
git clone https://github.com/FarmBot/Farmbot-Web-App --depth=5 --branch=master
cd Farmbot-Web-App
#snap install micro --classic # Don't like `micro`? vim, nano, etc are fine, too.
cp example.env .env # âš  SKIP THIS STEP IF UPGRADING!
# == This is a very important step!!! ==
#
# Open `.env` in a text editor and change all the values.
#
# == Nothing will work if you skip this step!!! ==
vim .env # âš  SKIP THIS STEP IF UPGRADING!
# ^ This is the most important step
# READ NOTE ABOVE. Very important!
# Install the correct version of bundler for the project
sudo docker-compose run web gem install bundler:2.1.4
# Install application specific Ruby dependencies
sudo docker-compose run web bundle install
# Install application specific Javascript deps
sudo docker-compose run web npm install
# Create a database in PostgreSQL
sudo docker-compose run web bundle exec rails db:create db:migrate
# Generate a set of *.pem files for data encryption
sudo docker-compose run web rake keys:generate # âš  SKIP THIS STEP IF UPGRADING!
# Build the UI assets via ParcelJS
sudo docker-compose run web rake assets:precompile
# Run the server! ٩(^‿^)۶
# NOTE: DONT TRY TO LOGIN until you see a message similar to this:
# "✨ Built in 44.92s"
# THIS MAY TAKE A VERY LONG TIME ON SLOW MACHINES (~3 minutes on DigitalOcean)
# You will just get an empty screen otherwise.
# This only happens during initialization
sudo docker-compose up
# At this point, setup is complete. Content should be visible at ===============
# http://YOUR_HOST:3000/.
# You can optionally verify installation by running unit tests.
# Create the database for the app to use:
sudo docker-compose run -e RAILS_ENV=test web bundle exec rails db:setup
# Run the tests in the "test" RAILS_ENV:
sudo docker-compose run -e RAILS_ENV=test web rspec spec
# Run user-interface unit tests REQUIRES AT LEAST 4 GB OF RAM:
sudo docker-compose run web npm run test
# === BEGIN OPTIONAL UPGRADES
# To update to later versions of FarmBot,
# shut down the server, create a database backup
# and run commands below.
git pull https://github.com/FarmBot/Farmbot-Web-App.git master
sudo docker-compose build
sudo docker-compose run web bundle install # <== âš  UPGRADE USERS ONLY
sudo docker-compose run web npm install # <== âš  UPGRADE USERS ONLY
sudo docker-compose run web rails db:migrate # <== âš  UPGRADE USERS ONLY
# === END OPTIONAL UPGRADES ^

View File

@ -2,7 +2,7 @@ FROM ruby:2.6.5
RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - && \
sh -c 'VERSION_CODENAME=stretch; . /etc/os-release; echo "deb http://apt.postgresql.org/pub/repos/apt/ $VERSION_CODENAME-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' && \
apt-get update -qq && apt-get install -y build-essential libpq-dev postgresql postgresql-contrib && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
sh -c 'echo "\nPackage: *\nPin: origin deb.nodesource.com\nPin-Priority: 700\n" >> /etc/apt/preferences' && \
apt-get install -y nodejs && \
mkdir /farmbot;

View File

@ -79,6 +79,10 @@ SMTP_PORT=587
# Delete these if you aren't a send grid customer.
SENDGRID_PASSWORD=Used by FarmBot, Inc
SENDGRID_USERNAME=Used by FarmBot, Inc
# If you're using other SMTP server (like Gmail) use this.
#SMTP_USERNAME=email@gmail.com
#SMTP_PASSWORD=password
# Used by people who pay for managed database hosting.
# Most users should delete this.
DATABASE_URL=postgres://user:password@host:5432/db_name

View File

@ -1,7 +0,0 @@
jest.mock("browser-speech", () => ({
talk: jest.fn(),
}));
jest.mock("../open_farm/cached_crop", () => ({
cachedCrop: jest.fn(() => Promise.resolve({ svg_icon: "icon" })),
}));

View File

@ -0,0 +1,25 @@
import * as React from "react";
jest.mock("browser-speech", () => ({
talk: jest.fn(),
}));
jest.mock("../open_farm/cached_crop", () => ({
cachedCrop: jest.fn(() => Promise.resolve({ svg_icon: "icon" })),
}));
const { ancestorOrigins } = window.location;
delete window.location;
window.location = {
assign: jest.fn(),
reload: jest.fn(),
replace: jest.fn(),
ancestorOrigins,
pathname: "", href: "", hash: "", search: "",
hostname: "", origin: "", port: "", protocol: "", host: "",
};
jest.mock("../error_boundary", () => ({
// tslint:disable-next-line:no-any
ErrorBoundary: (p: any) => <div>{p.children}</div>,
}));

View File

@ -4,10 +4,15 @@ export const panelState = (): ControlPanelState => {
return {
homing_and_calibration: false,
motors: false,
encoders_and_endstops: false,
encoders: false,
endstops: false,
error_handling: false,
pin_bindings: false,
danger_zone: false,
power_and_reset: false,
pin_guard: false,
diagnostic_dumps: false
farm_designer: false,
firmware: false,
farmbot_os: false,
};
};

View File

@ -1,18 +1,23 @@
import { DesignerState } from "../farm_designer/interfaces";
export const fakeDesignerState = (): DesignerState => ({
selectedPlants: undefined,
selectedPoints: undefined,
selectionPointType: undefined,
hoveredPlant: {
plantUUID: undefined,
icon: ""
},
hoveredPoint: undefined,
hoveredPlantListItem: undefined,
hoveredToolSlot: undefined,
cropSearchQuery: "",
cropSearchResults: [],
cropSearchInProgress: false,
chosenLocation: { x: undefined, y: undefined, z: undefined },
currentPoint: undefined,
drawnPoint: undefined,
drawnWeed: undefined,
openedSavedGarden: undefined,
tryGroupSortType: undefined,
editGroupAreaInMap: false,
settingsSearchTerm: "",
});

View File

@ -0,0 +1,2 @@
export const mockDispatch = (innerDispatch = jest.fn()) =>
jest.fn(x => typeof x === "function" && x(innerDispatch));

View File

@ -0,0 +1,36 @@
import { DeepPartial } from "redux";
type DomEvent = React.SyntheticEvent<HTMLInputElement>;
export const inputEvent = (value: string, name?: string): DomEvent => {
const event: DeepPartial<DomEvent> = { currentTarget: { value, name } };
return event as DomEvent;
};
type ChangeEvent = React.ChangeEvent<HTMLInputElement>;
export const changeEvent = (value: string): ChangeEvent => {
const event: DeepPartial<ChangeEvent> = { currentTarget: { value } };
return event as ChangeEvent;
};
type IMGEvent = React.SyntheticEvent<HTMLImageElement, Event>;
export const imgEvent = (): IMGEvent => {
const event: DeepPartial<IMGEvent> = {
currentTarget: {
getAttribute: jest.fn(),
setAttribute: jest.fn(),
}
};
return event as IMGEvent;
};
type FormEvent = React.FormEvent<HTMLFormElement>;
export const formEvent = (): FormEvent => {
const event: Partial<FormEvent> = { preventDefault: jest.fn() };
return event as FormEvent;
};
type DragEvent = React.DragEvent<HTMLElement>;
export const dragEvent = (key: string): DragEvent => {
const event: DeepPartial<DragEvent> = { dataTransfer: { getData: () => key } };
return event as DragEvent;
};

View File

@ -1,7 +0,0 @@
import { DeepPartial } from "redux";
type DomEvent = React.SyntheticEvent<HTMLInputElement>;
export const inputEvent = (value: string): DomEvent => {
const event: DeepPartial<DomEvent> = { currentTarget: { value } };
return event as DomEvent;
};

View File

@ -0,0 +1,17 @@
import { HardwareFlags, FarmwareData } from "../sequences/interfaces";
export const fakeHardwareFlags = (): HardwareFlags => ({
findHomeEnabled: { x: false, y: false, z: false },
stopAtHome: { x: false, y: false, z: false },
stopAtMax: { x: false, y: false, z: false },
negativeOnly: { x: false, y: false, z: false },
axisLength: { x: 0, y: 0, z: 0 },
});
export const fakeFarmwareData = (): FarmwareData => ({
farmwareNames: [],
firstPartyFarmwareNames: [],
showFirstPartyFarmware: false,
farmwareConfigs: {},
cameraDisabled: false,
});

View File

@ -1,6 +1,5 @@
import { noop } from "lodash";
import { Everything } from "../interfaces";
import { peripherals as Peripheral } from "./fake_state/peripherals";
import { auth } from "./fake_state/token";
import { bot } from "./fake_state/bot";
import { config } from "./fake_state/config";
@ -11,7 +10,6 @@ import { resources } from "./fake_state/resources";
export function fakeState(_: Function = noop): Everything {
return {
dispatch: jest.fn(),
Peripheral,
auth,
bot,
config,

View File

@ -1,17 +1,10 @@
import { Everything } from "../../interfaces";
import { panelState } from "../control_panel_state";
export let bot: Everything["bot"] = {
export const bot: Everything["bot"] = {
"consistent": true,
"stepSize": 100,
"controlPanelState": {
"homing_and_calibration": false,
"motors": false,
"encoders_and_endstops": false,
"danger_zone": false,
"power_and_reset": false,
"pin_guard": false,
"diagnostic_dumps": false
},
"controlPanelState": panelState(),
"hardware": {
"gpio_registry": {},
"mcu_params": {

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