Metabase: Incorporation in Other Applications


#1

Guys, good morning!

I currently use v0.31.2 version of Metabase. How do I embed the metabase in other web applications when the programming language is JAVA?

I’m using the implementation below, but I get the error “Failed to mount: require is not defined” from the web page.

Note: I have already entered the following entry in MAVEN:

-MAVEN

io.jsonwebtoken </ groupId>
jjwt </ artifactId>
0.9.0 </ version>
</ dependency>

  • MY CODE
    <! [CDATA [

var jwt = require (“jsonwebtoken”);
var METABASE_SITE_URL = “http: //www.localhost: 3000”;
var METABASE_SECRET_KEY = “5a0eb892d7a52fc38c56646f495fd2f07cd0d2855329e63d3b1063b92552cbcf”;
var payload = {
resource: {dashboard: 33},
params: {}
};
var token = jwt.sign (payload, METABASE_SECRET_KEY);
IframeDashboard “src = METABASE_SITE_URL +” / embed / dashboard / “+ token +” # bordered = true & titled = true ";
//document.getElementById(“IframeDashboard”).src = src = “http: // localhost: 3000 /”;
]]>
</ script>

<! -