コンテンツへスキップ
メニュー
この質問にフラグが付けられました
539 ビュー

I am working to embed a Metabase dashboard in the Odoo dashboard module.


Using Odoo 17 on SH.


I have been able to get publicly available pages in an iFrame, but this will require some authentication.


Metabase gives the following, I just don't know where I need to put it. Any help is appreciated.



import jwt
import time

METABASE_SITE_URL = "url"
METABASE_SECRET_KEY = "secret"

payload = {
  "resource": {"dashboard": 3},
  "params": {
   
  },
  "exp": round(time.time()) + (60 * 10) # 10 minute expiration
}
token = jwt.encode(payload, METABASE_SECRET_KEY, algorithm="HS256")

iframeUrl = METABASE_SITE_URL + "/embed/dashboard/" + token +
  "#bordered=true&titled=true"



アバター
破棄