カスタム ウィジェットをデプロイするには、JSON ウィジェット定義ファイルおよび関連するデータ ファイルを適切なディレクトリに配置します。カスタム ウィジェットに関して DTP は 2 つの場所をチェックします。
| JavaScript および JSP ベースのカスタム ウィジェット | ウィジェット定義ファイルを <DTP_DATA>/grs/plugins/widgets ディレクトリに置いてください。 |
|---|---|
| 再利用されるベース ウィジェット (DTP 5.2.x 以降が必要) | JSON ウィジェット定義ファイルで、既存のウィジェット データをポイントし、 DTP に同梱されているウィジェットは |
以下は、静的解析ウィジェット の 「違反 - サマリーの傾向」ウィジェットのウィジェット定義ファイルです。
{
"category": "staticAnalysis10",
"baseWidget": "dtpSummaryTrendWidgetV2",
"processor": {
"type": "internal",
"name": "violationsSummaryTrendProcessor"
},
"widgets": [{
"uuid": "62cb0f66-bbb5-4de3-910c-b70b2e6528a1",
"name": "violations",
"description": "static_analysis.violations.summary_trend"
}],
"parameters": [
{
"type": "filterDropdown",
"title": "filter",
"required": true,
"inheritable": true
}, {
"type": "periodDropdown",
"title": "period",
"required": true,
"inheritable": true
}, {
"type": "dropdown",
"title": "severity",
"name": "severity",
"required": false,
"options": [{
"label": "1",
"value": "1"
}, {
"label": "2",
"value": "2"
}, {
"label": "3",
"value": "3"
}, {
"label": "4",
"value": "4"
}, {
"label": "5",
"value": "5"
}]
}, {
"type": "dropdown",
"title": "Type",
"name": "status",
"required": true,
"options": [{
"label": "violations_res",
"value": "failed"
}, {
"label": "Suppressions",
"value": "suppressed"
}],
"defaultOption": "failed"
}
],
"labels": [
{
"name": "filter",
"value": "filter"
}, {
"name": "period",
"value": "period"
}, {
"name": "severity",
"value": "severity"
}, {
"name": "Type",
"value": "status"
}
],
"unrestricted": true
} |