I’ve created Metabase integration apps for Frappe and ERPNext.
Frappe does have Dashboard tools but it’s quite limited in terms of customization, creation and filtering. Metabase is an open-source dashboard tools which offer a lot of functionality.
This app offers an easy way to integrate Metabase into Frappe page.
Feature
Integrate Metabase into Frappe page using iFrame
Resize iFrame using Metabase resizer
Metabase link will expired based on pre-config time
You could install Metabase Integration app like you could install any custom apps.
The easiest way is just create new Dockerfile and build from my image.
FROM pipech/erpnext-docker-debian:v12-py3-latest
### set workdir
# These variable has been set from base image
# $systemUser, $benchFolderName
USER $systemUser
WORKDIR /home/$systemUser/$benchFolderName
RUN bench get-app metabase_integration https://github.com/pipech/frappe-metabase.git
Or you could follow this guild to set-up CI/CD using GitHub and GitLab which you could use to install Metabase Integration apps or your custom private apps.
But I don’t think I’ll include this apps in Docker image by default because I believe the majority of people won’t use this apps and I don’t want the image to be bloated.
How ever I’ll consider creating a new image tags such as v12-py3-w_metabase-latest
Traceback (most recent call last):
** File “/usr/local/bin/bench”, line 11, in **
** load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()**
** File “/home/frappe/bench-repo/bench/cli.py”, line 46, in cli**
** bench_command()**
** File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 764, in call**
** return self.main(args, kwargs)
** File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 717, in main*
** rv = self.invoke(ctx)**
** File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1137, in invoke**
** return _process_result(sub_ctx.command.invoke(sub_ctx))**
** File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 956, in invoke**
** return ctx.invoke(self.callback, ctx.params)
** File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 555, in invoke**
** return callback(args, kwargs)
** File “/home/frappe/bench-repo/bench/commands/make.py”, line 62, in get_app*
** get_app(git_url, branch=branch, skip_assets=skip_assets, overwrite=overwrite)**
** File “/home/frappe/bench-repo/bench/app.py”, line 116, in get_app**
** repo_name = git_url.rsplit(‘/’, 1)[1].rsplit(‘.’, 1)[0]** IndexError: list index out of range INFO: A newer version of bench is available: 4.1.0 → 5.1.0
Have you tried this in develop branch (version-13)?
I’ve installed it without errors. I just cant find the actual dashboard anywhere in erpnext.
As far as I know I have setup the Metabase Settings page correctly and I’ve found the Metabase Dashboard List and New Metabase Dashboard forms and saved a new Metabase dashboard as per your github page. I just can’t find the actual dashboard card as per your animation.
I have even tried viewing the Metabase dashboard list as a “dashboard” from the left-hand sidebar (version 13) but this just wants me to add the standard erpnext cards and dashboard charts.
Hey guys, I am trying to integrate this into ERPNext v13.6 but I’m getting this error: “UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x91 in position 187: invalid start byte”. If you know how to solve this, it will be much appreciated!
I checked the console and this was the full tracebok:
`Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
request.js:387 Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 68, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 31, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 67, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1172, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/desk_page.py", line 32, in getpage
doc = get(page)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/desk_page.py", line 15, in get
page.load_assets()
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/page/page.py", line 113, in load_assets
self.script = render_include(f.read())
File "/home/frappe/frappe-bench/env/lib/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x91 in position 187: invalid start byte
/socket.io/?EIO=3&transport=polling&t=NgDWDmv:1 Failed to load resource: the server responded with a status of 502 (Bad Gateway)`
I am testing the metabase_integration and it seems like a great feature.
I am testing it on Frappe (without ERPNext) and I just can’t get the Metabase dashboard displayed.
Metabase works, the dashboard is shared, the url and secret key have been pasted in metabase settings in Frappe but the Dashboard I created with the right ID (=1) is just one element of a list and there is no way to display it correctly.
I have even tried to paste the shared python code in metabase_dashboard.py as showned in the video advised by Tech_Hack_IT
There is no search filter or anything similar to what is shown in the gif in Github showing the displayed dashboards or visble at the end of the youtube video from Tech Hack Tamil.
Do you think it is related with an issue with a compatibility of the metabase_integration with a Frappe installation without erpnext or do you think there is something else I am missing ?