Skip to content

Commit

Permalink
Fix ui_metadata is not fetched when MDS client is used (#1124)
Browse files Browse the repository at this point in the history
Signed-off-by: Songkan Tang <[email protected]>
  • Loading branch information
songkant-aws authored Oct 12, 2024
1 parent 9150cdb commit f05088d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/services/MonitorService.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import _ from 'lodash';
import { INDEX } from '../../utils/constants';
import { isIndexNotFoundError } from './utils/helpers';
import { MDSEnabledClientService } from './MDSEnabledClientService';
import { DEFAULT_HEADERS } from "./utils/constants";

export default class MonitorService extends MDSEnabledClientService {
createMonitor = async (context, req, res) => {
Expand Down Expand Up @@ -103,7 +104,7 @@ export default class MonitorService extends MDSEnabledClientService {
getMonitor = async (context, req, res) => {
try {
const { id } = req.params;
const params = { monitorId: id };
const params = { monitorId: id, headers: DEFAULT_HEADERS };
const client = this.getClientBasedOnDataSource(context, req);
const getResponse = await client('alerting.getMonitor', params);
let monitor = _.get(getResponse, 'monitor', null);
Expand Down

0 comments on commit f05088d

Please sign in to comment.