Skip to content

Commit

Permalink
addressed PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan committed Jul 28, 2023
1 parent ad1bb6d commit bb9f1d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion public/store/LogTypeStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { NotificationsStart } from 'opensearch-dashboards/public';
import { LogType, LogTypeBase, LogTypeItem } from '../../types';
import LogTypeService from '../services/LogTypeService';
import { errorNotificationToast } from '../utils/helpers';
import { DataStore } from './DataStore';

export class LogTypeStore {
constructor(private service: LogTypeService, private notifications: NotificationsStart) {}
Expand All @@ -21,7 +22,11 @@ export class LogTypeStore {
};
});

return { ...logTypes[0], detectionRules: 10 };
const rulesRes = await DataStore.rules.getAllRules({
'rule.category': [id],
});

return { ...logTypes[0], detectionRules: rulesRes.length };
}

return undefined;
Expand Down
1 change: 0 additions & 1 deletion server/services/LogTypeService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export class LogTypeService {
const { logTypeId } = request.params;
const params: UpdateLogTypeParams = { body: logType, logTypeId };
const { callAsCurrentUser: callWithRequest } = this.osDriver.asScoped(request);
console.log(JSON.stringify(params));
const updateLogTypeResponse: UpdateLogTypeResponse = await callWithRequest(
CLIENT_LOGTYPE_METHODS.UPDATE_LOGTYPE,
params
Expand Down

0 comments on commit bb9f1d9

Please sign in to comment.