aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src')
-rw-r--r--webui/src/bug/SetStatus.js37
-rw-r--r--webui/src/bug/Timeline.js3
-rw-r--r--webui/src/bug/TimelineQuery.js3
3 files changed, 43 insertions, 0 deletions
diff --git a/webui/src/bug/SetStatus.js b/webui/src/bug/SetStatus.js
new file mode 100644
index 00000000..eb41fc28
--- /dev/null
+++ b/webui/src/bug/SetStatus.js
@@ -0,0 +1,37 @@
+import { withStyles } from '@material-ui/core/styles'
+import gql from 'graphql-tag'
+import React from 'react'
+import Author from '../Author'
+import Date from '../Date'
+
+const styles = theme => ({
+ main: {
+ ...theme.typography.body2
+ },
+})
+
+const SetStatus = ({op, classes}) => {
+
+ return (
+ <div className={classes.main}>
+ <Author author={op.author} bold />
+ <span> {op.status.toLowerCase()} this</span>
+ <Date date={op.date} />
+ </div>
+ )
+}
+
+SetStatus.fragment = gql`
+ fragment SetStatus on Operation {
+ ... on SetStatusOperation {
+ date
+ author {
+ name
+ email
+ }
+ status
+ }
+ }
+`
+
+export default withStyles(styles)(SetStatus)
diff --git a/webui/src/bug/Timeline.js b/webui/src/bug/Timeline.js
index 2881a73b..a15409ab 100644
--- a/webui/src/bug/Timeline.js
+++ b/webui/src/bug/Timeline.js
@@ -2,6 +2,7 @@ import { withStyles } from '@material-ui/core/styles'
import React from 'react'
import LabelChange from './LabelChange'
import Message from './Message'
+import SetStatus from './SetStatus'
import SetTitle from './SetTitle'
const styles = theme => ({
@@ -35,6 +36,8 @@ class Timeline extends React.Component {
return <LabelChange key={index} op={op}/>
case 'SetTitleOperation':
return <SetTitle key={index} op={op}/>
+ case 'SetStatusOperation':
+ return <SetStatus key={index} op={op}/>
default:
console.log('unsupported operation type ' + op.__typename)
diff --git a/webui/src/bug/TimelineQuery.js b/webui/src/bug/TimelineQuery.js
index 3d7db143..3ee4cb28 100644
--- a/webui/src/bug/TimelineQuery.js
+++ b/webui/src/bug/TimelineQuery.js
@@ -3,6 +3,7 @@ import gql from 'graphql-tag'
import React from 'react'
import { Query } from 'react-apollo'
import LabelChange from './LabelChange'
+import SetStatus from './SetStatus'
import SetTitle from './SetTitle'
import Timeline from './Timeline'
import Message from './Message'
@@ -17,6 +18,7 @@ const QUERY = gql`
...Comment
...LabelChange
...SetTitle
+ ...SetStatus
}
pageInfo {
hasNextPage
@@ -30,6 +32,7 @@ const QUERY = gql`
${Message.commentFragment}
${LabelChange.fragment}
${SetTitle.fragment}
+ ${SetStatus.fragment}
`
const TimelineQuery = ({id}) => (