Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.6.2 #1409

Merged
merged 8 commits into from
Jun 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.1
0.6.2
9 changes: 9 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
presets: ['@babel/preset-env', '@babel/preset-typescript'],
plugins: [
'react-hot-loader/babel',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-class-properties'
]
}
5 changes: 4 additions & 1 deletion core/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,11 @@ func initializeORM(config Config) (*orm.ORM, error) {
if err != nil {
return nil, err
}
if err = migrations.Migrate(orm.DB); err != nil {
return nil, err
}
orm.SetLogging(config.LogSQLStatements())
return orm, migrations.Migrate(orm.DB)
return orm, nil
}

// RunRequest is the type that the RunChannel uses to package all the necessary
Expand Down
14 changes: 0 additions & 14 deletions operator_ui/.babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion operator_ui/__tests__/components/KeyValueList.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { render } from 'enzyme'
import KeyValueList from 'components/KeyValueList'
import KeyValueList from '@chainlink/styleguide/components/KeyValueList'

describe('components/KeyValueList', () => {
it('can display a title', () => {
Expand Down
14 changes: 14 additions & 0 deletions operator_ui/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
extends: 'react-static/.babelrc',
presets: [
'@babel/preset-react',
'@babel/preset-env',
'@babel/preset-typescript'
],
plugins: [
'react-hot-loader/babel',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-throw-expressions',
'@babel/plugin-proposal-class-properties'
]
}
3 changes: 3 additions & 0 deletions operator_ui/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module.exports = {
'<rootDir>/tmp/',
'<rootDir>/node_modules/'
],
transform: {
'^.+\\.(js|jsx|ts|tsx)?$': './support/upwardBabelJestTransform.js'
},
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/fileMock.js',
Expand Down
2 changes: 2 additions & 0 deletions operator_ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "cross-env NODE_OPTIONS=--max_old_space_size=2048 react-static build",
"serve": "serve dist -p 3000",
"test": "cross-env NODE_ENV=test jest",
"test:nocache": "cross-env NODE_ENV=test jest --no-cache",
"watch": "cross-env NODE_ENV=test jest --watchAll --notify"
},
"dependencies": {
Expand All @@ -24,6 +25,7 @@
"@babel/preset-stage-2": "^7.0.0",
"@babel/preset-typescript": "^7.1.0",
"@babel/register": "^7.0.0",
"@chainlink/styleguide": "0.0.0",
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.1",
"@types/node": "^11.9.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import React from 'react'
import { Link as ReactStaticLink } from 'react-router-dom'

const ReactStaticLinkComponent = ({ children, to, className }) => (
interface IProps {
children: React.ReactNode
to: string
className?: string
}

const BaseLink = ({ children, to, className }: IProps) => (
<ReactStaticLink className={className} to={to}>
{children}
</ReactStaticLink>
)

export default ReactStaticLinkComponent
export default BaseLink
8 changes: 4 additions & 4 deletions operator_ui/src/components/Cards/TokenBalance.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react'
import PropTypes from 'prop-types'
import numeral from 'numeral'
import { BigNumber } from 'bignumber.js'
import StyledTooltip from 'components/Tooltip'
import Typography from '@material-ui/core/Typography'
import PaddedCard from 'components/PaddedCard'
import PaddedCard from '@chainlink/styleguide/components/PaddedCard'
import Tooltip from '@chainlink/styleguide/components/Tooltip'

const WEI_PER_TOKEN = new BigNumber(10 ** 18)

Expand Down Expand Up @@ -44,9 +44,9 @@ const TokenBalance = props => {
{props.title}
</Typography>
<Typography variant="body1" color="textSecondary">
<StyledTooltip title={tooltip} placement="left">
<Tooltip title={tooltip} placement="left">
<span>{val}</span>
</StyledTooltip>
</Tooltip>
</Typography>
</PaddedCard>
)
Expand Down
8 changes: 4 additions & 4 deletions operator_ui/src/components/Dashboards/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import TableRow from '@material-ui/core/TableRow'
import TableFooter from '@material-ui/core/TableFooter'
import CardContent from '@material-ui/core/CardContent'
import Card from '@material-ui/core/Card'
import TimeAgo from '@chainlink/styleguide/components/TimeAgo'
import Button from '../Button'
import ReactStaticLinkComponent from '../ReactStaticLinkComponent'
import BaseLink from '../BaseLink'
import Link from '../Link'
import TimeAgo from '../TimeAgo'
import StatusIcon from '../JobRuns/StatusIcon'
import NoContentLogo from '../Logos/NoContent'
import { IJobRuns } from '../../../@types/operator_ui'
Expand Down Expand Up @@ -151,7 +151,7 @@ const Activity = ({ classes, runs, count, pageSize }: IProps) => {
<TableFooter>
<TableRow>
<TableCell scope="row" className={classes.footer}>
<Button to={`/runs`} component={ReactStaticLinkComponent}>
<Button to={`/runs`} component={BaseLink}>
View More
</Button>
</TableCell>
Expand All @@ -172,7 +172,7 @@ const Activity = ({ classes, runs, count, pageSize }: IProps) => {
</Typography>
</Grid>
<Grid item xs={12} sm={4} align="right">
<Button component={ReactStaticLinkComponent} to={'/jobs/new'}>
<Button component={BaseLink} to={'/jobs/new'}>
New Job
</Button>
</Grid>
Expand Down
9 changes: 3 additions & 6 deletions operator_ui/src/components/JobRuns/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import TableRow from '@material-ui/core/TableRow'
import TableCell from '@material-ui/core/TableCell'
import Card from '@material-ui/core/Card'
import classNames from 'classnames'
import TimeAgo from '@chainlink/styleguide/components/TimeAgo'
import { IJobRuns } from '../../../@types/operator_ui'
import titleize from '../../utils/titleize'
import ReactStaticLinkComponent from '../ReactStaticLinkComponent'
import BaseLink from '../BaseLink'
import Link from '../Link'
import TimeAgo from '../TimeAgo'
import Button from '../Button'

const styles = ({ palette, spacing }: Theme) =>
Expand Down Expand Up @@ -161,10 +161,7 @@ const List = ({
<TableRow>
<TableCell>
<div className={classes.runDetails}>
<Button
to={`/jobs/${jobSpecId}/runs`}
component={ReactStaticLinkComponent}
>
<Button to={`/jobs/${jobSpecId}/runs`} component={BaseLink}>
View More
</Button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions operator_ui/src/components/JobRuns/RegionalNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import Grid from '@material-ui/core/Grid'
import List from '@material-ui/core/List'
import ListItem from '@material-ui/core/ListItem'
import classNames from 'classnames'
import TimeAgo from '@chainlink/styleguide/components/TimeAgo'
import localizedTimestamp from '@chainlink/styleguide/utils/localizedTimestamp'
import { fetchJob, createJobRun } from '../../actions'
import localizedTimestamp from '../../utils/localizedTimestamp'
import Link from '../Link'
import TimeAgo from '../TimeAgo'

const navItemStyles = ({ palette, spacing }: Theme) =>
createStyles({
Expand Down
2 changes: 1 addition & 1 deletion operator_ui/src/components/JobRuns/StatusCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
} from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
import classNames from 'classnames'
import PaddedCard from '@chainlink/styleguide/components/PaddedCard'
import { titleCase } from 'change-case'
import PaddedCard from '../PaddedCard'
import StatusIcon from '../JobRuns/StatusIcon'

const styles = (theme: Theme) =>
Expand Down
2 changes: 1 addition & 1 deletion operator_ui/src/components/Jobs/List.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import TableHead from '@material-ui/core/TableHead'
import TableRow from '@material-ui/core/TableRow'
import TablePagination from '@material-ui/core/TablePagination'
import Typography from '@material-ui/core/Typography'
import TimeAgo from '@chainlink/styleguide/components/TimeAgo'
import { formatInitiators } from 'utils/jobSpecInitiators'
import TableButtons, { FIRST_PAGE } from 'components/TableButtons'
import Link from 'components/Link'
import TimeAgo from 'components/TimeAgo'

const renderBody = (jobs, error) => {
if (error) {
Expand Down
8 changes: 4 additions & 4 deletions operator_ui/src/components/Jobs/RecentlyCreated.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
import Grid from '@material-ui/core/Grid'
import TableCell from '@material-ui/core/TableCell'
import TableRow from '@material-ui/core/TableRow'
import TimeAgo from 'components/TimeAgo'
import SimpleListCard from '@chainlink/styleguide/components/Cards/SimpleList'
import SimpleListCardItem from '@chainlink/styleguide/components/Cards/SimpleListItem'
import TimeAgo from '@chainlink/styleguide/components/TimeAgo'
import Link from 'components/Link'
import SimpleListCard from 'components/Cards/SimpleList'
import SimpleListCardItem from 'components/Cards/SimpleListItem'
import { withStyles } from '@material-ui/core/styles'

const styles = () => ({
block: { display: 'block' },
Expand Down
11 changes: 5 additions & 6 deletions operator_ui/src/components/Jobs/RegionalNav.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
import React from 'react'
import { connect } from 'react-redux'
import { Link as BaseLink } from 'react-router-dom'
import { withStyles } from '@material-ui/core/styles'
import Card from '@material-ui/core/Card'
import Typography from '@material-ui/core/Typography'
import Grid from '@material-ui/core/Grid'
import List from '@material-ui/core/List'
import ListItem from '@material-ui/core/ListItem'
import classNames from 'classnames'
import TimeAgo from '@chainlink/styleguide/components/TimeAgo'
import localizedTimestamp from '@chainlink/styleguide/utils/localizedTimestamp'
import Button from 'components/Button'
import Link from 'components/Link'
import ReactStaticLinkComponent from 'components/ReactStaticLinkComponent'
import BaseLink from 'components/BaseLink'
import CopyJobSpec from 'components/CopyJobSpec'
import ErrorMessage from 'components/Notifications/DefaultError'
import TimeAgo from 'components/TimeAgo'
import jobSpecDefinition from 'utils/jobSpecDefinition'
import { isWebInitiator } from 'utils/jobSpecInitiators'
import { fetchJobRuns, createJobRun } from 'actions'
import classNames from 'classnames'
import localizedTimestamp from 'utils/localizedTimestamp'

const styles = theme => {
return {
Expand Down Expand Up @@ -121,7 +120,7 @@ const RegionalNav = ({
pathname: '/jobs/new',
state: { definition: definition }
}}
component={ReactStaticLinkComponent}
component={BaseLink}
className={classes.duplicate}
>
Duplicate
Expand Down
6 changes: 3 additions & 3 deletions operator_ui/src/components/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import { Link as ReactStaticLink } from 'react-router-dom'
import BaseLink from './BaseLink'
import {
createStyles,
Theme,
Expand Down Expand Up @@ -39,11 +39,11 @@ const Link = ({ children, classes, className, to, variant, color }: IProps) => {
const c = color || 'inherit'

return (
<ReactStaticLink to={to} className={classNames(classes.link, className)}>
<BaseLink to={to} className={classNames(classes.link, className)}>
<Typography variant={v} color={c} className={classes.linkContent}>
{children}
</Typography>
</ReactStaticLink>
</BaseLink>
)
}

Expand Down
2 changes: 1 addition & 1 deletion operator_ui/src/components/Logos/Hexagon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import Logo from '../Logo'
import Logo from '@chainlink/styleguide/components/Logo'
import src from '../../images/icon-logo-blue.svg'

const Hexagon = props => {
Expand Down
2 changes: 1 addition & 1 deletion operator_ui/src/components/Logos/Main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import Logo from '../Logo'
import Logo from '@chainlink/styleguide/components/Logo'
import src from '../../images/chainlink-operator-logo.svg'

const Main = props => {
Expand Down
2 changes: 1 addition & 1 deletion operator_ui/src/components/Logos/NoContent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import PropTypes from 'prop-types'
import Logo from '../Logo'
import Logo from '@chainlink/styleguide/components/Logo'
import src from '../../images/no-activity-icon.svg'

const NoContent = props => {
Expand Down
22 changes: 0 additions & 22 deletions operator_ui/src/components/Tooltip.js

This file was deleted.

4 changes: 2 additions & 2 deletions operator_ui/src/containers/Bridges/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Button from 'components/Button'
import bridgeSelector from 'selectors/bridge'
import { fetchBridgeSpec, updateBridge } from 'actions'
import matchRouteAndMapDispatchToProps from 'utils/matchRouteAndMapDispatchToProps'
import ReactStaticLinkComponent from 'components/ReactStaticLinkComponent'
import BaseLink from 'components/BaseLink'
import Content from 'components/Content'
import { useHooks, useEffect } from 'use-react-hooks'

Expand Down Expand Up @@ -55,7 +55,7 @@ export const Edit = useHooks(props => {
<Grid item>
{bridge && (
<Button
component={ReactStaticLinkComponent}
component={BaseLink}
to={`/bridges/${bridge.id}`}
>
Cancel
Expand Down
4 changes: 2 additions & 2 deletions operator_ui/src/containers/Bridges/Index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
import Grid from '@material-ui/core/Grid'
import Title from 'components/Title'
import BridgeList from 'components/Bridges/List'
import ReactStaticLinkComponent from 'components/ReactStaticLinkComponent'
import BaseLink from 'components/BaseLink'
import matchRouteAndMapDispatchToProps from 'utils/matchRouteAndMapDispatchToProps'
import bridgesSelector from 'selectors/bridges'
import { fetchBridges } from 'actions'
Expand Down Expand Up @@ -34,7 +34,7 @@ export const Index = props => {
<Grid item>
<Button
variant="secondary"
component={ReactStaticLinkComponent}
component={BaseLink}
to={'/bridges/new'}
>
New Bridge
Expand Down
Loading