fix(striker-ui-api): add recipient and alert-override switches to manage alerts

main
Tsu-ba-me 11 months ago
parent 0774c80703
commit 9f1c2dd2c3
  1. 19
      striker-ui-api/src/lib/execManageAlerts.ts
  2. 2
      striker-ui-api/src/lib/request_handlers/mail-server/createMailServer.ts
  3. 2
      striker-ui-api/src/lib/request_handlers/mail-server/deleteMailServer.ts
  4. 2
      striker-ui-api/src/lib/request_handlers/mail-server/updateMailServer.ts

@ -1,12 +1,17 @@
import assert from 'assert';
import { spawnSync } from 'child_process';
import { SERVER_PATHS } from '../../consts';
import { SERVER_PATHS } from './consts';
import { stdoutVar } from '../../shell';
import { stdoutVar } from './shell';
const MAP_TO_FLAG_BUNDLE = {
'alert-overrides': {},
'alert-overrides': {
'--alert-override-alert-level': 'level',
'--alert-override-host-uuid': 'hostUuid',
'--alert-override-recipient-uuid': 'recipientUuid',
'--alert-override-uuid': 'uuid',
},
'mail-servers': {
'--mail-server-address': 'address',
'--mail-server-authentication': 'authentication',
@ -17,7 +22,13 @@ const MAP_TO_FLAG_BUNDLE = {
'--mail-server-username': 'username',
'--mail-server-uuid': 'uuid',
},
recipients: {},
recipients: {
'--recipient-email': 'email',
'--recipient-language': 'language',
'--recipient-level': 'level',
'--recipient-name': 'name',
'--recipient-uuid': 'uuid',
},
};
export const execManageAlerts = (

@ -1,6 +1,6 @@
import { RequestHandler } from 'express';
import { execManageAlerts } from './execManageAlerts';
import { execManageAlerts } from '../../execManageAlerts';
import { getMailServerRequestBody } from './getMailServerRequestBody';
import { stderr, stdout } from '../../shell';

@ -1,6 +1,6 @@
import { RequestHandler } from 'express';
import { execManageAlerts } from './execManageAlerts';
import { execManageAlerts } from '../../execManageAlerts';
import { stderr } from '../../shell';
export const deleteMailServer: RequestHandler<MailServerParamsDictionary> = (

@ -3,7 +3,7 @@ import { RequestHandler } from 'express';
import { REP_UUID } from '../../consts';
import { execManageAlerts } from './execManageAlerts';
import { execManageAlerts } from '../../execManageAlerts';
import { getMailServerRequestBody } from './getMailServerRequestBody';
import { stderr, stdout } from '../../shell';

Loading…
Cancel
Save