From a1586ac66167d113f848a7791186935ffd819c2f Mon Sep 17 00:00:00 2001 From: Dmitry Nikolaev Date: Thu, 25 Jun 2026 10:22:47 +0200 Subject: [PATCH 1/9] Don't use deprecated API (disabled in v13) Signed-off-by: Dmitry Nikolaev --- grafana/rmf-app/CHANGELOG.md | 3 + grafana/rmf-app/src/datasource/datasource.ts | 106 +++++++----------- .../queryeditor.parser.component.tsx | 55 ++++----- 3 files changed, 66 insertions(+), 98 deletions(-) diff --git a/grafana/rmf-app/CHANGELOG.md b/grafana/rmf-app/CHANGELOG.md index 14e07068..29203897 100644 --- a/grafana/rmf-app/CHANGELOG.md +++ b/grafana/rmf-app/CHANGELOG.md @@ -1,5 +1,8 @@ # Change Log +## 2.0.0.1 (2026-06-26) +- Add Grafana v13 support. + ## 2.0.0 (2026-03-06) - You can now import RMF Performance Monitoring dashboards and their associated data sources directly into Grafana for visualization. - The custom RMF full report panel (ibm-rmf-panel) has been deprecated and removed. Full RMF reports now rely on standard Grafana visualizations. diff --git a/grafana/rmf-app/src/datasource/datasource.ts b/grafana/rmf-app/src/datasource/datasource.ts index bbe086d5..ab8f42db 100644 --- a/grafana/rmf-app/src/datasource/datasource.ts +++ b/grafana/rmf-app/src/datasource/datasource.ts @@ -15,7 +15,7 @@ * limitations under the License. */ import { DataSourceInstanceSettings, MetricFindValue, ScopedVars } from '@grafana/data'; -import { DataSourceWithBackend, getBackendSrv, getTemplateSrv } from '@grafana/runtime'; +import { DataSourceWithBackend, getTemplateSrv } from '@grafana/runtime'; import { getResourceName, queryValidation } from './common/common.helper'; import { RMFDataSourceJsonData, RMFQuery, resourceBaseData } from './common/types'; @@ -71,74 +71,46 @@ export class DataSource extends DataSourceWithBackend { - const metricFindValue = this.loadDataFromService(resourceString, id, options) - .then((resp: any) => { - const result = JSON.parse(resp.data); - let resNames = getResourceName(result); - const retResult: MetricFindValue[] = []; - resNames.map((row: any, index: number) => { - let itemName = ''; - try { - // itemName = row[queryResult.columnName.toLowerCase()][0].trim(); - itemName = row[queryResult.columnName.toLowerCase()].trim(); - let itemNameParts = itemName.split(','); - if (itemNameParts[1].trim() === '*') { - itemName = itemNameParts[2].trim(); // Ex: ULQ01,*,ALL_WLM_RESOURCE_GROUPS - } else { - itemName = itemNameParts[1].trim(); // Ex: ULQ01,BATCHLOW,WLM_RESOURCE_GROUP - } - if ( - queryResult.filterTypes.trim() !== '' && - queryResult.filterTypes.indexOf(row.restype.toUpperCase().trim()) !== -1 - ) { - retResult.push({ text: itemName }); - } else if (queryResult.filterTypes.trim() === '') { - retResult.push({ text: itemName }); - } - } catch (errorObj) {} - }); - return retResult; - }) - .catch((err) => { - throw new Error(err.message + ', [resource=' + queryResult.resourceCommand + ']'); - }); - return resolve(metricFindValue); - }); - } + try { + const data = await this.postResource('variablequery', JSON.stringify({ query: resourceString }), { + headers: { + Accept: 'application/text', + 'Content-Type': 'application/text', + }, + responseType: 'text', + }); + + if (!data) { + throw new Error('Test connection failed.'); + } - async loadDataFromService(urlPath: string, id?: number, options?: any) { - return new Promise((resolve, reject) => - getBackendSrv() - .fetch({ - method: 'post', - headers: { - Accept: 'application/text', - 'Content-Type': 'application/text', - }, - url: `/api/datasources/${id}/resources/variablequery`, - responseType: 'text', - data: JSON.stringify({ query: urlPath }), - }) - .subscribe( - (resp) => { - if (resp.data) { - if (options !== undefined && options === 'headres') { - } else { - resolve({ - data: resp.data, - }); - } - } else { - reject({ status: 'failure', message: 'Test connection failed.' }); - } - }, - (err) => { - reject({ status: 'failure', message: err.data.message }); + const result = JSON.parse(data as string); + let resNames = getResourceName(result); + const retResult: MetricFindValue[] = []; + resNames.map((row: any, index: number) => { + let itemName = ''; + try { + itemName = row[queryResult.columnName.toLowerCase()].trim(); + let itemNameParts = itemName.split(','); + if (itemNameParts[1].trim() === '*') { + itemName = itemNameParts[2].trim(); // Ex: ULQ01,*,ALL_WLM_RESOURCE_GROUPS + } else { + itemName = itemNameParts[1].trim(); // Ex: ULQ01,BATCHLOW,WLM_RESOURCE_GROUP } - ) - ); + if ( + queryResult.filterTypes.trim() !== '' && + queryResult.filterTypes.indexOf(row.restype.toUpperCase().trim()) !== -1 + ) { + retResult.push({ text: itemName }); + } else if (queryResult.filterTypes.trim() === '') { + retResult.push({ text: itemName }); + } + } catch (errorObj) {} + }); + return retResult; + } catch (err: any) { + throw new Error((err.message || err.data?.message) + ', [resource=' + queryResult.resourceCommand + ']'); + } } } diff --git a/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx b/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx index 82f41ad5..f273899c 100644 --- a/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx +++ b/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx @@ -17,7 +17,7 @@ // import defaults from 'lodash/defaults'; import { QueryEditorProps } from '@grafana/data'; -import { getBackendSrv, getTemplateSrv } from '@grafana/runtime'; +import { getTemplateSrv } from '@grafana/runtime'; import { RadioButtonGroup, Spinner, Switch } from '@grafana/ui'; import React, { PureComponent } from 'react'; import { AutocompleteTextField } from '../autocomplete-text/autocomplete-textfield'; @@ -81,7 +81,7 @@ export class QueryEditorAutoCompleteComponent extends PureComponent {}) .catch((err: any) => { this.setServiceCallInprogresState(false); @@ -97,35 +97,28 @@ export class QueryEditorAutoCompleteComponent extends PureComponent - getBackendSrv() - .fetch({ - method: 'post', - headers: { - Accept: 'application/text', - 'Content-Type': 'application/text', - }, - url: `/api/datasources/${id}/resources/autopopulate`, - responseType: 'text', - }) - .subscribe( - (resp) => { - if (resp.data) { - let result = JSON.parse(resp.data as string); - let resourceList: any[] = getResource(result); - metricDict = loadDataToDictionary(resourceList); - resolve(true); - } else { - reject(false); - } - }, - (err) => { - this.setServiceCallInprogresState(false); - reject(false); - } - ) - ); + async loadMetricsIndex() { + try { + const data = await this.props.datasource.postResource('autopopulate', undefined, { + headers: { + Accept: 'application/text', + 'Content-Type': 'application/text', + }, + responseType: 'text', + }); + + if (data) { + let result = JSON.parse(data as string); + let resourceList: any[] = getResource(result); + metricDict = loadDataToDictionary(resourceList); + return true; + } else { + return Promise.reject(false); + } + } catch (err) { + this.setServiceCallInprogresState(false); + return Promise.reject(false); + } } onTextChange = (val: string, e: any) => { From 96eb96ddd56572d6df425a1b839b0d8098318c06 Mon Sep 17 00:00:00 2001 From: Dmitry Nikolaev Date: Thu, 25 Jun 2026 11:07:20 +0200 Subject: [PATCH 2/9] Address CodeQL findings Signed-off-by: Dmitry Nikolaev --- .../query-editor/queryeditor.parser.component.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx b/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx index f273899c..dbc9fe4c 100644 --- a/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx +++ b/grafana/rmf-app/src/datasource/query-editor/queryeditor.parser.component.tsx @@ -80,13 +80,6 @@ export class QueryEditorAutoCompleteComponent extends PureComponent {}) - .catch((err: any) => { - this.setServiceCallInprogresState(false); - }); - } } componentDidMount() { @@ -95,6 +88,13 @@ export class QueryEditorAutoCompleteComponent extends PureComponent {}) + .catch((err: any) => { + this.setServiceCallInprogresState(false); + }); + } } async loadMetricsIndex() { From 06207f7e197fea765eaa776712e986960579dad5 Mon Sep 17 00:00:00 2001 From: Dmitry Nikolaev Date: Thu, 25 Jun 2026 12:02:07 +0200 Subject: [PATCH 3/9] Bump version (2.0.0.1) Signed-off-by: Dmitry Nikolaev --- grafana/rmf-app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grafana/rmf-app/package.json b/grafana/rmf-app/package.json index 4ac1a393..f459afc0 100644 --- a/grafana/rmf-app/package.json +++ b/grafana/rmf-app/package.json @@ -1,7 +1,7 @@ { "author": "IBM", "name": "ibm-rmf", - "version": "2.0.0", + "version": "2.0.0.1", "description": "IBM RMF for z/OS", "license": "Apache-2.0", "scripts": { From 7b57638b2b706e7966e9e0dbe17453f036de6983 Mon Sep 17 00:00:00 2001 From: Ramanath Shanbhag Date: Fri, 26 Jun 2026 11:19:04 +0530 Subject: [PATCH 4/9] updated docs for v2001 release Signed-off-by: Ramanath Shanbhag --- .../grafana/rmf-app/access_grafana_zosmf.html | 47 +++++----- docs/grafana/rmf-app/alerts.html | 45 +++++----- docs/grafana/rmf-app/apply_visualize.html | 59 +++++++------ docs/grafana/rmf-app/context-help-map.xml | 25 +++++- docs/grafana/rmf-app/create_datasources.html | 71 +++++++-------- .../grafana/rmf-app/define_grafana_zosmf.html | 55 ++++++------ docs/grafana/rmf-app/error_reports.html | 49 ++++++----- .../grafana/rmf-app/grafana_config_parms.html | 45 +++++----- docs/grafana/rmf-app/grafana_via_zosmf.html | 45 +++++----- docs/grafana/rmf-app/historical_data.html | 53 +++++------ .../grafana/rmf-app/importing_dashboards.html | 51 +++++------ docs/grafana/rmf-app/index.html | 22 ++--- docs/grafana/rmf-app/indexTerms.html | 20 ++--- .../rmf-app/install_grafana_plugin.html | 83 +++++++++--------- .../rmf-app/integrating_dds_omegamon.html | 47 +++++----- .../rmf-app/oxygen-webhelp/app/commons.css | 9 +- .../oxygen-webhelp/app/commons.css.map | 2 +- .../rmf-app/oxygen-webhelp/app/commons.js | 2 +- .../oxygen-webhelp/app/commons.js.LICENSE.txt | 29 +++++- .../rmf-app/oxygen-webhelp/app/commons.js.map | 2 +- .../oxygen-webhelp/app/context-help.js | 2 +- .../oxygen-webhelp/app/context-help.js.map | 2 +- .../app/context-help/context-help-map.js | 2 +- .../rmf-app/oxygen-webhelp/app/indexterms.css | 2 +- .../oxygen-webhelp/app/indexterms.css.map | 2 +- .../rmf-app/oxygen-webhelp/app/indexterms.js | 2 +- .../oxygen-webhelp/app/indexterms.js.map | 2 +- .../app/localization/strings.js | 4 - .../rmf-app/oxygen-webhelp/app/main.css | 2 +- .../rmf-app/oxygen-webhelp/app/main.css.map | 2 +- .../rmf-app/oxygen-webhelp/app/main.js | 2 +- .../rmf-app/oxygen-webhelp/app/main.js.map | 2 +- .../json/grafana_via_zosmf-d423e208.js | 1 + .../app/nav-links/json/nav-links.js | 2 +- .../nav-links/json/prereq_zosmf-d423e227.js | 1 + .../app/nav-links/json/tocId-d415e254.js | 1 - .../app/nav-links/json/tocId-d415e276.js | 1 - .../oxygen-webhelp/app/options/properties.js | 1 - .../rmf-app/oxygen-webhelp/app/search.css | 2 +- .../rmf-app/oxygen-webhelp/app/search.css.map | 2 +- .../rmf-app/oxygen-webhelp/app/search.js | 2 +- .../rmf-app/oxygen-webhelp/app/search.js.map | 2 +- .../app/search/index/index-1.js | 2 +- .../app/search/index/index-2.js | 2 +- .../app/search/index/index-3.js | 2 +- .../app/search/index/link-to-parent.js | 2 +- .../oxygen-webhelp/app/search/nwSearchFnt.js | 18 ++-- .../oxygen-webhelp/app/topic-page-print.css | 2 +- .../app/topic-page-print.css.map | 2 +- .../rmf-app/oxygen-webhelp/app/topic.css | 2 +- .../rmf-app/oxygen-webhelp/app/topic.css.map | 2 +- .../rmf-app/oxygen-webhelp/app/topic.js | 2 +- .../rmf-app/oxygen-webhelp/app/topic.js.map | 2 +- docs/grafana/rmf-app/pdf/rmf_grafana.pdf | Bin 1162707 -> 1157099 bytes docs/grafana/rmf-app/pdf_guide.html | 45 +++++----- docs/grafana/rmf-app/prereq_zosmf.html | 54 ++++++------ .../rmf-app/prometheus_sample_dashboards.html | 51 +++++------ docs/grafana/rmf-app/query_lang.html | 58 ++++++------ docs/grafana/rmf-app/rn.html | 58 ++++++------ docs/grafana/rmf-app/search.html | 36 ++++---- docs/grafana/rmf-app/sitemap.xml | 42 ++++----- docs/grafana/rmf-app/ts_issues.html | 45 +++++----- docs/grafana/rmf-app/update_plugin.html | 69 ++++++++------- docs/grafana/rmf-app/variables.html | 62 ++++++------- docs/grafana/rmf-app/visual_grafana.html | 45 +++++----- grafana/rmf-app/CHANGELOG.md | 2 +- grafana/rmf-app/doc/src/pdf/rmf_grafana.pdf | Bin 1162707 -> 1157099 bytes grafana/rmf-app/doc/src/rn.dita | 4 + 68 files changed, 736 insertions(+), 675 deletions(-) create mode 100644 docs/grafana/rmf-app/oxygen-webhelp/app/nav-links/json/grafana_via_zosmf-d423e208.js create mode 100644 docs/grafana/rmf-app/oxygen-webhelp/app/nav-links/json/prereq_zosmf-d423e227.js delete mode 100644 docs/grafana/rmf-app/oxygen-webhelp/app/nav-links/json/tocId-d415e254.js delete mode 100644 docs/grafana/rmf-app/oxygen-webhelp/app/nav-links/json/tocId-d415e276.js diff --git a/docs/grafana/rmf-app/access_grafana_zosmf.html b/docs/grafana/rmf-app/access_grafana_zosmf.html index fabc1f05..d9e6dcc3 100644 --- a/docs/grafana/rmf-app/access_grafana_zosmf.html +++ b/docs/grafana/rmf-app/access_grafana_zosmf.html @@ -1,19 +1,19 @@ - + - Accessing the Grafana dashboard + Accessing the Grafana dashboard - - + + - - - - - - + + + + + + - + Jump to main content @@ -72,12 +72,12 @@ -