{
    "manifestVersion": "2.0",
    "routes": [
        {
            "type": "section",
            "nav": {
                "label": "i18n:fc.inventory.sources.section",
                "icon": "outline_input"
            },
            "pages": [
                {
                    "type": "page",
                    "path": "sourcesDashboard",
                    "component": "fc.page",
                    "data": {
                        "query": "query ($barChartCompleteSummaryQuery: String!, $barChartFailedSummaryQuery: String!, $barChartSourceQuery: String!, $timeToCompleteQueueQuery: String!, $lastUpdateReceivedQuery: String!, $totalFailuresQuery: String!, $totalTableQuery: String!, $totalFailuresTableQuery: String!, $totalCompletedTableQuery: String!, $lastUpdateReceivedTableQuery: String!, $start: DateTime, $end: DateTime, $step: String!) {\n  barChartCompleteSummary: metricRange(\n    query: $barChartCompleteSummaryQuery\n    start: $start\n    step: $step\n    end: $end\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  barChartFailedSummary: metricRange(\n    query: $barChartFailedSummaryQuery\n    start: $start\n    step: $step\n    end: $end\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  barChartSource: metricRange(\n    query: $barChartSourceQuery\n    start: $start\n    step: $step\n    end: $end\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  timeToCompleteQueue: metricInstant(query: $timeToCompleteQueueQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n  lastUpdateReceived: metricInstant(query: $lastUpdateReceivedQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n  totalFailures: metricInstant(query: $totalFailuresQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n  totalTable: metricInstant(query: $totalTableQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n  totalFailuresTable: metricInstant(query: $totalFailuresTableQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n  totalCompletedTable: metricInstant(query: $totalCompletedTableQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n  lastUpdateReceivedTable: metricInstant(query: $lastUpdateReceivedTableQuery) {\n    data {\n      result {\n        metric\n        value\n      }\n    }\n  }\n}\n",
                        "variables": {
                            "barChartCompleteSummaryQuery": "sum((last_over_time(rubix_event_runtime_seconds_count{status!~\"FAILED|NO_MATCH\",         source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{getMetricStepByTimePeriod params.filter_value}}m]) - rubix_event_runtime_seconds_count{status!~\"FAILED|NO_MATCH\",         source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{getMetricStepByTimePeriod params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{status!~\"FAILED|NO_MATCH\",         source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{getMetricStepByTimePeriod params.filter_value}}m]))",
                            "barChartFailedSummaryQuery": "sum((last_over_time(rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",         source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{getMetricStepByTimePeriod params.filter_value}}m]) - rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",         source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{getMetricStepByTimePeriod params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",         source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{getMetricStepByTimePeriod params.filter_value}}m]))",
                            "barChartSourceQuery": "sum by (source) ((last_over_time(rubix_event_runtime_seconds_count{source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{getMetricStepByTimePeriod params.filter_value}}m]) - rubix_event_runtime_seconds_count{source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{getMetricStepByTimePeriod params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{getMetricStepByTimePeriod params.filter_value}}m]))",
                            "lastUpdateReceivedQuery": "max(last_over_time(core_event_last_received_seconds{   source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "timeToCompleteQueueQuery": "sum(rate(rubix_event_inflight_latency_seconds_sum{                    entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))/sum(rate(rubix_event_inflight_latency_seconds_count{account_id=\"{{activeAccount}}\",entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "totalFailuresQuery": "sum((last_over_time(rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]) - rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "totalTableQuery": "sum by (source) ((last_over_time(rubix_event_runtime_seconds_count{                    source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]) - rubix_event_runtime_seconds_count{                    source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{                    source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "totalFailuresTableQuery": "sum by (source) ((last_over_time(rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",  source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]) - rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",  source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{status=~\"FAILED|NO_MATCH\",  source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "totalCompletedTableQuery": "sum by (source) ((last_over_time(rubix_event_runtime_seconds_count{status=\"COMPLETE\",source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]) - rubix_event_runtime_seconds_count{status=\"COMPLETE\",source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"} offset {{params.filter_value}}m) or last_over_time(rubix_event_runtime_seconds_count{status=\"COMPLETE\",source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "lastUpdateReceivedTableQuery": "max by (source) (last_over_time(core_event_last_received_seconds{     source!=\"internal\", entity_type=~\"INVENTORY_CATALOGUE|INVENTORY_POSITION|INVENTORY_QUANTITY|VIRTUAL_CATALOGUE|VIRTUAL_POSITION|BATCH\"}[{{params.filter_value}}m]))",
                            "start": "{{dateFormat (dateSubtract minutes=params.filter_value) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' true _locale='en'}}",
                            "end": "{{dateFormat (dateSubtract minutes=(multiply (getMetricStepByTimePeriod params.filter_value) -1)) 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' true _locale='en'}}",
                            "step": "{{getMetricStepByTimePeriod params.filter_value}}m"
                        }
                    },
                    "nav": {
                        "label": "i18n:fc.inventory.sources.dashboard.section",
                        "icon": "insert_chart"
                    },
                    "props": {
                        "title": "i18n:fc.inventory.sources.dashboard.section"
                    },
                    "descendants": [
                        {
                            "component": "fc.page.section.header",
                            "props": {
                                "title": "i18n:fc.om.dashboard.page.nav.label"
                            },
                            "descendants": [
                                {
                                    "component": "fc.page.filter.select",
                                    "props": {
                                        "options": [
                                            {
                                                "label": "i18n:fc.inventory.filter.last30min",
                                                "value": "30"
                                            },
                                            {
                                                "label": "i18n:fc.inventory.filter.last1hour",
                                                "value": "60"
                                            },
                                            {
                                                "label": "i18n:fc.inventory.filter.last8hours",
                                                "value": "480"
                                            },
                                            {
                                                "label": "i18n:fc.inventory.filter.last24hours",
                                                "value": "1440"
                                            }
                                        ]
                                    }
                                }
                            ]
                        },
                        {
                            "component": "fc.page.section.column",
                            "props": {
                                "height": "stretch",
                                "width": "4"
                            },
                            "descendants": [
                                {
                                    "component": "fc.card.multi",
                                    "props": {
                                        "title": "i18n:fc.inventory.sources.dashboard.overview.card.status"
                                    },
                                    "descendants": [
                                        {
                                            "component": "fc.chart.gauge.wrapper.threshold",
                                            "props": {
                                                "dataSource": "barChartSource",
                                                "noCard": true,
                                                "chartContainerConfig": {
                                                    "height": 250
                                                },
                                                "settingName": "fc.chart.gauge.sources.dashboard",
                                                "timeFilterKey": "filter_value",
                                                "primaryText": "{{compactNumberFormat value}}",
                                                "secondaryText": "i18n:fc.inventory.sources.dashboard.overview.card.inventoryOutput"
                                            }
                                        },
                                        {
                                            "component": "fc.chart.bar.wrapper.source",
                                            "props": {
                                                "noCard": true,
                                                "bars": [
                                                    {
                                                        "dataKey": "i18n:fc.inventory.sources.dashboard.list.overview.column.complete.heading",
                                                        "fill": "#4A44E5",
                                                        "path": "barChartCompleteSummary"
                                                    },
                                                    {
                                                        "dataKey": "i18n:fc.inventory.sources.dashboard.list.overview.column.failed.heading",
                                                        "fill": "#DF5F5C",
                                                        "path": "barChartFailedSummary"
                                                    }
                                                ],
                                                "chartContainerConfig": {
                                                    "height": 500
                                                },
                                                "YAxis": {
                                                    "label": "i18n:fc.inventory.sources.dashboard.bar.chart.updates",
                                                    "tickFormatter": "{{compactNumberFormat value}}"
                                                },
                                                "XAxis": {
                                                    "dataKey": "name",
                                                    "label": "i18n:fc.inventory.sources.dashboard.bar.chart.time",
                                                    "tick": false
                                                },
                                                "legend": false,
                                                "tooltip": true
                                            }
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "component": "fc.page.section.column",
                            "props": {
                                "height": "stretch",
                                "width": "8"
                            },
                            "descendants": [
                                {
                                    "component": "fc.tile.metric",
                                    "props": {
                                        "label": "i18n:fc.inventory.sources.dashboard.overview.card.timeToCompleteQueue",
                                        "value": "{{timeAgo (dateSubtract ms=timeToCompleteQueue.data.result.0.value.[1])}}",
                                        "variant": "small",
                                        "width": "third"
                                    }
                                },
                                {
                                    "component": "fc.tile.metric",
                                    "props": {
                                        "label": "i18n:fc.inventory.sources.dashboard.overview.card.lastUpdate",
                                        "value": "{{timeAgo (multiply lastUpdateReceived.data.result.0.value.[1] 1000)}}",
                                        "variant": "small",
                                        "width": "third"
                                    }
                                },
                                {
                                    "component": "fc.tile.metric",
                                    "props": {
                                        "label": "i18n:fc.inventory.sources.dashboard.overview.card.totalFailures",
                                        "value": "{{compactNumberFormat (round totalFailures.data.result.0.value.[1])}}",
                                        "link": "events?eventStatus=FAILED&eventStatus=NO_MATCH&context.rootEntityType=INVENTORY_CATALOGUE&context.rootEntityType=VIRTUAL_CATALOGUE",
                                        "variant": "small",
                                        "width": "third",
                                        "options": {
                                            "styles": [
                                                {
                                                    "expression": "{{gt totalFailures.data.result.0.value.[1] 0}}",
                                                    "text": {
                                                        "color": "error"
                                                    }
                                                }
                                            ]
                                        }
                                    }
                                },
                                {
                                    "component": "fc.chart.bar.wrapper.source",
                                    "props": {
                                        "dataSource": "barChartSource",
                                        "title": "i18n:fc.inventory.sources.dashboard.overview.card.updatesBySource",
                                        "chartContainerConfig": {
                                            "maxHeight": 400,
                                            "height": 400
                                        },
                                        "YAxis": {
                                            "label": "i18n:fc.inventory.sources.dashboard.bar.chart.updates",
                                            "tickFormatter": "{{compactNumberFormat value}}"
                                        },
                                        "XAxis": {
                                            "dataKey": "name",
                                            "label": "i18n:fc.inventory.sources.dashboard.bar.chart.time",
                                            "tick": false
                                        },
                                        "legend": true,
                                        "tooltip": true
                                    }
                                }
                            ]
                        },
                        {
                            "component": "fc.page.section.header",
                            "props": {
                                "title": "i18n:fc.inventory.sources.section"
                            }
                        },
                        {
                            "component": "fc.list.wrapper.source",
                            "props": {
                                "descendants": [
                                    {
                                        "component": "fc.list",
                                        "props": {
                                            "responsiveness": "card",
                                            "hidePagination": true,
                                            "attributes": [
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.list.overview.column.source.heading",
                                                    "value": "{{node.name}}"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.list.overview.column.complete.heading",
                                                    "value": "{{#if (round node.totalCompletedTable)}}{{round node.totalCompletedTable}}{{else}}0{{/if}}"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.list.overview.column.failed.heading",
                                                    "value": "{{#if (round node.totalFailuresTable)}}{{round node.totalFailuresTable}}{{else}}0{{/if}}",
                                                    "options": {
                                                        "styles": [
                                                            {
                                                                "expression": "{{gt node.totalFailuresTable 0}}",
                                                                "text": {
                                                                    "color": "error"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.list.overview.column.total.heading",
                                                    "value": "{{#if (round node.totalTable)}}{{round node.totalTable}}{{else}}0{{/if}}"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.list.overview.column.successRate.heading",
                                                    "value": "{{#if (gt node.totalTable 0)}}{{round (multiply (divide (firstDefinedValue node.totalCompletedTable 0) node.totalTable) 100)}}%{{else}}-{{/if}}",
                                                    "options": {
                                                        "styles": [
                                                            {
                                                                "expression": "{{and (gt node.totalTable 0) (lte (round (multiply (divide (firstDefinedValue node.totalCompletedTable 0) node.totalTable) 100)) 40)}}",
                                                                "text": {
                                                                    "color": "error"
                                                                }
                                                            },
                                                            {
                                                                "expression": "{{and (gt node.totalTable 0) (and (lte (round (multiply (divide (firstDefinedValue node.totalCompletedTable 0) node.totalTable) 100)) 80) (gt (round (multiply (divide (firstDefinedValue node.totalCompletedTable 0) node.totalTable) 100)) 40))}}",
                                                                "text": {
                                                                    "color": "warning"
                                                                }
                                                            },
                                                            {
                                                                "expression": "{{and (gt node.totalTable 0) (gt (round (multiply (divide (firstDefinedValue node.totalCompletedTable 0) node.totalTable) 100)) 80)}}",
                                                                "text": {
                                                                    "color": "success"
                                                                }
                                                            }
                                                        ]
                                                    }
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.list.overview.column.lastUpdate.heading",
                                                    "value": "{{#if (gt (multiply (firstDefinedValue node.lastUpdateReceivedTable 0) 1000) (dateAdd day=-1)) }} {{dateFormat (convertMsToDate (multiply (firstDefinedValue node.lastUpdateReceivedTable 0) 1000)) }} ({{dateRelative (convertMsToDate (multiply (firstDefinedValue node.lastUpdateReceivedTable 0) 1000)) }}) {{else}} > 1 {{i18n 'fc.inventory.sources.dashboard.list.overview.column.lastUpdate.dayAgo'}}{{/if}}"
                                                }
                                            ]
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "type": "page",
                    "path": "bppDashboard",
                    "component": "fc.page",
                    "data": {
                        "query": "query ($processedTotalTableQuery: String!, $processedTotalTileQuery: String!, $changedTotalTableQuery: String!, $changedTotalTileQuery: String!, $unchangedTotalTableQuery: String!, $unchangedTotalTileQuery: String!, $completionTimeTableQuery: String!, $start: DateTime, $step: String!, $end: DateTime) {\n  processedTotalTable: metricRange(\n    query: $processedTotalTableQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  processedTotalTile: metricRange(\n    query: $processedTotalTileQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  changedTotalTable: metricRange(\n    query: $changedTotalTableQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  changedTotalTile: metricRange(\n    query: $changedTotalTileQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  unchangedTotalTable: metricRange(\n    query: $unchangedTotalTableQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  unchangedTotalTile: metricRange(\n    query: $unchangedTotalTileQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n  completionTimeTable: metricRange(\n    query: $completionTimeTableQuery\n    start: $start\n    end: $end\n    step: $step\n  ) {\n    data {\n      result {\n        metric\n        values\n      }\n    }\n  }\n}\n",
                        "variables": {
                            "processedTotalTableQuery": "sum by (run_id)((last_over_time(bpp_records_processed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_records_processed_total @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_records_processed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "processedTotalTileQuery": "sum ((last_over_time(bpp_records_processed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_records_processed_total @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_records_processed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "changedTotalTableQuery": "sum by (run_id)((last_over_time(bpp_records_changed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_records_changed_total @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_records_changed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "changedTotalTileQuery": "sum ((last_over_time(bpp_records_changed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_records_changed_total @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_records_changed_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "unchangedTotalTableQuery": "sum by (run_id)((last_over_time(bpp_records_unchanged_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_records_unchanged_total @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_records_unchanged_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "unchangedTotalTileQuery": "sum ((last_over_time(bpp_records_unchanged_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_records_unchanged_total @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_records_unchanged_total[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "completionTimeTableQuery": "max by (run_id)((last_over_time(bpp_last_run_timestamp_seconds[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}) - bpp_last_run_timestamp_seconds @ {{divide (convertISODateToMS params.start) 1000}}) or last_over_time(bpp_last_run_timestamp_seconds[{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s] offset -{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s @ {{divide (convertISODateToMS params.start) 1000}}))",
                            "start": "{{params.start}}",
                            "end": "{{params.end}}",
                            "step": "{{subtract (divide (convertISODateToMS params.end) 1000) (divide (convertISODateToMS params.start) 1000)}}s"
                        }
                    },
                    "nav": {
                        "label": "i18n:fc.inventory.sources.dashboard.bpp",
                        "icon": "filter_list"
                    },
                    "props": {
                        "title": "i18n:fc.inventory.sources.dashboard.bpp.title"
                    },
                    "descendants": [
                        {
                            "component": "fc.daterange.wrapper.forwarder",
                            "props": {
                                "keyConfig": {
                                    "from": "start",
                                    "to": "end"
                                }
                            }
                        },
                        {
                            "component": "fc.tile.metric",
                            "props": {
                                "label": "i18n:fc.inventory.sources.dashboard.bpp.overview.card.overallChangeRateEfficiency",
                                "value": "{{round (multiply (divide changedTotalTile.data.result.0.values.0.[1] processedTotalTile.data.result.0.values.0.[1]) 100)}} %",
                                "variant": "small",
                                "width": 3
                            }
                        },
                        {
                            "component": "fc.tile.metric",
                            "props": {
                                "label": "i18n:fc.inventory.sources.dashboard.bpp.overview.card.totalRecordsProcessed",
                                "value": "{{processedTotalTile.data.result.0.values.0.[1]}}",
                                "variant": "small",
                                "width": 3
                            }
                        },
                        {
                            "component": "fc.tile.metric",
                            "props": {
                                "label": "i18n:fc.inventory.sources.dashboard.bpp.overview.card.totalRecordsChanged",
                                "value": "{{changedTotalTile.data.result.0.values.0.[1]}}",
                                "variant": "small",
                                "width": 3
                            }
                        },
                        {
                            "component": "fc.tile.metric",
                            "props": {
                                "label": "i18n:fc.inventory.sources.dashboard.bpp.overview.card.totalRecordsUnchanged",
                                "value": "{{unchangedTotalTile.data.result.0.values.0.[1]}}",
                                "width": 3,
                                "variant": "small"
                            }
                        },
                        {
                            "component": "fc.list.wrapper.bppmetrics",
                            "props": {
                                "hideEmptyRecords": true,
                                "descendants": [
                                    {
                                        "component": "fc.list",
                                        "props": {
                                            "responsiveness": "card",
                                            "hidePagination": true,
                                            "attributes": [
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.bpp.list.column.completionTime.title",
                                                    "value": "{{dateFormat (convertMsToDate (multiply (firstDefinedValue node.completionTimeTable 0) 1000)) }} ({{dateRelative (convertMsToDate (multiply (firstDefinedValue node.completionTimeTable 0) 1000)) }})"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.bpp.list.column.processed.title",
                                                    "value": "{{#if (gt node.processedTotalTable 0)}} {{node.processedTotalTable}} {{else}} 0 {{/if}}"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.bpp.list.column.changed.title",
                                                    "value": "{{#if (gt node.changedTotalTable 0)}} {{node.changedTotalTable}} {{else}} 0 {{/if}}"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.bpp.list.column.unchanged.title",
                                                    "value": "{{#if (gt node.unchangedTotalTable 0)}} {{node.unchangedTotalTable}} {{else}} 0 {{/if}}"
                                                },
                                                {
                                                    "label": "i18n:fc.inventory.sources.dashboard.bpp.list.column.efficiencyPercent.title",
                                                    "value": "{{#if (gt node.efficiency 0)}} {{node.efficiency}} % {{else}} 0 % {{/if}}"
                                                }
                                            ]
                                        }
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}