You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.3 KiB

# Copyright (C) 2005-2024 Splunk Inc. All Rights Reserved.
class ContentType(object):
CORRELATION_SEARCH = 'correlation_searches'
DEEP_DIVE = 'deep_dives'
ENTITY_TYPE = 'entity_types'
EVENT_MANAGEMENT_STATE = 'event_management_states'
GLASS_TABLE = 'glass_tables'
GLASS_TABLE_ICON = 'glass_table_icons'
GLASS_TABLE_IMAGE = 'glass_table_images'
KPI_BASE_SEARCH = 'kpi_base_searches'
KPI_THRESHOLD_TEMPLATE = 'kpi_threshold_templates'
NOTABLE_EVENT_AGGREGATION_POLICY = 'notable_event_aggregation_policies'
SERVICE_ANALYZER = 'service_analyzers'
SERVICE_TEMPLATE = 'service_templates'
SERVICE = 'services'
class ContentPackFields(object):
AUTHOR = 'author'
DESCRIPTION = 'description'
HELP_LINKS = 'help_links'
ICON = 'icon'
ID = 'id'
OVERVIEW = 'overview'
SCREENSHOTS = 'screenshots'
SCREENSHOT_MAIN = 'main_screenshot'
SCREENSHOT_PATH = 'path'
SCREENSHOT_THUMB = 'thumb'
TITLE = 'title'
VERSION = 'version'
VERSION_INSTALLED = 'installed_versions'
INSTALLED = 'installed'
ENTITLEMENT_STATUS = 'entitlement_status'
SAVED_SEARCHES = 'saved_searches'
class ContentPackFiles(object):
CONTENT_DIR = 'content'
ICON = 'icon.png'
MANIFEST = 'manifest.json'
OVERVIEW = 'README.md'
class ContentPackInstallOptions(object):
BACKFILL = 'backfill'
CONTENT = 'content'
ENABLED = 'enabled'
INSTALL_ALL = 'install_all'
OVERWRITE_ALL = 'overwrite'
PREFIX = 'prefix'
RESOLUTION = 'resolution'
SAVED_SEARCH_ACTION = 'saved_search_action'
SAVED_SEARCH_DISABLE = 'disable'
SAVED_SEARCH_ENABLE = 'enable'
SAVED_SEARCH_RETAIN_STATUS = 'retain_status'
SKIP = 'skip'
CONF_ITSI_CONTENT_PACKS = 'itsi_content_packs'
ERROR_REFRESH_CONF = 'ERROR_REFRESH_CONF'
OBJECT_NAME_ALREADY_EXISTS = 'OBJECT_NAME_ALREADY_EXISTS'
ERROR_REFRESH_INVALID_CONTENT_PACK = 'ERROR_REFRESH_INVALID_CONTENT_PACK'
CONTENT_PACK_SOURCE_FIELD = 'source_itsi_da'
CONTENT_PACK_SOURCE_ID_FIELD = 'source_itsi_da_id'
CONTENT_PACK_SOURCE_VERSION_FIELD = 'source_itsi_da_version'
CONTENT_PACKS_HOME_DIR = 'itsi'
CONTENT_PACKS_SCREENSHOTS_DIR = 'screenshots'
CONTENT_TYPE_TO_ITOA_TYPE = {
ContentType.CORRELATION_SEARCH: 'correlation_search',
ContentType.DEEP_DIVE: 'deep_dive',
ContentType.ENTITY_TYPE: 'entity_type',
ContentType.EVENT_MANAGEMENT_STATE: 'event_management_state',
ContentType.GLASS_TABLE: 'glass_table',
ContentType.GLASS_TABLE_ICON: 'icon',
ContentType.GLASS_TABLE_IMAGE: 'image',
ContentType.KPI_BASE_SEARCH: 'kpi_base_search',
ContentType.KPI_THRESHOLD_TEMPLATE: 'kpi_threshold_template',
ContentType.NOTABLE_EVENT_AGGREGATION_POLICY: 'notable_event_aggregation_policy',
ContentType.SERVICE_ANALYZER: 'home_view',
ContentType.SERVICE_TEMPLATE: 'base_service_template',
ContentType.SERVICE: 'service'
}
CONTENT_TYPES_WITH_ACL = {
ContentType.CORRELATION_SEARCH,
ContentType.DEEP_DIVE,
ContentType.EVENT_MANAGEMENT_STATE,
ContentType.GLASS_TABLE,
ContentType.GLASS_TABLE_IMAGE,
ContentType.NOTABLE_EVENT_AGGREGATION_POLICY,
ContentType.SERVICE_ANALYZER
}
CONTENT_TYPE_WRITE_PRIORITY = {
ContentType.CORRELATION_SEARCH: 8,
ContentType.DEEP_DIVE: 9,
ContentType.ENTITY_TYPE: 4,
ContentType.EVENT_MANAGEMENT_STATE: 9,
ContentType.GLASS_TABLE: 9,
ContentType.GLASS_TABLE_ICON: 7,
ContentType.GLASS_TABLE_IMAGE: 7,
ContentType.KPI_BASE_SEARCH: 2,
ContentType.KPI_THRESHOLD_TEMPLATE: 3,
ContentType.NOTABLE_EVENT_AGGREGATION_POLICY: 8,
ContentType.SERVICE_ANALYZER: 9,
ContentType.SERVICE_TEMPLATE: 5,
ContentType.SERVICE: 6
}
IMAGE_EXT_TO_MIMETYPE = {
'.bmp': 'image/x-ms-bmp',
'.gif': 'image/gif',
'.ico': 'image/vnd.microsoft.icon',
'.ief': 'image/ief',
'.jpe': 'image/jpeg',
'.jpeg': 'image/jpeg',
'.jpg': 'image/jpeg',
'.pbm': 'image/x-portable-bitmap',
'.pgm': 'image/x-portable-graymap',
'.png': 'image/png',
'.pnm': 'image/x-portable-anymap',
'.ppm': 'image/x-portable-pixmap',
'.ras': 'image/x-cmu-raster',
'.rgb': 'image/x-rgb',
'.svg': 'image/svg+xml',
'.tif': 'image/tiff',
'.tiff': 'image/tiff',
'.txt': 'text/plain',
'.xbm': 'image/x-xbitmap',
'.xpm': 'image/x-xpixmap',
'.xwd': 'image/x-xwindowdump'
}