Commit Graph

1390 Commits

Author SHA1 Message Date
paul121 f810938f08 Include hours minutes and seconds in date range so timestamps are not truncated to 12am each day. 2020-08-27 08:01:43 -04:00
paul121 cb57c29a93 Only display the graph fieldset if the sensor has data. 2020-08-27 08:01:43 -04:00
Michael Stenta 4a2eee85ec Show value summary if /summary is included at the end of the URL, instead of a ?summary=1 GET parameter. 2020-08-27 08:01:43 -04:00
Michael Stenta c6790e6886 Remove farm/sensor/listener/values/% menu item and page callback. 2020-08-27 08:01:43 -04:00
Michael Stenta 59301f948f If "summary" GET parameter is set, return sensor value summary information instead of values. 2020-08-27 08:01:43 -04:00
Michael Stenta 0f0cd5f023 Rename farm_sensor_listener_values() to farm_sensor_listener_values_info(). 2020-08-27 08:01:43 -04:00
Michael Stenta 34679aa475 Add missing return value and improve docblock. 2020-08-27 08:01:43 -04:00
Michael Stenta 8656d1a5d5 Only check if $limit is empty, not $offset. 2020-08-27 08:01:43 -04:00
paul121 0241b06c40 Add farm/sensor/listener/values page returning sensor value info. 2020-08-27 08:01:43 -04:00
paul121 a2e32c8638 Only capitalize first word in Sensor Graphs. 2020-08-27 08:01:43 -04:00
paul121 edeb7a53e0 Remove bootstrap styles from warning message. 2020-08-27 08:01:43 -04:00
paul121 72f15d3541 Display the most recent week of data by default. 2020-08-27 08:01:43 -04:00
paul121 2dcc0e861f Create farm_sensor_listener_values helper function. 2020-08-27 08:01:43 -04:00
paul121 378c27e062 Display message in place of graph is there is no data to display. 2020-08-27 08:01:43 -04:00
paul121 b5f996b53d Display graphs of sensor data in a form with options for filtering data. 2020-08-27 08:01:43 -04:00
paul121 6d66bb62dd Allow querying sensor data with no limit.
The query range() method does not support passing NULL. When NULL is
passed for both parameters the query is built with LIMIT 0 OFFSET 0.
When range() is called with no parameters, no LIMIT or OFFSET is set.

https://www.drupal.org/project/drupal/issues/1943754
https://api.drupal.org/comment/49938#comment-49938
2020-08-27 08:01:43 -04:00
Michael Stenta c2ef587ecd Update hook_farm_access_perms() doc to demonstrate how to add a permission to farmOS roles with config access. 2020-08-26 15:39:40 -04:00
Michael Stenta 152f356cec Increment the farmOS API version to 1.4. 2020-08-21 11:40:22 -04:00
Michael Stenta cd59223f4c Include list of installed languages in /farm.json. 2020-08-21 11:40:15 -04:00
Michael Stenta 87d9a97c84 Increase the character limit of Notes and Description fields in Views to 280. 2020-08-21 11:00:56 -04:00
Michael Stenta d5891a5557 Issue #3166556: Add asset reference field to soil and water test logs 2020-08-21 10:43:14 -04:00
Michael Stenta e28dd5de25 Add language to farm.json. 2020-08-13 10:16:59 -04:00
paul121 b80cc84104 Change column label from "Sensor Type" to "Sensor type" for consistency. 2020-08-11 09:02:05 -04:00
paul121 c31750031b Move Sensor type filter so it appears after Name and before Location.
Also remove the remember_roles property from the default view code.
2020-08-11 09:02:05 -04:00
paul121 2d52458c64 Remove remember_roles property. 2020-08-11 09:02:05 -04:00
paul121 fa4342d096 Make sensor type click sortable. 2020-08-11 09:02:05 -04:00
paul121 a36ffec752 Add sensor type to sensor asset view and expose sensor type as a filter. 2020-08-11 09:02:05 -04:00
Symbioquine 01e1f05c46 Enable the snapping grid controls when farmOS-map is used for editing #335 2020-08-11 08:51:56 -04:00
Michael Stenta 8d6ece7fa4 Add explicit dependencies on modules that we are using functions from. 2020-07-30 14:57:01 -04:00
Michael Stenta 2f333eca67 Use htmlspecialchars(entity_label()) to format entity names. 2020-07-30 14:57:01 -04:00
paul121 a0c9a7ecbc Display message in place of table if no assets match filter criteria. 2020-07-30 14:57:01 -04:00
paul121 6b52f0f771 Add optional date of birth range filters. 2020-07-30 14:57:01 -04:00
paul121 4f5a380a8f Allow filtering assets by flag(s). 2020-07-30 14:57:01 -04:00
paul121 7b59f6d84f Allow more selective filtering of archived assets. 2020-07-30 14:57:01 -04:00
paul121 62a8c5f230 Display archive date with asset names. 2020-07-30 14:57:01 -04:00
paul121 18b56e700d Make plotly graphs responsive to page size. 2020-07-30 14:48:38 -04:00
Michael Stenta 2d62bd9a83 Add "app://localhost" to the list of allowed origins, so that requests from Field Kit on iOS native (WKWebView) are accepted. 2020-07-29 21:29:39 -04:00
Michael Stenta 571ffbe733 Update mapbox layers to use 512x512 tile size. 2020-07-29 12:32:32 -04:00
paul121 52e369824e Update mapbox layers to use new studio style format. 2020-07-29 12:22:07 -04:00
Michael Stenta 331a88fb6a Move CORS headers logic to a helper function and expand comments. 2020-07-28 17:22:50 -04:00
paul121 1addc94cae Add sensor_type and sensor_settings fields to sensor asset properties. 2020-07-27 10:58:52 -04:00
paul121 233af6d2c7 Implement hook_farm_sensor_view instead of hook_entity_view_alter. 2020-07-27 10:56:45 -04:00
paul121 338f103444 Recursive merge the build arrays to avoid overriding the views index.
Because farm_sensor_listener_farm_sensor_view returns a build array with
the 'views' index set, this causes other views already in the build
array to be overwritten.
2020-07-27 10:44:14 -04:00
Michael Stenta cb879f94b7 Add measure behavior to the "current location" also. 2020-07-24 10:57:26 -04:00
Michael Stenta cc8105dfbe Declare log form element type as 'value' and use $form_state['values'] in submit. 2020-07-24 10:57:26 -04:00
Michael Stenta dad3d3560e Whitespace for coding standards. 2020-07-24 10:57:26 -04:00
paul121 48b292bfd4 Update default done value to match form state. 2020-07-24 10:57:26 -04:00
Michael Stenta f4ecb23098 Add description to photo fields that explains how to attach multiple photos. 2020-07-24 10:57:26 -04:00
Michael Stenta 61d16ab2c9 Translate "Planned for" text. 2020-07-24 10:57:26 -04:00
Michael Stenta 6dcccac4f2 Use entity_label() and check_plain() with entity labels. 2020-07-24 10:57:26 -04:00
Michael Stenta 08921b9af6 Filter to pending activity logs in the query itself. 2020-07-24 10:57:26 -04:00
Paul Weidner efaaf4468c Add measure behavior to movement layer. 2020-07-24 10:57:26 -04:00
Paul Weidner 9996e83c13 Add hours and minutes to movement date field. 2020-07-24 10:57:26 -04:00
Paul Weidner 1d5df1ddc5 Save assets previous location geometry in post grazing logs. 2020-07-24 10:57:26 -04:00
Paul Weidner 2a6033cb65 Display assets current location geometry on map. 2020-07-24 10:57:26 -04:00
Paul Weidner 21818a6004 Create movement logs for multiple assets. 2020-07-24 10:57:26 -04:00
Paul Weidner b4f457cf15 Save custom geometry to pre-grazing logs. 2020-07-24 10:57:26 -04:00
Paul Weidner 96a9dd8231 Uncollapse the geometry fieldset default geometry is provided. 2020-07-24 10:57:26 -04:00
Paul Weidner 4d5041367e Update map layers when selecting a planned movement log. 2020-07-24 10:57:26 -04:00
Paul Weidner 71882433af Add helper functions to build ajax commands. 2020-07-24 10:57:26 -04:00
Paul Weidner 34b413f6d2 Edit planned movement logs. 2020-07-24 10:57:26 -04:00
Paul Weidner 425a7534da Only create observation logs if movement is marked as completed. 2020-07-24 10:57:26 -04:00
Paul Weidner 210268a74e Add checkbox to set the movement log status. 2020-07-24 10:57:26 -04:00
Paul Weidner f06cb357bc Save photos with pre and post grazing observation logs. 2020-07-24 10:57:26 -04:00
Michael Stenta ce457d88d0 Add fields for photo attachments (not processed yet). 2020-07-24 10:57:26 -04:00
Michael Stenta 9ca51f4c9a Serve client module JS files through Drupal. 2020-07-24 10:52:31 -04:00
paul121 5d17f01bca Rename hook_farm_client_modules() to hook_farm_client_module_info(). 2020-07-24 10:52:31 -04:00
Michael Stenta 1102f26ae9 Provide a hook that allows modules to declare Field Modules they provide. 2020-07-24 10:52:31 -04:00
Michael Stenta b8159138d9 If getallheaders() is not available, implement it ourselves. 2020-07-24 09:40:32 -04:00
Michael Stenta 7424cb9a54 Add Vary: Origin header when Access-Control-Allow-Origin is added. 2020-07-21 11:08:19 -04:00
Michael Stenta 282ac7fa71 Trim whitespace from allowed origins before checking them. 2020-07-21 11:08:03 -04:00
Michael Stenta 0b59497344 Allow multiple origins to be accepted for Access-Control-Allow-Origin header. 2020-07-21 11:07:38 -04:00
Michael Stenta 6289b37848 Fix "Done" filter in Calendar View only showing pending logs by default. 2020-07-21 07:54:43 -04:00
Michael Stenta e5423ac615 Add "Done" filter to Calendar View. 2020-07-20 08:21:47 -04:00
Michael Stenta 8a58fa7360 Allow OPTIONS requests to return 200 code on certain paths needed by Field Kit (right now just /farm/areas/geojson). 2020-07-20 08:21:47 -04:00
paul121 e40270ea48 Use isset to check for measurement values including 0. 2020-07-17 11:04:06 -04:00
Michael Stenta 34f569a8fb Fix birth quick form permissions. 2020-07-15 19:55:03 -04:00
Michael Stenta 7e930dd210 Make farm_map_combine_geoms() more resilient to empty geometries. 2020-07-15 13:45:19 -04:00
Paul Weidner 4b9df8fe63 Autocomplete multiple asset names separated by commas. 2020-07-15 13:33:36 -04:00
Paul Weidner 5f80906a23 Use correct order of parameters in implode function. 2020-07-15 11:56:18 -04:00
Michael Stenta fd867b6fbb Fix farm_map base_path JS setting to work without clean URLs. 2020-07-15 11:53:54 -04:00
Michael Stenta 3ef56dde35 Add description to animal weight action form. 2020-07-14 08:28:13 -04:00
Paul Weidner 2ea0c1f1f0 Link created logs to the quick form. 2020-07-07 14:24:45 -04:00
Michael Stenta faa9fdadba Use #default_value instead of #value and unset $form_state['input'] so that custom geometries are saved. 2020-07-03 08:48:18 -04:00
Michael Stenta ede70d0358 Pass geometry for farm_movement_create() instead of using farm_map_geofield_populate() because that doesn't populate movement geometries. 2020-07-03 08:48:18 -04:00
Michael Stenta 8bab415caa Allow a custom geometry to be provided with farm_movement_create(). 2020-07-03 08:48:18 -04:00
paul121 01c7147ddb Remove the current location layer if an asset has no location. 2020-07-03 08:48:18 -04:00
paul121 19db0bd560 Move next location ajax logic to form builder function. 2020-07-03 08:48:18 -04:00
paul121 948944e6bf Move current location ajax logic to form builder function. 2020-07-03 08:48:18 -04:00
paul121 64b4860a42 Rename ajax function to farm_livestock_move_form_current_location_ajax. 2020-07-03 08:48:18 -04:00
paul121 ec7aa6c19b Use log_save() method instead of $log->save(). 2020-07-03 08:48:18 -04:00
paul121 9b07b45d86 Call access callback with array of permissions as the first argument. 2020-07-03 08:48:18 -04:00
paul121 419d52cabd Display the movement geometry with orange color. 2020-07-03 08:48:18 -04:00
paul121 1bb243b576 Zoom to all vector layers when auto-updating the map. 2020-07-03 08:48:18 -04:00
paul121 6f231744f1 Create an editable Movement layer that updates with area geometry. 2020-07-03 08:48:18 -04:00
paul121 baa8fd5329 Display the assets current location on the map. 2020-07-03 08:48:18 -04:00
paul121 69ca698238 Link post grazing logs to area(s) animals are moving from. 2020-07-03 08:48:18 -04:00
paul121 f4d6aaabfb Create post grazing observation log before movement log. 2020-07-03 08:48:18 -04:00
paul121 f0dd507f80 Link pre grazing logs to the area animals are moving to. 2020-07-03 08:48:18 -04:00
paul121 544ef28f5a Create pre and post grazing observation logs. 2020-07-03 08:48:18 -04:00