diff options
40 files changed, 784 insertions, 6779 deletions
diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index ff1e1805948..a55a47c277d 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -8,16 +8,14 @@ import { GlLink, } from '@gitlab/ui'; import _ from 'underscore'; +import { mapActions, mapState } from 'vuex'; import { s__ } from '~/locale'; import Icon from '~/vue_shared/components/icon.vue'; import '~/vue_shared/mixins/is_ee'; import { getParameterValues } from '~/lib/utils/url_utility'; -import Flash from '../../flash'; -import MonitoringService from '../services/monitoring_service'; import MonitorAreaChart from './charts/area.vue'; import GraphGroup from './graph_group.vue'; import EmptyState from './empty_state.vue'; -import MonitoringStore from '../stores/monitoring_store'; import { timeWindows, timeWindowsKeyNames } from '../constants'; import { getTimeDiff } from '../utils'; @@ -128,9 +126,7 @@ export default { }, data() { return { - store: new MonitoringStore(), state: 'gettingStarted', - showEmptyState: true, elWidth: 0, selectedTimeWindow: '', selectedTimeWindowKey: '', @@ -141,13 +137,21 @@ export default { canAddMetrics() { return this.customMetricsAvailable && this.customMetricsPath.length; }, + ...mapState('monitoringDashboard', [ + 'groups', + 'emptyState', + 'showEmptyState', + 'environments', + 'deploymentData', + ]), }, created() { - this.service = new MonitoringService({ + this.setEndpoints({ metricsEndpoint: this.metricsEndpoint, - deploymentEndpoint: this.deploymentEndpoint, environmentsEndpoint: this.environmentsEndpoint, + deploymentsEndpoint: this.deploymentEndpoint, }); + this.timeWindows = timeWindows; this.selectedTimeWindowKey = _.escape(getParameterValues('time_window')[0]) || timeWindowsKeyNames.eightHours; @@ -165,31 +169,11 @@ export default { } }, mounted() { - const startEndWindow = getTimeDiff(this.timeWindows[this.selectedTimeWindowKey]); - this.servicePromises = [ - this.service - .getGraphsData(startEndWindow) - .then(data => this.store.storeMetrics(data)) - .catch(() => Flash(s__('Metrics|There was an error while retrieving metrics'))), - this.service - .getDeploymentData() - .then(data => this.store.storeDeploymentData(data)) - .catch(() => Flash(s__('Metrics|There was an error getting deployment information.'))), - ]; if (!this.hasMetrics) { - this.state = 'gettingStarted'; + this.setGettingStartedEmptyState(); } else { - if (this.environmentsEndpoint) { - this.servicePromises.push( - this.service - .getEnvironmentsData() - .then(data => this.store.storeEnvironmentsData(data)) - .catch(() => - Flash(s__('Metrics|There was an error getting environments information.')), - ), - ); - } - this.getGraphsData(); + this.fetchData(getTimeDiff(this.timeWindows.eightHours)); + sidebarMutationObserver = new MutationObserver(this.onSidebarMutation); sidebarMutationObserver.observe(document.querySelector('.layout-page'), { attributes: true, @@ -199,6 +183,11 @@ export default { } }, methods: { + ...mapActions('monitoringDashboard', [ + 'fetchData', + 'setGettingStartedEmptyState', + 'setEndpoints', + ]), getGraphAlerts(queries) { if (!this.allAlerts) return {}; const metricIdsForChart = queries.map(q => q.metricId); @@ -207,21 +196,6 @@ export default { getGraphAlertValues(queries) { return Object.values(this.getGraphAlerts(queries)); }, - getGraphsData() { - this.state = 'loading'; - Promise.all(this.servicePromises) - .then(() => { - if (this.store.groups.length < 1) { - this.state = 'noData'; - return; - } - - this.showEmptyState = false; - }) - .catch(() => { - this.state = 'unableToConnect'; - }); - }, hideAddMetricModal() { this.$refs.addMetricModal.hide(); }, @@ -263,10 +237,10 @@ export default { class="prepend-left-10 js-environments-dropdown" toggle-class="dropdown-menu-toggle" :text="currentEnvironmentName" - :disabled="store.environmentsData.length === 0" + :disabled="environments.length === 0" > <gl-dropdown-item - v-for="environment in store.environmentsData" + v-for="environment in environments" :key="environment.id" :active="environment.name === currentEnvironmentName" active-class="is-active" @@ -336,7 +310,7 @@ export default { </div> </div> <graph-group - v-for="(groupData, index) in store.groups" + v-for="(groupData, index) in groups" :key="index" :name="groupData.group" :show-panels="showPanels" @@ -345,7 +319,7 @@ export default { v-for="(graphData, graphIndex) in groupData.metrics" :key="graphIndex" :graph-data="graphData" - :deployment-data="store.deploymentData" + :deployment-data="deploymentData" :thresholds="getGraphAlertValues(graphData.queries)" :container-width="elWidth" group-id="monitor-area-chart" @@ -362,7 +336,7 @@ export default { </div> <empty-state v-else - :selected-state="state" + :selected-state="emptyState" :documentation-path="documentationPath" :settings-path="settingsPath" :clusters-path="clustersPath" diff --git a/app/assets/javascripts/monitoring/monitoring_bundle.js b/app/assets/javascripts/monitoring/monitoring_bundle.js index 08dc57d545c..57771ccf4d9 100644 --- a/app/assets/javascripts/monitoring/monitoring_bundle.js +++ b/app/assets/javascripts/monitoring/monitoring_bundle.js @@ -1,6 +1,7 @@ import Vue from 'vue'; import { parseBoolean } from '~/lib/utils/common_utils'; import Dashboard from 'ee_else_ce/monitoring/components/dashboard.vue'; +import store from './stores'; export default (props = {}) => { const el = document.getElementById('prometheus-graphs'); @@ -9,6 +10,7 @@ export default (props = {}) => { // eslint-disable-next-line no-new new Vue({ el, + store, render(createElement) { return createElement(Dashboard, { props: { diff --git a/app/assets/javascripts/monitoring/services/monitoring_service.js b/app/assets/javascripts/monitoring/services/monitoring_service.js deleted file mode 100644 index 1efa5189996..00000000000 --- a/app/assets/javascripts/monitoring/services/monitoring_service.js +++ /dev/null @@ -1,75 +0,0 @@ -import axios from '../../lib/utils/axios_utils'; -import statusCodes from '../../lib/utils/http_status'; -import { backOff } from '../../lib/utils/common_utils'; -import { s__, __ } from '../../locale'; - -const MAX_REQUESTS = 3; - -function backOffRequest(makeRequestCallback) { - let requestCounter = 0; - return backOff((next, stop) => { - makeRequestCallback() - .then(resp => { - if (resp.status === statusCodes.NO_CONTENT) { - requestCounter += 1; - if (requestCounter < MAX_REQUESTS) { - next(); - } else { - stop(new Error(__('Failed to connect to the prometheus server'))); - } - } else { - stop(resp); - } - }) - .catch(stop); - }); -} - -export default class MonitoringService { - constructor({ metricsEndpoint, deploymentEndpoint, environmentsEndpoint }) { - this.metricsEndpoint = metricsEndpoint; - this.deploymentEndpoint = deploymentEndpoint; - this.environmentsEndpoint = environmentsEndpoint; - } - - getGraphsData(params = {}) { - return backOffRequest(() => axios.get(this.metricsEndpoint, { params })) - .then(resp => resp.data) - .then(response => { - if (!response || !response.data || !response.success) { - throw new Error(s__('Metrics|Unexpected metrics data response from prometheus endpoint')); - } - return response.data; - }); - } - - getDeploymentData() { - if (!this.deploymentEndpoint) { - return Promise.resolve([]); - } - return backOffRequest(() => axios.get(this.deploymentEndpoint)) - .then(resp => resp.data) - .then(response => { - if (!response || !response.deployments) { - throw new Error( - s__('Metrics|Unexpected deployment data response from prometheus endpoint'), - ); - } - return response.deployments; - }); - } - - getEnvironmentsData() { - return axios - .get(this.environmentsEndpoint) - .then(resp => resp.data) - .then(response => { - if (!response || !response.environments) { - throw new Error( - s__('Metrics|There was an error fetching the environments data, please try again'), - ); - } - return response.environments; - }); - } -} diff --git a/app/assets/javascripts/monitoring/stores/actions.js b/app/assets/javascripts/monitoring/stores/actions.js new file mode 100644 index 00000000000..63c23e8449d --- /dev/null +++ b/app/assets/javascripts/monitoring/stores/actions.js @@ -0,0 +1,117 @@ +import * as types from './mutation_types'; +import axios from '~/lib/utils/axios_utils'; +import createFlash from '~/flash'; +import statusCodes from '../../lib/utils/http_status'; +import { backOff } from '../../lib/utils/common_utils'; +import { s__, __ } from '../../locale'; + +const MAX_REQUESTS = 3; + +function backOffRequest(makeRequestCallback) { + let requestCounter = 0; + return backOff((next, stop) => { + makeRequestCallback() + .then(resp => { + if (resp.status === statusCodes.NO_CONTENT) { + requestCounter += 1; + if (requestCounter < MAX_REQUESTS) { + next(); + } else { + stop(new Error(__('Failed to connect to the prometheus server'))); + } + } else { + stop(resp); + } + }) + .catch(stop); + }); +} + +export const setGettingStartedEmptyState = ({ commit }) => { + commit(types.SET_GETTING_STARTED_EMPTY_STATE); +}; + +export const setEndpoints = ({ commit }, endpoints) => { + commit(types.SET_ENDPOINTS, endpoints); +}; + +export const requestMetricsData = ({ commit }) => commit(types.REQUEST_METRICS_DATA); +export const receiveMetricsDataSuccess = ({ commit }, data) => + commit(types.RECEIVE_METRICS_DATA_SUCCESS, data); +export const receiveMetricsDataFailure = ({ commit }, error) => + commit(types.RECEIVE_METRICS_DATA_FAILURE, error); +export const receiveDeploymentsDataSuccess = ({ commit }, data) => + commit(types.RECEIVE_DEPLOYMENTS_DATA_SUCCESS, data); +export const receiveDeploymentsDataFailure = ({ commit }) => + commit(types.RECEIVE_DEPLOYMENTS_DATA_FAILURE); +export const receiveEnvironmentsDataSuccess = ({ commit }, data) => + commit(types.RECEIVE_ENVIRONMENTS_DATA_SUCCESS, data); +export const receiveEnvironmentsDataFailure = ({ commit }) => + commit(types.RECEIVE_ENVIRONMENTS_DATA_FAILURE); + +export const fetchData = ({ dispatch }, params) => { + dispatch('fetchMetricsData', params); + dispatch('fetchDeploymentsData'); + dispatch('fetchEnvironmentsData'); +}; + +export const fetchMetricsData = ({ state, dispatch }, params) => { + dispatch('requestMetricsData'); + + return backOffRequest(() => axios.get(state.metricsEndpoint, { params })) + .then(resp => resp.data) + .then(response => { + if (!response || !response.data || !response.success) { + dispatch('receiveMetricsDataFailure', null); + createFlash(s__('Metrics|Unexpected metrics data response from prometheus endpoint')); + } + dispatch('receiveMetricsDataSuccess', response.data); + }) + .catch(error => { + dispatch('receiveMetricsDataFailure', error); + createFlash(s__('Metrics|There was an error while retrieving metrics')); + }); +}; + +export const fetchDeploymentsData = ({ state, dispatch }) => { + if (!state.deploymentEndpoint) { + return Promise.resolve([]); + } + return backOffRequest(() => axios.get(state.deploymentEndpoint)) + .then(resp => resp.data) + .then(response => { + if (!response || !response.deployments) { + createFlash(s__('Metrics|Unexpected deployment data response from prometheus endpoint')); + } + + dispatch('receiveDeploymentsDataSuccess', response.deployments); + }) + .catch(() => { + dispatch('receiveDeploymentsDataFailure'); + createFlash(s__('Metrics|There was an error getting deployment information.')); + }); +}; + +export const fetchEnvironmentsData = ({ state, dispatch }) => { + if (!state.environmentsEndpoint) { + return Promise.resolve([]); + } + return axios + .get(state.environmentsEndpoint) + .then(resp => resp.data) + .then(response => { + if (!response || !response.environments) { + createFlash( + s__('Metrics|There was an error fetching the environments data, please try again'), + ); + } + dispatch('receiveEnvironmentsDataSuccess', response.environments); + }) + .catch(() => { + dispatch('receiveEnvironmentsDataFailure'); + createFlash(s__('Metrics|There was an error getting environments information.')); + }); +}; + +// prevent babel-plugin-rewire from generating an invalid default during karma tests +export default () => {}; diff --git a/app/assets/javascripts/monitoring/stores/index.js b/app/assets/javascripts/monitoring/stores/index.js new file mode 100644 index 00000000000..d58398c54ae --- /dev/null +++ b/app/assets/javascripts/monitoring/stores/index.js @@ -0,0 +1,21 @@ +import Vue from 'vue'; +import Vuex from 'vuex'; +import * as actions from './actions'; +import mutations from './mutations'; +import state from './state'; + +Vue.use(Vuex); + +export const createStore = () => + new Vuex.Store({ + modules: { + monitoringDashboard: { + namespaced: true, + actions, + mutations, + state, + }, + }, + }); + +export default createStore(); diff --git a/app/assets/javascripts/monitoring/stores/mutation_types.js b/app/assets/javascripts/monitoring/stores/mutation_types.js new file mode 100644 index 00000000000..74c4ae64712 --- /dev/null +++ b/app/assets/javascripts/monitoring/stores/mutation_types.js @@ -0,0 +1,15 @@ +export const REQUEST_METRICS_DATA = 'REQUEST_METRICS_DATA'; +export const RECEIVE_METRICS_DATA_SUCCESS = 'RECEIVE_METRICS_DATA_SUCCESS'; +export const RECEIVE_METRICS_DATA_FAILURE = 'RECEIVE_METRICS_DATA_FAILURE'; +export const REQUEST_DEPLOYMENTS_DATA = 'REQUEST_DEPLOYMENTS_DATA'; +export const RECEIVE_DEPLOYMENTS_DATA_SUCCESS = 'RECEIVE_DEPLOYMENTS_DATA_SUCCESS'; +export const RECEIVE_DEPLOYMENTS_DATA_FAILURE = 'RECEIVE_DEPLOYMENTS_DATA_FAILURE'; +export const REQUEST_ENVIRONMENTS_DATA = 'REQUEST_ENVIRONMENTS_DATA'; +export const RECEIVE_ENVIRONMENTS_DATA_SUCCESS = 'RECEIVE_ENVIRONMENTS_DATA_SUCCESS'; +export const RECEIVE_ENVIRONMENTS_DATA_FAILURE = 'RECEIVE_ENVIRONMENTS_DATA_FAILURE'; +export const SET_TIME_WINDOW = 'SET_TIME_WINDOW'; +export const SET_METRICS_ENDPOINT = 'SET_METRICS_ENDPOINT'; +export const SET_ENVIRONMENTS_ENDPOINT = 'SET_ENVIRONMENTS_ENDPOINT'; +export const SET_DEPLOYMENTS_ENDPOINT = 'SET_DEPLOYMENTS_ENDPOINT'; +export const SET_ENDPOINTS = 'SET_ENDPOINTS'; +export const SET_GETTING_STARTED_EMPTY_STATE = 'SET_GETTING_STARTED_EMPTY_STATE'; diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js new file mode 100644 index 00000000000..c1779333d75 --- /dev/null +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -0,0 +1,45 @@ +import * as types from './mutation_types'; +import { normalizeMetrics, sortMetrics } from './utils'; + +export default { + [types.REQUEST_METRICS_DATA](state) { + state.emptyState = 'loading'; + state.showEmptyState = true; + }, + [types.RECEIVE_METRICS_DATA_SUCCESS](state, groupData) { + state.groups = groupData.map(group => ({ + ...group, + metrics: normalizeMetrics(sortMetrics(group.metrics)), + })); + + if (!state.groups.length) { + state.emptyState = 'noData'; + } else { + state.showEmptyState = false; + } + }, + [types.RECEIVE_METRICS_DATA_FAILURE](state, error) { + state.emptyState = error ? 'unableToConnect' : 'noData'; + state.showEmptyState = true; + }, + [types.RECEIVE_DEPLOYMENTS_DATA_SUCCESS](state, deployments) { + state.deploymentData = deployments; + }, + [types.RECEIVE_DEPLOYMENTS_DATA_FAILURE](state) { + state.deploymentData = []; + }, + [types.RECEIVE_ENVIRONMENTS_DATA_SUCCESS](state, environments) { + state.environments = environments; + }, + [types.RECEIVE_ENVIRONMENTS_DATA_FAILURE](state) { + state.environments = []; + }, + [types.SET_ENDPOINTS](state, endpoints) { + state.metricsEndpoint = endpoints.metricsEndpoint; + state.environmentsEndpoint = endpoints.environmentsEndpoint; + state.deploymentsEndpoint = endpoints.deploymentsEndpoint; + }, + [types.SET_GETTING_STARTED_EMPTY_STATE](state) { + state.emptyState = 'gettingStarted'; + }, +}; diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js new file mode 100644 index 00000000000..5103122612a --- /dev/null +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -0,0 +1,12 @@ +export default () => ({ + hasMetrics: false, + showPanels: true, + metricsEndpoint: null, + environmentsEndpoint: null, + deploymentsEndpoint: null, + emptyState: 'gettingStarted', + showEmptyState: true, + groups: [], + deploymentData: [], + environments: [], +}); diff --git a/app/assets/javascripts/monitoring/stores/monitoring_store.js b/app/assets/javascripts/monitoring/stores/utils.js index 013fb0d4540..9216554ecbf 100644 --- a/app/assets/javascripts/monitoring/stores/monitoring_store.js +++ b/app/assets/javascripts/monitoring/stores/utils.js @@ -1,12 +1,5 @@ import _ from 'underscore'; -function sortMetrics(metrics) { - return _.chain(metrics) - .sortBy('title') - .sortBy('weight') - .value(); -} - function checkQueryEmptyData(query) { return { ...query, @@ -59,7 +52,13 @@ function groupQueriesByChartInfo(metrics) { return Object.values(metricsByChart); } -function normalizeMetrics(metrics) { +export const sortMetrics = metrics => + _.chain(metrics) + .sortBy('title') + .sortBy('weight') + .value(); + +export const normalizeMetrics = metrics => { const groupedMetrics = groupQueriesByChartInfo(metrics); return groupedMetrics.map(metric => { @@ -81,31 +80,4 @@ function normalizeMetrics(metrics) { queries: removeTimeSeriesNoData(queries), }; }); -} - -export default class MonitoringStore { - constructor() { - this.groups = []; - this.deploymentData = []; - this.environmentsData = []; - } - - storeMetrics(groups = []) { - this.groups = groups.map(group => ({ - ...group, - metrics: normalizeMetrics(sortMetrics(group.metrics)), - })); - } - - storeDeploymentData(deploymentData = []) { - this.deploymentData = deploymentData; - } - - storeEnvironmentsData(environmentsData = []) { - this.environmentsData = environmentsData.filter(environment => !!environment.last_deployment); - } - - getMetricsCount() { - return this.groups.reduce((count, group) => count + group.metrics.length, 0); - } -} +}; diff --git a/app/models/clusters/applications/runner.rb b/app/models/clusters/applications/runner.rb index 01711e477b1..0dff91c3fe2 100644 --- a/app/models/clusters/applications/runner.rb +++ b/app/models/clusters/applications/runner.rb @@ -3,7 +3,7 @@ module Clusters module Applications class Runner < ApplicationRecord - VERSION = '0.5.0'.freeze + VERSION = '0.5.1'.freeze self.table_name = 'clusters_applications_runners' diff --git a/app/models/repository.rb b/app/models/repository.rb index e05d3dd58ac..d43f991bb3e 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1077,7 +1077,7 @@ class Repository end def rebase(user, merge_request) - if Feature.disabled?(:two_step_rebase, default_enabled: true) + if Feature.disabled?(:two_step_rebase, default_enabled: false) return rebase_deprecated(user, merge_request) end diff --git a/app/views/projects/registry/repositories/_tag.html.haml b/app/views/projects/registry/repositories/_tag.html.haml index a4cde53e8c6..9594c9184a2 100644 --- a/app/views/projects/registry/repositories/_tag.html.haml +++ b/app/views/projects/registry/repositories/_tag.html.haml @@ -1,7 +1,7 @@ %tr.tag %td = escape_once(tag.name) - = clipboard_button(text: "docker pull #{tag.location}") + = clipboard_button(text: "#{tag.location}") %td - if tag.revision %span.has-tooltip{ title: "#{tag.revision}" } diff --git a/changelogs/unreleased/11609-geo-remove-support-for-using-geo-with-an-installation-from-source-docs.yml b/changelogs/unreleased/11609-geo-remove-support-for-using-geo-with-an-installation-from-source-docs.yml new file mode 100644 index 00000000000..6570cb3e2a3 --- /dev/null +++ b/changelogs/unreleased/11609-geo-remove-support-for-using-geo-with-an-installation-from-source-docs.yml @@ -0,0 +1,5 @@ +--- +title: Remove support for using Geo with an installation from source +merge_request: 28737 +author: +type: other diff --git a/changelogs/unreleased/28757-remove-docker-pull-prefix-when-copying-a-tag-from-the-registry.yml b/changelogs/unreleased/28757-remove-docker-pull-prefix-when-copying-a-tag-from-the-registry.yml new file mode 100644 index 00000000000..e954b97f05b --- /dev/null +++ b/changelogs/unreleased/28757-remove-docker-pull-prefix-when-copying-a-tag-from-the-registry.yml @@ -0,0 +1,5 @@ +--- +title: Remove `docker pull` prefix when copying a tag from the registry +merge_request: 28757 +author: Benedikt Franke +type: changed diff --git a/changelogs/unreleased/dm-disable-two-step-rebase.yml b/changelogs/unreleased/dm-disable-two-step-rebase.yml new file mode 100644 index 00000000000..342d61a20d6 --- /dev/null +++ b/changelogs/unreleased/dm-disable-two-step-rebase.yml @@ -0,0 +1,5 @@ +--- +title: Disable two-step rebase which could cause rebases to hang +merge_request: 28778 +author: +type: other diff --git a/changelogs/unreleased/fix-autodevops-postgres-versioning.yml b/changelogs/unreleased/fix-autodevops-postgres-versioning.yml new file mode 100644 index 00000000000..8ddc70f6314 --- /dev/null +++ b/changelogs/unreleased/fix-autodevops-postgres-versioning.yml @@ -0,0 +1,5 @@ +--- +title: Fixed ignored postgres version that occurs after the first autodevops deploy when specifying custom $POSTGRES_VERSION +merge_request: 28735 +author: Brandon Dimcheff +type: fixed diff --git a/changelogs/unreleased/jivl-migrate-dashboard-store-vuex.yml b/changelogs/unreleased/jivl-migrate-dashboard-store-vuex.yml new file mode 100644 index 00000000000..dc4edbc058f --- /dev/null +++ b/changelogs/unreleased/jivl-migrate-dashboard-store-vuex.yml @@ -0,0 +1,5 @@ +--- +title: Migrate the monitoring dashboard store to vuex +merge_request: 28555 +author: +type: other diff --git a/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-1.yml b/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-1.yml new file mode 100644 index 00000000000..dd71aa7d461 --- /dev/null +++ b/changelogs/unreleased/update-gitlab-runner-helm-chart-to-0-5-1.yml @@ -0,0 +1,5 @@ +--- +title: Update GitLab Runner Helm Chart to 0.5.1 +merge_request: 28720 +author: +type: other diff --git a/doc/administration/geo/disaster_recovery/background_verification.md b/doc/administration/geo/disaster_recovery/background_verification.md index c7299b6e196..d4c8c2d3624 100644 --- a/doc/administration/geo/disaster_recovery/background_verification.md +++ b/doc/administration/geo/disaster_recovery/background_verification.md @@ -29,12 +29,7 @@ the node more time before scheduling a planned failover. Run the following commands in a Rails console on the **primary** node: ```sh -# Omnibus GitLab gitlab-rails console - -# Installation from source -cd /home/git/gitlab -sudo -u git -H bin/rails console RAILS_ENV=production ``` To check if automatic background verification is enabled: @@ -102,12 +97,7 @@ disable if you need. Run the following commands in a Rails console on the **primary** node: ```sh -# Omnibus GitLab gitlab-rails console - -# Installation from source -cd /home/git/gitlab -sudo -u git -H bin/rails console RAILS_ENV=production ``` To disable automatic background re-verification: @@ -131,31 +121,15 @@ to be resynced without the backoff period: For repositories: -- Omnibus Installation - - ```sh - sudo gitlab-rake geo:verification:repository:reset - ``` - -- Source Installation - - ```sh - sudo -u git -H bundle exec rake geo:verification:repository:reset RAILS_ENV=production - ``` +```sh +sudo gitlab-rake geo:verification:repository:reset +``` For wikis: -- Omnibus Installation - - ```sh - sudo gitlab-rake geo:verification:wiki:reset - ``` - -- Source Installation - - ```sh - sudo -u git -H bundle exec rake geo:verification:wiki:reset RAILS_ENV=production - ``` +```sh +sudo gitlab-rake geo:verification:wiki:reset +``` ## Reconcile differences with checksum mismatches @@ -169,7 +143,7 @@ If the **primary** and **secondary** nodes have a checksum verification mismatch 1. On the project admin page get the **Gitaly storage name**, and **Gitaly relative path**: ![Project admin page](img/checksum-differences-admin-project-page.png) -1. Navigate to the project's repository directory on both **primary** and **secondary** nodes. For an installation from source, the path is usually `/home/git/repositories`. For Omnibus installs, the path is usually `/var/opt/gitlab/git-data/repositories`. Note that if `git_data_dirs` is customized, check the directory layout on your server to be sure. +1. Navigate to the project's repository directory on both **primary** and **secondary** nodes (the path is usually `/var/opt/gitlab/git-data/repositories`). Note that if `git_data_dirs` is customized, check the directory layout on your server to be sure. ```sh cd /var/opt/gitlab/git-data/repositories diff --git a/doc/administration/geo/replication/configuration.md b/doc/administration/geo/replication/configuration.md index 57735b21cda..3d4f69d3abe 100644 --- a/doc/administration/geo/replication/configuration.md +++ b/doc/administration/geo/replication/configuration.md @@ -1,9 +1,4 @@ -# Geo configuration (GitLab Omnibus) **[PREMIUM ONLY]** - -NOTE: **Note:** -This is the documentation for the Omnibus GitLab packages. For installations -from source, follow the [**Geo nodes configuration for installations -from source**][configuration-source] guide. +# Geo configuration **[PREMIUM ONLY]** ## Configuring a new **secondary** node @@ -303,7 +298,6 @@ See the [updating the Geo nodes document](updating_the_geo_nodes.md). See the [troubleshooting document](troubleshooting.md). -[configuration-source]: configuration_source.md [setup-geo-omnibus]: index.md#using-omnibus-gitlab [Hashed Storage]: ../../repository_storage_types.md [Disaster Recovery]: ../disaster_recovery/index.md diff --git a/doc/administration/geo/replication/configuration_source.md b/doc/administration/geo/replication/configuration_source.md deleted file mode 100644 index 10dd9405b4b..00000000000 --- a/doc/administration/geo/replication/configuration_source.md +++ /dev/null @@ -1,172 +0,0 @@ -# Geo configuration (source) **[PREMIUM ONLY]** - -NOTE: **Note:** -This documentation applies to GitLab source installations. In GitLab 11.5, this documentation was deprecated and will be removed in a future release. -Please consider [migrating to GitLab Omnibus install](https://docs.gitlab.com/omnibus/update/convert_to_omnibus.html). For installations -using the Omnibus GitLab packages, follow the -[**Omnibus Geo nodes configuration**][configuration] guide. - -## Configuring a new **secondary** node - -NOTE: **Note:** -This is the final step in setting up a **secondary** node. Stages of the setup -process must be completed in the documented order. Before attempting the steps -in this stage, [complete all prior stages](index.md#using-gitlab-installed-from-source-deprecated). - -The basic steps of configuring a **secondary** node are to: - -- Replicate required configurations between the **primary** and **secondary** nodes. -- Configure a tracking database on each **secondary** node. -- Start GitLab on the **secondary** node. - -You are encouraged to first read through all the steps before executing them -in your testing/production environment. - -NOTE: **Note:** -**Do not** set up any custom authentication on **secondary** nodes, this will be handled by the **primary** node. - -NOTE: **Note:** -**Do not** add anything in the **secondary** node's admin area (**Admin Area > Geo**). This is handled solely by the **primary** node. - -### Step 1. Manually replicate secret GitLab values - -GitLab stores a number of secret values in the `/home/git/gitlab/config/secrets.yml` -file which *must* match between the **primary** and **secondary** nodes. Until there is -a means of automatically replicating these between nodes (see [gitlab-org/gitlab-ee#3789]), they must -be manually replicated to **secondary** nodes. - -1. SSH into the **primary** node, and execute the command below: - - ```sh - sudo cat /home/git/gitlab/config/secrets.yml - ``` - - This will display the secrets that need to be replicated, in YAML format. - -1. SSH into the **secondary** node and login as the `git` user: - - ```sh - sudo -i -u git - ``` - -1. Make a backup of any existing secrets: - - ```sh - mv /home/git/gitlab/config/secrets.yml /home/git/gitlab/config/secrets.yml.`date +%F` - ``` - -1. Copy `/home/git/gitlab/config/secrets.yml` from the **primary** node to the **secondary** node, or - copy-and-paste the file contents between nodes: - - ```sh - sudo editor /home/git/gitlab/config/secrets.yml - - # paste the output of the `cat` command you ran on the primary - # save and exit - ``` - -1. Ensure the file permissions are correct: - - ```sh - chown git:git /home/git/gitlab/config/secrets.yml - chmod 0600 /home/git/gitlab/config/secrets.yml - ``` - -1. Restart GitLab - - ```sh - service gitlab restart - ``` - -Once restarted, the **secondary** node will automatically start replicating missing data -from the **primary** node in a process known as backfill. Meanwhile, the **primary** node -will start to notify the **secondary** node of any changes, so that the **secondary** node can -act on those notifications immediately. - -Make sure the **secondary** node is running and accessible. You can login to -the **secondary** node with the same credentials as used for the **primary** node. - -### Step 2. Manually replicate the **primary** node's SSH host keys - -Read [Manually replicate the **primary** node's SSH host keys](configuration.md#step-2-manually-replicate-the-primary-nodes-ssh-host-keys) - -### Step 3. Add the **secondary** GitLab node - -1. Navigate to the **primary** node's **Admin Area > Geo** - (`/admin/geo/nodes`) in your browser. -1. Add the **secondary** node by providing its full URL. **Do NOT** check the - **This is a primary node** checkbox. -1. Optionally, choose which namespaces should be replicated by the - **secondary** node. Leave blank to replicate all. Read more in - [selective synchronization](#selective-synchronization). -1. Click the **Add node** button. -1. SSH into your GitLab **secondary** server and restart the services: - - ```sh - service gitlab restart - ``` - - Check if there are any common issue with your Geo setup by running: - - ```sh - bundle exec rake gitlab:geo:check - ``` - -1. SSH into your GitLab **primary** server and login as root to verify the - **secondary** node is reachable or there are any common issue with your Geo setup: - - ```sh - bundle exec rake gitlab:geo:check - ``` - -Once reconfigured, the **secondary** node will automatically start -replicating missing data from the **primary** node in a process known as backfill. -Meanwhile, the **primary** node will start to notify the **secondary** node of any changes, so -that the **secondary** node can act on those notifications immediately. - -Make sure the **secondary** node is running and accessible. -You can log in to the **secondary** node with the same credentials as used for the **primary** node. - -### Step 4. Enabling Hashed Storage - -Read [Enabling Hashed Storage](configuration.md#step-4-enabling-hashed-storage). - -### Step 5. (Optional) Configuring the secondary to trust the primary - -You can safely skip this step if your **primary** node uses a CA-issued HTTPS certificate. - -If your **primary** node is using a self-signed certificate for *HTTPS* support, you will -need to add that certificate to the **secondary** node's trust store. Retrieve the -certificate from the **primary** node and follow your distribution's instructions for -adding it to the **secondary** node's trust store. In Debian/Ubuntu, you would follow these steps: - -```sh -sudo -i -cp <primary_node_certification_file> /usr/local/share/ca-certificates -update-ca-certificates -``` - -### Step 6. Enable Git access over HTTP/HTTPS - -Geo synchronizes repositories over HTTP/HTTPS, and therefore requires this clone -method to be enabled. Navigate to **Admin Area > Settings** -(`/admin/application_settings`) on the **primary** node, and set -`Enabled Git access protocols` to `Both SSH and HTTP(S)` or `Only HTTP(S)`. - -### Step 7. Verify proper functioning of the secondary node - -Read [Verify proper functioning of the secondary node][configuration-verify-node]. - -## Selective synchronization - -Read [Selective synchronization][configuration-selective-replication]. - -## Troubleshooting - -Read the [troubleshooting document][troubleshooting]. - -[gitlab-org/gitlab-ee#3789]: https://gitlab.com/gitlab-org/gitlab-ee/issues/3789 -[configuration]: configuration.md -[configuration-selective-replication]: configuration.md#selective-synchronization -[configuration-verify-node]: configuration.md#step-7-verify-proper-functioning-of-the-secondary-node -[troubleshooting]: troubleshooting.md diff --git a/doc/administration/geo/replication/database.md b/doc/administration/geo/replication/database.md index e57583a3bf9..a0c2cf0eced 100644 --- a/doc/administration/geo/replication/database.md +++ b/doc/administration/geo/replication/database.md @@ -1,9 +1,7 @@ -# Geo database replication (GitLab Omnibus) **[PREMIUM ONLY]** +# Geo database replication **[PREMIUM ONLY]** NOTE: **Note:** -This is the documentation for the Omnibus GitLab packages. For installations -from source, follow the -[Geo database replication (source)](database_source.md) guide. +The following steps are for Omnibus installs only. Using Geo with source-based installs was **deprecated** in GitLab 11.5. NOTE: **Note:** If your GitLab installation uses external (not managed by Omnibus) PostgreSQL @@ -102,10 +100,15 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o else. If you are using an external database not managed by Omnibus GitLab, you need - to create the replicator user and define a password to it manually. - For information on how to create a replication user, refer to the - [appropriate step](database_source.md#step-1-configure-the-primary-server) - in [Geo database replication (source)](database_source.md). + to create the replicator user and define a password to it manually: + + ```sql + --- Create a new user 'replicator' + CREATE USER gitlab_replicator; + + --- Set/change a password and grants replication privilege + ALTER USER gitlab_replicator WITH REPLICATION ENCRYPTED PASSWORD '<replication_password>'; + ``` 1. Configure PostgreSQL to listen on network interfaces: @@ -340,7 +343,7 @@ There is an [issue where support is being discussed](https://gitlab.com/gitlab-o ## ## Secondary address - ## - replace '<secondary_node_ip>' with the public or VPC address of your Geo secondary node + ## - replace '<secondary_node_ip>' with the public or VPC address of your Geo secondary node ## postgresql['listen_address'] = '<secondary_node_ip>' postgresql['md5_auth_cidr_addresses'] = ['<secondary_node_ip>/32'] @@ -383,8 +386,7 @@ the database on the **primary** node, replicates the database, and creates the needed files for streaming replication. The directories used are the defaults that are set up in Omnibus. If you have -changed any defaults or are using a source installation, configure it as you -see fit replacing the directories and paths. +changed any defaults, configure it as you see fit replacing the directories and paths. CAUTION: **Warning:** Make sure to run this on the **secondary** server as it removes all PostgreSQL's diff --git a/doc/administration/geo/replication/database_source.md b/doc/administration/geo/replication/database_source.md deleted file mode 100644 index 67cf8b6535f..00000000000 --- a/doc/administration/geo/replication/database_source.md +++ /dev/null @@ -1,439 +0,0 @@ -# Geo database replication (source) **[PREMIUM ONLY]** - -NOTE: **Note:** -This documentation applies to GitLab source installations. In GitLab 11.5, this documentation was deprecated and will be removed in a future release. -Please consider [migrating to GitLab Omnibus install](https://docs.gitlab.com/omnibus/update/convert_to_omnibus.html). For installations -using the Omnibus GitLab packages, follow the -[**database replication for Omnibus GitLab**][database] guide. - -NOTE: **Note:** -The stages of the setup process must be completed in the documented order. -Before attempting the steps in this stage, [complete all prior stages](index.md#using-gitlab-installed-from-source-deprecated). - -This document describes the minimal steps you have to take in order to -replicate your **primary** GitLab database to a **secondary** node's database. You may -have to change some values according to your database setup, how big it is, etc. - -You are encouraged to first read through all the steps before executing them -in your testing/production environment. - -## PostgreSQL replication - -The GitLab **primary** node where the write operations happen will connect to -**primary** database server, and the **secondary** ones which are read-only will -connect to **secondary** database servers (which are read-only too). - -NOTE: **Note:** -In many databases' documentation, you will see "**primary**" being referenced as "master" -and "**secondary**" as either "slave" or "standby" server (read-only). - -We recommend using [PostgreSQL replication slots][replication-slots-article] -to ensure the **primary** node retains all the data necessary for the secondaries to -recover. See below for more details. - -The following guide assumes that: - -- You are using PostgreSQL 9.6 or later which includes the - [`pg_basebackup` tool][pgback] and improved [Foreign Data Wrapper][FDW] support. -- You have a **primary** node already set up (the GitLab server you are - replicating from), running PostgreSQL 9.6 or later, and - you have a new **secondary** server set up with the same versions of the OS, - PostgreSQL, and GitLab on all nodes. -- The IP of the **primary** server for our examples is `198.51.100.1`, whereas the - **secondary** node's IP is `198.51.100.2`. Note that the **primary** and **secondary** servers - **must** be able to communicate over these addresses. These IP addresses can either - be public or private. - -CAUTION: **Warning:** -Geo works with streaming replication. Logical replication is not supported at this time. -There is an [issue where support is being discussed](https://gitlab.com/gitlab-org/gitlab-ee/issues/7420). - -### Step 1. Configure the **primary** server - -1. SSH into your GitLab **primary** server and login as root: - - ```sh - sudo -i - ``` - -1. Add this node as the Geo **primary** by running: - - ```sh - bundle exec rake geo:set_primary_node - ``` - -1. Create a [replication user] named `gitlab_replicator`: - - ```sql - --- Create a new user 'replicator' - CREATE USER gitlab_replicator; - - --- Set/change a password and grants replication privilege - ALTER USER gitlab_replicator WITH REPLICATION ENCRYPTED PASSWORD '<replication_password>'; - ``` - -1. Make sure your the `gitlab` database user has a password defined: - - ```sh - sudo \ - -u postgres psql \ - -d template1 \ - -c "ALTER USER gitlab WITH ENCRYPTED PASSWORD '<database_password>';" - ``` - -1. Edit the content of `database.yml` in `production:` and add the password like the example below: - - ```yaml - # - # PRODUCTION - # - production: - adapter: postgresql - encoding: unicode - database: gitlabhq_production - pool: 10 - username: gitlab - password: <database_password> - host: /var/opt/gitlab/geo-postgresql - ``` - -1. Set up TLS support for the PostgreSQL **primary** server: - - CAUTION: **Warning**: - Only skip this step if you **know** that PostgreSQL traffic - between the **primary** and **secondary** nodes will be secured through some other - means, e.g., a known-safe physical network path or a site-to-site VPN that - you have configured. - - If you are replicating your database across the open Internet, it is - **essential** that the connection is TLS-secured. Correctly configured, this - provides protection against both passive eavesdroppers and active - "man-in-the-middle" attackers. - - To generate a self-signed certificate and key, run this command: - - ```sh - openssl req \ - -nodes \ - -batch \ - -x509 \ - -newkey rsa:4096 \ - -keyout server.key \ - -out server.crt \ - -days 3650 - ``` - - This will create two files - `server.key` and `server.crt` - that you can - use for authentication. - - Copy them to the correct location for your PostgreSQL installation: - - ```sh - # Copying a self-signed certificate and key - install -o postgres -g postgres -m 0400 -T server.crt ~postgres/9.x/main/data/server.crt - install -o postgres -g postgres -m 0400 -T server.key ~postgres/9.x/main/data/server.key - ``` - - Add this configuration to `postgresql.conf`, removing any existing - configuration for `ssl_cert_file` or `ssl_key_file`: - - ``` - ssl = on - ssl_cert_file='server.crt' - ssl_key_file='server.key' - ``` - -1. Edit `postgresql.conf` to configure the **primary** server for streaming replication - (for Debian/Ubuntu that would be `/etc/postgresql/9.x/main/postgresql.conf`): - - ``` - listen_address = '<primary_node_ip>' - wal_level = hot_standby - max_wal_senders = 5 - min_wal_size = 80MB - max_wal_size = 1GB - max_replicaton_slots = 1 # Number of Geo secondary nodes - wal_keep_segments = 10 - hot_standby = on - ``` - - NOTE: **Note**: - Be sure to set `max_replication_slots` to the number of Geo **secondary** - nodes that you may potentially have (at least 1). - - For security reasons, PostgreSQL by default only listens on the local - interface (e.g. 127.0.0.1). However, Geo needs to communicate - between the **primary** and **secondary** nodes over a common network, such as a - corporate LAN or the public Internet. For this reason, we need to - configure PostgreSQL to listen on more interfaces. - - The `listen_address` option opens PostgreSQL up to external connections - with the interface corresponding to the given IP. See [the PostgreSQL - documentation][pg-docs-runtime-conn] for more details. - - You may also want to edit the `wal_keep_segments` and `max_wal_senders` to - match your database replication requirements. Consult the - [PostgreSQL - Replication documentation][pg-docs-runtime-replication] for more information. - -1. Set the access control on the **primary** node to allow TCP connections using the - server's public IP and set the connection from the **secondary** node to require a - password. Edit `pg_hba.conf` (for Debian/Ubuntu that would be - `/etc/postgresql/9.x/main/pg_hba.conf`): - - ```sh - host all all <primary_node_ip>/32 md5 - host replication gitlab_replicator <secondary_node_ip>/32 md5 - ``` - - If you want to add another secondary, add one more row like the replication - one and change the IP address: - - ```sh - host all all <primary_node_ip>/32 md5 - host replication gitlab_replicator <secondary_node_ip>/32 md5 - host replication gitlab_replicator <another_secondary_node_ip>/32 md5 - ``` - -1. Restart PostgreSQL for the changes to take effect. - -1. Choose a database-friendly name to use for your secondary to use as the - replication slot name. For example, if your domain is - `secondary.geo.example.com`, you may use `secondary_example` as the slot - name. - -1. Create the replication slot on the **primary** node: - - ```sh - $ sudo -u postgres psql -c "SELECT * FROM pg_create_physical_replication_slot('secondary_example');" - slot_name | xlog_position - ------------------+--------------- - secondary_example | - (1 row) - ``` - -1. Now that the PostgreSQL server is set up to accept remote connections, run - `netstat -plnt` to make sure that PostgreSQL is listening to the server's - public IP. - -### Step 2. Configure the secondary server - -Follow the first steps in ["configure the secondary server"][database-replication] and note that since you are installing from source, the username and -group listed as `gitlab-psql` in those steps should be replaced by `postgres` -instead. After completing the "Test that the `gitlab-psql` user can connect to -the **primary** node's database" step, continue here: - -1. Edit `postgresql.conf` to configure the secondary for streaming replication - (for Debian/Ubuntu that would be `/etc/postgresql/9.*/main/postgresql.conf`): - - ```sh - wal_level = hot_standby - max_wal_senders = 5 - checkpoint_segments = 10 - wal_keep_segments = 10 - hot_standby = on - ``` - -1. Restart PostgreSQL for the changes to take effect. - -#### Enable tracking database on the secondary server - -Geo secondary nodes use a tracking database to keep track of replication status -and recover automatically from some replication issues. Follow the steps below to create -the tracking database. - -1. On the secondary node, run the following command to create `database_geo.yml` with the - information of your secondary PostgreSQL instance: - - ```sh - sudo cp /home/git/gitlab/config/database_geo.yml.postgresql /home/git/gitlab/config/database_geo.yml - ``` - -1. Edit the content of `database_geo.yml` in `production:` as in the example below: - - ```yaml - # - # PRODUCTION - # - production: - adapter: postgresql - encoding: unicode - database: gitlabhq_geo_production - pool: 10 - username: gitlab_geo - # password: - host: /var/opt/gitlab/geo-postgresql - ``` - -1. Create the database `gitlabhq_geo_production` on the PostgreSQL instance of the **secondary** node. - -1. Set up the Geo tracking database: - - ```sh - bundle exec rake geo:db:migrate - ``` - -1. Configure the [PostgreSQL FDW][FDW] connection and credentials: - - Save the script below in a file, ex. `/tmp/geo_fdw.sh` and modify the connection - params to match your environment. Execute it to set up the FDW connection. - - ```sh - #!/bin/bash - - # Secondary Database connection params: - DB_HOST="/var/opt/gitlab/postgresql" # change to the public IP or VPC private IP if its an external server - DB_NAME="gitlabhq_production" - DB_USER="gitlab" - DB_PORT="5432" - - # Tracking Database connection params: - GEO_DB_HOST="/var/opt/gitlab/geo-postgresql" # change to the public IP or VPC private IP if its an external server - GEO_DB_NAME="gitlabhq_geo_production" - GEO_DB_USER="gitlab_geo" - GEO_DB_PORT="5432" - - query_exec () { - gitlab-psql -h $GEO_DB_HOST -d $GEO_DB_NAME -p $GEO_DB_PORT -c "${1}" - } - - query_exec "CREATE EXTENSION postgres_fdw;" - query_exec "CREATE SERVER gitlab_secondary FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host '${DB_HOST}', dbname '${DB_NAME}', port '${DB_PORT}');" - query_exec "CREATE USER MAPPING FOR ${GEO_DB_USER} SERVER gitlab_secondary OPTIONS (user '${DB_USER}');" - query_exec "CREATE SCHEMA gitlab_secondary;" - query_exec "GRANT USAGE ON FOREIGN SERVER gitlab_secondary TO ${GEO_DB_USER};" - ``` - - And edit the content of `database_geo.yml` and to add `fdw: true` to - the `production:` block. - -### Step 3. Initiate the replication process - -Below we provide a script that connects the database on the **secondary** node to -the database on the **primary** node, replicates the database, and creates the -needed files for streaming replication. - -The directories used are the defaults for Debian/Ubuntu. If you have changed -any defaults, configure it as you see fit replacing the directories and paths. - -CAUTION: **Warning:** -Make sure to run this on the **secondary** server as it removes all PostgreSQL's -data before running `pg_basebackup`. - -1. SSH into your GitLab **secondary** server and login as root: - - ```sh - sudo -i - ``` - -1. Save the snippet below in a file, let's say `/tmp/replica.sh`. Modify the - embedded paths if necessary: - - ``` - #!/bin/bash - - PORT="5432" - USER="gitlab_replicator" - echo --------------------------------------------------------------- - echo WARNING: Make sure this script is run from the secondary server - echo --------------------------------------------------------------- - echo - echo Enter the IP or FQDN of the primary PostgreSQL server - read HOST - echo Enter the password for $USER@$HOST - read -s PASSWORD - echo Enter the required sslmode - read SSLMODE - - echo Stopping PostgreSQL and all GitLab services - sudo service gitlab stop - sudo service postgresql stop - - echo Backing up postgresql.conf - sudo -u postgres mv /var/opt/gitlab/postgresql/data/postgresql.conf /var/opt/gitlab/postgresql/ - - echo Cleaning up old cluster directory - sudo -u postgres rm -rf /var/opt/gitlab/postgresql/data - - echo Starting base backup as the replicator user - echo Enter the password for $USER@$HOST - sudo -u postgres /opt/gitlab/embedded/bin/pg_basebackup -h $HOST -D /var/opt/gitlab/postgresql/data -U gitlab_replicator -v -x -P - - echo Writing recovery.conf file - sudo -u postgres bash -c "cat > /var/opt/gitlab/postgresql/data/recovery.conf <<- _EOF1_ - standby_mode = 'on' - primary_conninfo = 'host=$HOST port=$PORT user=$USER password=$PASSWORD sslmode=$SSLMODE' - _EOF1_ - " - - echo Restoring postgresql.conf - sudo -u postgres mv /var/opt/gitlab/postgresql/postgresql.conf /var/opt/gitlab/postgresql/data/ - - echo Starting PostgreSQL - sudo service postgresql start - ``` - -1. Run it with: - - ```sh - bash /tmp/replica.sh - ``` - - When prompted, enter the IP/FQDN of the **primary** node, and the password you set up - for the `gitlab_replicator` user in the first step. - - You should use `verify-ca` for the `sslmode`. You can use `disable` if you - are happy to skip PostgreSQL TLS authentication altogether (e.g., you know - the network path is secure, or you are using a site-to-site VPN). This is - **not** safe over the public Internet! - - You can read more details about each `sslmode` in the - [PostgreSQL documentation][pg-docs-ssl]; - the instructions above are carefully written to ensure protection against - both passive eavesdroppers and active "man-in-the-middle" attackers. - -The replication process is now over. - -## PGBouncer support (optional) - -1. First, enter the PostgreSQL console as an admin user. - -1. Then create the read-only user: - - ```sql - -- NOTE: Use the password defined earlier - CREATE USER gitlab_geo_fdw WITH password '<your_password_here>'; - GRANT CONNECT ON DATABASE gitlabhq_production to gitlab_geo_fdw; - GRANT USAGE ON SCHEMA public TO gitlab_geo_fdw; - GRANT SELECT ON ALL TABLES IN SCHEMA public TO gitlab_geo_fdw; - GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO gitlab_geo_fdw; - - -- Tables created by "gitlab" should be made read-only for "gitlab_geo_fdw" - -- automatically. - ALTER DEFAULT PRIVILEGES FOR USER gitlab IN SCHEMA public GRANT SELECT ON TABLES TO gitlab_geo_fdw; - ALTER DEFAULT PRIVILEGES FOR USER gitlab IN SCHEMA public GRANT SELECT ON SEQUENCES TO gitlab_geo_fdw; - ``` - -1. Enter the PostgreSQL console on the **secondary** tracking database and change the user mapping to this new user: - - ``` - ALTER USER MAPPING FOR gitlab_geo SERVER gitlab_secondary OPTIONS (SET user 'gitlab_geo_fdw') - ``` - -## MySQL replication - -MySQL replication is not supported for Geo. - -## Troubleshooting - -Read the [troubleshooting document](troubleshooting.md). - -[replication-slots-article]: https://medium.com/@tk512/replication-slots-in-postgresql-b4b03d277c75 -[pgback]: http://www.postgresql.org/docs/9.6/static/app-pgbasebackup.html -[replication user]:https://wiki.postgresql.org/wiki/Streaming_Replication -[FDW]: https://www.postgresql.org/docs/9.6/static/postgres-fdw.html -[database]: database.md -[add-geo-node]: configuration.md#step-3-add-the-secondary-gitlab-node -[database-replication]: database.md#step-2-configure-the-secondary-server -[pg-docs-ssl]: https://www.postgresql.org/docs/9.6/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION -[pg-docs-runtime-conn]: https://www.postgresql.org/docs/9.6/static/runtime-config-connection.html -[pg-docs-runtime-replication]: https://www.postgresql.org/docs/9.6/static/runtime-config-replication.html diff --git a/doc/administration/geo/replication/index.md b/doc/administration/geo/replication/index.md index 6abea2cf271..b2f71d82cfc 100644 --- a/doc/administration/geo/replication/index.md +++ b/doc/administration/geo/replication/index.md @@ -186,30 +186,13 @@ If you installed GitLab using the Omnibus packages (highly recommended): 1. Optional: [Configure a secondary LDAP server](../../auth/ldap.md) for the **secondary** node. See [notes on LDAP](#ldap). 1. [Follow the "Using a Geo Server" guide](using_a_geo_server.md). -### Using GitLab installed from source (Deprecated) - -NOTE: **Note:** -In GitLab 11.5, support for using Geo in GitLab source installations was deprecated and will be removed in a future release. Please consider [migrating to GitLab Omnibus install](https://docs.gitlab.com/omnibus/update/convert_to_omnibus.html). - -If you installed GitLab from source: - -1. [Install GitLab Enterprise Edition](../../../install/installation.md) on the server that will serve as the **secondary** node. Do not create an account or log in to the new **secondary** node. -1. [Upload the GitLab License](https://docs.gitlab.com/ee/user/admin_area/license.html) on the **primary** node to unlock Geo. The license must be for [GitLab Premium](https://about.gitlab.com/pricing/) or higher. -1. [Set up the database replication](database_source.md) (`primary (read-write) <-> secondary (read-only)` topology). -1. [Configure fast lookup of authorized SSH keys in the database](../../operations/fast_ssh_key_lookup.md). Do this step for **both** **primary** and **secondary** nodes. -1. [Configure GitLab](configuration_source.md) to set the **primary** and **secondary** nodes. -1. [Follow the "Using a Geo Server" guide](using_a_geo_server.md). - ## Post-installation documentation After installing GitLab on the **secondary** nodes and performing the initial configuration, see the following documentation for post-installation information. ### Configuring Geo -For information on configuring Geo, see: - -- [Geo configuration (GitLab Omnibus)](configuration.md). -- [Geo configuration (source)](configuration_source.md). Configuring Geo in GitLab source installations was **deprecated** in GitLab 11.5. +For information on configuring Geo, see [Geo configuration](configuration.md). ### Updating Geo diff --git a/doc/administration/geo/replication/security_review.md b/doc/administration/geo/replication/security_review.md index 46d3e68ab63..cd54e2dc8c4 100644 --- a/doc/administration/geo/replication/security_review.md +++ b/doc/administration/geo/replication/security_review.md @@ -120,9 +120,7 @@ questions from [owasp.org](https://www.owasp.org). ### What details regarding required OS components and lock‐down needs have been defined? -- The recommended installation method (Omnibus) packages most components itself. - A from-source installation method exists. Both are documented at - <https://docs.gitlab.com/ee/administration/geo/replication/index.html> +- The supported installation method (Omnibus) packages most components itself. - There are significant dependencies on the system-installed OpenSSH daemon (Geo requires users to set up custom authentication methods) and the omnibus or system-provided PostgreSQL daemon (it must be configured to listen on TCP, diff --git a/doc/administration/geo/replication/troubleshooting.md b/doc/administration/geo/replication/troubleshooting.md index 8a9694f02be..c5bdd36ba70 100644 --- a/doc/administration/geo/replication/troubleshooting.md +++ b/doc/administration/geo/replication/troubleshooting.md @@ -310,7 +310,7 @@ same host on different ports. That is, 5432 and 5431 respectively. ### Checking configuration NOTE: **Note:** -The following steps are for Omnibus installs only. Using Geo with source-based installs [is deprecated](index.md#using-gitlab-installed-from-source-deprecated). +The following steps are for Omnibus installs only. Using Geo with source-based installs was **deprecated** in GitLab 11.5. To check the configuration: diff --git a/doc/administration/geo/replication/updating_the_geo_nodes.md b/doc/administration/geo/replication/updating_the_geo_nodes.md index 66728366e24..933a75c47d8 100644 --- a/doc/administration/geo/replication/updating_the_geo_nodes.md +++ b/doc/administration/geo/replication/updating_the_geo_nodes.md @@ -337,6 +337,53 @@ is prepended with the relevant node for better clarity: 1. **[secondary]** Create the `replica.sh` script as described in the [database configuration document][database-source-replication]. + 1. 1. **[secondary]** Save the snippet below in a file, let's say `/tmp/replica.sh`. Modify the + embedded paths if necessary: + + ``` + #!/bin/bash + + PORT="5432" + USER="gitlab_replicator" + echo --------------------------------------------------------------- + echo WARNING: Make sure this script is run from the secondary server + echo --------------------------------------------------------------- + echo + echo Enter the IP or FQDN of the primary PostgreSQL server + read HOST + echo Enter the password for $USER@$HOST + read -s PASSWORD + echo Enter the required sslmode + read SSLMODE + + echo Stopping PostgreSQL and all GitLab services + sudo service gitlab stop + sudo service postgresql stop + + echo Backing up postgresql.conf + sudo -u postgres mv /var/opt/gitlab/postgresql/data/postgresql.conf /var/opt/gitlab/postgresql/ + + echo Cleaning up old cluster directory + sudo -u postgres rm -rf /var/opt/gitlab/postgresql/data + + echo Starting base backup as the replicator user + echo Enter the password for $USER@$HOST + sudo -u postgres /opt/gitlab/embedded/bin/pg_basebackup -h $HOST -D /var/opt/gitlab/postgresql/data -U gitlab_replicator -v -x -P + + echo Writing recovery.conf file + sudo -u postgres bash -c "cat > /var/opt/gitlab/postgresql/data/recovery.conf <<- _EOF1_ + standby_mode = 'on' + primary_conninfo = 'host=$HOST port=$PORT user=$USER password=$PASSWORD sslmode=$SSLMODE' + _EOF1_ + " + + echo Restoring postgresql.conf + sudo -u postgres mv /var/opt/gitlab/postgresql/postgresql.conf /var/opt/gitlab/postgresql/data/ + + echo Starting PostgreSQL + sudo service postgresql start + ``` + 1. **[secondary]** Run the recovery script using the credentials from the previous step: @@ -396,8 +443,6 @@ and it is required since 10.0. [update]: ../../../update/README.md [database]: database.md -[database-replication]: database.md#step-3-initiate-the-replication-process -[database-source-replication]: database_source.md#step-3-initiate-the-replication-process [Hashed Storage]: ../../repository_storage_types.md [hashed-migration]: ../../raketasks/storage.md [ssh-fast-lookup]: ../../operations/fast_ssh_key_lookup.md diff --git a/doc/ci/docker/using_docker_build.md b/doc/ci/docker/using_docker_build.md index 5222cc45bc4..dd112dadc40 100644 --- a/doc/ci/docker/using_docker_build.md +++ b/doc/ci/docker/using_docker_build.md @@ -142,9 +142,12 @@ In order to do that, follow the steps: # The 'docker' hostname is the alias of the service container as described at # https://docs.gitlab.com/ee/ci/docker/using_docker_images.html#accessing-the-services # - # Note that if you're using Kubernetes executor, the variable should be set to - # tcp://localhost:2375 because of how Kubernetes executor connects services + # Note that if you're using the Kubernetes executor, the variable should be set to + # tcp://localhost:2375/ because of how the Kubernetes executor connects services # to the job container + # DOCKER_HOST: tcp://localhost:2375/ + # + # For non-Kubernetes executors, we use tcp://docker:2375/ DOCKER_HOST: tcp://docker:2375/ # When using dind, it's wise to use the overlayfs driver for # improved performance. diff --git a/doc/development/architecture.md b/doc/development/architecture.md index 930e0e7d676..4b76d5f9c5b 100644 --- a/doc/development/architecture.md +++ b/doc/development/architecture.md @@ -135,7 +135,7 @@ Component statuses are linked to configuration documentation for each component. | [Runner](#gitlab-runner) | Executes GitLab CI jobs | [⤓][runner-omnibus] | [✅][runner-charts] | [⚙][runner-charts] | [✅](../user/gitlab_com/index.md#shared-runners) | [⚙][runner-source] | [⚙][runner-gdk] | CE & EE | | [Database Migrations](#database-migrations) | Database migrations | [✅][database-migrations-omnibus] | [✅][database-migrations-charts] | [✅][database-migrations-charts] | ✅ | [⚙][database-migrations-source] | ✅ | CE & EE | | [Certificate Management](#certificate-management) | TLS Settings, Let's Encrypt | [✅][certificate-management-omnibus] | [✅][certificate-management-charts] | [⚙][certificate-management-charts] | [✅](https://about.gitlab.com/handbook/engineering/infrastructure/production-architecture/#secrets-management) | [⚙][certificate-management-source] | [⚙][certificate-management-gdk] | CE & EE | -| [GitLab Geo Node](#gitlab-geo) | Geographically distributed GitLab nodes | [⚙][geo-omnibus] | [❌][geo-charts] | [❌][geo-charts] | ✅ | [❌](../administration/geo/replication/configuration_source.md) | [⚙][geo-gdk] | EE Only | +| [GitLab Geo Node](#gitlab-geo) | Geographically distributed GitLab nodes | [⚙][geo-omnibus] | [❌][geo-charts] | [❌][geo-charts] | ✅ | ❌ | [⚙][geo-gdk] | EE Only | | [LDAP Authentication](#ldap-authentication) | Authenticate users against centralized LDAP directory | [⤓][ldap-omnibus] | [⤓][ldap-charts] | [⤓][ldap-charts] | [❌](https://about.gitlab.com/pricing/#gitlab-com) | [⤓][gitlab-yml] | [⤓][ldap-gdk] | CE & EE | | [Outbound email (SMTP)](#outbound-email) | Send email messages to users | [⤓][outbound-email-omnibus] | [⤓][outbound-email-charts] | [⤓][outbound-email-charts] | [✅](../user/gitlab_com/index.md#mail-configuration) | [⤓][gitlab-yml] | [⤓][gitlab-yml] | CE & EE | | [Inbound email (SMTP)](#inbound-email) | Receive messages to update issues | [⤓][inbound-email-omnibus] | [⤓][inbound-email-charts] | [⤓][inbound-email-charts] | [✅](../user/gitlab_com/index.md#mail-configuration) | [⤓][gitlab-yml] | [⤓][gitlab-yml] | CE & EE | diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 58d6f08954d..4c9d1684c00 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -67,9 +67,6 @@ Remember that the performance of each test depends on the environment. GitLab uses the [Karma][karma] test runner with [Jasmine] as its test framework for our JavaScript unit and integration tests. -We generate HTML and JSON fixtures from backend views and controllers -using RSpec (see `spec/javascripts/fixtures/*.rb` for examples). -Fixtures are served during testing by the [jasmine-jquery][jasmine-jquery] plugin. JavaScript tests live in `spec/javascripts/`, matching the folder structure of `app/assets/javascripts/`: `app/assets/javascripts/behaviors/autosize.js` @@ -421,7 +418,7 @@ See this [section][vue-test]. For running the frontend tests, you need the following commands: -- `rake karma:fixtures` (re-)generates fixtures. +- `rake karma:fixtures` (re-)generates [fixtures](#frontend-test-fixtures). - `yarn test` executes the tests. As long as the fixtures don't change, `yarn test` is sufficient (and saves you some time). @@ -469,6 +466,48 @@ yarn karma -f 'spec/javascripts/ide/**/file_spec.js' Information on setting up and running RSpec integration tests with [Capybara] can be found in the [Testing Best Practices](best_practices.md). +## Frontend test fixtures + +Code that is added to HAML templates (in `app/views/`) or makes Ajax requests to the backend has tests that require HTML or JSON from the backend. +Fixtures for these tests are located at: + +- `spec/javascripts/fixtures/`, for running tests in CE. +- `ee/spec/javascripts/fixtures/`, for running tests in EE. + +Fixture files in: + +- The Karma test suite are served by [jasmine-jquery](https://github.com/velesin/jasmine-jquery). +- Jest use `spec/frontend/helpers/fixtures.js`. + +The following are examples of tests that work for both Karma and Jest: + +```javascript +it('makes a request', () => { + const responseBody = getJSONFixture('some/fixture.json'); // loads spec/javascripts/fixtures/some/fixture.json + axiosMock.onGet(endpoint).reply(200, responseBody); + + myButton.click(); + + // ... +}); + +it('uses some HTML element', () => { + loadFixtures('some/page.html'); // loads spec/javascripts/fixtures/some/page.html and adds it to the DOM + + const element = document.getElementById('#my-id'); + + // ... +}); +``` + +HTML and JSON fixtures are generated from backend views and controllers using RSpec (see `spec/javascripts/fixtures/*.rb`). + +For each fixture, the content of the `response` variable is stored in the output file. +This variable gets automagically set if the test is marked as `type: :request` or `type: :controller`. +Fixtures are regenerated using the `bin/rake karma:fixtures` command but you can also generate them individually, +for example `bin/rspec spec/javascripts/fixtures/merge_requests.rb`. +When creating a new fixture, it often makes sense to take a look at the corresponding tests for the endpoint in `(ee/)spec/controllers/` or `(ee/)spec/requests/`. + ## Gotchas ### RSpec errors due to JavaScript @@ -501,7 +540,6 @@ end ``` [jasmine-focus]: https://jasmine.github.io/2.5/focused_specs.html -[jasmine-jquery]: https://github.com/velesin/jasmine-jquery [karma]: http://karma-runner.github.io/ [vue-test]: https://docs.gitlab.com/ce/development/fe_guide/vue.html#testing-vue-components [rspec]: https://github.com/rspec/rspec-rails#feature-specs diff --git a/doc/gitlab-geo/configuration_source.md b/doc/gitlab-geo/configuration_source.md index f1aab86fadc..b46a2caea4a 100644 --- a/doc/gitlab-geo/configuration_source.md +++ b/doc/gitlab-geo/configuration_source.md @@ -1,5 +1,5 @@ --- -redirect_to: '../administration/geo/replication/configuration_source.md' +redirect_to: '../administration/geo/replication/configuration.md' --- -This document was moved to [another location](../administration/geo/replication/configuration_source.md). +This document was moved to [another location](../administration/geo/replication/configuration.md). diff --git a/doc/gitlab-geo/database_source.md b/doc/gitlab-geo/database_source.md index 3392d0f02c0..b4156dc4ec6 100644 --- a/doc/gitlab-geo/database_source.md +++ b/doc/gitlab-geo/database_source.md @@ -1,5 +1,5 @@ --- -redirect_to: '../administration/geo/replication/database_source.md' +redirect_to: '../administration/geo/replication/database.md' --- -This document was moved to [another location](../administration/geo/replication/database_source.md). +This document was moved to [another location](../administration/geo/replication/database.md). diff --git a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml index 11569437cb6..1d55c64ec56 100644 --- a/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Deploy.gitlab-ci.yml @@ -432,6 +432,7 @@ rollout 100%: --set postgresql.postgresUser="$POSTGRES_USER" \ --set postgresql.postgresPassword="$POSTGRES_PASSWORD" \ --set postgresql.postgresDatabase="$POSTGRES_DB" \ + --set postgresql.imageTag="$POSTGRES_VERSION" \ --set application.migrateCommand="$DB_MIGRATE" \ $HELM_UPGRADE_EXTRA_ARGS \ --namespace="$KUBE_NAMESPACE" \ diff --git a/spec/javascripts/monitoring/charts/area_spec.js b/spec/javascripts/monitoring/charts/area_spec.js index 41a6c04efb9..56609665b88 100644 --- a/spec/javascripts/monitoring/charts/area_spec.js +++ b/spec/javascripts/monitoring/charts/area_spec.js @@ -2,7 +2,8 @@ import { shallowMount } from '@vue/test-utils'; import { GlAreaChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts'; import { shallowWrapperContainsSlotText } from 'spec/helpers/vue_test_utils_helper'; import Area from '~/monitoring/components/charts/area.vue'; -import MonitoringStore from '~/monitoring/stores/monitoring_store'; +import { createStore } from '~/monitoring/stores'; +import * as types from '~/monitoring/stores/mutation_types'; import MonitoringMock, { deploymentData } from '../mock_data'; describe('Area component', () => { @@ -13,17 +14,18 @@ describe('Area component', () => { let spriteSpy; beforeEach(() => { - const store = new MonitoringStore(); - store.storeMetrics(MonitoringMock.data); - store.storeDeploymentData(deploymentData); + const store = createStore(); - [mockGraphData] = store.groups[0].metrics; + store.commit(`monitoringDashboard/${types.RECEIVE_METRICS_DATA_SUCCESS}`, MonitoringMock.data); + store.commit(`monitoringDashboard/${types.RECEIVE_DEPLOYMENTS_DATA_SUCCESS}`, deploymentData); + + [mockGraphData] = store.state.monitoringDashboard.groups[0].metrics; areaChart = shallowMount(Area, { propsData: { graphData: mockGraphData, containerWidth: 0, - deploymentData: store.deploymentData, + deploymentData: store.state.monitoringDashboard.deploymentData, }, slots: { default: mockWidgets, diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js index e9bd6050d68..58bcd916739 100644 --- a/spec/javascripts/monitoring/dashboard_spec.js +++ b/spec/javascripts/monitoring/dashboard_spec.js @@ -2,8 +2,15 @@ import Vue from 'vue'; import MockAdapter from 'axios-mock-adapter'; import Dashboard from '~/monitoring/components/dashboard.vue'; import { timeWindows, timeWindowsKeyNames } from '~/monitoring/constants'; +import * as types from '~/monitoring/stores/mutation_types'; +import { createStore } from '~/monitoring/stores'; import axios from '~/lib/utils/axios_utils'; -import { metricsGroupsAPIResponse, mockApiEndpoint, environmentData } from './mock_data'; +import { + metricsGroupsAPIResponse, + mockApiEndpoint, + environmentData, + singleGroupResponse, +} from './mock_data'; const propsData = { hasMetrics: false, @@ -30,6 +37,7 @@ export default propsData; describe('Dashboard', () => { let DashboardComponent; let mock; + let store; beforeEach(() => { setFixtures(` @@ -45,6 +53,7 @@ describe('Dashboard', () => { }, }; + store = createStore(); mock = new MockAdapter(axios); DashboardComponent = Vue.extend(Dashboard); }); @@ -58,10 +67,11 @@ describe('Dashboard', () => { const component = new DashboardComponent({ el: document.querySelector('.prometheus-graphs'), propsData: { ...propsData, showTimeWindowDropdown: false }, + store, }); expect(component.$el.querySelector('.prometheus-graphs')).toBe(null); - expect(component.state).toEqual('gettingStarted'); + expect(component.emptyState).toEqual('gettingStarted'); }); }); @@ -74,10 +84,11 @@ describe('Dashboard', () => { const component = new DashboardComponent({ el: document.querySelector('.prometheus-graphs'), propsData: { ...propsData, hasMetrics: true, showTimeWindowDropdown: false }, + store, }); Vue.nextTick(() => { - expect(component.state).toEqual('loading'); + expect(component.emptyState).toEqual('loading'); done(); }); }); @@ -91,6 +102,7 @@ describe('Dashboard', () => { showLegend: false, showTimeWindowDropdown: false, }, + store, }); setTimeout(() => { @@ -110,6 +122,7 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: false, }, + store, }); setTimeout(() => { @@ -129,16 +142,24 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: false, }, + store, }); - component.store.storeEnvironmentsData(environmentData); + component.$store.commit( + `monitoringDashboard/${types.RECEIVE_ENVIRONMENTS_DATA_SUCCESS}`, + environmentData, + ); + component.$store.commit( + `monitoringDashboard/${types.RECEIVE_METRICS_DATA_SUCCESS}`, + singleGroupResponse, + ); setTimeout(() => { const dropdownMenuEnvironments = component.$el.querySelectorAll( '.js-environments-dropdown .dropdown-item', ); - expect(dropdownMenuEnvironments.length).toEqual(component.store.environmentsData.length); + expect(dropdownMenuEnvironments.length).toEqual(component.environments.length); done(); }); }); @@ -152,18 +173,29 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: false, }, + store, }); - component.store.storeEnvironmentsData([]); + component.$store.commit( + `monitoringDashboard/${types.SET_ENVIRONMENTS_ENDPOINT}`, + '/environments', + ); + component.$store.commit(`monitoringDashboard/${types.RECEIVE_ENVIRONMENTS_DATA_SUCCESS}`, []); + component.$store.commit( + `monitoringDashboard/${types.RECEIVE_METRICS_DATA_SUCCESS}`, + singleGroupResponse, + ); - setTimeout(() => { - const dropdownMenuEnvironments = component.$el.querySelectorAll( - '.js-environments-dropdown .dropdown-item', - ); + Vue.nextTick() + .then(() => { + const dropdownMenuEnvironments = component.$el.querySelectorAll( + '.js-environments-dropdown .dropdown-item', + ); - expect(dropdownMenuEnvironments.length).toEqual(0); - done(); - }); + expect(dropdownMenuEnvironments.length).toEqual(0); + done(); + }) + .catch(done.fail); }); it('renders the environments dropdown with a single active element', done => { @@ -175,19 +207,32 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: false, }, + store, }); - component.store.storeEnvironmentsData(environmentData); + component.$store.commit( + `monitoringDashboard/${types.SET_ENVIRONMENTS_ENDPOINT}`, + '/environments', + ); + component.$store.commit( + `monitoringDashboard/${types.RECEIVE_ENVIRONMENTS_DATA_SUCCESS}`, + environmentData, + ); + component.$store.commit( + `monitoringDashboard/${types.RECEIVE_METRICS_DATA_SUCCESS}`, + singleGroupResponse, + ); - setTimeout(() => { - const dropdownItems = component.$el.querySelectorAll( - '.js-environments-dropdown .dropdown-item[active="true"]', - ); + Vue.nextTick() + .then(() => { + const dropdownItems = component.$el.querySelectorAll( + '.js-environments-dropdown .dropdown-item[active="true"]', + ); - expect(dropdownItems.length).toEqual(1); - expect(dropdownItems[0].textContent.trim()).toEqual(component.currentEnvironmentName); - done(); - }); + expect(dropdownItems.length).toEqual(1); + done(); + }) + .catch(done.fail); }); it('hides the dropdown', done => { @@ -200,6 +245,7 @@ describe('Dashboard', () => { environmentsEndpoint: '', showTimeWindowDropdown: false, }, + store, }); Vue.nextTick(() => { @@ -219,6 +265,7 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: false, }, + store, }); setTimeout(() => { @@ -239,6 +286,7 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: true, }, + store, }); const numberOfTimeWindows = Object.keys(timeWindows).length; @@ -261,6 +309,7 @@ describe('Dashboard', () => { const component = new DashboardComponent({ el: document.querySelector('.prometheus-graphs'), propsData: { ...propsData, hasMetrics: true, showTimeWindowDropdown: true }, + store, }); setTimeout(() => { @@ -281,6 +330,7 @@ describe('Dashboard', () => { const component = new DashboardComponent({ el: document.querySelector('.prometheus-graphs'), propsData: { ...propsData, hasMetrics: true, showTimeWindowDropdown: true }, + store, }); Vue.nextTick(() => { @@ -310,6 +360,7 @@ describe('Dashboard', () => { showPanels: false, showTimeWindowDropdown: false, }, + store, }); expect(component.elWidth).toEqual(0); @@ -352,6 +403,7 @@ describe('Dashboard', () => { showTimeWindowDropdown: false, externalDashboardPath: '/mockPath', }, + store, }); }); @@ -377,6 +429,7 @@ describe('Dashboard', () => { showTimeWindowDropdown: false, externalDashboardPath: '', }, + store, }); }); diff --git a/spec/javascripts/monitoring/helpers.js b/spec/javascripts/monitoring/helpers.js new file mode 100644 index 00000000000..672e3b948c4 --- /dev/null +++ b/spec/javascripts/monitoring/helpers.js @@ -0,0 +1,8 @@ +// eslint-disable-next-line import/prefer-default-export +export const resetStore = store => { + store.replaceState({ + showEmptyState: true, + emptyState: 'loading', + groups: [], + }); +}; diff --git a/spec/javascripts/monitoring/mock_data.js b/spec/javascripts/monitoring/mock_data.js index 6d4ef960c1a..d9d8cb66749 100644 --- a/spec/javascripts/monitoring/mock_data.js +++ b/spec/javascripts/monitoring/mock_data.js @@ -685,6 +685,47 @@ export const metricsGroupsAPIResponse = { last_update: '2017-05-25T13:18:34.949Z', }; +export const singleGroupResponse = [ + { + group: 'System metrics (Kubernetes)', + priority: 5, + metrics: [ + { + title: 'Memory Usage (Total)', + weight: 0, + y_label: 'Total Memory Used', + queries: [ + { + query_range: + 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^production-(.*)",namespace="autodevops-deploy-33"}) by (job)) without (job) /1024/1024/1024', + unit: 'GB', + label: 'Total', + result: [ + { + metric: {}, + values: [ + [1558453960.079, '0.0357666015625'], + [1558454020.079, '0.035675048828125'], + [1558454080.079, '0.035152435302734375'], + [1558454140.079, '0.035221099853515625'], + [1558454200.079, '0.0352325439453125'], + [1558454260.079, '0.03479766845703125'], + [1558454320.079, '0.034793853759765625'], + [1558454380.079, '0.034931182861328125'], + [1558454440.079, '0.034816741943359375'], + [1558454500.079, '0.034816741943359375'], + [1558454560.079, '0.034816741943359375'], + ], + }, + ], + }, + ], + id: 15, + }, + ], + }, +]; + export default metricsGroupsAPIResponse; export const deploymentData = [ @@ -738,5836 +779,6 @@ export const statePaths = { documentationPath: '/help/administration/monitoring/prometheus/index.md', }; -export const singleRowMetricsMultipleSeries = [ - { - title: 'Multiple Time Series', - weight: 1, - y_label: 'Request Rates', - queries: [ - { - query_range: - 'sum(rate(nginx_responses_total{environment="production"}[2m])) by (status_code)', - label: 'Requests', - unit: 'Req/sec', - result: [ - { - metric: { - status_code: '1xx', - }, - values: [ - { - time: '2017-08-27T11:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T11:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T12:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T13:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T14:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T15:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T16:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T17:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:01:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:02:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:03:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:04:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:05:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:06:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:07:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:08:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:09:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:10:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:11:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:12:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:13:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:14:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:15:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:16:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:17:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:18:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:19:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:20:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:21:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:22:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:23:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:24:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:25:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:26:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:27:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:28:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:29:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:30:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:31:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:32:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:33:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:34:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:35:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:36:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:37:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:38:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:39:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:40:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:41:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:42:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:43:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:44:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:45:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:46:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:47:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:48:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:49:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:50:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:51:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:52:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:53:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:54:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:55:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:56:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:57:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:58:51.462Z', - value: '0', - }, - { - time: '2017-08-27T18:59:51.462Z', - value: '0', - }, - { - time: '2017-08-27T19:00:51.462Z', - value: '0', - }, - { - time: '2017-08-27T19:01:51.462Z', - value: '0', - }, - ], - }, - { - metric: { - status_code: '2xx', - }, - values: [ - { - time: '2017-08-27T11:01:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:02:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T11:03:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:04:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:05:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:06:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:07:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:08:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:09:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:10:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:12:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:13:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:14:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:15:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:16:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:17:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:18:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:19:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:20:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:21:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:22:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:23:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:24:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:25:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:26:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:27:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:28:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:29:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:30:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:31:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:32:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:33:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:34:51.462Z', - value: '1.333320635041571', - }, - { - time: '2017-08-27T11:35:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:36:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:37:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:38:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:39:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:40:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:41:51.462Z', - value: '1.3333587306424883', - }, - { - time: '2017-08-27T11:42:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:43:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:44:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:45:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:46:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:47:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:48:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:49:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T11:50:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:51:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:52:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:53:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:54:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:55:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:56:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:57:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T11:58:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T11:59:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:00:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:01:51.462Z', - value: '1.3333460318669703', - }, - { - time: '2017-08-27T12:02:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:03:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:04:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:05:51.462Z', - value: '1.31427319739812', - }, - { - time: '2017-08-27T12:06:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:07:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:08:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:09:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:10:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:12:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:13:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:14:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:15:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:16:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:17:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:18:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:19:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:20:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:21:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:22:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:23:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:24:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:25:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:26:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:27:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:28:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:29:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:30:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:31:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:32:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:33:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:34:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:35:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:36:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:37:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:38:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:39:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:40:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:41:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:42:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:43:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:44:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:45:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:46:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:47:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:48:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:49:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:50:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:51:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:52:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:53:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:54:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T12:55:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:56:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:57:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T12:58:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T12:59:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:00:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:01:51.462Z', - value: '1.295225759754669', - }, - { - time: '2017-08-27T13:02:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:03:51.462Z', - value: '1.2952627669098458', - }, - { - time: '2017-08-27T13:04:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:05:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:06:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:07:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:08:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:09:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:10:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:12:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:13:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:14:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:15:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T13:16:51.462Z', - value: '1.3333587306424883', - }, - { - time: '2017-08-27T13:17:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:18:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:19:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:20:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:21:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:22:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:23:51.462Z', - value: '1.276190476190476', - }, - { - time: '2017-08-27T13:24:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T13:25:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:26:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:27:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:28:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:29:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:30:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:31:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:32:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:33:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:34:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:35:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:36:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:37:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:38:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:39:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:40:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:41:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:42:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:43:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:44:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:45:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:46:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T13:47:51.462Z', - value: '1.276190476190476', - }, - { - time: '2017-08-27T13:48:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:49:51.462Z', - value: '1.295225759754669', - }, - { - time: '2017-08-27T13:50:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:51:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:52:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:53:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:54:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:55:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:56:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T13:57:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T13:58:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T13:59:51.462Z', - value: '1.295225759754669', - }, - { - time: '2017-08-27T14:00:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:01:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:02:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:03:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:04:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:05:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:06:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:07:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:08:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:09:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:10:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:12:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:13:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:14:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:15:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:16:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:17:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:18:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:19:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:20:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:21:51.462Z', - value: '1.3333079369916765', - }, - { - time: '2017-08-27T14:22:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:23:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:24:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:25:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:26:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:27:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:28:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:29:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:30:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:31:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:32:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:33:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T14:34:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:35:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:36:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:37:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:38:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:39:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:40:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:41:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:42:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:43:51.462Z', - value: '1.276190476190476', - }, - { - time: '2017-08-27T14:44:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T14:45:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:46:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:47:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:48:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:49:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:50:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:51:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:52:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:53:51.462Z', - value: '1.333320635041571', - }, - { - time: '2017-08-27T14:54:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:55:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T14:56:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:57:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T14:58:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T14:59:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:00:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:01:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:02:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:03:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:04:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T15:05:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:06:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:07:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:08:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:09:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:10:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:11:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:12:51.462Z', - value: '1.31427319739812', - }, - { - time: '2017-08-27T15:13:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:14:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:15:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:16:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:17:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:18:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:19:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:20:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:21:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:22:51.462Z', - value: '1.3333460318669703', - }, - { - time: '2017-08-27T15:23:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:24:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:25:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:26:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:27:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:28:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:29:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:30:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:31:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:32:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:33:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:34:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:35:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:36:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:37:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:38:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:39:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:40:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:41:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:42:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:43:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:44:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:45:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:46:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:47:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:48:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:49:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T15:50:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:51:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:52:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:53:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:54:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:55:51.462Z', - value: '1.3333587306424883', - }, - { - time: '2017-08-27T15:56:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T15:57:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:58:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T15:59:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:00:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:01:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:02:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:03:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:04:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:05:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:06:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:07:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:08:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:09:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:10:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:12:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:13:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:14:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:15:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:16:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:17:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:18:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:19:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:20:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:21:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:22:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:23:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:24:51.462Z', - value: '1.295225759754669', - }, - { - time: '2017-08-27T16:25:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:26:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:27:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:28:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:29:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:30:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:31:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:32:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:33:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:34:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:35:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:36:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:37:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:38:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:39:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:40:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:41:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:42:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:43:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:44:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:45:51.462Z', - value: '1.3142982314117277', - }, - { - time: '2017-08-27T16:46:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:47:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:48:51.462Z', - value: '1.333320635041571', - }, - { - time: '2017-08-27T16:49:51.462Z', - value: '1.31427319739812', - }, - { - time: '2017-08-27T16:50:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:51:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:52:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:53:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:54:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:55:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T16:56:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:57:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T16:58:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T16:59:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:00:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:01:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:02:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:03:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:04:51.462Z', - value: '1.2952504309564854', - }, - { - time: '2017-08-27T17:05:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:06:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:07:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:08:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:09:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:10:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:12:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:13:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:14:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:15:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:16:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:17:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:18:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:19:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:20:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:21:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:22:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:23:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:24:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:25:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:26:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:27:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:28:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:29:51.462Z', - value: '1.295225759754669', - }, - { - time: '2017-08-27T17:30:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:31:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:32:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:33:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:34:51.462Z', - value: '1.295225759754669', - }, - { - time: '2017-08-27T17:35:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:36:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:37:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:38:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:39:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:40:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:41:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:42:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:43:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:44:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:45:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:46:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:47:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:48:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:49:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:50:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:51:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:52:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:53:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:54:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:55:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T17:56:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:57:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T17:58:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T17:59:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T18:00:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:01:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:02:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:03:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:04:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:05:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:06:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:07:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:08:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:09:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:10:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:11:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:12:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T18:13:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:14:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:15:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:16:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:17:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:18:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:19:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:20:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:21:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:22:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:23:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:24:51.462Z', - value: '1.2571428571428571', - }, - { - time: '2017-08-27T18:25:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:26:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:27:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:28:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:29:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:30:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:31:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:32:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:33:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:34:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:35:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:36:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:37:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T18:38:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:39:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:40:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:41:51.462Z', - value: '1.580952380952381', - }, - { - time: '2017-08-27T18:42:51.462Z', - value: '1.7333333333333334', - }, - { - time: '2017-08-27T18:43:51.462Z', - value: '2.057142857142857', - }, - { - time: '2017-08-27T18:44:51.462Z', - value: '2.1904761904761902', - }, - { - time: '2017-08-27T18:45:51.462Z', - value: '1.8285714285714287', - }, - { - time: '2017-08-27T18:46:51.462Z', - value: '2.1142857142857143', - }, - { - time: '2017-08-27T18:47:51.462Z', - value: '1.619047619047619', - }, - { - time: '2017-08-27T18:48:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:49:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:50:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T18:51:51.462Z', - value: '1.2952504309564854', - }, - { - time: '2017-08-27T18:52:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:53:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:54:51.462Z', - value: '1.3333333333333333', - }, - { - time: '2017-08-27T18:55:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:56:51.462Z', - value: '1.314285714285714', - }, - { - time: '2017-08-27T18:57:51.462Z', - value: '1.295238095238095', - }, - { - time: '2017-08-27T18:58:51.462Z', - value: '1.7142857142857142', - }, - { - time: '2017-08-27T18:59:51.462Z', - value: '1.7333333333333334', - }, - { - time: '2017-08-27T19:00:51.462Z', - value: '1.3904761904761904', - }, - { - time: '2017-08-27T19:01:51.462Z', - value: '1.5047619047619047', - }, - ], - }, - ], - when: [ - { - value: 'hundred(s)', - color: 'green', - }, - ], - }, - ], - }, - { - title: 'Throughput', - weight: 1, - y_label: 'Requests / Sec', - queries: [ - { - query_range: - "sum(rate(nginx_requests_total{server_zone!='*', server_zone!='_', container_name!='POD',environment='production'}[2m]))", - label: 'Total', - unit: 'req / sec', - result: [ - { - metric: {}, - values: [ - { - time: '2017-08-27T11:01:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:02:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T11:03:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:04:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:05:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:06:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:07:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:08:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:09:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:10:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:12:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:13:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:14:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:15:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:16:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:17:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:18:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:19:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:20:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:21:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:22:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:23:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:24:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:25:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:26:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:27:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:28:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:29:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:30:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:31:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:32:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:33:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:34:51.462Z', - value: '0.4952333787297264', - }, - { - time: '2017-08-27T11:35:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:36:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:37:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:38:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:39:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:40:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:41:51.462Z', - value: '0.49524752852435283', - }, - { - time: '2017-08-27T11:42:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:43:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:44:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:45:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:46:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:47:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:48:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:49:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T11:50:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:51:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:52:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:53:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:54:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:55:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:56:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:57:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T11:58:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T11:59:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:00:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:01:51.462Z', - value: '0.49524281183630325', - }, - { - time: '2017-08-27T12:02:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:03:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:04:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:05:51.462Z', - value: '0.4857096599080009', - }, - { - time: '2017-08-27T12:06:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:07:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:08:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:09:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:10:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:12:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:13:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:14:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:15:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:16:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:17:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:18:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:19:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:20:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:21:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:22:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:23:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:24:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:25:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:26:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:27:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:28:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:29:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:30:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:31:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:32:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:33:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:34:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:35:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:36:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:37:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:38:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:39:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:40:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:41:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:42:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:43:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:44:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:45:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:46:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:47:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:48:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:49:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:50:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:51:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:52:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:53:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:54:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T12:55:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:56:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:57:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T12:58:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T12:59:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:00:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:01:51.462Z', - value: '0.4761859410862754', - }, - { - time: '2017-08-27T13:02:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:03:51.462Z', - value: '0.4761995466580315', - }, - { - time: '2017-08-27T13:04:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:05:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:06:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:07:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:08:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:09:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:10:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:12:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:13:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:14:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:15:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T13:16:51.462Z', - value: '0.49524752852435283', - }, - { - time: '2017-08-27T13:17:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:18:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:19:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:20:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:21:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:22:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:23:51.462Z', - value: '0.4666666666666667', - }, - { - time: '2017-08-27T13:24:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T13:25:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:26:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:27:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:28:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:29:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:30:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:31:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:32:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:33:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:34:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:35:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:36:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:37:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:38:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:39:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:40:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:41:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:42:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:43:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:44:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:45:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:46:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T13:47:51.462Z', - value: '0.4666666666666667', - }, - { - time: '2017-08-27T13:48:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:49:51.462Z', - value: '0.4761859410862754', - }, - { - time: '2017-08-27T13:50:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:51:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:52:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:53:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:54:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:55:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:56:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T13:57:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T13:58:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T13:59:51.462Z', - value: '0.4761859410862754', - }, - { - time: '2017-08-27T14:00:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:01:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:02:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:03:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:04:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:05:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:06:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:07:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:08:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:09:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:10:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:12:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:13:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:14:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:15:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:16:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:17:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:18:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:19:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:20:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:21:51.462Z', - value: '0.4952286623111941', - }, - { - time: '2017-08-27T14:22:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:23:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:24:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:25:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:26:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:27:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:28:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:29:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:30:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:31:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:32:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:33:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T14:34:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:35:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:36:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:37:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:38:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:39:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:40:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:41:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:42:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:43:51.462Z', - value: '0.4666666666666667', - }, - { - time: '2017-08-27T14:44:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T14:45:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:46:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:47:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:48:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:49:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:50:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:51:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:52:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:53:51.462Z', - value: '0.4952333787297264', - }, - { - time: '2017-08-27T14:54:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:55:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T14:56:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:57:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T14:58:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T14:59:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:00:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:01:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:02:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:03:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:04:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T15:05:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:06:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:07:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:08:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:09:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:10:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:11:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:12:51.462Z', - value: '0.4857096599080009', - }, - { - time: '2017-08-27T15:13:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:14:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:15:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:16:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:17:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:18:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:19:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:20:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:21:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:22:51.462Z', - value: '0.49524281183630325', - }, - { - time: '2017-08-27T15:23:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:24:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:25:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:26:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:27:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:28:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:29:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:30:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:31:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:32:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:33:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:34:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:35:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:36:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:37:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:38:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:39:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:40:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:41:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:42:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:43:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:44:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:45:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:46:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:47:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:48:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:49:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T15:50:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:51:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:52:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:53:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:54:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:55:51.462Z', - value: '0.49524752852435283', - }, - { - time: '2017-08-27T15:56:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T15:57:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:58:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T15:59:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:00:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:01:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:02:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:03:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:04:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:05:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:06:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:07:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:08:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:09:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:10:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:12:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:13:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:14:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:15:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:16:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:17:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:18:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:19:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:20:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:21:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:22:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:23:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:24:51.462Z', - value: '0.4761859410862754', - }, - { - time: '2017-08-27T16:25:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:26:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:27:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:28:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:29:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:30:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:31:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:32:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:33:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:34:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:35:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:36:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:37:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:38:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:39:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:40:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:41:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:42:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:43:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:44:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:45:51.462Z', - value: '0.485718911608682', - }, - { - time: '2017-08-27T16:46:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:47:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:48:51.462Z', - value: '0.4952333787297264', - }, - { - time: '2017-08-27T16:49:51.462Z', - value: '0.4857096599080009', - }, - { - time: '2017-08-27T16:50:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:51:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:52:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:53:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:54:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:55:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T16:56:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:57:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T16:58:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T16:59:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:00:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:01:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:02:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:03:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:04:51.462Z', - value: '0.47619501138106085', - }, - { - time: '2017-08-27T17:05:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:06:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:07:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:08:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:09:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:10:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:12:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:13:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:14:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:15:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:16:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:17:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:18:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:19:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:20:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:21:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:22:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:23:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:24:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:25:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:26:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:27:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:28:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:29:51.462Z', - value: '0.4761859410862754', - }, - { - time: '2017-08-27T17:30:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:31:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:32:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:33:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:34:51.462Z', - value: '0.4761859410862754', - }, - { - time: '2017-08-27T17:35:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:36:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:37:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:38:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:39:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:40:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:41:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:42:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:43:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:44:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:45:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:46:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:47:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:48:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:49:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:50:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:51:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:52:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:53:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:54:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:55:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T17:56:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:57:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T17:58:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T17:59:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T18:00:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:01:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:02:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:03:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:04:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:05:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:06:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:07:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:08:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:09:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:10:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:11:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:12:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T18:13:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:14:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:15:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:16:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:17:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:18:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:19:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:20:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:21:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:22:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:23:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:24:51.462Z', - value: '0.45714285714285713', - }, - { - time: '2017-08-27T18:25:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:26:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:27:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:28:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:29:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:30:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:31:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:32:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:33:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:34:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:35:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:36:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:37:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T18:38:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:39:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:40:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:41:51.462Z', - value: '0.6190476190476191', - }, - { - time: '2017-08-27T18:42:51.462Z', - value: '0.6952380952380952', - }, - { - time: '2017-08-27T18:43:51.462Z', - value: '0.857142857142857', - }, - { - time: '2017-08-27T18:44:51.462Z', - value: '0.9238095238095239', - }, - { - time: '2017-08-27T18:45:51.462Z', - value: '0.7428571428571429', - }, - { - time: '2017-08-27T18:46:51.462Z', - value: '0.8857142857142857', - }, - { - time: '2017-08-27T18:47:51.462Z', - value: '0.638095238095238', - }, - { - time: '2017-08-27T18:48:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:49:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:50:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T18:51:51.462Z', - value: '0.47619501138106085', - }, - { - time: '2017-08-27T18:52:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:53:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:54:51.462Z', - value: '0.4952380952380952', - }, - { - time: '2017-08-27T18:55:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:56:51.462Z', - value: '0.4857142857142857', - }, - { - time: '2017-08-27T18:57:51.462Z', - value: '0.47619047619047616', - }, - { - time: '2017-08-27T18:58:51.462Z', - value: '0.6857142857142856', - }, - { - time: '2017-08-27T18:59:51.462Z', - value: '0.6952380952380952', - }, - { - time: '2017-08-27T19:00:51.462Z', - value: '0.5238095238095237', - }, - { - time: '2017-08-27T19:01:51.462Z', - value: '0.5904761904761905', - }, - ], - }, - ], - }, - ], - }, -]; - export const queryWithoutData = { title: 'HTTP Error rate', weight: 10, diff --git a/spec/javascripts/monitoring/monitoring_store_spec.js b/spec/javascripts/monitoring/monitoring_store_spec.js deleted file mode 100644 index 5bf6937c92e..00000000000 --- a/spec/javascripts/monitoring/monitoring_store_spec.js +++ /dev/null @@ -1,59 +0,0 @@ -import MonitoringStore from '~/monitoring/stores/monitoring_store'; -import MonitoringMock, { deploymentData, environmentData } from './mock_data'; - -describe('MonitoringStore', () => { - const store = new MonitoringStore(); - store.storeMetrics(MonitoringMock.data); - - it('contains two groups that contains, one of which has two queries sorted by priority', () => { - expect(store.groups).toBeDefined(); - expect(store.groups.length).toEqual(2); - expect(store.groups[0].metrics.length).toEqual(2); - }); - - it('gets the metrics count for every group', () => { - expect(store.getMetricsCount()).toEqual(3); - }); - - it('contains deployment data', () => { - store.storeDeploymentData(deploymentData); - - expect(store.deploymentData).toBeDefined(); - expect(store.deploymentData.length).toEqual(3); - expect(typeof store.deploymentData[0]).toEqual('object'); - }); - - it('only stores environment data that contains deployments', () => { - store.storeEnvironmentsData(environmentData); - - expect(store.environmentsData.length).toEqual(2); - }); - - it('removes the data if all the values from a query are not defined', () => { - expect(store.groups[1].metrics[0].queries[0].result.length).toEqual(0); - }); - - it('assigns queries a metric id', () => { - expect(store.groups[1].metrics[0].queries[0].metricId).toEqual('100'); - }); - - it('assigns metric id of null if metric has no id', () => { - const noId = MonitoringMock.data.map(group => ({ - ...group, - ...{ - metrics: group.metrics.map(metric => { - const { id, ...metricWithoutId } = metric; - - return metricWithoutId; - }), - }, - })); - store.storeMetrics(noId); - - store.groups.forEach(group => { - group.metrics.forEach(metric => { - expect(metric.queries.every(query => query.metricId === null)).toBe(true); - }); - }); - }); -}); diff --git a/spec/javascripts/monitoring/store/actions_spec.js b/spec/javascripts/monitoring/store/actions_spec.js new file mode 100644 index 00000000000..a848cd24fe3 --- /dev/null +++ b/spec/javascripts/monitoring/store/actions_spec.js @@ -0,0 +1,158 @@ +import axios from '~/lib/utils/axios_utils'; +import MockAdapter from 'axios-mock-adapter'; +import store from '~/monitoring/stores'; +import * as types from '~/monitoring/stores/mutation_types'; +import { + fetchDeploymentsData, + fetchEnvironmentsData, + requestMetricsData, + setEndpoints, + setGettingStartedEmptyState, +} from '~/monitoring/stores/actions'; +import storeState from '~/monitoring/stores/state'; +import testAction from 'spec/helpers/vuex_action_helper'; +import { resetStore } from '../helpers'; +import { deploymentData, environmentData } from '../mock_data'; + +describe('Monitoring store actions', () => { + let mock; + + beforeEach(() => { + mock = new MockAdapter(axios); + }); + + afterEach(() => { + resetStore(store); + mock.restore(); + }); + + describe('requestMetricsData', () => { + it('sets emptyState to loading', () => { + const commit = jasmine.createSpy(); + const { state } = store; + + requestMetricsData({ state, commit }); + + expect(commit).toHaveBeenCalledWith(types.REQUEST_METRICS_DATA); + }); + }); + + describe('fetchDeploymentsData', () => { + it('commits RECEIVE_DEPLOYMENTS_DATA_SUCCESS on error', done => { + const dispatch = jasmine.createSpy(); + const { state } = store; + state.deploymentEndpoint = '/success'; + + mock.onGet(state.deploymentEndpoint).reply(200, { + deployments: deploymentData, + }); + + fetchDeploymentsData({ state, dispatch }) + .then(() => { + expect(dispatch).toHaveBeenCalledWith('receiveDeploymentsDataSuccess', deploymentData); + done(); + }) + .catch(done.fail); + }); + + it('commits RECEIVE_DEPLOYMENTS_DATA_FAILURE on error', done => { + const dispatch = jasmine.createSpy(); + const { state } = store; + state.deploymentEndpoint = '/error'; + + mock.onGet(state.deploymentEndpoint).reply(500); + + fetchDeploymentsData({ state, dispatch }) + .then(() => { + expect(dispatch).toHaveBeenCalledWith('receiveDeploymentsDataFailure'); + done(); + }) + .catch(done.fail); + }); + }); + + describe('fetchEnvironmentsData', () => { + it('commits RECEIVE_ENVIRONMENTS_DATA_SUCCESS on error', done => { + const dispatch = jasmine.createSpy(); + const { state } = store; + state.environmentsEndpoint = '/success'; + + mock.onGet(state.environmentsEndpoint).reply(200, { + environments: environmentData, + }); + + fetchEnvironmentsData({ state, dispatch }) + .then(() => { + expect(dispatch).toHaveBeenCalledWith('receiveEnvironmentsDataSuccess', environmentData); + done(); + }) + .catch(done.fail); + }); + + it('commits RECEIVE_ENVIRONMENTS_DATA_FAILURE on error', done => { + const dispatch = jasmine.createSpy(); + const { state } = store; + state.environmentsEndpoint = '/error'; + + mock.onGet(state.environmentsEndpoint).reply(500); + + fetchEnvironmentsData({ state, dispatch }) + .then(() => { + expect(dispatch).toHaveBeenCalledWith('receiveEnvironmentsDataFailure'); + done(); + }) + .catch(done.fail); + }); + }); + + describe('Set endpoints', () => { + let mockedState; + + beforeEach(() => { + mockedState = storeState(); + }); + + it('should commit SET_ENDPOINTS mutation', done => { + testAction( + setEndpoints, + { + metricsEndpoint: 'additional_metrics.json', + deploymentsEndpoint: 'deployments.json', + environmentsEndpoint: 'deployments.json', + }, + mockedState, + [ + { + type: types.SET_ENDPOINTS, + payload: { + metricsEndpoint: 'additional_metrics.json', + deploymentsEndpoint: 'deployments.json', + environmentsEndpoint: 'deployments.json', + }, + }, + ], + [], + done, + ); + }); + }); + + describe('Set empty states', () => { + let mockedState; + + beforeEach(() => { + mockedState = storeState(); + }); + + it('should commit SET_METRICS_ENDPOINT mutation', done => { + testAction( + setGettingStartedEmptyState, + null, + mockedState, + [{ type: types.SET_GETTING_STARTED_EMPTY_STATE }], + [], + done, + ); + }); + }); +}); diff --git a/spec/javascripts/monitoring/store/mutations_spec.js b/spec/javascripts/monitoring/store/mutations_spec.js new file mode 100644 index 00000000000..882ee1dec14 --- /dev/null +++ b/spec/javascripts/monitoring/store/mutations_spec.js @@ -0,0 +1,92 @@ +import mutations from '~/monitoring/stores/mutations'; +import * as types from '~/monitoring/stores/mutation_types'; +import state from '~/monitoring/stores/state'; +import { metricsGroupsAPIResponse, deploymentData } from '../mock_data'; + +describe('Monitoring mutations', () => { + let stateCopy; + + beforeEach(() => { + stateCopy = state(); + }); + + describe(types.RECEIVE_METRICS_DATA_SUCCESS, () => { + beforeEach(() => { + stateCopy.groups = []; + const groups = metricsGroupsAPIResponse.data; + + mutations[types.RECEIVE_METRICS_DATA_SUCCESS](stateCopy, groups); + }); + + it('normalizes values', () => { + const expectedTimestamp = '2017-05-25T08:22:34.925Z'; + const expectedValue = 0.0010794445585559514; + const [timestamp, value] = stateCopy.groups[0].metrics[0].queries[0].result[0].values[0]; + + expect(timestamp).toEqual(expectedTimestamp); + expect(value).toEqual(expectedValue); + }); + + it('contains two groups that contains, one of which has two queries sorted by priority', () => { + expect(stateCopy.groups).toBeDefined(); + expect(stateCopy.groups.length).toEqual(2); + expect(stateCopy.groups[0].metrics.length).toEqual(2); + }); + + it('assigns queries a metric id', () => { + expect(stateCopy.groups[1].metrics[0].queries[0].metricId).toEqual('100'); + }); + + it('removes the data if all the values from a query are not defined', () => { + expect(stateCopy.groups[1].metrics[0].queries[0].result.length).toEqual(0); + }); + + it('assigns metric id of null if metric has no id', () => { + stateCopy.groups = []; + const groups = metricsGroupsAPIResponse.data; + const noId = groups.map(group => ({ + ...group, + ...{ + metrics: group.metrics.map(metric => { + const { id, ...metricWithoutId } = metric; + + return metricWithoutId; + }), + }, + })); + + mutations[types.RECEIVE_METRICS_DATA_SUCCESS](stateCopy, noId); + + stateCopy.groups.forEach(group => { + group.metrics.forEach(metric => { + expect(metric.queries.every(query => query.metricId === null)).toBe(true); + }); + }); + }); + }); + + describe(types.RECEIVE_DEPLOYMENTS_DATA_SUCCESS, () => { + it('stores the deployment data', () => { + stateCopy.deploymentData = []; + mutations[types.RECEIVE_DEPLOYMENTS_DATA_SUCCESS](stateCopy, deploymentData); + + expect(stateCopy.deploymentData).toBeDefined(); + expect(stateCopy.deploymentData.length).toEqual(3); + expect(typeof stateCopy.deploymentData[0]).toEqual('object'); + }); + }); + + describe('SET_ENDPOINTS', () => { + it('should set all the endpoints', () => { + mutations[types.SET_ENDPOINTS](stateCopy, { + metricsEndpoint: 'additional_metrics.json', + environmentsEndpoint: 'environments.json', + deploymentsEndpoint: 'deployments.json', + }); + + expect(stateCopy.metricsEndpoint).toEqual('additional_metrics.json'); + expect(stateCopy.environmentsEndpoint).toEqual('environments.json'); + expect(stateCopy.deploymentsEndpoint).toEqual('deployments.json'); + }); + }); +}); |