waf.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. export default {
  2. data () {
  3. return {
  4. wafRuleTypeMap: {
  5. ByteMatch: {
  6. label: this.$t('network_waf_statement.type.ByteMatch'),
  7. value: 'ByteMatch',
  8. },
  9. GeoMatch: {
  10. label: this.$t('network_waf_statement.type.GeoMatch'),
  11. value: 'GeoMatch',
  12. },
  13. IPSet: {
  14. label: this.$t('network_waf_statement.type.IPSet'),
  15. value: 'IPSet',
  16. },
  17. LabelMatch: {
  18. label: this.$t('network_waf_statement.type.LabelMatch'),
  19. value: 'LabelMatch',
  20. },
  21. ManagedRuleGroup: {
  22. label: this.$t('network_waf_statement.type.ManagedRuleGroup'),
  23. value: 'ManagedRuleGroup',
  24. },
  25. Rate: {
  26. label: this.$t('network_waf_statement.type.Rate'),
  27. value: 'Rate',
  28. },
  29. RegexSet: {
  30. label: this.$t('network_waf_statement.type.RegexSet'),
  31. value: 'RegexSet',
  32. },
  33. RuleGroup: {
  34. label: this.$t('network_waf_statement.type.RuleGroup'),
  35. value: 'RuleGroup',
  36. },
  37. Size: {
  38. label: this.$t('network_waf_statement.type.Size'),
  39. value: 'Size',
  40. },
  41. SqliMatch: {
  42. label: this.$t('network_waf_statement.type.SqliMatch'),
  43. value: 'SqliMatch',
  44. },
  45. XssMatch: {
  46. label: this.$t('network_waf_statement.type.XssMatch'),
  47. value: 'XssMatch',
  48. },
  49. },
  50. wafRuleActionOptions: [
  51. {
  52. label: this.$t('network.waf.rule_action_Allow'),
  53. value: 'Allow',
  54. },
  55. {
  56. label: this.$t('network.waf.rule_action_Block'),
  57. value: 'Block',
  58. },
  59. {
  60. label: this.$t('network.waf.rule_action_Log'),
  61. value: 'Log',
  62. },
  63. {
  64. label: this.$t('network.waf.rule_action_Count'),
  65. value: 'Count',
  66. },
  67. {
  68. label: this.$t('network.waf.rule_action_Alert'),
  69. value: 'Alert',
  70. },
  71. {
  72. label: this.$t('network.waf.rule_action_Detection'),
  73. value: 'Detection',
  74. },
  75. ],
  76. statementConditionOptions: [
  77. {
  78. id: 1,
  79. label: this.$t('network.waf.match_null'),
  80. value: '',
  81. },
  82. {
  83. id: 1,
  84. label: this.$t('network.waf.match_any'),
  85. value: 'Or',
  86. },
  87. {
  88. id: 2,
  89. label: this.$t('network.waf.match_all'),
  90. value: 'And',
  91. },
  92. {
  93. id: 3,
  94. label: this.$t('network.waf.match_not'),
  95. value: 'Not',
  96. },
  97. ],
  98. }
  99. },
  100. created () {
  101. },
  102. methods: {
  103. hasField (data, field) {
  104. return data.hasOwnProperty(field)
  105. },
  106. },
  107. }