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.
149 lines
4.5 KiB
149 lines
4.5 KiB
# Copyright (C) 2005-2025 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'
|
|
DUPLICATE_TITLE = 'duplicate_title'
|
|
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'
|
|
BACKFILL_TIMERANGE = 'backfill_timerange'
|
|
CONTENT = 'content'
|
|
ENABLED = 'enabled'
|
|
INSTALL_ALL = 'install_all'
|
|
PREFIX = 'prefix'
|
|
SAVED_SEARCH_ACTION = 'saved_search_action'
|
|
SAVED_SEARCH_DISABLE = 'disable'
|
|
SAVED_SEARCH_ENABLE = 'enable'
|
|
SAVED_SEARCH_RETAIN_STATUS = 'retain_status'
|
|
|
|
|
|
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_SUPPORTING_DUPLICATES = {
|
|
ContentType.DEEP_DIVE,
|
|
ContentType.GLASS_TABLE,
|
|
ContentType.NOTABLE_EVENT_AGGREGATION_POLICY,
|
|
ContentType.SERVICE_ANALYZER
|
|
}
|
|
|
|
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'
|
|
}
|