Skip to content

Commit ca5be5d

Browse files
Fix ui_metadata is not fetched when MDS client is used (#1124) (#1125)
(cherry picked from commit f05088d) Signed-off-by: Songkan Tang <songkant@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 1d20816 commit ca5be5d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/services/MonitorService.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import _ from 'lodash';
88
import { INDEX } from '../../utils/constants';
99
import { isIndexNotFoundError } from './utils/helpers';
1010
import { MDSEnabledClientService } from './MDSEnabledClientService';
11+
import { DEFAULT_HEADERS } from "./utils/constants";
1112

1213
export default class MonitorService extends MDSEnabledClientService {
1314
createMonitor = async (context, req, res) => {
@@ -103,7 +104,7 @@ export default class MonitorService extends MDSEnabledClientService {
103104
getMonitor = async (context, req, res) => {
104105
try {
105106
const { id } = req.params;
106-
const params = { monitorId: id };
107+
const params = { monitorId: id, headers: DEFAULT_HEADERS };
107108
const client = this.getClientBasedOnDataSource(context, req);
108109
const getResponse = await client('alerting.getMonitor', params);
109110
let monitor = _.get(getResponse, 'monitor', null);

0 commit comments

Comments
 (0)