Skip to content

Commit 0548c9e

Browse files
Set iframe height, include mods to hide features
1 parent bfecee8 commit 0548c9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const METABASE_SITE_URL = process.env.METABASE_SITE_URL || "http://localhost:300
44
const METABASE_JWT_SHARED_SECRET =
55
process.env.METABASE_JWT_SHARED_SECRET ||
66
"ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff";
7-
7+
const mods = 'logo=false&top_nav=false&search=false&new_button=false&side_nav=false&header=false&additional_info=false&breadcrumbs=false&action_buttons=false'
88
/**
99
* Module dependencies.
1010
*/
@@ -117,7 +117,7 @@ app.get('/analytics', restrict, function(req, res){
117117
// replace ID "1" with the ID number in the path of your dashboard in Metabase.
118118
const METABASE_DASHBOARD_PATH = "/dashboard/1"
119119
var iframeUrl = `/sso/metabase?return_to=${METABASE_DASHBOARD_PATH}`;
120-
res.send(`<iframe src="${iframeUrl}" frameborder="0" width="1280" height="600" allowtransparency></iframe>`);
120+
res.send(`<iframe src="${iframeUrl}" frameborder="0" width="1280" height="1000" allowtransparency></iframe>`);
121121
});
122122

123123
app.get('/logout', function(req, res){
@@ -165,7 +165,7 @@ app.get("/sso/metabase", restrict, (req, res) => {
165165
pathname: `${METABASE_SITE_URL}/auth/sso`,
166166
query: {
167167
jwt: signUserToken(req.session.user),
168-
return_to: `${req.query.return_to || '/'}`
168+
return_to: `${req.query.return_to || '/'}?${mods}`
169169
}
170170
})
171171
);

0 commit comments

Comments
 (0)