Hi,
I tried following this tutorial and use curl first then I tried including it in a php file. When I tried to check it from the browser it only shows the text I created but not the dashboard. I already tried using an iframe as an alternative but i think its slow and shows 'error processing query' in few seconds after it shows the dashboard so I decided to try this method.
curl 'http://localhost:8080/pentaho/content/pentaho-cdf-dd/GetHeaders?solution=cde&path=&file=sample.wcdf&userid=joe&password=password'
<title>sample</title><script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/scripts.js?version=a262b023dff9ac8707cc2cb6e16f76e5"></script><link href="/pentaho/content/pentaho-cdf/js/styles.css?version=0d3805f31608614d53e4a4ff17d419bd" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="/pentaho/content/pentaho-cdf/js/theme/cupertino/jquery-ui-1.8.custom.css"/>
<!--[if lte IE 8]><link rel="stylesheet" href="/pentaho/content/pentaho-cdf/js/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> <script language="javascript" type="text/javascript" src="/pentaho/content/pentaho-cdf-dd/getJsResource/js/CDF.js?v=e1dc0e84d3e40a0b840d2b40340ce7e6"></script> <link href="/pentaho/content/pentaho-cdf-dd/getCssResource/css/CDF-CSS.css?v=8c5bd9f0e6b454e1ab6a70142fa75744" rel="stylesheet" type="text/css" />
curl 'http://localhost:8080/pentaho/content/pentaho-cdf-dd/GetContent?solution=cde&path=&file=sample.wcdf&userid=joe&password=password'
<div class='container'>
<div id='5d2e8104-0c76-58be-ec9e-250f241892b5' class='clearfix ' >
SAMPLE
<div id='qqry' class='span-5 last ' >
</div>
</div>
</div>
<script language="javascript" type="text/javascript">
wcdfSettings = {
"title": "sample",
"author": "",
"description": "",
"style": "Clean",
"widgetName": "",
"widget": false,
"rendererType": "blueprint",
"widgetParameters": []
};
var render_linechart = {
type: "cccLineChart",
name: "render_linechart",
priority: 5,
parameters: [],
executeAtStart: true,
htmlObject: "qqry",
listeners: [],
chartDefinition: {
dataAccessId: "qry",
path: "/cde/sample.cda",
width: 500,
height: 300,
extensionPoints: [],
colors: [],
title: "sample",
animate: true,
baseAxisDomainRoundMode: "tick",
baseAxisDomainScope: "global",
baseAxisGrid: false,
baseAxisMinorTicks: true,
baseAxisOffset: 0,
baseAxisOverlappedLabelsMode: "hide",
baseAxisTicks: true,
baseAxisTitleFont: "12px sans-serif",
baseAxisTitleMargins: "0",
baseAxisVisible: true,
baseAxisZeroLine: true,
clearSelectionMode: "emptySpaceClick",
clickable: true,
color2AxisColors: [],
color2AxisLegendClickMode: "toggleVisible",
color2AxisLegendVisible: true,
compatVersion: 2,
contentMargins: "0",
contentPaddings: "0",
crosstabMode: true,
ctrlSelectMode: true,
dataIgnoreMetadataLabels: false,
dataMeasuresInColumns: false,
dataSeparator: "~",
dotsVisible: false,
groupedLabelSep: " ~ ",
hoverable: false,
ignoreNulls: true,
isMultiValued: false,
leafContentOverflow: "auto",
legend: true,
legendClickMode: "toggleVisible",
legendFont: "10px sans-serif",
legendItemPadding: 2.5,
legendMargins: "0",
legendMarkerSize: 15,
legendPaddings: "5",
legendPosition: "bottom",
legendTextMargin: 6,
legendVisible: true,
margins: "3",
measuresIndexes: [],
multiChartColumnsMax: 3,
multiChartIndexes: [],
multiChartOverflow: "grow",
multiChartSingleColFillsHeight: true,
multiChartSingleRowFillsHeight: true,
nullInterpolationMode: "none",
orientation: "vertical",
ortho2AxisDomainRoundMode: "tick",
ortho2AxisDomainScope: "global",
ortho2AxisGrid: false,
ortho2AxisMinorTicks: true,
ortho2AxisOffset: 0,
ortho2AxisOverlappedLabelsMode: "hide",
ortho2AxisTicks: true,
ortho2AxisTitleFont: "12px sans-serif",
ortho2AxisTitleMargins: "0",
ortho2AxisVisible: true,
ortho2AxisZeroLine: true,
orthoAxisDomainRoundMode: "tick",
orthoAxisDomainScope: "global",
orthoAxisGrid: false,
orthoAxisMinorTicks: true,
orthoAxisOffset: 0,
orthoAxisOverlappedLabelsMode: "hide",
orthoAxisTicks: true,
orthoAxisTitleFont: "12px sans-serif",
orthoAxisTitleMargins: "0",
orthoAxisVisible: true,
orthoAxisZeroLine: true,
paddings: "0",
plot2: false,
plot2AreasVisible: false,
plot2ColorAxis: 2,
plot2DotsVisible: true,
plot2LinesVisible: true,
plot2NullInterpolationMode: "none",
plot2OrthoAxis: 1,
plot2Series: [],
plot2SeriesIndexes: -1,
plot2Stacked: false,
plot2ValuesFont: "10px sans-serif",
plot2ValuesMask: "{value}",
plot2ValuesVisible: false,
plotFrameVisible: true,
selectable: false,
seriesInRows: false,
smallContentMargins: "0",
smallContentPaddings: "0",
smallMargins: "2%",
smallPaddings: "0",
smallTitleFont: "14px sans-serif",
smallTitleMargins: "0",
smallTitlePaddings: "0",
smallTitlePosition: "top",
timeSeries: false,
timeSeriesFormat: "%Y-%m-%d",
titleFont: "14px sans-serif",
titleMargins: "0",
titlePaddings: "0",
titlePosition: "top",
tooltipEnabled: true,
tooltipFade: true,
tooltipFollowMouse: false,
tooltipHtml: true,
tooltipOpacity: 0.9,
trendAreasVisible: false,
trendColorAxis: 2,
trendDotsVisible: false,
trendLinesVisible: true,
trendOrthoAxis: 1,
trendStacked: false,
trendValuesAnchor: "right",
trendValuesFont: "10px sans-serif",
trendValuesVisible: false,
valuesFont: "10px sans-serif"
}
};
Dashboards.addComponents([render_linechart]);
</script>
<script language="javascript" type="text/javascript">
Dashboards.init();
</script>
I tried following this tutorial and use curl first then I tried including it in a php file. When I tried to check it from the browser it only shows the text I created but not the dashboard. I already tried using an iframe as an alternative but i think its slow and shows 'error processing query' in few seconds after it shows the dashboard so I decided to try this method.
curl 'http://localhost:8080/pentaho/content/pentaho-cdf-dd/GetHeaders?solution=cde&path=&file=sample.wcdf&userid=joe&password=password'
Quote:
<title>sample</title><script type="text/javascript" src="/pentaho/content/pentaho-cdf/js/scripts.js?version=a262b023dff9ac8707cc2cb6e16f76e5"></script><link href="/pentaho/content/pentaho-cdf/js/styles.css?version=0d3805f31608614d53e4a4ff17d419bd" rel="stylesheet" type="text/css" /><link rel="stylesheet" type="text/css" href="/pentaho/content/pentaho-cdf/js/theme/cupertino/jquery-ui-1.8.custom.css"/>
<!--[if lte IE 8]><link rel="stylesheet" href="/pentaho/content/pentaho-cdf/js/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> <script language="javascript" type="text/javascript" src="/pentaho/content/pentaho-cdf-dd/getJsResource/js/CDF.js?v=e1dc0e84d3e40a0b840d2b40340ce7e6"></script> <link href="/pentaho/content/pentaho-cdf-dd/getCssResource/css/CDF-CSS.css?v=8c5bd9f0e6b454e1ab6a70142fa75744" rel="stylesheet" type="text/css" />
Quote:
<div class='container'>
<div id='5d2e8104-0c76-58be-ec9e-250f241892b5' class='clearfix ' >
SAMPLE
<div id='qqry' class='span-5 last ' >
</div>
</div>
</div>
<script language="javascript" type="text/javascript">
wcdfSettings = {
"title": "sample",
"author": "",
"description": "",
"style": "Clean",
"widgetName": "",
"widget": false,
"rendererType": "blueprint",
"widgetParameters": []
};
var render_linechart = {
type: "cccLineChart",
name: "render_linechart",
priority: 5,
parameters: [],
executeAtStart: true,
htmlObject: "qqry",
listeners: [],
chartDefinition: {
dataAccessId: "qry",
path: "/cde/sample.cda",
width: 500,
height: 300,
extensionPoints: [],
colors: [],
title: "sample",
animate: true,
baseAxisDomainRoundMode: "tick",
baseAxisDomainScope: "global",
baseAxisGrid: false,
baseAxisMinorTicks: true,
baseAxisOffset: 0,
baseAxisOverlappedLabelsMode: "hide",
baseAxisTicks: true,
baseAxisTitleFont: "12px sans-serif",
baseAxisTitleMargins: "0",
baseAxisVisible: true,
baseAxisZeroLine: true,
clearSelectionMode: "emptySpaceClick",
clickable: true,
color2AxisColors: [],
color2AxisLegendClickMode: "toggleVisible",
color2AxisLegendVisible: true,
compatVersion: 2,
contentMargins: "0",
contentPaddings: "0",
crosstabMode: true,
ctrlSelectMode: true,
dataIgnoreMetadataLabels: false,
dataMeasuresInColumns: false,
dataSeparator: "~",
dotsVisible: false,
groupedLabelSep: " ~ ",
hoverable: false,
ignoreNulls: true,
isMultiValued: false,
leafContentOverflow: "auto",
legend: true,
legendClickMode: "toggleVisible",
legendFont: "10px sans-serif",
legendItemPadding: 2.5,
legendMargins: "0",
legendMarkerSize: 15,
legendPaddings: "5",
legendPosition: "bottom",
legendTextMargin: 6,
legendVisible: true,
margins: "3",
measuresIndexes: [],
multiChartColumnsMax: 3,
multiChartIndexes: [],
multiChartOverflow: "grow",
multiChartSingleColFillsHeight: true,
multiChartSingleRowFillsHeight: true,
nullInterpolationMode: "none",
orientation: "vertical",
ortho2AxisDomainRoundMode: "tick",
ortho2AxisDomainScope: "global",
ortho2AxisGrid: false,
ortho2AxisMinorTicks: true,
ortho2AxisOffset: 0,
ortho2AxisOverlappedLabelsMode: "hide",
ortho2AxisTicks: true,
ortho2AxisTitleFont: "12px sans-serif",
ortho2AxisTitleMargins: "0",
ortho2AxisVisible: true,
ortho2AxisZeroLine: true,
orthoAxisDomainRoundMode: "tick",
orthoAxisDomainScope: "global",
orthoAxisGrid: false,
orthoAxisMinorTicks: true,
orthoAxisOffset: 0,
orthoAxisOverlappedLabelsMode: "hide",
orthoAxisTicks: true,
orthoAxisTitleFont: "12px sans-serif",
orthoAxisTitleMargins: "0",
orthoAxisVisible: true,
orthoAxisZeroLine: true,
paddings: "0",
plot2: false,
plot2AreasVisible: false,
plot2ColorAxis: 2,
plot2DotsVisible: true,
plot2LinesVisible: true,
plot2NullInterpolationMode: "none",
plot2OrthoAxis: 1,
plot2Series: [],
plot2SeriesIndexes: -1,
plot2Stacked: false,
plot2ValuesFont: "10px sans-serif",
plot2ValuesMask: "{value}",
plot2ValuesVisible: false,
plotFrameVisible: true,
selectable: false,
seriesInRows: false,
smallContentMargins: "0",
smallContentPaddings: "0",
smallMargins: "2%",
smallPaddings: "0",
smallTitleFont: "14px sans-serif",
smallTitleMargins: "0",
smallTitlePaddings: "0",
smallTitlePosition: "top",
timeSeries: false,
timeSeriesFormat: "%Y-%m-%d",
titleFont: "14px sans-serif",
titleMargins: "0",
titlePaddings: "0",
titlePosition: "top",
tooltipEnabled: true,
tooltipFade: true,
tooltipFollowMouse: false,
tooltipHtml: true,
tooltipOpacity: 0.9,
trendAreasVisible: false,
trendColorAxis: 2,
trendDotsVisible: false,
trendLinesVisible: true,
trendOrthoAxis: 1,
trendStacked: false,
trendValuesAnchor: "right",
trendValuesFont: "10px sans-serif",
trendValuesVisible: false,
valuesFont: "10px sans-serif"
}
};
Dashboards.addComponents([render_linechart]);
</script>
<script language="javascript" type="text/javascript">
Dashboards.init();
</script>