Wiki Markup |
---|
{anchor:top} {toc: class=contents} h2. 概要 {styleclass: Class=topLink}[ページトップ|#top]{styleclass} h3. Javascript APIの有効化 Javascript APIは、新規インストールされたバージョン5.1以降のYellowfinで有効です。古いバージョンからアップグレードした場合は、お使いのインストールでAPIを有効にする手順について[Yellowfinサポート|mailto:yellowfin@kmsi.co.jp]にお問い合わせください。 h3. Javascript APIの使用 HTMLページにレポートまたはダッシュボードをロードする方法は2つあります。簡単な方法では、1つのJavascript URLを使用します。高度な方法では、レポートまたはダッシュボードの表示をカスタマイズして、他のスクリプトから必要に応じてコンテンツをロードできます。 h4. 基本的な使用 HTMLページにYellowfinサーバーを示すスクリプトタグを含めます。レポートまたはダッシュボードの識別子をURLのパラメーターとして含める必要があります。例: {code:html} <!-- report example --> <script type="text/javascript" src="http://reporting.example.com/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63"></script> <!-- dashboard example --> <script type="text/javascript" src="http://reporting.example.com/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9"></script> {code} APIのURLは、Yellowfinフロントエンドにアクセスするときに使用されるURLが基になります。たとえば、ユーザーが\*[http://reporting.example.com:8080/\*|http://reporting.example.com:8080/*]経由でYellowfinにアクセスする場合、Javascript APIのURLは\*[http://reporting.example.com/8080/JsAPI\*|http://reporting.example.com/8080/JsAPI*]になります。このURLはエンドユーザーのブラウザーからアクセスされるため、エンドユーザーがページを使用するあらゆる場所(社内ネットワーク、外部、VPN経由など)からアクセスできる必要があります。 ページの記述に使用したAPIのバージョンをサーバーが確実にサポートするように、versionパラメーターを使用できます。サーバーがAPIの複数バージョンをサポートする場合に、このパラメーターを使用して、サーバーが使用するバージョンが決定されます。サーバーがリクエストされたバージョンをサポートしない場合は、エラーメッセージが表示されます。 {code:html} <script src="http://localhost/JsAPI?version=2.1&reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63" type="text/javascript"></script> {code} {{version{}}}パラメーターが含まれない場合、サーバーは現在のバージョンを使用します。 bq. 詳細については、[バージョン履歴|Basic Use#Version基本的な使用#Version History]を参照してください。 h2. レポートURLのパラメーター {styleclass: Class=topLink}[ページトップ|#top] {styleclass} レポートは、{{reportUUID{}}}{{{}パラメーターによって識別されます。下位互換性のために、reportId{}}}または {{wsName{}}}パラメーターで識別することもできます。レポートの表示方法を変更する追加のパラメーターをURLに追加することもできます。使用可能なパラメーターは以下のとおりです: h3. {expand:title=ここを展開...} ||パラメーター|||| 説明|| | {{reportUUID}} | {{reportUUID}}、 {{reportId}}、{{wsName}} のいずれかが存在する必要があります。 ロードするダッシュボードを識別する固有のIDです。 | | {{reportId}} | Either {{reportUUID}}, 、{{reportId}} or 、{{wsName}} must be present.The numeric reportId identifying the report to load. It is recommended to use the のいずれかが存在する必要があります。 ロードするレポートを識別する数値のreportIdです。代わりに{{reportUUID}} parameter instead.パラメーターを使用することをお勧めします。 | | {{wsName}} | Either {{reportUUID}}, 、{{reportId}} or 、{{wsName}} must be present.The Web Service name identifying the report to load. It is recommended to use the のいずれかが存在する必要があります。 ロードするレポートを識別するWebサービス名です。代わりに{{reportUUID}}パラメーターを使用することをお勧めします。 parameter instead. | | {{version}} | The API version to use. If the server does not support the requested version, an error message will be displayed. If this is not included, the server will use its current API version. 使用するAPIバージョンです。サーバーがリクエストされたバージョンをサポートしない場合は、エラーメッセージが表示されます。このパラメーターが含まれない場合、サーバーは現在のAPIバージョンを使用します。 | | {{elementId}} | The id of the html element in which to load the report. If this is not included, a container element will be created at the point that the script tag is included. レポートをロードするHTML要素のIDです。このパラメーターが含まれない場合、スクリプトタグが含まれる時点でコンテナー要素が作成されます。 | | {{showTitle}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the title bar at the top of the report. All interactive buttons included in the title bar will also be omitted.に設定すると、レポート上部のタイトルバーが省略されます。タイトルバーに含まれるすべての対話型ボタンも省略されます。 | | {{showInfo}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the Info button in the title bar. に設定すると、タイトルバーの情報ボタンが省略されます。 | | {{showFilters}} | Default: デフォルト:{{true{}}}Set to {{false}}に設定すると、タイトルバーのフィルターボタンが省略されます。ユーザープロンプトフィルターは表示されません。 to omit the Filters button in the title bar. Any user-prompt filters will not be displayed. | | {{showSections}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the Sections button in the title bar (for reports with tabbed or multi-page sections). に設定すると、タイトルバーのセクションボタンが省略されます(タブ形式または複数ページのセクションを使用するレポートの場合)。 | | {{showSeries}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the Series button in the title bar (for reports with the series selection option).に設定すると、タイトルバーのシリーズボタンが省略されます(シリーズ選択オプションを使用するレポートの場合)。 | | {{showPageLinks}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the previous page/next page button in the title bar (for reports with multiple pages). に設定すると、タイトルバーの前のページ/次のページボタンが省略されます(複数ページを使用するレポートの場合)。 | | {{showExport}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the Export button in the title bar. に設定すると、タイトルバーのエクスポートボタンが省略されます。 | | {{height}} | Set this to a numeric value to override the report height.レポートの高さを上書きするには、数値を設定します。 | | {{width}} | Set this to a numeric value to override the report width.レポートの幅を上書きするには、数値を設定します。 | | {{display}} | Default:デフォルト: デフォルト:{{chart{}}}Set to {{table}} to display the report initially as a table.Set to に設定すると、レポートの初期状態がテーブルで表示されます。 {{chart}} to display the report initially as a chart.This is ignored for reports that do not have both table and chart available. に設定すると、レポートの初期状態がグラフで表示されます。 テーブルとグラフの両方が使用可能でないレポートでは無視されます。 | | {{fitTableWidth}} | Default: デフォルト:{{true{}}}Set to {{true}} to attempt to scale the report to the width of the enclosing element. に設定すると、レポートを囲み要素の幅に合わせようとします。 | | {{canChangeDisplay}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the buttons that allow the user to switch between chart and table display. に設定すると、ユーザーがグラフ表示とテーブル表示を切り替えできるボタンが省略されます。 | | {{username}} | Set this along with the これを{{password}} parameter to authenticate as a particular user when loading the report. This avoids the need for users to enter their login details before viewing restricted reports. パラメーターと共に設定すると、レポートをロードするときに特定のユーザーとして認証されます。ユーザーは制限されているレポートを表示する前に、ログインの詳細を入力する必要がありません。 | | {{password}} | Set this along with the これを{{username}} parameter to authenticate as a particular user when loading the report. パラメーターと共に設定すると、レポートをロードするときに特定のユーザーとして認証されます。 | | {{token}} | Use a web service token to authenticate a user when loading the report.Webサービストークンを使用して、レポートをロードするときにユーザーが認証されます。 |{expand} h3. 例 レポートを含め、レポートの寸法を設定する例を示します: {code:html} <script src="http://localhost/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&width=500&height=350" type="text/javascript"></script> {code} 既存の要素の中にレポートを表示し、ユーザー資格情報を渡す例を示します: {code:html} <div id="myReportDiv" style="background: blue; width: 500px; height: 350px"> <script src="http://localhost/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&elementId=myReportDiv&username=admin@yellowfin.com.au&password=test" type="text/javascript"></script> </div> {code} 既存の要素の中にレポートを表示し、レポートの寸法を上書きし、初期の表示オプションの一部を変更する例を示します: {code:html} <div id="myReportDiv" style="background: blue; width: 500px; height: 350px"> <script src="http://localhost/JsAPI?reportUUID=e5e5aaf3-c3b8-4f9b-8280-e21e4d848e63&elementId=myReportDiv&width=400&height=300&showFilters=false&display=table" type="text/javascript"></script> </div> {code} h2. ダッシュボードURLのパラメーター {styleclass: Class=topLink}[ページトップ|#top] {styleclass} ダッシュボードは、{{dashUUID{}}}パラメーターによって識別されます。ダッシュボードの表示方法を変更する追加のパラメーターをURLに追加することもできます。使用可能なパラメーターは以下のとおりです: h3. {expand:title=ここを展開...} ||パラメーター|||| 説明|| | {{dashUUID}} | Must存在する必要があります。 be present.The unique ID identifying the dashboard to load. ロードするダッシュボードを識別する固有のIDです。 | | {{version}} | The API version to use. If the server does not support the requested version, an error message will be displayed. If this is not included, the server will use its current API version. | | {{elementId}} | The id of the html element in which to load the dashboard. If this is not included, a container element will be created at the point that the script tag is included. |使用するAPIバージョンです。サーバーがリクエストされたバージョンをサポートしない場合は、エラーメッセージが表示されます。このパラメーターが含まれない場合、サーバーは現在のAPIバージョンを使用します。 | ダッシュボードをロードするHTML要素のIDです。このパラメーターが含まれない場合、スクリプトタグが含まれる時点でコンテナー要素が作成されます。 | {{showTitle}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the title bar at the top of the report. All interactive buttons included in the title bar will also be omitted. に設定すると、レポート上部のタイトルバーが省略されます。タイトルバーに含まれるすべての対話型ボタンも省略されます。 | | {{showInfo}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the Info button in the title bar. に設定すると、タイトルバーの情報ボタンが省略されます。 | | {{showFilters}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the Filters button in the title bar. Any analytical filters will not be displayed. に設定すると、タイトルバーのフィルターボタンが省略されます。分析フィルターは表示されません。 | | {{showExport}} | Default: デフォルト:{{true{}}}Set to {{false}} to omit the export button in the title bar. に設定すると、タイトルバーのエクスポートボタンが省略されます。 | | {{height}} | Set this to a numeric value to override the dashboard height.If not specified, the dashboard height will be set large enough to show all reports without scrolling. ダッシュボードの高さを上書きするには、数値を設定します。 指定しない場合、ダッシュボードの高さはスクロールしなくてもすべてのレポートが表示されるのに十分な大きさに設定されます。 | | {{width}} | Set this to a numeric value to override the dashboard width.Set this to ダッシュボードの幅を上書きするには、数値を設定します。 {{auto}} to expand to fill the parent element.If not specified, the dashboard width will be set based on the logged-in user's preference setting, or the system configuration setting. に設定すると、上位要素に合わせて拡大します。 | | {{username}} | Set this along with the これを{{password}} parameter to authenticate as a particular user when loading the dashboard. This avoids the need for users to enter their login details before viewing restricted dashboards.パラメーターと共に設定すると、ダッシュボードをロードするときに特定のユーザーとして認証されます。ユーザーは制限されているダッシュボードを表示する前に、ログインの詳細を入力する必要がありません。 | | {{password}} | Set this along with the これを{{username}} parameter to authenticate as a particular user when loading the dashboard. パラメーターと共に設定すると、ダッシュボードをロードするときに特定のユーザーとして認証されます。 | | {{token}} | Use a web service token to authenticate a user when loading the dashboard.Webサービストークンを使用して、ダッシュボードをロードするときにユーザーが認証されます。 |{expand} h3. 例 ダッシュボードを含め、ダッシュボードの寸法を設定する例を示します: {code:html} <script src="http://localhost/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9&width=auto&height=500" type="text/javascript"></script> {code} 既存の要素の中にレポートを表示し、ユーザー資格情報を渡す例を示します: {code:html} <div id="myDashDiv" style="background: blue; width: 900px; height: 500px"> <script src="http://localhost/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9&elementId=myDashDiv&username=admin@yellowfin.com.au&password=test" type="text/javascript"></script> </div> {code} 既存の要素の中にレポートを表示し、レポートの寸法を上書きし、初期の表示オプションの一部を変更する例を示します: {code:html} <div id="myDashDiv" style="background: blue; width: 900px; height: 500px"> <script src="http://localhost/JsAPI?dashUUID=3b0b6c9a-9dfb-41f0-b85a-eb17bb8aeeb9&elementId=myDashDiv&width=800&height=400&showFilters=false" type="text/javascript"></script> </div> {code} \\ \\ {horizontalrule} {styleclass: Class=topLink}[ページトップ|#top] {styleclass} |
Page Comparison
General
Content
Integrations