【问题标题】:JBoss / Dashbuilder Embed code not workingJBoss / Dashbuilder 嵌入代码不起作用
【发布时间】:2016-05-26 13:12:47
【问题描述】:

我正在尝试在另一个页面中嵌入 KPI 表。我修改了此处(第 X 页)说明中提供的示例并提出:

<html>
<head>
<title>Dashbuilder Javascript API</title>
<script src="http://localhost:8080/dashbuilder/js-api/dashbuilder-1.0.0.js"></script>
<style>
.code {
padding:10px;
background-color: rgb(248, 248, 248);
border-color: rgb(221, 221, 221);
border-radius: 3px;
border-style: solid;
box-sizing: border-box;
color: rgb(51, 51, 51);
font-weight: normal;
}
</style>
</head>
<body onload="embedCharts();">
<span class="code">dashbuilder_embed_chart('Hawkwood At-Risk', 'http://localhost:8080/dashbuilder', 'kpi_18141464209498716', 600, 350);</span>
<br/>
<!-- Very simple layout with charts -->
<table border="0" cellpadding="5" >
<tr>
<td id="chart1"></td>
</tr>
</table>
<!-- End of charts -->
<script type="text/javascript">
function embedCharts() {
var dashbuilderUrl = 'http://localhost:8080/dashbuilder';
dashbuilder_embed_chart('Hawkwood At-Risk', dashbuilderUrl, 'kpi_18141464209498716', 600, 350);
}
</script>
</body>
</html>

但我在结果页面上看到的只是一个带有文本“dashbuilder_embed_chart('Hawkwood At-Risk', 'http://localhost:8080/dashbuilder', 'kpi_18141464209498716', 600, 350);" 的框里面。

我能够验证文件 http://localhost:8080/dashbuilder/js-api/dashbuilder-1.0.0.js 的存在。

你能看出我做错了什么吗?

【问题讨论】:

    标签: javascript jboss embed kpi


    【解决方案1】:

    想通了!正确的嵌入代码是:

    <html>
    <head>
    <title>Dashbuilder Javascript API</title>
    <script src="http://localhost:8080/dashbuilder/js-api/dashbuilder-1.0.0.js"></script>
    <style>
    .code {
    padding:10px;
    background-color: rgb(248, 248, 248);
    border-color: rgb(221, 221, 221);
    border-radius: 3px;
    border-style: solid;
    box-sizing: border-box;
    color: rgb(51, 51, 51);
    font-weight: normal;
    }
    </style>
    </head>
    <body onload="embedCharts();">
    <!-- Very simple layout with charts -->
    <table border="0" cellpadding="5" >
    <tr>
    <td id="chart1"></td>
    </tr>
    </table>
    <!-- End of charts -->
    <script type="text/javascript">
    function embedCharts() {
    var dashbuilderUrl = 'http://localhost:8080/dashbuilder';
    dashbuilder_embed_chart('chart1', dashbuilderUrl, 'kpi_18141464209498716', 600, 350);
    }
    </script>
    </body>
    </html>
    

    【讨论】:

      猜你喜欢
      • 2011-12-21
      • 2014-08-13
      • 2018-12-27
      • 1970-01-01
      • 1970-01-01
      • 2020-07-25
      • 1970-01-01
      • 2018-10-16
      • 2014-02-16
      相关资源
      最近更新 更多