Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 18:09:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-13 18:09:21 +0300
commitc36152ff8c41fad2f413f253eb7ac5c927e47c56 (patch)
treebbf300da207de3e8bbf272d44111ceedb18f5833 /app/assets/javascripts/sidebar
parent286fe61013674fe2d245ffc8d2233baf09923e70 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/sidebar')
-rw-r--r--app/assets/javascripts/sidebar/queries/updateStatus.mutation.graphql7
-rw-r--r--app/assets/javascripts/sidebar/services/sidebar_service.js15
-rw-r--r--app/assets/javascripts/sidebar/sidebar_mediator.js2
3 files changed, 21 insertions, 3 deletions
diff --git a/app/assets/javascripts/sidebar/queries/updateStatus.mutation.graphql b/app/assets/javascripts/sidebar/queries/updateStatus.mutation.graphql
new file mode 100644
index 00000000000..27a5cff12c7
--- /dev/null
+++ b/app/assets/javascripts/sidebar/queries/updateStatus.mutation.graphql
@@ -0,0 +1,7 @@
+mutation ($projectPath: ID!, $iid: String!, $healthStatus: HealthStatus) {
+ updateIssue(input: { projectPath: $projectPath, iid: $iid, healthStatus: $healthStatus}) {
+ issue {
+ healthStatus
+ }
+ }
+}
diff --git a/app/assets/javascripts/sidebar/services/sidebar_service.js b/app/assets/javascripts/sidebar/services/sidebar_service.js
index 59d4f6ed388..3b8903b4a4c 100644
--- a/app/assets/javascripts/sidebar/services/sidebar_service.js
+++ b/app/assets/javascripts/sidebar/services/sidebar_service.js
@@ -18,7 +18,7 @@ export default class SidebarService {
this.moveIssueEndpoint = endpointMap.moveIssueEndpoint;
this.projectsAutocompleteEndpoint = endpointMap.projectsAutocompleteEndpoint;
this.fullPath = endpointMap.fullPath;
- this.id = endpointMap.id;
+ this.iid = endpointMap.iid;
SidebarService.singleton = this;
}
@@ -37,7 +37,7 @@ export default class SidebarService {
: sidebarDetailsQuery,
variables: {
fullPath: this.fullPath,
- iid: this.id.toString(),
+ iid: this.iid.toString(),
},
}),
]);
@@ -47,6 +47,17 @@ export default class SidebarService {
return axios.put(this.endpoint, { [key]: data });
}
+ updateWithGraphQl(mutation, variables) {
+ return gqClient.mutate({
+ mutation,
+ variables: {
+ ...variables,
+ projectPath: this.fullPath,
+ iid: this.iid.toString(),
+ },
+ });
+ }
+
getProjectsAutocomplete(searchTerm) {
return axios.get(this.projectsAutocompleteEndpoint, {
params: {
diff --git a/app/assets/javascripts/sidebar/sidebar_mediator.js b/app/assets/javascripts/sidebar/sidebar_mediator.js
index eb1cf977725..34621fc1036 100644
--- a/app/assets/javascripts/sidebar/sidebar_mediator.js
+++ b/app/assets/javascripts/sidebar/sidebar_mediator.js
@@ -20,7 +20,7 @@ export default class SidebarMediator {
moveIssueEndpoint: options.moveIssueEndpoint,
projectsAutocompleteEndpoint: options.projectsAutocompleteEndpoint,
fullPath: options.fullPath,
- id: options.id,
+ iid: options.iid,
});
SidebarMediator.singleton = this;
}