diff --git a/bitmovin-analytics-datasource/src/components/QueryEditor.tsx b/bitmovin-analytics-datasource/src/components/QueryEditor.tsx index 5f52b62..bdce976 100644 --- a/bitmovin-analytics-datasource/src/components/QueryEditor.tsx +++ b/bitmovin-analytics-datasource/src/components/QueryEditor.tsx @@ -7,6 +7,9 @@ import { MyDataSourceOptions, MyQuery } from '../types'; import { fetchLicenses } from '../utils/licenses'; import { DEFAULT_SELECTABLE_QUERY_INTERVAL, SELECTABLE_QUERY_INTERVALS } from '../utils/intervalUtils'; import { DEFAULT_SELECTABLE_AGGREGATION, SELECTABLE_AGGREGATIONS } from '../types/aggregations'; +import { SELECTABLE_QUERY_AD_ATTRIBUTES } from '../types/queryAdAttributes'; +import { SELECTABLE_QUERY_ATTRIBUTES } from '../types/queryAttributes'; +import { isMetric, SELECTABLE_METRICS } from '../types/metric'; enum LoadingState { Default = 'DEFAULT', @@ -22,6 +25,7 @@ export function QueryEditor({ query, onChange, onRunQuery, datasource }: Props) const [licenseLoadingState, setLicenseLoadingState] = useState(LoadingState.Default); const [licenseErrorMessage, setLicenseErrorMessage] = useState(''); const [isTimeSeries, setIsTimeSeries] = useState(true); + const [isDimensionMetricSelected, setIsDimensionMetricSelected] = useState(false); useEffect(() => { setLicenseLoadingState(LoadingState.Loading); @@ -41,8 +45,19 @@ export function QueryEditor({ query, onChange, onRunQuery, datasource }: Props) onRunQuery(); }; - const onMetricChange = (item: SelectableValue) => { - onChange({ ...query, aggregation: item.value }); + const onAggregationChange = (item: SelectableValue) => { + onChange({ ...query, aggregation: item.value, metric: undefined }); + onRunQuery(); + }; + + const onDimensionChange = (item: SelectableValue) => { + if (isMetric(item.value)) { + setIsDimensionMetricSelected(true); + onChange({ ...query, aggregation: undefined, dimension: undefined, metric: item.value }); + } else { + setIsDimensionMetricSelected(false); + onChange({ ...query, dimension: item.value }); + } onRunQuery(); }; @@ -95,12 +110,25 @@ export function QueryEditor({ query, onChange, onRunQuery, datasource }: Props) placeholder={licenseLoadingState === LoadingState.Loading ? 'Loading Licenses' : 'Choose License'} /> - + {!isDimensionMetricSelected && ( + + onMetricChange(item)} + onChange={onDimensionChange} width={40} - options={SELECTABLE_AGGREGATIONS} + options={ + datasource.adAnalytics + ? SELECTABLE_QUERY_AD_ATTRIBUTES + : SELECTABLE_QUERY_ATTRIBUTES.concat(SELECTABLE_METRICS) + } /> diff --git a/bitmovin-analytics-datasource/src/datasource.ts b/bitmovin-analytics-datasource/src/datasource.ts index 9be8ea3..54f3027 100644 --- a/bitmovin-analytics-datasource/src/datasource.ts +++ b/bitmovin-analytics-datasource/src/datasource.ts @@ -12,12 +12,17 @@ import { catchError, lastValueFrom, map, Observable, of } from 'rxjs'; import { MixedDataRowList, MyDataSourceOptions, MyQuery, NumberDataRowList } from './types'; import { transformGroupedTimeSeriesData, transformSimpleTimeSeries, transformTableData } from './utils/dataUtils'; import { calculateQueryInterval, QueryInterval } from './utils/intervalUtils'; +import { QueryAttribute } from './types/queryAttributes'; +import { QueryAdAttribute } from './types/queryAdAttributes'; +import { Metric } from './types/metric'; +import { Aggregation } from './types/aggregations'; type AnalyticsQuery = { filters: Array<{ name: string; operator: string; value: number }>; groupBy: string[]; orderBy: Array<{ name: string; order: string }>; - dimension: string; + dimension?: QueryAttribute | QueryAdAttribute; + metric?: Metric; start: Date; end: Date; licenseKey: string; @@ -54,7 +59,6 @@ export class DataSource extends DataSourceApi { const to = range!.to.toDate(); const promises = options.targets.map(async (target) => { - const urlAppendix = target.aggregation; const interval = target.interval ? calculateQueryInterval(target.interval!, from.getTime(), to.getTime()) : undefined; @@ -76,14 +80,17 @@ export class DataSource extends DataSourceApi { }, ] : [], - dimension: 'IMPRESSION_ID', + dimension: target.dimension, + metric: target.metric, start: from, end: to, licenseKey: target.licenseKey, interval: interval, }; - const response = await lastValueFrom(this.request(this.getRequestUrl() + urlAppendix, 'POST', query)); + const response = await lastValueFrom( + this.request(this.getRequestUrl(target.metric, target.aggregation), 'POST', query) + ); const dataRows: MixedDataRowList = response.data.data.result.rows; const columnLabels: Array<{ key: string; label: string }> = response.data.data.result.columnLabels; @@ -120,12 +127,17 @@ export class DataSource extends DataSourceApi { return Promise.all(promises).then((data) => ({ data })); } - getRequestUrl(): string { + getRequestUrl(metric?: Metric, aggregation?: Aggregation): string { + let url = '/analytics'; if (this.adAnalytics === true) { - return '/analytics/ads/queries/'; + url += '/ads'; } - return '/analytics/queries/'; + if (metric != null) { + return url + '/metrics/' + metric; + } + + return url + '/queries/' + aggregation; } request(url: string, method: string, payload?: any): Observable> { diff --git a/bitmovin-analytics-datasource/src/types.ts b/bitmovin-analytics-datasource/src/types.ts index b2831fc..d53deec 100644 --- a/bitmovin-analytics-datasource/src/types.ts +++ b/bitmovin-analytics-datasource/src/types.ts @@ -2,11 +2,16 @@ import { DataSourceJsonData } from '@grafana/data'; import { DataQuery } from '@grafana/schema'; import { QueryInterval } from './utils/intervalUtils'; import { Aggregation } from './types/aggregations'; +import { QueryAttribute } from './types/queryAttributes'; +import { QueryAdAttribute } from './types/queryAdAttributes'; +import { Metric } from './types/metric'; export interface MyQuery extends DataQuery { licenseKey: string; interval?: QueryInterval | 'AUTO'; - aggregation: Aggregation; + aggregation?: Aggregation; + metric?: Metric; + dimension?: QueryAttribute | QueryAdAttribute; } export const DEFAULT_QUERY: Partial = {}; diff --git a/bitmovin-analytics-datasource/src/types/metric.ts b/bitmovin-analytics-datasource/src/types/metric.ts new file mode 100644 index 0000000..37743ba --- /dev/null +++ b/bitmovin-analytics-datasource/src/types/metric.ts @@ -0,0 +1,19 @@ +import { SelectableValue } from '@grafana/data'; + +export enum METRICS { + AVG_CONCURRENTVIEWERS = 'avg-concurrentviewers', + MAX_CONCURRENTVIEWERS = 'max-concurrentviewers', + AVG_DROPPED_FRAMES = 'avg-dropped-frames', +} + +export type Metric = (typeof METRICS)[keyof typeof METRICS]; + +export const SELECTABLE_METRICS: Array> = [ + { value: METRICS.AVG_CONCURRENTVIEWERS, label: 'Avg Concurrent Viewers' }, + { value: METRICS.MAX_CONCURRENTVIEWERS, label: 'Max Concurrent Viewers' }, + { value: METRICS.AVG_DROPPED_FRAMES, label: 'Avg Dropped Frames' }, +]; + +export const isMetric = (value: string): boolean => { + return Object.values(METRICS).includes(value as Metric); +}; diff --git a/bitmovin-analytics-datasource/src/types/queryAdAttributes.ts b/bitmovin-analytics-datasource/src/types/queryAdAttributes.ts new file mode 100644 index 0000000..2d2b012 --- /dev/null +++ b/bitmovin-analytics-datasource/src/types/queryAdAttributes.ts @@ -0,0 +1,301 @@ +import { SelectableValue } from '@grafana/data'; + +export enum QUERY_AD_ATTRIBUTES { + ADVERTISER_NAME = 'ADVERTISER_NAME', + AD_CLICKTHROUGH_URL = 'AD_CLICKTHROUGH_URL', + AD_DESCRIPTION = 'AD_DESCRIPTION', + AD_DURATION = 'AD_DURATION', + AD_FALLBACK_INDEX = 'AD_FALLBACK_INDEX', + AD_ID = 'AD_ID', + AD_ID_PLAYER = 'AD_ID_PLAYER', + AD_IMPRESSION_ID = 'AD_IMPRESSION_ID', + AD_IS_PERSISTENT = 'AD_IS_PERSISTENT', + AD_MODULE = 'AD_MODULE', + AD_OFFSET = 'AD_OFFSET', + AD_PLAYBACK_HEIGHT = 'AD_PLAYBACK_HEIGHT', + AD_PLAYBACK_WIDTH = 'AD_PLAYBACK_WIDTH', + AD_POSITION = 'AD_POSITION', + AD_PRELOAD_OFFSET = 'AD_PRELOAD_OFFSET', + AD_REPLACE_CONTENT_DURATION = 'AD_REPLACE_CONTENT_DURATION', + AD_SCHEDULE_TIME = 'AD_SCHEDULE_TIME', + AD_SKIPPABLE = 'AD_SKIPPABLE', + AD_SKIP_AFTER = 'AD_SKIP_AFTER', + AD_STARTUP_TIME = 'AD_STARTUP_TIME', + AD_SYSTEM = 'AD_SYSTEM', + AD_TAG_PATH = 'AD_TAG_PATH', + AD_TAG_SERVER = 'AD_TAG_SERVER', + AD_TAG_TYPE = 'AD_TAG_TYPE', + AD_TAG_URL = 'AD_TAG_URL', + AD_TITLE = 'AD_TITLE', + AD_WRAPPER_ADS_COUNT = 'AD_WRAPPER_ADS_COUNT', + ANALYTICS_VERSION = 'ANALYTICS_VERSION', + APIORG_ID = 'APIORG_ID', + APIUSER_ID = 'APIUSER_ID', + API_FRAMEWORK = 'API_FRAMEWORK', + AUDIO_BITRATE = 'AUDIO_BITRATE', + AUTOPLAY = 'AUTOPLAY', + BROWSER = 'BROWSER', + BROWSER_IS_BOT = 'BROWSER_IS_BOT', + BROWSER_VERSION_MAJOR = 'BROWSER_VERSION_MAJOR', + BROWSER_VERSION_MINOR = 'BROWSER_VERSION_MINOR', + CDN_PROVIDER = 'CDN_PROVIDER', + CITY = 'CITY', + CLICKED = 'CLICKED', + CLICK_PERCENTAGE = 'CLICK_PERCENTAGE', + CLICK_POSITION = 'CLICK_POSITION', + CLICK_RATE = 'CLICK_RATE', + CLIENT_TIME = 'CLIENT_TIME', + CLOSED = 'CLOSED', + CLOSE_PERCENTAGE = 'CLOSE_PERCENTAGE', + CLOSE_POSITION = 'CLOSE_POSITION', + COMPLETED = 'COMPLETED', + COUNTRY = 'COUNTRY', + CREATIVE_AD_ID = 'CREATIVE_AD_ID', + CREATIVE_ID = 'CREATIVE_ID', + CUSTOM_DATA_10 = 'CUSTOM_DATA_10', + CUSTOM_DATA_11 = 'CUSTOM_DATA_11', + CUSTOM_DATA_12 = 'CUSTOM_DATA_12', + CUSTOM_DATA_13 = 'CUSTOM_DATA_13', + CUSTOM_DATA_14 = 'CUSTOM_DATA_14', + CUSTOM_DATA_15 = 'CUSTOM_DATA_15', + CUSTOM_DATA_16 = 'CUSTOM_DATA_16', + CUSTOM_DATA_17 = 'CUSTOM_DATA_17', + CUSTOM_DATA_18 = 'CUSTOM_DATA_18', + CUSTOM_DATA_19 = 'CUSTOM_DATA_19', + CUSTOM_DATA_1 = 'CUSTOM_DATA_1', + CUSTOM_DATA_20 = 'CUSTOM_DATA_20', + CUSTOM_DATA_21 = 'CUSTOM_DATA_21', + CUSTOM_DATA_22 = 'CUSTOM_DATA_22', + CUSTOM_DATA_23 = 'CUSTOM_DATA_23', + CUSTOM_DATA_24 = 'CUSTOM_DATA_24', + CUSTOM_DATA_25 = 'CUSTOM_DATA_25', + CUSTOM_DATA_26 = 'CUSTOM_DATA_26', + CUSTOM_DATA_27 = 'CUSTOM_DATA_27', + CUSTOM_DATA_28 = 'CUSTOM_DATA_28', + CUSTOM_DATA_29 = 'CUSTOM_DATA_29', + CUSTOM_DATA_2 = 'CUSTOM_DATA_2', + CUSTOM_DATA_30 = 'CUSTOM_DATA_30', + CUSTOM_DATA_3 = 'CUSTOM_DATA_3', + CUSTOM_DATA_4 = 'CUSTOM_DATA_4', + CUSTOM_DATA_5 = 'CUSTOM_DATA_5', + CUSTOM_DATA_6 = 'CUSTOM_DATA_6', + CUSTOM_DATA_7 = 'CUSTOM_DATA_7', + CUSTOM_DATA_8 = 'CUSTOM_DATA_8', + CUSTOM_DATA_9 = 'CUSTOM_DATA_9', + CUSTOM_USER_ID = 'CUSTOM_USER_ID', + DAY = 'DAY', + DAYPART = 'DAYPART', + DEAL_ID = 'DEAL_ID', + DEVICE_TYPE = 'DEVICE_TYPE', + DOMAIN = 'DOMAIN', + ERROR_CODE = 'ERROR_CODE', + ERROR_MESSAGE = 'ERROR_MESSAGE', + EXPERIMENT_NAME = 'EXPERIMENT_NAME', + HOUR = 'HOUR', + IP_ADDRESS = 'IP_ADDRESS', + ISP = 'ISP', + IS_LINEAR = 'IS_LINEAR', + LANGUAGE = 'LANGUAGE', + LICENSE_KEY = 'LICENSE_KEY', + MANIFEST_DOWNLOAD_TIME = 'MANIFEST_DOWNLOAD_TIME', + MEDIA_PATH = 'MEDIA_PATH', + MEDIA_SERVER = 'MEDIA_SERVER', + MEDIA_URL = 'MEDIA_URL', + MIDPOINT = 'MIDPOINT', + MINUTE = 'MINUTE', + MIN_SUGGESTED_DURATION = 'MIN_SUGGESTED_DURATION', + MONTH = 'MONTH', + OPERATINGSYSTEM = 'OPERATINGSYSTEM', + OPERATINGSYSTEM_VERSION_MAJOR = 'OPERATINGSYSTEM_VERSION_MAJOR', + OPERATINGSYSTEM_VERSION_MINOR = 'OPERATINGSYSTEM_VERSION_MINOR', + PAGE_LOAD_TIME = 'PAGE_LOAD_TIME', + PAGE_LOAD_TYPE = 'PAGE_LOAD_TYPE', + PATH = 'PATH', + PERCENTAGE_IN_VIEWPORT = 'PERCENTAGE_IN_VIEWPORT', + PLATFORM = 'PLATFORM', + PLAYER = 'PLAYER', + PLAYER_KEY = 'PLAYER_KEY', + PLAYER_STARTUPTIME = 'PLAYER_STARTUPTIME', + PLAYER_TECH = 'PLAYER_TECH', + PLAYER_VERSION = 'PLAYER_VERSION', + PLAY_PERCENTAGE = 'PLAY_PERCENTAGE', + QUARTILE_1 = 'QUARTILE_1', + QUARTILE_3 = 'QUARTILE_3', + REGION = 'REGION', + SCREEN_HEIGHT = 'SCREEN_HEIGHT', + SCREEN_WIDTH = 'SCREEN_WIDTH', + SIZE = 'SIZE', + SKIPPED = 'SKIPPED', + SKIP_PERCENTAGE = 'SKIP_PERCENTAGE', + SKIP_POSITION = 'SKIP_POSITION', + STARTED = 'STARTED', + STREAM_FORMAT = 'STREAM_FORMAT', + SURVEY_URL = 'SURVEY_URL', + TIME = 'TIME', + TIME_HOVERED = 'TIME_HOVERED', + TIME_IN_VIEWPORT = 'TIME_IN_VIEWPORT', + TIME_PLAYED = 'TIME_PLAYED', + TIME_TO_FIRST_AD = 'TIME_TO_FIRST_AD', + TIME_UNTIL_HOVER = 'TIME_UNTIL_HOVER', + UNIVERSAL_AD_ID_REGISTRY = 'UNIVERSAL_AD_ID_REGISTRY', + UNIVERSAL_AD_ID_VALUE = 'UNIVERSAL_AD_ID_VALUE', + USER_ID = 'USER_ID', + VIDEO_BITRATE = 'VIDEO_BITRATE', + VIDEO_ID = 'VIDEO_ID', + VIDEO_IMPRESSION_ID = 'VIDEO_IMPRESSION_ID', + VIDEO_TITLE = 'VIDEO_TITLE', + VIDEO_WINDOW_HEIGHT = 'VIDEO_WINDOW_HEIGHT', + VIDEO_WINDOW_WIDTH = 'VIDEO_WINDOW_WIDTH', + YEAR = 'YEAR', +} + +export type QueryAdAttribute = keyof typeof QUERY_AD_ATTRIBUTES; + +export const SELECTABLE_QUERY_AD_ATTRIBUTES: Array> = [ + { value: QUERY_AD_ATTRIBUTES.ADVERTISER_NAME, label: 'Advertiser Name' }, + { value: QUERY_AD_ATTRIBUTES.AD_CLICKTHROUGH_URL, label: 'Ad Clickthrough Url' }, + { value: QUERY_AD_ATTRIBUTES.AD_DESCRIPTION, label: 'Ad Description' }, + { value: QUERY_AD_ATTRIBUTES.AD_DURATION, label: 'Ad Duration' }, + { value: QUERY_AD_ATTRIBUTES.AD_FALLBACK_INDEX, label: 'Ad Fallback Position' }, + { value: QUERY_AD_ATTRIBUTES.AD_ID, label: 'Ad Id' }, + { value: QUERY_AD_ATTRIBUTES.AD_ID_PLAYER, label: 'Ad Id Player' }, + { value: QUERY_AD_ATTRIBUTES.AD_IMPRESSION_ID, label: 'Ad Impression Id' }, + { value: QUERY_AD_ATTRIBUTES.AD_IS_PERSISTENT, label: 'Ad Is Persistent' }, + { value: QUERY_AD_ATTRIBUTES.AD_MODULE, label: 'Ad Module' }, + { value: QUERY_AD_ATTRIBUTES.AD_OFFSET, label: 'Ad Offset' }, + { value: QUERY_AD_ATTRIBUTES.AD_PLAYBACK_HEIGHT, label: 'Ad Playback Height' }, + { value: QUERY_AD_ATTRIBUTES.AD_PLAYBACK_WIDTH, label: 'Ad Playback Width' }, + { value: QUERY_AD_ATTRIBUTES.AD_POSITION, label: 'Ad Position' }, + { value: QUERY_AD_ATTRIBUTES.AD_PRELOAD_OFFSET, label: 'Ad Preload Offset' }, + { value: QUERY_AD_ATTRIBUTES.AD_REPLACE_CONTENT_DURATION, label: 'Ad Replace Content Duration' }, + { value: QUERY_AD_ATTRIBUTES.AD_SCHEDULE_TIME, label: 'Ad Schedule Time' }, + { value: QUERY_AD_ATTRIBUTES.AD_SKIPPABLE, label: 'Ad Skippable' }, + { value: QUERY_AD_ATTRIBUTES.AD_SKIP_AFTER, label: 'Ad Skip After' }, + { value: QUERY_AD_ATTRIBUTES.AD_STARTUP_TIME, label: 'Ad Startup Time' }, + { value: QUERY_AD_ATTRIBUTES.AD_SYSTEM, label: 'Ad System' }, + { value: QUERY_AD_ATTRIBUTES.AD_TAG_PATH, label: 'Ad Tag Path' }, + { value: QUERY_AD_ATTRIBUTES.AD_TAG_SERVER, label: 'Tag Server' }, + { value: QUERY_AD_ATTRIBUTES.AD_TAG_TYPE, label: 'Tag Type' }, + { value: QUERY_AD_ATTRIBUTES.AD_TAG_URL, label: 'Ad Tag Url' }, + { value: QUERY_AD_ATTRIBUTES.AD_TITLE, label: 'Ad Title' }, + { value: QUERY_AD_ATTRIBUTES.AD_WRAPPER_ADS_COUNT, label: 'Wrapper Position' }, + { value: QUERY_AD_ATTRIBUTES.ANALYTICS_VERSION, label: 'Analytics Version' }, + { value: QUERY_AD_ATTRIBUTES.APIORG_ID, label: 'Api Organization Id' }, + { value: QUERY_AD_ATTRIBUTES.APIUSER_ID, label: 'Api User Id' }, + { value: QUERY_AD_ATTRIBUTES.API_FRAMEWORK, label: 'Api Framework' }, + { value: QUERY_AD_ATTRIBUTES.AUDIO_BITRATE, label: 'Audio Bitrate' }, + { value: QUERY_AD_ATTRIBUTES.AUTOPLAY, label: 'Autoplay' }, + { value: QUERY_AD_ATTRIBUTES.BROWSER, label: 'Browser' }, + { value: QUERY_AD_ATTRIBUTES.BROWSER_IS_BOT, label: 'Is Bot' }, + { value: QUERY_AD_ATTRIBUTES.BROWSER_VERSION_MAJOR, label: 'Browser Version Major' }, + { value: QUERY_AD_ATTRIBUTES.BROWSER_VERSION_MINOR, label: 'Browser Version Minor' }, + { value: QUERY_AD_ATTRIBUTES.CDN_PROVIDER, label: 'Cdn Provider' }, + { value: QUERY_AD_ATTRIBUTES.CITY, label: 'City' }, + { value: QUERY_AD_ATTRIBUTES.CLICKED, label: 'Clicked' }, + { value: QUERY_AD_ATTRIBUTES.CLICK_PERCENTAGE, label: 'Click Percentage' }, + { value: QUERY_AD_ATTRIBUTES.CLICK_POSITION, label: 'Click Position' }, + { value: QUERY_AD_ATTRIBUTES.CLICK_RATE, label: 'Click Rate' }, + { value: QUERY_AD_ATTRIBUTES.CLIENT_TIME, label: 'Client Time' }, + { value: QUERY_AD_ATTRIBUTES.CLOSED, label: 'Closed' }, + { value: QUERY_AD_ATTRIBUTES.CLOSE_PERCENTAGE, label: 'Close Percentage' }, + { value: QUERY_AD_ATTRIBUTES.CLOSE_POSITION, label: 'Close Position' }, + { value: QUERY_AD_ATTRIBUTES.COMPLETED, label: 'Completed' }, + { value: QUERY_AD_ATTRIBUTES.COUNTRY, label: 'Country' }, + { value: QUERY_AD_ATTRIBUTES.CREATIVE_AD_ID, label: 'Creative Ad Id' }, + { value: QUERY_AD_ATTRIBUTES.CREATIVE_ID, label: 'Creative Id' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_10, label: 'Custom Data 10' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_11, label: 'Custom Data 11' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_12, label: 'Custom Data 12' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_13, label: 'Custom Data 13' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_14, label: 'Custom Data 14' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_15, label: 'Custom Data 15' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_16, label: 'Custom Data 16' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_17, label: 'Custom Data 17' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_18, label: 'Custom Data 18' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_19, label: 'Custom Data 19' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_1, label: 'Custom Data 1' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_20, label: 'Custom Data 20' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_21, label: 'Custom Data 21' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_22, label: 'Custom Data 22' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_23, label: 'Custom Data 23' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_24, label: 'Custom Data 24' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_25, label: 'Custom Data 25' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_26, label: 'Custom Data 26' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_27, label: 'Custom Data 27' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_28, label: 'Custom Data 28' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_29, label: 'Custom Data 29' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_2, label: 'Custom Data 2' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_30, label: 'Custom Data 30' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_3, label: 'Custom Data 3' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_4, label: 'Custom Data 4' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_5, label: 'Custom Data 5' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_6, label: 'Custom Data 6' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_7, label: 'Custom Data 7' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_8, label: 'Custom Data 8' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_DATA_9, label: 'Custom Data 9' }, + { value: QUERY_AD_ATTRIBUTES.CUSTOM_USER_ID, label: 'Custom User Id' }, + { value: QUERY_AD_ATTRIBUTES.DAY, label: 'Day' }, + { value: QUERY_AD_ATTRIBUTES.DAYPART, label: 'Daypart' }, + { value: QUERY_AD_ATTRIBUTES.DEAL_ID, label: 'Deal Id' }, + { value: QUERY_AD_ATTRIBUTES.DEVICE_TYPE, label: 'Device Type' }, + { value: QUERY_AD_ATTRIBUTES.DOMAIN, label: 'Domain' }, + { value: QUERY_AD_ATTRIBUTES.ERROR_CODE, label: 'Error Code' }, + { value: QUERY_AD_ATTRIBUTES.ERROR_MESSAGE, label: 'Error Message' }, + { value: QUERY_AD_ATTRIBUTES.EXPERIMENT_NAME, label: 'Experiment Name' }, + { value: QUERY_AD_ATTRIBUTES.HOUR, label: 'Hour' }, + { value: QUERY_AD_ATTRIBUTES.IP_ADDRESS, label: 'Ip Address' }, + { value: QUERY_AD_ATTRIBUTES.ISP, label: 'Internet Service Provider' }, + { value: QUERY_AD_ATTRIBUTES.IS_LINEAR, label: 'Is Linear' }, + { value: QUERY_AD_ATTRIBUTES.LANGUAGE, label: 'Language' }, + { value: QUERY_AD_ATTRIBUTES.LICENSE_KEY, label: 'License Key' }, + { value: QUERY_AD_ATTRIBUTES.MANIFEST_DOWNLOAD_TIME, label: 'Manifest Download Time' }, + { value: QUERY_AD_ATTRIBUTES.MEDIA_PATH, label: 'Media Path' }, + { value: QUERY_AD_ATTRIBUTES.MEDIA_SERVER, label: 'Creative Server' }, + { value: QUERY_AD_ATTRIBUTES.MEDIA_URL, label: 'Media Url' }, + { value: QUERY_AD_ATTRIBUTES.MIDPOINT, label: 'Midpoint' }, + { value: QUERY_AD_ATTRIBUTES.MINUTE, label: 'Minute' }, + { value: QUERY_AD_ATTRIBUTES.MIN_SUGGESTED_DURATION, label: 'Min Suggested Duration' }, + { value: QUERY_AD_ATTRIBUTES.MONTH, label: 'Month' }, + { value: QUERY_AD_ATTRIBUTES.OPERATINGSYSTEM, label: 'Operating System' }, + { value: QUERY_AD_ATTRIBUTES.OPERATINGSYSTEM_VERSION_MAJOR, label: 'Operating System Version Major' }, + { value: QUERY_AD_ATTRIBUTES.OPERATINGSYSTEM_VERSION_MINOR, label: 'Operating System Version Minor' }, + { value: QUERY_AD_ATTRIBUTES.PAGE_LOAD_TIME, label: 'Page Load Time' }, + { value: QUERY_AD_ATTRIBUTES.PAGE_LOAD_TYPE, label: 'Page Load Type' }, + { value: QUERY_AD_ATTRIBUTES.PATH, label: 'Path' }, + { value: QUERY_AD_ATTRIBUTES.PERCENTAGE_IN_VIEWPORT, label: 'Percentage In Viewport' }, + { value: QUERY_AD_ATTRIBUTES.PLATFORM, label: 'Platform' }, + { value: QUERY_AD_ATTRIBUTES.PLAYER, label: 'Player Software' }, + { value: QUERY_AD_ATTRIBUTES.PLAYER_KEY, label: 'Player Key' }, + { value: QUERY_AD_ATTRIBUTES.PLAYER_STARTUPTIME, label: 'Player Startuptime' }, + { value: QUERY_AD_ATTRIBUTES.PLAYER_TECH, label: 'Player Technology' }, + { value: QUERY_AD_ATTRIBUTES.PLAYER_VERSION, label: 'Player Software Version' }, + { value: QUERY_AD_ATTRIBUTES.PLAY_PERCENTAGE, label: 'Play Percentage' }, + { value: QUERY_AD_ATTRIBUTES.QUARTILE_1, label: 'Quartile 1' }, + { value: QUERY_AD_ATTRIBUTES.QUARTILE_3, label: 'Quartile 3' }, + { value: QUERY_AD_ATTRIBUTES.REGION, label: 'Region' }, + { value: QUERY_AD_ATTRIBUTES.SCREEN_HEIGHT, label: 'Screen Height' }, + { value: QUERY_AD_ATTRIBUTES.SCREEN_WIDTH, label: 'Screen Width' }, + { value: QUERY_AD_ATTRIBUTES.SIZE, label: 'Size' }, + { value: QUERY_AD_ATTRIBUTES.SKIPPED, label: 'Skipped' }, + { value: QUERY_AD_ATTRIBUTES.SKIP_PERCENTAGE, label: 'Skip Percentage' }, + { value: QUERY_AD_ATTRIBUTES.SKIP_POSITION, label: 'Skip Position' }, + { value: QUERY_AD_ATTRIBUTES.STARTED, label: 'Started' }, + { value: QUERY_AD_ATTRIBUTES.STREAM_FORMAT, label: 'Stream Format' }, + { value: QUERY_AD_ATTRIBUTES.SURVEY_URL, label: 'Survey Url' }, + { value: QUERY_AD_ATTRIBUTES.TIME, label: 'Time' }, + { value: QUERY_AD_ATTRIBUTES.TIME_HOVERED, label: 'Time Hovered' }, + { value: QUERY_AD_ATTRIBUTES.TIME_IN_VIEWPORT, label: 'Time In Viewport' }, + { value: QUERY_AD_ATTRIBUTES.TIME_PLAYED, label: 'Time Played' }, + { value: QUERY_AD_ATTRIBUTES.TIME_TO_FIRST_AD, label: 'Time To First Ad' }, + { value: QUERY_AD_ATTRIBUTES.TIME_UNTIL_HOVER, label: 'Time Until Hover' }, + { value: QUERY_AD_ATTRIBUTES.UNIVERSAL_AD_ID_REGISTRY, label: 'Universal Ad Id Registry' }, + { value: QUERY_AD_ATTRIBUTES.UNIVERSAL_AD_ID_VALUE, label: 'Universal Ad Id Value' }, + { value: QUERY_AD_ATTRIBUTES.USER_ID, label: 'User Id' }, + { value: QUERY_AD_ATTRIBUTES.VIDEO_BITRATE, label: 'Video Bitrate' }, + { value: QUERY_AD_ATTRIBUTES.VIDEO_ID, label: 'Video Id' }, + { value: QUERY_AD_ATTRIBUTES.VIDEO_IMPRESSION_ID, label: 'Video Impression Id' }, + { value: QUERY_AD_ATTRIBUTES.VIDEO_TITLE, label: 'Video Title' }, + { value: QUERY_AD_ATTRIBUTES.VIDEO_WINDOW_HEIGHT, label: 'Video Window Height' }, + { value: QUERY_AD_ATTRIBUTES.VIDEO_WINDOW_WIDTH, label: 'Video Window Width' }, + { value: QUERY_AD_ATTRIBUTES.YEAR, label: 'Year' }, +]; diff --git a/bitmovin-analytics-datasource/src/types/queryAttributes.ts b/bitmovin-analytics-datasource/src/types/queryAttributes.ts new file mode 100644 index 0000000..b38d92b --- /dev/null +++ b/bitmovin-analytics-datasource/src/types/queryAttributes.ts @@ -0,0 +1,277 @@ +import { SelectableValue } from '@grafana/data'; + +export enum QUERY_ATTRIBUTES { + AD = 'AD', + ANALYTICS_VERSION = 'ANALYTICS_VERSION', + AUDIO_BITRATE = 'AUDIO_BITRATE', + AUDIO_CODEC = 'AUDIO_CODEC', + AUDIO_LANGUAGE = 'AUDIO_LANGUAGE', + AUTOPLAY = 'AUTOPLAY', + BROWSER = 'BROWSER', + BROWSER_IS_BOT = 'BROWSER_IS_BOT', + BROWSER_VERSION_MAJOR = 'BROWSER_VERSION_MAJOR', + BROWSER_VERSION_MINOR = 'BROWSER_VERSION_MINOR', + BUFFERED = 'BUFFERED', + CAST_TECH = 'CAST_TECH', + CDN_PROVIDER = 'CDN_PROVIDER', + CITY = 'CITY', + CLIENT_TIME = 'CLIENT_TIME', + CONTEXT = 'CONTEXT', + COUNTRY = 'COUNTRY', + CUSTOM_DATA_10 = 'CUSTOM_DATA_10', + CUSTOM_DATA_11 = 'CUSTOM_DATA_11', + CUSTOM_DATA_12 = 'CUSTOM_DATA_12', + CUSTOM_DATA_13 = 'CUSTOM_DATA_13', + CUSTOM_DATA_14 = 'CUSTOM_DATA_14', + CUSTOM_DATA_15 = 'CUSTOM_DATA_15', + CUSTOM_DATA_16 = 'CUSTOM_DATA_16', + CUSTOM_DATA_17 = 'CUSTOM_DATA_17', + CUSTOM_DATA_18 = 'CUSTOM_DATA_18', + CUSTOM_DATA_19 = 'CUSTOM_DATA_19', + CUSTOM_DATA_1 = 'CUSTOM_DATA_1', + CUSTOM_DATA_20 = 'CUSTOM_DATA_20', + CUSTOM_DATA_21 = 'CUSTOM_DATA_21', + CUSTOM_DATA_22 = 'CUSTOM_DATA_22', + CUSTOM_DATA_23 = 'CUSTOM_DATA_23', + CUSTOM_DATA_24 = 'CUSTOM_DATA_24', + CUSTOM_DATA_25 = 'CUSTOM_DATA_25', + CUSTOM_DATA_26 = 'CUSTOM_DATA_26', + CUSTOM_DATA_27 = 'CUSTOM_DATA_27', + CUSTOM_DATA_28 = 'CUSTOM_DATA_28', + CUSTOM_DATA_29 = 'CUSTOM_DATA_29', + CUSTOM_DATA_2 = 'CUSTOM_DATA_2', + CUSTOM_DATA_30 = 'CUSTOM_DATA_30', + CUSTOM_DATA_3 = 'CUSTOM_DATA_3', + CUSTOM_DATA_4 = 'CUSTOM_DATA_4', + CUSTOM_DATA_5 = 'CUSTOM_DATA_5', + CUSTOM_DATA_6 = 'CUSTOM_DATA_6', + CUSTOM_DATA_7 = 'CUSTOM_DATA_7', + CUSTOM_DATA_8 = 'CUSTOM_DATA_8', + CUSTOM_DATA_9 = 'CUSTOM_DATA_9', + CUSTOM_USER_ID = 'CUSTOM_USER_ID', + DAY = 'DAY', + DAYPART = 'DAYPART', + DEVICE_CLASS = 'DEVICE_CLASS', + DEVICE_TYPE = 'DEVICE_TYPE', + DOMAIN = 'DOMAIN', + DOWNLOAD_SPEED = 'DOWNLOAD_SPEED', + DRM_LOAD_TIME = 'DRM_LOAD_TIME', + DRM_TYPE = 'DRM_TYPE', + DROPPED_FRAMES = 'DROPPED_FRAMES', + DURATION = 'DURATION', + ERROR_CODE = 'ERROR_CODE', + ERROR_MESSAGE = 'ERROR_MESSAGE', + ERROR_PERCENTAGE = 'ERROR_PERCENTAGE', + EXPERIMENT_NAME = 'EXPERIMENT_NAME', + FUNCTION = 'FUNCTION', + HOUR = 'HOUR', + ID = 'ID', + IMPRESSION_ID = 'IMPRESSION_ID', + INITIAL_TIME_TO_TARGET_LATENCY = 'INITIAL_TIME_TO_TARGET_LATENCY', + IP_ADDRESS = 'IP_ADDRESS', + ISP = 'ISP', + IS_CASTING = 'IS_CASTING', + IS_LIVE = 'IS_LIVE', + IS_LOW_LATENCY = 'IS_LOW_LATENCY', + IS_MUTED = 'IS_MUTED', + LANGUAGE = 'LANGUAGE', + LATENCY = 'LATENCY', + LICENSE_KEY = 'LICENSE_KEY', + M3U8_URL = 'M3U8_URL', + MINUTE = 'MINUTE', + MONTH = 'MONTH', + MPD_URL = 'MPD_URL', + OPERATINGSYSTEM = 'OPERATINGSYSTEM', + OPERATINGSYSTEM_VERSION_MAJOR = 'OPERATINGSYSTEM_VERSION_MAJOR', + OPERATINGSYSTEM_VERSION_MINOR = 'OPERATINGSYSTEM_VERSION_MINOR', + ORGANIZATION = 'ORGANIZATION', + PAGE_LOAD_TIME = 'PAGE_LOAD_TIME', + PAGE_LOAD_TYPE = 'PAGE_LOAD_TYPE', + PATH = 'PATH', + PAUSED = 'PAUSED', + PLATFORM = 'PLATFORM', + PLAYED = 'PLAYED', + PLAYER = 'PLAYER', + PLAYER_STARTUPTIME = 'PLAYER_STARTUPTIME', + PLAYER_TECH = 'PLAYER_TECH', + PLAYER_VERSION = 'PLAYER_VERSION', + PLAY_ATTEMPTS = 'PLAY_ATTEMPTS', + PROG_URL = 'PROG_URL', + REBUFFER_PERCENTAGE = 'REBUFFER_PERCENTAGE', + REGION = 'REGION', + SCALE_FACTOR = 'SCALE_FACTOR', + SCREEN_HEIGHT = 'SCREEN_HEIGHT', + SCREEN_ORIENTATION = 'SCREEN_ORIENTATION', + SCREEN_WIDTH = 'SCREEN_WIDTH', + SEEKED = 'SEEKED', + SIZE = 'SIZE', + STARTUPTIME = 'STARTUPTIME', + STATE = 'STATE', + STREAM_FORMAT = 'STREAM_FORMAT', + SUBTITLE_ENABLED = 'SUBTITLE_ENABLED', + SUBTITLE_LANGUAGE = 'SUBTITLE_LANGUAGE', + SUPPORTED_VIDEO_CODECS = 'SUPPORTED_VIDEO_CODECS', + TARGET_LATENCY = 'TARGET_LATENCY', + TARGET_LATENCY_DELTA = 'TARGET_LATENCY_DELTA', + TIME = 'TIME', + TIME_TO_TARGET_LATENCY = 'TIME_TO_TARGET_LATENCY', + USER_ID = 'USER_ID', + VIDEOSTART_FAILED = 'VIDEOSTART_FAILED', + VIDEOSTART_FAILED_REASON = 'VIDEOSTART_FAILED_REASON', + VIDEOTIME_END = 'VIDEOTIME_END', + VIDEOTIME_START = 'VIDEOTIME_START', + VIDEO_BITRATE = 'VIDEO_BITRATE', + VIDEO_CODEC = 'VIDEO_CODEC', + VIDEO_CODEC_TYPE = 'VIDEO_CODEC_TYPE', + VIDEO_DURATION = 'VIDEO_DURATION', + VIDEO_ID = 'VIDEO_ID', + VIDEO_PLAYBACK_HEIGHT = 'VIDEO_PLAYBACK_HEIGHT', + VIDEO_PLAYBACK_WIDTH = 'VIDEO_PLAYBACK_WIDTH', + VIDEO_SEGMENTS_DOWNLOADED = 'VIDEO_SEGMENTS_DOWNLOADED', + VIDEO_SEGMENTS_DOWNLOAD_SIZE = 'VIDEO_SEGMENTS_DOWNLOAD_SIZE', + VIDEO_STARTUPTIME = 'VIDEO_STARTUPTIME', + VIDEO_TITLE = 'VIDEO_TITLE', + VIDEO_WINDOW_HEIGHT = 'VIDEO_WINDOW_HEIGHT', + VIDEO_WINDOW_WIDTH = 'VIDEO_WINDOW_WIDTH', + VIEWTIME = 'VIEWTIME', + YEAR = 'YEAR', +} + +export type QueryAttribute = keyof typeof QUERY_ATTRIBUTES; + +export const SELECTABLE_QUERY_ATTRIBUTES: Array> = [ + { value: QUERY_ATTRIBUTES.AD, label: 'Ad' }, + { value: QUERY_ATTRIBUTES.ANALYTICS_VERSION, label: 'Analytics Software Version' }, + { value: QUERY_ATTRIBUTES.AUDIO_BITRATE, label: 'Audio Bitrate' }, + { value: QUERY_ATTRIBUTES.AUDIO_CODEC, label: 'Audio Codec' }, + { value: QUERY_ATTRIBUTES.AUDIO_LANGUAGE, label: 'Audio Language' }, + { value: QUERY_ATTRIBUTES.AUTOPLAY, label: 'Autoplay' }, + { value: QUERY_ATTRIBUTES.BROWSER, label: 'Browser' }, + { value: QUERY_ATTRIBUTES.BROWSER_IS_BOT, label: 'Is Bot' }, + { value: QUERY_ATTRIBUTES.BROWSER_VERSION_MAJOR, label: 'Browser Version Major' }, + { value: QUERY_ATTRIBUTES.BROWSER_VERSION_MINOR, label: 'Browser Version Minor' }, + { value: QUERY_ATTRIBUTES.BUFFERED, label: 'Buffered' }, + { value: QUERY_ATTRIBUTES.CAST_TECH, label: 'Casting Tech' }, + { value: QUERY_ATTRIBUTES.CDN_PROVIDER, label: 'Cdn Provider' }, + { value: QUERY_ATTRIBUTES.CITY, label: 'City' }, + { value: QUERY_ATTRIBUTES.CLIENT_TIME, label: 'Client Time' }, + { value: QUERY_ATTRIBUTES.CONTEXT, label: 'Context' }, + { value: QUERY_ATTRIBUTES.COUNTRY, label: 'Country' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_10, label: 'Custom Data 10' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_11, label: 'Custom Data 11' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_12, label: 'Custom Data 12' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_13, label: 'Custom Data 13' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_14, label: 'Custom Data 14' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_15, label: 'Custom Data 15' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_16, label: 'Custom Data 16' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_17, label: 'Custom Data 17' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_18, label: 'Custom Data 18' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_19, label: 'Custom Data 19' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_1, label: 'Custom Data 1' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_20, label: 'Custom Data 20' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_21, label: 'Custom Data 21' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_22, label: 'Custom Data 22' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_23, label: 'Custom Data 23' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_24, label: 'Custom Data 24' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_25, label: 'Custom Data 25' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_26, label: 'Custom Data 26' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_27, label: 'Custom Data 27' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_28, label: 'Custom Data 28' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_29, label: 'Custom Data 29' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_2, label: 'Custom Data 2' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_30, label: 'Custom Data 30' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_3, label: 'Custom Data 3' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_4, label: 'Custom Data 4' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_5, label: 'Custom Data 5' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_6, label: 'Custom Data 6' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_7, label: 'Custom Data 7' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_8, label: 'Custom Data 8' }, + { value: QUERY_ATTRIBUTES.CUSTOM_DATA_9, label: 'Custom Data 9' }, + { value: QUERY_ATTRIBUTES.CUSTOM_USER_ID, label: 'Custom User Id' }, + { value: QUERY_ATTRIBUTES.DAY, label: 'Day' }, + { value: QUERY_ATTRIBUTES.DAYPART, label: 'Daypart' }, + { value: QUERY_ATTRIBUTES.DEVICE_CLASS, label: 'Device Class' }, + { value: QUERY_ATTRIBUTES.DEVICE_TYPE, label: 'Device Type' }, + { value: QUERY_ATTRIBUTES.DOMAIN, label: 'Domain' }, + { value: QUERY_ATTRIBUTES.DOWNLOAD_SPEED, label: 'Download Speed' }, + { value: QUERY_ATTRIBUTES.DRM_LOAD_TIME, label: 'Drm Load Time' }, + { value: QUERY_ATTRIBUTES.DRM_TYPE, label: 'Drm Type' }, + { value: QUERY_ATTRIBUTES.DROPPED_FRAMES, label: 'Dropped Frames' }, + { value: QUERY_ATTRIBUTES.DURATION, label: 'Duration' }, + { value: QUERY_ATTRIBUTES.ERROR_CODE, label: 'Error Code' }, + { value: QUERY_ATTRIBUTES.ERROR_MESSAGE, label: 'Error Message' }, + { value: QUERY_ATTRIBUTES.ERROR_PERCENTAGE, label: 'Error Percentage' }, + { value: QUERY_ATTRIBUTES.EXPERIMENT_NAME, label: 'Experiment Name' }, + { value: QUERY_ATTRIBUTES.FUNCTION, label: 'Function' }, + { value: QUERY_ATTRIBUTES.HOUR, label: 'Hour' }, + { value: QUERY_ATTRIBUTES.ID, label: 'Id' }, + { value: QUERY_ATTRIBUTES.IMPRESSION_ID, label: 'Impression Id' }, + { value: QUERY_ATTRIBUTES.INITIAL_TIME_TO_TARGET_LATENCY, label: 'Initial Time to Target Latency' }, + { value: QUERY_ATTRIBUTES.IP_ADDRESS, label: 'Ip Address' }, + { value: QUERY_ATTRIBUTES.ISP, label: 'Internet Service Provider' }, + { value: QUERY_ATTRIBUTES.IS_CASTING, label: 'Casting' }, + { value: QUERY_ATTRIBUTES.IS_LIVE, label: 'Live' }, + { value: QUERY_ATTRIBUTES.IS_LOW_LATENCY, label: 'Is Low Latency' }, + { value: QUERY_ATTRIBUTES.IS_MUTED, label: 'Muted' }, + { value: QUERY_ATTRIBUTES.LANGUAGE, label: 'Language' }, + { value: QUERY_ATTRIBUTES.LATENCY, label: 'Latency' }, + { value: QUERY_ATTRIBUTES.LICENSE_KEY, label: 'License Key' }, + { value: QUERY_ATTRIBUTES.M3U8_URL, label: 'M3U8 Url' }, + { value: QUERY_ATTRIBUTES.MINUTE, label: 'Minute' }, + { value: QUERY_ATTRIBUTES.MONTH, label: 'Month' }, + { value: QUERY_ATTRIBUTES.MPD_URL, label: 'MPD Url' }, + { value: QUERY_ATTRIBUTES.OPERATINGSYSTEM, label: 'Operating System' }, + { value: QUERY_ATTRIBUTES.OPERATINGSYSTEM_VERSION_MAJOR, label: 'Operating System Version Major' }, + { value: QUERY_ATTRIBUTES.OPERATINGSYSTEM_VERSION_MINOR, label: 'Operating System Version Minor' }, + { value: QUERY_ATTRIBUTES.ORGANIZATION, label: 'Organization' }, + { value: QUERY_ATTRIBUTES.PAGE_LOAD_TIME, label: 'Page Load Time' }, + { value: QUERY_ATTRIBUTES.PAGE_LOAD_TYPE, label: 'Page Load Type' }, + { value: QUERY_ATTRIBUTES.PATH, label: 'Path' }, + { value: QUERY_ATTRIBUTES.PAUSED, label: 'Paused' }, + { value: QUERY_ATTRIBUTES.PLATFORM, label: 'Platform' }, + { value: QUERY_ATTRIBUTES.PLAYED, label: 'Played' }, + { value: QUERY_ATTRIBUTES.PLAYER, label: 'Player Software' }, + { value: QUERY_ATTRIBUTES.PLAYER_STARTUPTIME, label: 'Player Startuptime' }, + { value: QUERY_ATTRIBUTES.PLAYER_TECH, label: 'Player Technology' }, + { value: QUERY_ATTRIBUTES.PLAYER_VERSION, label: 'Player Software Version' }, + { value: QUERY_ATTRIBUTES.PLAY_ATTEMPTS, label: 'play Attempts' }, + { value: QUERY_ATTRIBUTES.PROG_URL, label: 'Prog Url' }, + { value: QUERY_ATTRIBUTES.REBUFFER_PERCENTAGE, label: 'Rebuffer Percentage' }, + { value: QUERY_ATTRIBUTES.REGION, label: 'Region' }, + { value: QUERY_ATTRIBUTES.SCALE_FACTOR, label: 'Scale Factor' }, + { value: QUERY_ATTRIBUTES.SCREEN_HEIGHT, label: 'Screen Height' }, + { value: QUERY_ATTRIBUTES.SCREEN_ORIENTATION, label: 'Screen Orientation' }, + { value: QUERY_ATTRIBUTES.SCREEN_WIDTH, label: 'Screen Width' }, + { value: QUERY_ATTRIBUTES.SEEKED, label: 'Seeked' }, + { value: QUERY_ATTRIBUTES.SIZE, label: 'Size' }, + { value: QUERY_ATTRIBUTES.STARTUPTIME, label: 'Startuptime' }, + { value: QUERY_ATTRIBUTES.STATE, label: 'State' }, + { value: QUERY_ATTRIBUTES.STREAM_FORMAT, label: 'Stream Format' }, + { value: QUERY_ATTRIBUTES.SUBTITLE_ENABLED, label: 'Subtitle Enabled' }, + { value: QUERY_ATTRIBUTES.SUBTITLE_LANGUAGE, label: 'Subtitle Language' }, + { value: QUERY_ATTRIBUTES.SUPPORTED_VIDEO_CODECS, label: 'Supported Video Codecs' }, + { value: QUERY_ATTRIBUTES.TARGET_LATENCY, label: 'Target Latency' }, + { value: QUERY_ATTRIBUTES.TARGET_LATENCY_DELTA, label: 'Target Latency Delta' }, + { value: QUERY_ATTRIBUTES.TIME, label: 'Time' }, + { value: QUERY_ATTRIBUTES.TIME_TO_TARGET_LATENCY, label: 'Time to Target Latency' }, + { value: QUERY_ATTRIBUTES.USER_ID, label: 'User Id' }, + { value: QUERY_ATTRIBUTES.VIDEOSTART_FAILED, label: 'Video Start Failed' }, + { value: QUERY_ATTRIBUTES.VIDEOSTART_FAILED_REASON, label: 'Video Start Failed Reason' }, + { value: QUERY_ATTRIBUTES.VIDEOTIME_END, label: 'Videotime End' }, + { value: QUERY_ATTRIBUTES.VIDEOTIME_START, label: 'Videotime Start' }, + { value: QUERY_ATTRIBUTES.VIDEO_BITRATE, label: 'Video Bitrate' }, + { value: QUERY_ATTRIBUTES.VIDEO_CODEC, label: 'Video Codec' }, + { value: QUERY_ATTRIBUTES.VIDEO_CODEC_TYPE, label: 'Video Codec Type' }, + { value: QUERY_ATTRIBUTES.VIDEO_DURATION, label: 'Video Duration' }, + { value: QUERY_ATTRIBUTES.VIDEO_ID, label: 'Video Id' }, + { value: QUERY_ATTRIBUTES.VIDEO_PLAYBACK_HEIGHT, label: 'Video Playback Height' }, + { value: QUERY_ATTRIBUTES.VIDEO_PLAYBACK_WIDTH, label: 'Video Playback Width' }, + { value: QUERY_ATTRIBUTES.VIDEO_SEGMENTS_DOWNLOADED, label: 'Video Segments Downloaded' }, + { value: QUERY_ATTRIBUTES.VIDEO_SEGMENTS_DOWNLOAD_SIZE, label: 'Video Segments Download Size' }, + { value: QUERY_ATTRIBUTES.VIDEO_STARTUPTIME, label: 'Video Startuptime' }, + { value: QUERY_ATTRIBUTES.VIDEO_TITLE, label: 'Video Title' }, + { value: QUERY_ATTRIBUTES.VIDEO_WINDOW_HEIGHT, label: 'Video Window Height' }, + { value: QUERY_ATTRIBUTES.VIDEO_WINDOW_WIDTH, label: 'Video Window Width' }, + { value: QUERY_ATTRIBUTES.VIEWTIME, label: 'Viewtime' }, + { value: QUERY_ATTRIBUTES.YEAR, label: 'Year' }, +];