aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/pages')
-rw-r--r--webui/src/pages/bug/CommentForm.graphql4
-rw-r--r--webui/src/pages/bug/MessageHistoryDialog.tsx10
-rw-r--r--webui/src/pages/bug/labels/SetLabel.graphql24
-rw-r--r--webui/src/pages/identity/GetBugsByUser.graphql20
-rw-r--r--webui/src/pages/identity/GetUserStatistic.graphql8
-rw-r--r--webui/src/pages/list/FilterToolbar.tsx58
-rw-r--r--webui/src/pages/list/ListIdentities.graphql20
-rw-r--r--webui/src/pages/list/ListLabels.graphql16
-rw-r--r--webui/src/pages/list/ListQuery.tsx12
9 files changed, 94 insertions, 78 deletions
diff --git a/webui/src/pages/bug/CommentForm.graphql b/webui/src/pages/bug/CommentForm.graphql
index 33d21193..f4b61850 100644
--- a/webui/src/pages/bug/CommentForm.graphql
+++ b/webui/src/pages/bug/CommentForm.graphql
@@ -1,5 +1,7 @@
mutation AddComment($input: AddCommentInput!) {
addComment(input: $input) {
- operation { id }
+ operation {
+ id
+ }
}
}
diff --git a/webui/src/pages/bug/MessageHistoryDialog.tsx b/webui/src/pages/bug/MessageHistoryDialog.tsx
index df8915d9..84848cce 100644
--- a/webui/src/pages/bug/MessageHistoryDialog.tsx
+++ b/webui/src/pages/bug/MessageHistoryDialog.tsx
@@ -179,12 +179,10 @@ function MessageHistoryDialog({ bugId, commentId, open, onClose }: Props) {
const history = comment?.history.slice().reverse();
const editCount = history?.length === undefined ? 0 : history?.length - 1;
- const handleChange = (panel: string) => (
- event: React.ChangeEvent<{}>,
- newExpanded: boolean
- ) => {
- setExpanded(newExpanded ? panel : false);
- };
+ const handleChange =
+ (panel: string) => (event: React.ChangeEvent<{}>, newExpanded: boolean) => {
+ setExpanded(newExpanded ? panel : false);
+ };
const getSummary = (index: number, date: Date) => {
const desc =
diff --git a/webui/src/pages/bug/labels/SetLabel.graphql b/webui/src/pages/bug/labels/SetLabel.graphql
index 44dfae11..6f4ad510 100644
--- a/webui/src/pages/bug/labels/SetLabel.graphql
+++ b/webui/src/pages/bug/labels/SetLabel.graphql
@@ -1,13 +1,19 @@
mutation SetLabel($input: ChangeLabelInput) {
- changeLabels(input: $input) {
- results{
- status,
- label{
- name,
- color{R},
- color{G},
- color{B}
- }
+ changeLabels(input: $input) {
+ results {
+ status
+ label {
+ name
+ color {
+ R
}
+ color {
+ G
+ }
+ color {
+ B
+ }
+ }
}
+ }
}
diff --git a/webui/src/pages/identity/GetBugsByUser.graphql b/webui/src/pages/identity/GetBugsByUser.graphql
index 0f170dc1..38f139ab 100644
--- a/webui/src/pages/identity/GetBugsByUser.graphql
+++ b/webui/src/pages/identity/GetBugsByUser.graphql
@@ -1,12 +1,12 @@
-query GetBugsByUser ($query: String){
- repository {
- allBugs(query: $query) {
- nodes {
- id
- title
- createdAt
- lastEdit
- }
- }
+query GetBugsByUser($query: String) {
+ repository {
+ allBugs(query: $query) {
+ nodes {
+ id
+ title
+ createdAt
+ lastEdit
+ }
}
+ }
}
diff --git a/webui/src/pages/identity/GetUserStatistic.graphql b/webui/src/pages/identity/GetUserStatistic.graphql
index 318b860d..a7598320 100644
--- a/webui/src/pages/identity/GetUserStatistic.graphql
+++ b/webui/src/pages/identity/GetUserStatistic.graphql
@@ -1,8 +1,12 @@
-query GetUserStatistic($authorQuery: String!, $participantQuery: String!, $actionQuery: String!) {
+query GetUserStatistic(
+ $authorQuery: String!
+ $participantQuery: String!
+ $actionQuery: String!
+) {
repository {
authored: allBugs(query: $authorQuery) {
totalCount
- },
+ }
participated: allBugs(query: $participantQuery) {
totalCount
}
diff --git a/webui/src/pages/list/FilterToolbar.tsx b/webui/src/pages/list/FilterToolbar.tsx
index 4ac579f5..0c7a9e4f 100644
--- a/webui/src/pages/list/FilterToolbar.tsx
+++ b/webui/src/pages/list/FilterToolbar.tsx
@@ -110,36 +110,38 @@ function FilterToolbar({ query, queryLocation }: Props) {
const containsValue = (key: string, value: string): boolean =>
hasKey(key) && params[key].indexOf(value) !== -1;
const loc = pipe(stringify, queryLocation);
- const replaceParam = (key: string, value: string) => (
- params: Query
- ): Query => ({
- ...params,
- [key]: [value],
- });
- const toggleParam = (key: string, value: string) => (
- params: Query
- ): Query => ({
- ...params,
- [key]: params[key] && params[key].includes(value) ? [] : [value],
- });
- const toggleOrAddParam = (key: string, value: string) => (
- params: Query
- ): Query => {
- const values = params[key];
- return {
+ const replaceParam =
+ (key: string, value: string) =>
+ (params: Query): Query => ({
+ ...params,
+ [key]: [value],
+ });
+ const toggleParam =
+ (key: string, value: string) =>
+ (params: Query): Query => ({
...params,
- [key]:
- params[key] && params[key].includes(value)
- ? values.filter((v) => v !== value)
- : values
- ? [...values, value]
- : [value],
+ [key]: params[key] && params[key].includes(value) ? [] : [value],
+ });
+ const toggleOrAddParam =
+ (key: string, value: string) =>
+ (params: Query): Query => {
+ const values = params[key];
+ return {
+ ...params,
+ [key]:
+ params[key] && params[key].includes(value)
+ ? values.filter((v) => v !== value)
+ : values
+ ? [...values, value]
+ : [value],
+ };
};
- };
- const clearParam = (key: string) => (params: Query): Query => ({
- ...params,
- [key]: [],
- });
+ const clearParam =
+ (key: string) =>
+ (params: Query): Query => ({
+ ...params,
+ [key]: [],
+ });
return (
<Toolbar className={classes.toolbar}>
diff --git a/webui/src/pages/list/ListIdentities.graphql b/webui/src/pages/list/ListIdentities.graphql
index 73073ae8..1d909496 100644
--- a/webui/src/pages/list/ListIdentities.graphql
+++ b/webui/src/pages/list/ListIdentities.graphql
@@ -1,13 +1,13 @@
query ListIdentities {
- repository {
- allIdentities {
- nodes {
- id
- humanId
- name
- email
- displayName
- }
- }
+ repository {
+ allIdentities {
+ nodes {
+ id
+ humanId
+ name
+ email
+ displayName
+ }
}
+ }
}
diff --git a/webui/src/pages/list/ListLabels.graphql b/webui/src/pages/list/ListLabels.graphql
index 8b2f561a..35f25e25 100644
--- a/webui/src/pages/list/ListLabels.graphql
+++ b/webui/src/pages/list/ListLabels.graphql
@@ -1,10 +1,14 @@
query ListLabels {
- repository {
- validLabels {
- nodes {
- name,
- color{R,G,B}
- }
+ repository {
+ validLabels {
+ nodes {
+ name
+ color {
+ R
+ G
+ B
}
+ }
}
+ }
}
diff --git a/webui/src/pages/list/ListQuery.tsx b/webui/src/pages/list/ListQuery.tsx
index 9aefd02d..c2f71ef0 100644
--- a/webui/src/pages/list/ListQuery.tsx
+++ b/webui/src/pages/list/ListQuery.tsx
@@ -304,12 +304,12 @@ function ListQuery() {
const loc = pipe(stringify, queryLocation);
const qparams: Query = parse(query);
- const replaceParam = (key: string, value: string) => (
- params: Query
- ): Query => ({
- ...params,
- [key]: [value],
- });
+ const replaceParam =
+ (key: string, value: string) =>
+ (params: Query): Query => ({
+ ...params,
+ [key]: [value],
+ });
return (
<Paper className={classes.main}>