| 06:31 | * | heartburn has quit (Ping timeout: 260 seconds) |
| 06:32 | * | heartburn has joined |
| 07:49 | Ujeeee[m] | is there any example of a module that add column to the table view of assets. I really want to add inventory (qty) column in table view of plant asset |
| 11:37 | mstenta[m] | Ujeeee: that is a bit tricky for a number of reasons, but would make a good feature request for farmOS core IMO |
| 11:38 | mstenta[m] | If you wanted to experiment with it, I would probably recommend enabling the Views UI module and creating a new View to experiment with |
| 11:39 | mstenta[m] | All lists of assets/logs/etc in farmOS are created as "Views" in Drupal |
| 11:39 | mstenta[m] | Views is essentially a UI for building a database query, along with options for how to display the results (in our case we use the "table" display for most UIs) |
| 11:40 | mstenta[m] | farmOS core comes with a default "farmOS Assets" View, which is what defines all the columns that you're seeing when you go to Records > Assets > Plants |
| 11:40 | mstenta[m] | Technically you can edit that View directly yourself in the UI and try adding the column you want |
| 11:40 | mstenta[m] | HOWEVER |
| 11:40 | mstenta[m] | This is not the best way to do it from a long term maintenance perspective |
| 11:41 | mstenta[m] | Because: if farmOS core changes that View itself in the future, you won't get those changes - you are essentially maintaining a fork of that View configuration in your own instance |
| 11:41 | mstenta[m] | (ALSO: Definitely disable the farm_update module if you plan to experiment with changing farmOS core config - that module is responsible for automatically reverting changes to automate updates) |
| 11:42 | mstenta[m] | One option that gives you a lot of freedom: if you enable the `views_ui` module, and go to Administration > Structure > Views, you can create your own View - separate from the farmOS core one |
| 11:42 | mstenta[m] | You can do whatever you want to your own Views, without worrying about conflicting with core Views |
| 11:43 | mstenta[m] | You can also add them to the main menu |
| 11:43 | mstenta[m] | So: perhaps you could try creating a "Plant inventory" View, which is focused on giving yourself an overview of your plant inventories |
| 11:44 | mstenta[m] | One thing I am not sure of though, off the top of my head, is: there may not be an "Inventory" field available to Views. That might require writing a Views plugin. |
| 11:44 | mstenta[m] | Views plugins are essentially little bits of PHP that describe to Views how to get the data necessary from the database or farmOS API |
| 11:45 | mstenta[m] | In the case of inventory, it is calculated based on logs using the asset.inventory service |
| 11:45 | mstenta[m] | farmos.org/development/module/services/# |
| 11:45 | mstenta[m] | So it may require a bit of coding to wire that up, I'm not sure |
| 11:46 | mstenta[m] | > Ujeeee: that is a bit tricky for a number of reasons, but would make a good feature request for farmOS core IMO |
| 11:46 | mstenta[m] | It would be great for farmOS core to offer this "Inventory" column by default IMO |
| 11:46 | mstenta[m] | There are some considerations there too, though... |
| 11:47 | mstenta[m] | For one, not everyone needs it, so it would add to an already crowded list of columns |
| 11:47 | mstenta[m] | There has been some brainstorming around that problem more generally though - perhaps farmOS core could provide some configuration to allow users to enable/disable the columns they want to see |
| 11:48 | mstenta[m] | Then we could make the inventory column available without worrying about cluttering the page too much for everyone |
| 11:50 | mstenta[m] | > example of a module that add column to the table view of assets |
| 11:50 | mstenta[m] | Lastly, I will also say: yes it is also possible for a module to *alter* the list of columns in an existing View. This is a nice option too because it doesn't require changing core code/configuration at all, so you aren't "maintaining a fork" like I described above. It is definitely an advanced technique, though, and requires some deep understanding of how Views works to achieve it. The core `farm_ui_views` module uses this technique to |
| 11:50 | mstenta[m] | automatically add bundle-specific fields: github.com/farmOS/farmOS/blob/482d790555 |
| 11:52 | mstenta[m] | > So: perhaps you could try creating a "Plant inventory" View, which is focused on giving yourself an overview of your plant inventories |
| 11:52 | mstenta[m] | This is probably the best place to start - because it has the lowest risk of conflicting with core code, doesn't require any module development, and will give you some experience with the power of Views :-) |
| 12:36 | mstenta[m] | jgaehring symbioquine paul121 wotnak: github.com/farmOS/farmOS-community-blog/ |
| 12:36 | * | explore has quit (Quit: Connection closed for inactivity) |
| 12:36 | mstenta[m] | Sorry it took me so long to get the account set up :-) |
| 12:36 | mstenta[m] | I think the top priority is just setting up something for the blog previews |
| 12:37 | mstenta[m] | We can also talk about moving farmOS.org and farmOS.app over to this account as a next step, but that's not urgent |
| 12:37 | mstenta[m] | (are there others?) |
| 14:50 | mstenta[m] | Making it look easy wotnak haha |
| 14:54 | mstenta[m] | We should merge the views field plugin bit of that into core IMO |
| 14:54 | mstenta[m] | > One thing I am not sure of though, off the top of my head, is: there may not be an "Inventory" field available to Views. That might require writing a Views plugin. |
| 14:54 | mstenta[m] | thanks for answering this questions! |
| 14:54 | mstenta[m] | s/questions/question/ |
| 15:08 | * | wotnak[m] has joined |
| 15:14 | mstenta[m] | > added to the PR |
| 15:14 | mstenta[m] | Thanks paul121! I'll take a closer look today... in the meantime it looks like this breaks one of the new tests |
| 15:15 | mstenta[m] | github.com/farmOS/farmOS/actions/runs/49 |
| 15:15 | * | sent a code block: libera.ems.host/_matrix/media/v3/downloa |
| 15:44 | * | explore has joined |
| 16:16 | * | calbasi[m] has quit (Remote host closed the connection) |
| 17:31 | * | Mims[m] has joined |
| 17:31 | Mims[m] | I'm a student and i would like to create a project with farmOs |
| 17:31 | Mims[m] | Hii |
| 17:31 | Mims[m] | can someone show me how installation is that |
| 17:31 | Mims[m] | done* |
| 17:31 | mstenta[m] | Hi Mims welcome to the chat :-) |
| 17:32 | mstenta[m] | Have you seen the docs on farmOS.org? |
| 17:32 | mstenta[m] | If you want to set up a local development environment, I would recommend starting here: farmos.org/development/environment/ |
| 17:33 | mstenta[m] | And when you are ready to host a production instance with real data, the official installation/hosting docs are here: farmos.org/hosting/install/ |
| 17:33 | mstenta[m] | If you run into a trouble, or have any questions, feel free to ask here in the chat, or start a forum topic: farmOS.discourse.group (there are some folks on the forum who aren't in the chat and vice versa) |
| 17:34 | Mims[m] | thank you |
| 17:34 | mstenta[m] | What kind of project are you thinking about? |
| 17:35 | Mims[m] | farm traceability app |
| 17:35 | mstenta[m] | Cool! Might be worth searching the forum - traceability is a common topic :-) |
| 17:36 | Mims[m] | okay. thanks for your time |
| 19:39 | * | heartburn has quit (Ping timeout: 264 seconds) |
| 19:47 | * | heartburn has joined |
| 20:06 | mstenta[m] | wotnak: the blog PR previews are a game changer!!! 🚀 |
| 20:09 | mstenta[m] | Now I just need to figure out how to make embedded MP4s work 😅 |
| 20:12 | mstenta[m] | I wonder if we need to add support for that in our Gatsby.js setup? |
| 20:17 | mstenta[m] | Initially I tried  but the build failed with an error about unsupported types |
| 20:17 | mstenta[m] | So then I tried `<video>` tags with a relative path to the file, but I don't think the build process puts the file in the right place |
| 20:18 | mstenta[m] | I'll open a bug report and leave notes there |
| 20:19 | mstenta[m] | I suppose this may actually be a github.com/farmOS/farmOS.org issue, not a github.com/farmOS/farmOS-community-blog issue, huh? |
| 20:32 | mstenta[m] | github.com/farmOS/farmOS.org/issues/75 |