Skip to content

Commit

Permalink
rename syslog handlers in deep
Browse files Browse the repository at this point in the history
  • Loading branch information
stgmsa committed Jun 12, 2024
1 parent 96153d5 commit 4654df1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/api/spec/paths/api/v1/config/syslog_parsers.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/api/v1/config/syslog_parsers:
/api/v1/config/event_handlers:
description: |-
pf::UnifiedApi::Controller::Config::SyslogParsers
Expand Down
4 changes: 2 additions & 2 deletions go/api-frontend/aaa/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ var pathAdminRolesMap = []adminRoleMapping{
adminRoleMapping{prefix: configApiPrefix + "/switches", role: "SWITCHES"},
adminRoleMapping{prefix: configApiPrefix + "/syslog_forwarder/", role: "SYSLOG"},
adminRoleMapping{prefix: configApiPrefix + "/syslog_forwarders", role: "SYSLOG"},
adminRoleMapping{prefix: configApiPrefix + "/syslog_parser/", role: "PFDETECT"},
adminRoleMapping{prefix: configApiPrefix + "/syslog_parsers", role: "PFDETECT"},
adminRoleMapping{prefix: configApiPrefix + "/event_handler/", role: "PFDETECT"},
adminRoleMapping{prefix: configApiPrefix + "/event_handlers", role: "PFDETECT"},
}

var methodSuffixMap = map[string]string{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import store from '@/store'
import i18n from '@/utils/locale'
import yup from '@/utils/yup'

yup.addMethod(yup.string, 'syslogParserIdExistsExcept', function (exceptId = '', message) {
yup.addMethod(yup.string, 'eventHandlerIdExistsExcept', function (exceptId = '', message) {
return this.test({
name: 'syslogParserIdExistsExcept',
name: 'eventHandlerIdExistsExcept',
message: message || i18n.t('Detector exists.'),
test: (value) => {
if (!value || value.toLowerCase() === exceptId.toLowerCase()) return true
Expand Down Expand Up @@ -43,7 +43,7 @@ export const schema = (props) => {
id: yup.string()
.nullable()
.required(i18n.t('Detector required.'))
.syslogParserIdExistsExcept((!isNew && !isClone) ? id : undefined, i18n.t('Detector exists.')),
.eventHandlerIdExistsExcept((!isNew && !isClone) ? id : undefined, i18n.t('Detector exists.')),
path: yup.string()
.nullable()
.label(i18n.t('Alert pipe'))
Expand Down

0 comments on commit 4654df1

Please sign in to comment.