07.01.26
This commit is contained in:
@@ -551,12 +551,14 @@ class Dashboard(ModelSQL, ModelView):
|
||||
return pu
|
||||
|
||||
def gen_url(self,name=None):
|
||||
Configuration = Pool().get('gr.configuration')
|
||||
config = Configuration.search(['id','>',0])[0]
|
||||
payload = {
|
||||
"resource": {"dashboard": self.bi_id},
|
||||
"params": {},
|
||||
"exp": datetime.datetime.utcnow() + datetime.timedelta(minutes=30),
|
||||
}
|
||||
token = jwt.encode(payload, "798f256d3119a3292bf121196c2a38dddf2cad155c0b6b0b444efc34c6db197c", algorithm="HS256")
|
||||
token = jwt.encode(payload, config.payload, algorithm="HS256")
|
||||
logger.info("TOKEN:%s",token)
|
||||
return f"metabase:http://vps107.geneva.hosting:3000/embed/dashboard/{token}#bordered=true&titled=true"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user