import Vue from 'vue'
import * as common from './common'
import * as monitor from './monitor'
import * as resource from './resource'
import * as task from './task'
import * as system from './system'
import * as report from './report'
import * as personal from './personal'

const filters = {
  ...common,
  ...monitor,
  ...resource,
  ...task,
  ...system,
  ...report,
  ...personal
}
export const {
  accountFilter,
  redundancyFilter,
  specFilter,
  booleanFilter,
  mysqlStatus,
  mysqlStatusColor,
  publicAccess,
  leaseState,
  blobFilter,
  discountFilter,
  status,
  resourceCatalog,
  waiteTime,
  isTrue,
  etherType,
  alarmStatus,
  alarmStatusColor,
  alarmLevel,
  alarmLevelColor,
  resourceType,
  statusOnColor,
  monitorValueType,
  monitorRuleUnit,
  monitorRuleOperate,
  monitorRuleTimeunit,
  autoType,
  resourceCatalogMonitor,
  resourceTypeMonitor,
  alarmMetric,
  openstackServerColor,
  tcImageStatus,
  tcImageColor,
  vmStatusFilter,
  platformStatusFilter,
  fiberOpticalWeb,
  powerVolumeFilter,
  powerVolumeFilterColor,
  openstackServer,
  powerServer,
  firewallStatus,
  powerFloatIp,
  ipv6Enabled,
  powerJoin,
  powerJoinColor,
  powerDescription,
  powerDescriptionColor,
  powerProvider,
  powerProviderColor,
  powerMapping,
  powerVmTaskStatus,
  powerMappingColor,
  firewallColor,
  tcFloatIp,
  tcFloatIpColor,
  action,
  grouoRuleAction,
  snapshot,
  snapshotColor,
  image,
  imageColor,
  powervcImage,
  powervcImageColor,
  volume,
  volumeColor,
  balancerFilter,
  vmStatusColor,
  systemDiskType,
  azureRegion,
  infrastructFilter,
  securityGroupFilter,
  secruityProtocol,
  vmMaintain,
  vmNetworkType,
  vmConnect,
  openstackNetworkStatus,
  stack,
  stackColor,
  vmImageStatus,
  storageStatus,
  cephStatus,
  nodeType,
  vpcStatus,
  F5Status,
  shareType,
  resourceGroup,
  poolStatus,
  flashcopyStatus,
  flashcopyColor,
  diskStatus,
  forUse,
  hostType,
  portType,
  fcPortStatus,
  fcType,
  portStatus,
  portOperateStatus,
  portHealthStatus,
  mirrorType,
  volumeType,
  switchType,
  database,
  raidStatus,
  healthStatus,
  operateStatus,
  mDiskType,
  iparStatus,
  partitionType,
  sharingMode,
  bootModeType,
  tipStatus,
  disabledStatus,
  rmcState,
  serverStatus,
  serverStatusColor,
  normalStatus,
  powerOnSpeedOverride,
  Keylock,
  PowerOnSide,
  LparStartPolicy,
  objectStorageStatusFilter,
  xskyStatus,
  qosEnabled,
  priority,
  NoValue,
  rolePoolType,
  roleDiskType,
  syncStatus,
  xskyHostType,
  deviceType,
  aclStatus,
  loggedStatus,
  periodFilter,
  stateFliter,
  taskTypeFilter,
  taskExeStatusFilter,
  authenModeFilter,
  authTypeFilter,
  promotions,
  promotionsColor,
  promotionsSla,
  promotionsType,
  orderStatusFilter,
  coupon,
  chargeMode,
  couponColor,
  reportCycleType,
  weekFilter,
  reportStatusType,
  reportStatusTypeColor,
  level,
  messageStatusFilter,
  adminStateupFilter,
  templateState,
  templateStateColor,
  flowServiceStatus,
  applyStatus,
  moneyPariod,
  workOrder,
  categoryFilter,
  workOrderColor,
  category,
  applyF5Service,
  F5ApplyStatus,
  templateStatusFilter,
  vendorName
} = filters

// 注册全局过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
