Commit 0ac66e44 authored by Andrew Fontaine's avatar Andrew Fontaine

Poll folder for changes in new environments page

In the old page, the folder followed the main endpoint's polling
interval. This replicates that in the new page by using Apollo's poll
interval mechanism.

Changelog: fixed
parent fdaff68a
<script> <script>
import { GlButton, GlCollapse, GlIcon, GlBadge, GlLink } from '@gitlab/ui'; import { GlButton, GlCollapse, GlIcon, GlBadge, GlLink } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import pollIntervalQuery from '../graphql/queries/poll_interval.query.graphql';
import folderQuery from '../graphql/queries/folder.query.graphql'; import folderQuery from '../graphql/queries/folder.query.graphql';
import EnvironmentItem from './new_environment_item.vue'; import EnvironmentItem from './new_environment_item.vue';
...@@ -20,7 +21,7 @@ export default { ...@@ -20,7 +21,7 @@ export default {
}, },
}, },
data() { data() {
return { visible: false }; return { visible: false, interval: undefined };
}, },
apollo: { apollo: {
folder: { folder: {
...@@ -28,6 +29,12 @@ export default { ...@@ -28,6 +29,12 @@ export default {
variables() { variables() {
return { environment: this.nestedEnvironment.latest }; return { environment: this.nestedEnvironment.latest };
}, },
pollInterval() {
return this.interval;
},
},
interval: {
query: pollIntervalQuery,
}, },
}, },
i18n: { i18n: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment