From 6ed4b8b7a1185ad278eb2e40b32e859f828233d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Tue, 23 Aug 2022 14:48:49 +0200 Subject: [PATCH] webui: adapt to CombinedId --- cache/repo_cache_bug.go | 2 +- webui/src/components/Identity/CurrentIdentity.graphql | 1 + webui/src/components/Identity/UserIdentity.graphql | 1 + webui/src/pages/bug/BugQuery.graphql | 1 + webui/src/pages/bug/EditCommentForm.tsx | 3 +-- webui/src/pages/bug/MessageHistory.graphql | 1 + webui/src/pages/bug/TimelineQuery.graphql | 1 + webui/src/pages/identity/GetBugsByUser.graphql | 1 + webui/src/pages/identity/GetUserStatistic.graphql | 1 + webui/src/pages/list/FilterToolbar.graphql | 1 + webui/src/pages/list/ListIdentities.graphql | 1 + webui/src/pages/list/ListLabels.graphql | 1 + webui/src/pages/list/ListQuery.graphql | 1 + 13 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cache/repo_cache_bug.go b/cache/repo_cache_bug.go index 226c4c13e09939c7924530413445cea05bf701d0..4522f1bcbdefd55c3708c688f2aa8e24bef2ceff 100644 --- a/cache/repo_cache_bug.go +++ b/cache/repo_cache_bug.go @@ -290,7 +290,7 @@ func (c *RepoCache) ResolveComment(prefix string) (*BugCache, entity.CombinedId, } for _, comment := range b.Snapshot().Comments { - if comment.TargetId().HasPrefix(prefix) { + if comment.CombinedId().HasPrefix(prefix) { matchingBugIds = append(matchingBugIds, bugId) matchingBug = b matchingCommentId = comment.CombinedId() diff --git a/webui/src/components/Identity/CurrentIdentity.graphql b/webui/src/components/Identity/CurrentIdentity.graphql index 054190df50c3900168cb95168adae93fda5a9eb6..56efeacf019823e0420a6d61dc0169a0eb213f73 100644 --- a/webui/src/components/Identity/CurrentIdentity.graphql +++ b/webui/src/components/Identity/CurrentIdentity.graphql @@ -2,6 +2,7 @@ query CurrentIdentity { repository { + name userIdentity { ...Identity } diff --git a/webui/src/components/Identity/UserIdentity.graphql b/webui/src/components/Identity/UserIdentity.graphql index 9cf102486236da0b62cb604e58de2503ee6fd5b4..01e8c3e56bb69f25d64103a66258849af5f62bbf 100644 --- a/webui/src/components/Identity/UserIdentity.graphql +++ b/webui/src/components/Identity/UserIdentity.graphql @@ -2,6 +2,7 @@ query GetUserById($userId: String!) { repository { + name identity(prefix: $userId) { ...Identity } diff --git a/webui/src/pages/bug/BugQuery.graphql b/webui/src/pages/bug/BugQuery.graphql index cdc4723fdf032e10cec2898771a718151275bf8a..9d4cede83a5111e2045ca68f8df95e3958543c3f 100644 --- a/webui/src/pages/bug/BugQuery.graphql +++ b/webui/src/pages/bug/BugQuery.graphql @@ -2,6 +2,7 @@ query GetBug($id: String!) { repository { + name bug(prefix: $id) { ...Bug } diff --git a/webui/src/pages/bug/EditCommentForm.tsx b/webui/src/pages/bug/EditCommentForm.tsx index 4da051e6cb245e6db03debf243ae0b1658841d2d..b265735b05e69068a8c90e5099502f5fb0574b7c 100644 --- a/webui/src/pages/bug/EditCommentForm.tsx +++ b/webui/src/pages/bug/EditCommentForm.tsx @@ -58,9 +58,8 @@ function EditCommentForm({ bug, comment, onCancel, onPostSubmit }: Props) { editComment({ variables: { input: { - prefix: bug.id, + targetPrefix: comment.id, message: message, - target: comment.id, }, }, }).then((result) => { diff --git a/webui/src/pages/bug/MessageHistory.graphql b/webui/src/pages/bug/MessageHistory.graphql index e90eb45958280f519690b148859e4c53943064b4..6daab75c9922297c1ebca526ee48151a6a8fcc30 100644 --- a/webui/src/pages/bug/MessageHistory.graphql +++ b/webui/src/pages/bug/MessageHistory.graphql @@ -3,6 +3,7 @@ query MessageHistory($bugIdPrefix: String!) { repository { + name bug(prefix: $bugIdPrefix) { timeline { comments: nodes { diff --git a/webui/src/pages/bug/TimelineQuery.graphql b/webui/src/pages/bug/TimelineQuery.graphql index 6d78ab7f851a7b6c85a55bc9404881db702b5712..7c9badfd8f5f60aae2643d76e1a194904e2db654 100644 --- a/webui/src/pages/bug/TimelineQuery.graphql +++ b/webui/src/pages/bug/TimelineQuery.graphql @@ -6,6 +6,7 @@ query Timeline($id: String!, $first: Int = 10, $after: String) { repository { + name bug(prefix: $id) { timeline(first: $first, after: $after) { nodes { diff --git a/webui/src/pages/identity/GetBugsByUser.graphql b/webui/src/pages/identity/GetBugsByUser.graphql index 38f139ab0ca24724b14076eaa393b0b0dd9943d1..5bb09553ef9bfc9a67677971c01307988a56cfa2 100644 --- a/webui/src/pages/identity/GetBugsByUser.graphql +++ b/webui/src/pages/identity/GetBugsByUser.graphql @@ -1,5 +1,6 @@ query GetBugsByUser($query: String) { repository { + name allBugs(query: $query) { nodes { id diff --git a/webui/src/pages/identity/GetUserStatistic.graphql b/webui/src/pages/identity/GetUserStatistic.graphql index a759832055b359f3aba5b426bf72697839abb9a9..bc7ab874683741d9548a53b38593adc7ab49a020 100644 --- a/webui/src/pages/identity/GetUserStatistic.graphql +++ b/webui/src/pages/identity/GetUserStatistic.graphql @@ -4,6 +4,7 @@ query GetUserStatistic( $actionQuery: String! ) { repository { + name authored: allBugs(query: $authorQuery) { totalCount } diff --git a/webui/src/pages/list/FilterToolbar.graphql b/webui/src/pages/list/FilterToolbar.graphql index cd103f4490ae3bab3388bf7bb99d1ff25d90266a..2d2435cf628e4f91dac95607933e29b96402f3e1 100644 --- a/webui/src/pages/list/FilterToolbar.graphql +++ b/webui/src/pages/list/FilterToolbar.graphql @@ -1,5 +1,6 @@ query BugCount($query: String) { repository { + name bugs: allBugs(query: $query) { totalCount } diff --git a/webui/src/pages/list/ListIdentities.graphql b/webui/src/pages/list/ListIdentities.graphql index 1d90949624e5fedf5ecc0f4bde239ad53989a7fa..9a92dae732577a2f00978ce01dbeed07c0bd9816 100644 --- a/webui/src/pages/list/ListIdentities.graphql +++ b/webui/src/pages/list/ListIdentities.graphql @@ -1,5 +1,6 @@ query ListIdentities { repository { + name allIdentities { nodes { id diff --git a/webui/src/pages/list/ListLabels.graphql b/webui/src/pages/list/ListLabels.graphql index 35f25e251fd9c970206100316757b4190c4c59d8..84ed38dd2ef8bac589495cd102737a4623b009b7 100644 --- a/webui/src/pages/list/ListLabels.graphql +++ b/webui/src/pages/list/ListLabels.graphql @@ -1,5 +1,6 @@ query ListLabels { repository { + name validLabels { nodes { name diff --git a/webui/src/pages/list/ListQuery.graphql b/webui/src/pages/list/ListQuery.graphql index ded60c8a80a4abc785d8d36e709e9c5924c9c7be..922e8e09f4e97cc943f5eed740069bed0b464f03 100644 --- a/webui/src/pages/list/ListQuery.graphql +++ b/webui/src/pages/list/ListQuery.graphql @@ -8,6 +8,7 @@ query ListBugs( $query: String ) { repository { + name bugs: allBugs( first: $first last: $last