diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue
index d716fc211caf6f2eadfa0a65d7756384101c2a0f..0a652329dfe7be88db199382d9291401b1b583a8 100644
--- a/app/assets/javascripts/monitoring/components/dashboard.vue
+++ b/app/assets/javascripts/monitoring/components/dashboard.vue
@@ -70,7 +70,7 @@ export default {
type: String,
required: true,
},
- deploymentEndpoint: {
+ deploymentsEndpoint: {
type: String,
required: false,
default: null,
@@ -148,7 +148,7 @@ export default {
this.setEndpoints({
metricsEndpoint: this.metricsEndpoint,
environmentsEndpoint: this.environmentsEndpoint,
- deploymentsEndpoint: this.deploymentEndpoint,
+ deploymentsEndpoint: this.deploymentsEndpoint,
dashboardEndpoint: this.dashboardEndpoint,
});
@@ -280,9 +280,8 @@ export default {
{{ $options.addMetric.title }}
- {{ $options.addMetric.title }}
-
-
- {{ __('Cancel') }}
-
+ {{ __('Cancel') }}
{{ __('Save changes') }}
- {{ __('Save changes') }}
-
diff --git a/app/assets/javascripts/monitoring/stores/actions.js b/app/assets/javascripts/monitoring/stores/actions.js
index 49ce722b8386683aef78fa9dad6f7f266d016c57..f41e215cb5d9e45dac4a13c060ea3c3a22c2ab0c 100644
--- a/app/assets/javascripts/monitoring/stores/actions.js
+++ b/app/assets/javascripts/monitoring/stores/actions.js
@@ -164,10 +164,10 @@ export const fetchPrometheusMetrics = ({ state, commit, dispatch }, params) => {
};
export const fetchDeploymentsData = ({ state, dispatch }) => {
- if (!state.deploymentEndpoint) {
+ if (!state.deploymentsEndpoint) {
return Promise.resolve([]);
}
- return backOffRequest(() => axios.get(state.deploymentEndpoint))
+ return backOffRequest(() => axios.get(state.deploymentsEndpoint))
.then(resp => resp.data)
.then(response => {
if (!response || !response.deployments) {
diff --git a/app/helpers/environments_helper.rb b/app/helpers/environments_helper.rb
index 855b243cc8af2564318d15a1e956c854d64a969a..0f118c235d808ea5bd5622bce79e41fb820135a0 100644
--- a/app/helpers/environments_helper.rb
+++ b/app/helpers/environments_helper.rb
@@ -27,7 +27,7 @@ module EnvironmentsHelper
"empty-unable-to-connect-svg-path" => image_path('illustrations/monitoring/unable_to_connect.svg'),
"metrics-endpoint" => additional_metrics_project_environment_path(project, environment, format: :json),
"dashboard-endpoint" => metrics_dashboard_project_environment_path(project, environment, format: :json),
- "deployment-endpoint" => project_environment_deployments_path(project, environment, format: :json),
+ "deployments-endpoint" => project_environment_deployments_path(project, environment, format: :json),
"environments-endpoint": project_environments_path(project, format: :json),
"project-path" => project_path(project),
"tags-path" => project_tags_path(project),
diff --git a/changelogs/unreleased/dhiraj-fix-missing-deployment-rockets-in-monitoring-dashboard.yml b/changelogs/unreleased/dhiraj-fix-missing-deployment-rockets-in-monitoring-dashboard.yml
new file mode 100644
index 0000000000000000000000000000000000000000..12a21e818b427dbf8151f031fcdf8c4d19c1ba5a
--- /dev/null
+++ b/changelogs/unreleased/dhiraj-fix-missing-deployment-rockets-in-monitoring-dashboard.yml
@@ -0,0 +1,5 @@
+---
+title: Fix missing deployment rockets in monitor dashboard
+merge_request: 29574
+author:
+type: fixed
diff --git a/spec/helpers/environments_helper_spec.rb b/spec/helpers/environments_helper_spec.rb
index 0c8a8d2f032d3f3421d7506f174e126d9c76489a..2b8bf9319fc2f392fa8af7dfdf8d87e45d58c0b2 100644
--- a/spec/helpers/environments_helper_spec.rb
+++ b/spec/helpers/environments_helper_spec.rb
@@ -27,7 +27,7 @@ describe EnvironmentsHelper do
'empty-no-data-svg-path' => match_asset_path('/assets/illustrations/monitoring/no_data.svg'),
'empty-unable-to-connect-svg-path' => match_asset_path('/assets/illustrations/monitoring/unable_to_connect.svg'),
'metrics-endpoint' => additional_metrics_project_environment_path(project, environment, format: :json),
- 'deployment-endpoint' => project_environment_deployments_path(project, environment, format: :json),
+ 'deployments-endpoint' => project_environment_deployments_path(project, environment, format: :json),
'environments-endpoint': project_environments_path(project, format: :json),
'project-path' => project_path(project),
'tags-path' => project_tags_path(project),
diff --git a/spec/javascripts/monitoring/dashboard_spec.js b/spec/javascripts/monitoring/dashboard_spec.js
index f1d578648b8ba22c205abf10699436a9b44a5631..f4166987aedc5a2ab7172137f5b4f0f0d752e3c5 100644
--- a/spec/javascripts/monitoring/dashboard_spec.js
+++ b/spec/javascripts/monitoring/dashboard_spec.js
@@ -20,7 +20,7 @@ const propsData = {
tagsPath: '/path/to/tags',
projectPath: '/path/to/project',
metricsEndpoint: mockApiEndpoint,
- deploymentEndpoint: null,
+ deploymentsEndpoint: null,
emptyGettingStartedSvgPath: '/path/to/getting-started.svg',
emptyLoadingSvgPath: '/path/to/loading.svg',
emptyNoDataSvgPath: '/path/to/no-data.svg',
diff --git a/spec/javascripts/monitoring/store/actions_spec.js b/spec/javascripts/monitoring/store/actions_spec.js
index 8c02e21eda21441074a131b564fcc11a504459c7..083a01c4d744f2e0550290c46cccab8803a125b9 100644
--- a/spec/javascripts/monitoring/store/actions_spec.js
+++ b/spec/javascripts/monitoring/store/actions_spec.js
@@ -51,9 +51,9 @@ describe('Monitoring store actions', () => {
it('commits RECEIVE_DEPLOYMENTS_DATA_SUCCESS on error', done => {
const dispatch = jasmine.createSpy();
const { state } = store;
- state.deploymentEndpoint = '/success';
+ state.deploymentsEndpoint = '/success';
- mock.onGet(state.deploymentEndpoint).reply(200, {
+ mock.onGet(state.deploymentsEndpoint).reply(200, {
deployments: deploymentData,
});
@@ -68,9 +68,9 @@ describe('Monitoring store actions', () => {
it('commits RECEIVE_DEPLOYMENTS_DATA_FAILURE on error', done => {
const dispatch = jasmine.createSpy();
const { state } = store;
- state.deploymentEndpoint = '/error';
+ state.deploymentsEndpoint = '/error';
- mock.onGet(state.deploymentEndpoint).reply(500);
+ mock.onGet(state.deploymentsEndpoint).reply(500);
fetchDeploymentsData({ state, dispatch })
.then(() => {