...@@ -203,6 +203,8 @@ ...@@ -203,6 +203,8 @@
- name: postgres:9.6 - name: postgres:9.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg10: .use-pg10:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
...@@ -210,6 +212,8 @@ ...@@ -210,6 +212,8 @@
- name: postgres:10.9 - name: postgres:10.9
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg9-ee: .use-pg9-ee:
services: services:
...@@ -217,6 +221,8 @@ ...@@ -217,6 +221,8 @@
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
- name: elasticsearch:6.4.2 - name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg10-ee: .use-pg10-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.21-postgresql-10-graphicsmagick-1.3.34"
...@@ -225,6 +231,8 @@ ...@@ -225,6 +231,8 @@
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
- name: elasticsearch:6.4.2 - name: elasticsearch:6.4.2
variables:
POSTGRES_HOST_AUTH_METHOD: trust
.only-ee: .only-ee:
only: only:
... ...
......
...@@ -6,7 +6,7 @@ import { gqClient, parseEnvironmentsResponse, removeLeadingSlash } from './utils ...@@ -6,7 +6,7 @@ import { gqClient, parseEnvironmentsResponse, removeLeadingSlash } from './utils
import trackDashboardLoad from '../monitoring_tracking_helper'; import trackDashboardLoad from '../monitoring_tracking_helper';
import getEnvironments from '../queries/getEnvironments.query.graphql'; import getEnvironments from '../queries/getEnvironments.query.graphql';
import statusCodes from '../../lib/utils/http_status'; import statusCodes from '../../lib/utils/http_status';
import { backOff } from '../../lib/utils/common_utils'; import { backOff, convertObjectPropsToCamelCase } from '../../lib/utils/common_utils';
import { s__, sprintf } from '../../locale'; import { s__, sprintf } from '../../locale';
import { PROMETHEUS_TIMEOUT } from '../constants'; import { PROMETHEUS_TIMEOUT } from '../constants';
...@@ -52,6 +52,8 @@ export const requestMetricsDashboard = ({ commit }) => { ...@@ -52,6 +52,8 @@ export const requestMetricsDashboard = ({ commit }) => {
export const receiveMetricsDashboardSuccess = ({ commit, dispatch }, { response, params }) => { export const receiveMetricsDashboardSuccess = ({ commit, dispatch }, { response, params }) => {
commit(types.SET_ALL_DASHBOARDS, response.all_dashboards); commit(types.SET_ALL_DASHBOARDS, response.all_dashboards);
commit(types.RECEIVE_METRICS_DATA_SUCCESS, response.dashboard); commit(types.RECEIVE_METRICS_DATA_SUCCESS, response.dashboard);
commit(types.SET_ENDPOINTS, convertObjectPropsToCamelCase(response.metrics_data));
return dispatch('fetchPrometheusMetrics', params); return dispatch('fetchPrometheusMetrics', params);
}; };
export const receiveMetricsDashboardFailure = ({ commit }, error) => { export const receiveMetricsDashboardFailure = ({ commit }, error) => {
... ...
......
import Vue from 'vue'; import Vue from 'vue';
import pick from 'lodash/pick';
import { slugify } from '~/lib/utils/text_utility'; import { slugify } from '~/lib/utils/text_utility';
import * as types from './mutation_types'; import * as types from './mutation_types';
import { normalizeMetric, normalizeQueryResult } from './utils'; import { normalizeMetric, normalizeQueryResult } from './utils';
...@@ -174,15 +175,19 @@ export default { ...@@ -174,15 +175,19 @@ export default {
state: emptyStateFromError(error), state: emptyStateFromError(error),
}); });
}, },
[types.SET_ENDPOINTS](state, endpoints = {}) {
[types.SET_ENDPOINTS](state, endpoints) { const endpointKeys = [
state.metricsEndpoint = endpoints.metricsEndpoint; 'metricsEndpoint',
state.deploymentsEndpoint = endpoints.deploymentsEndpoint; 'deploymentsEndpoint',
state.dashboardEndpoint = endpoints.dashboardEndpoint; 'dashboardEndpoint',
state.dashboardsEndpoint = endpoints.dashboardsEndpoint; 'dashboardsEndpoint',
state.currentDashboard = endpoints.currentDashboard; 'currentDashboard',
state.projectPath = endpoints.projectPath; 'projectPath',
state.logsPath = endpoints.logsPath || state.logsPath; 'logsPath',
];
Object.entries(pick(endpoints, endpointKeys)).forEach(([key, value]) => {
state[key] = value;
});
}, },
[types.SET_TIME_RANGE](state, timeRange) { [types.SET_TIME_RANGE](state, timeRange) {
state.timeRange = timeRange; state.timeRange = timeRange;
... ...
......
import ZenMode from '~/zen_mode'; import ZenMode from '~/zen_mode';
import initEditRelease from '~/releases/detail'; import initEditRelease from '~/releases/mount_edit';
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
new ZenMode(); // eslint-disable-line no-new new ZenMode(); // eslint-disable-line no-new
... ...
......
import initReleases from '~/releases/list'; import initReleases from '~/releases/mount_index';
document.addEventListener('DOMContentLoaded', initReleases); document.addEventListener('DOMContentLoaded', initReleases);
...@@ -7,7 +7,7 @@ import MarkdownField from '~/vue_shared/components/markdown/field.vue'; ...@@ -7,7 +7,7 @@ import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import autofocusonshow from '~/vue_shared/directives/autofocusonshow'; import autofocusonshow from '~/vue_shared/directives/autofocusonshow';
export default { export default {
name: 'ReleaseDetailApp', name: 'ReleaseEditApp',
components: { components: {
GlFormInput, GlFormInput,
GlFormGroup, GlFormGroup,
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
autofocusonshow, autofocusonshow,
}, },
computed: { computed: {
...mapState([ ...mapState('detail', [
'isFetchingRelease', 'isFetchingRelease',
'fetchError', 'fetchError',
'markdownDocsPath', 'markdownDocsPath',
...@@ -42,7 +42,7 @@ export default { ...@@ -42,7 +42,7 @@ export default {
); );
}, },
tagName() { tagName() {
return this.$store.state.release.tagName; return this.$store.state.detail.release.tagName;
}, },
tagNameHintText() { tagNameHintText() {
return sprintf( return sprintf(
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}, },
releaseTitle: { releaseTitle: {
get() { get() {
return this.$store.state.release.name; return this.$store.state.detail.release.name;
}, },
set(title) { set(title) {
this.updateReleaseTitle(title); this.updateReleaseTitle(title);
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
}, },
releaseNotes: { releaseNotes: {
get() { get() {
return this.$store.state.release.description; return this.$store.state.detail.release.description;
}, },
set(notes) { set(notes) {
this.updateReleaseNotes(notes); this.updateReleaseNotes(notes);
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
this.fetchRelease(); this.fetchRelease();
}, },
methods: { methods: {
...mapActions([ ...mapActions('detail', [
'fetchRelease', 'fetchRelease',
'updateRelease', 'updateRelease',
'updateReleaseTitle', 'updateReleaseTitle',
... ...
......
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
}, },
}, },
computed: { computed: {
...mapState(['isLoading', 'releases', 'hasError', 'pageInfo']), ...mapState('list', ['isLoading', 'releases', 'hasError', 'pageInfo']),
shouldRenderEmptyState() { shouldRenderEmptyState() {
return !this.releases.length && !this.hasError && !this.isLoading; return !this.releases.length && !this.hasError && !this.isLoading;
}, },
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}); });
}, },
methods: { methods: {
...mapActions(['fetchReleases']), ...mapActions('list', ['fetchReleases']),
onChangePage(page) { onChangePage(page) {
historyPushState(buildUrlWithCurrentLocation(`?page=${page}`)); historyPushState(buildUrlWithCurrentLocation(`?page=${page}`));
this.fetchReleases({ page, projectId: this.projectId }); this.fetchReleases({ page, projectId: this.projectId });
... ...
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
import Vue from 'vue';
import App from './components/app.vue';
import createStore from './store';
export default () => {
const element = document.getElementById('js-releases-page');
return new Vue({
el: element,
store: createStore(),
components: {
App,
},
render(createElement) {
return createElement('app', {
props: {
projectId: element.dataset.projectId,
documentationLink: element.dataset.documentationPath,
illustrationPath: element.dataset.illustrationPath,
},
});
},
});
};
import Vue from 'vue'; import Vue from 'vue';
import ReleaseDetailApp from './components/app.vue'; import ReleaseEditApp from './components/app_edit.vue';
import createStore from './store'; import createStore from './stores';
import detailModule from './stores/modules/detail';
export default () => { export default () => {
const el = document.getElementById('js-edit-release-page'); const el = document.getElementById('js-edit-release-page');
const store = createStore(); const store = createStore({ detail: detailModule });
store.dispatch('setInitialState', el.dataset); store.dispatch('setInitialState', el.dataset);
return new Vue({ return new Vue({
el, el,
store, store,
components: { ReleaseDetailApp }, render: h => h(ReleaseEditApp),
render(createElement) {
return createElement('release-detail-app');
},
}); });
}; };
import Vue from 'vue';
import ReleaseListApp from './components/app_index.vue';
import createStore from './stores';
import listModule from './stores/modules/list';
export default () => {
const el = document.getElementById('js-releases-page');
return new Vue({
el,
store: createStore({ list: listModule }),
render: h =>
h(ReleaseListApp, {
props: {
projectId: el.dataset.projectId,
documentationLink: el.dataset.documentationPath,
illustrationPath: el.dataset.illustrationPath,
},
}),
});
};