Metabase integration for Frappe and ERPNext

Wow this is very good. Can wait to try. can this work with version 10? Am still running version 10.

I haven’t tried but it should works with version 10, 11, 12.

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

Cheers! :nerd_face:

1 Like

Cheers! Thanks a lot for your work Pipech!

Great Work!

Dis you managed to make it work with SSL? I can’t figure how to make metabase work with the let’s encrypt created from frappe / erpnext.

So if the ERPNEXt/ frappe site is with SSL It seems it doesn’t work with metabase being without SSL. Any idea? Thanks!

I got message:

Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
desk:1 Uncaught ReferenceError: iFrameResize is not defined
at HTMLIFrameElement.onload (desk:1)

Kind Regards,

Rubén

@pipech

I followed all the steps and was successful up until the installation:
bench get-app GitHub - pipech/frappe-metabase: Metabase integration for Frappe web framework metabase_integration

I encountered the error below;

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

Please be kind to advise what I may doing wrong.

Thanks.

@Sirjames

The command should be.

bench get-app metabase_integration https://github.com/pipech/frappe-metabase.git
2 Likes

@pipech

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.

There is an issue with me

When I close my ssh terminal and java -jar metabase.jar running, after close ssh session I can’t access to localhost:3000

refer,

I want to run metabase on port 3000 and erpnext on port 80, How to configure in nginx?

1 Like

This page have some clues Redirecting…

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 have created a thread but no response has been received. If anyone could help that would be much appreciated. (Link to the thread: ERROR: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0x91 in position 187: invalid start byt - Developers / Bug - ERPNext Forum )

When will this app be available for Frappe Cloud?

Were you able to resolve the issue? Otherwise contact Mr. Jigme, ERPNext Expert who is working at Thimphu TechPark Limited.

Hello,

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

What is displayed in Frappe :

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 ?

Pierre

Found any solution? Same here too

Hi, I am using the Metabase app to show Dashboards on several sites.
The steps you need to make sure you do are as follows:-

  1. Install the metabase_integration app to the required
  2. Set the Metabase Settings with the correct Metabase Server URL, Secret Key
  3. Add a Metabase Dashboard with Dahsboard Name & ID from the Metabase embedded code info
  4. On your Workspace, create a Page link to ‘metabase-dashboard-view’ - save the Workspace
  5. Selecting the Page link on the Workspace will take you to the Metabase View Page - on the top right you can select one or more of the configured Metabase Dashboards to view
1 Like

Frappe Insights latest version has around 80% of features metabase has, you can try that, it is easy to integrate with ERPNext

1 Like

is frappe insights compatible with v13?