Skip to content

Commit

Permalink
Merge pull request #7 from smartcontractkit/169958251-Add-several-new…
Browse files Browse the repository at this point in the history
…-ropsten-pairs-on-aggregator-app

Add several new ropsten pairs on aggregator app
  • Loading branch information
hellobart authored and rupurt committed Jan 31, 2020
1 parent f02ea2c commit 3f17f68
Show file tree
Hide file tree
Showing 14 changed files with 745 additions and 122 deletions.
25 changes: 14 additions & 11 deletions feeds-ui/src/components/networkGraph/ContractDetailsModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { Drawer, Button } from 'antd'
import moment from 'moment'
import { etherscanAddress } from 'utils'

const ContractDetailsModal = ({
onClose,
Expand Down Expand Up @@ -57,28 +58,30 @@ const ContractDetailsContent = ({ data = {}, options, updateHeight }) => {
Response date
</div>
<h3 className="network-graph__contract-details__item--value">
{updateHeight && dateResonse(updateHeight.timestamp)}
{updateHeight && dateResonse(updateHeight)}
</h3>
</div>

<hr className="hr" />

<div>
<h4>Find out more in:</h4>
<Button style={{ marginRight: 10 }} ghost type="primary">
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://explorer.chain.link/job-runs?search=${options.contractAddress}`}
>
Chainlink Explorer
</a>
</Button>
{options.network === 'mainnet' && (
<Button style={{ marginRight: 10 }} ghost type="primary">
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://explorer.chain.link/job-runs?search=${options.contractAddress}`}
>
Chainlink Explorer
</a>
</Button>
)}
<Button ghost type="primary">
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://etherscan.io/address/${options.contractAddress}`}
href={etherscanAddress(options.network, options.contractAddress)}
>
Etherscan
</a>
Expand Down
53 changes: 29 additions & 24 deletions feeds-ui/src/components/networkGraph/NodeDetailsModal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { Drawer, Button } from 'antd'
import moment from 'moment'
import { etherscanAddress } from 'utils'

const NodeDetailsModal = ({
onClose,
Expand Down Expand Up @@ -59,34 +60,38 @@ const NodeDetailsContent = ({ data = {}, jobId, options }) => {

<div>
<h4>Find out more in:</h4>
<Button
style={{ marginRight: 10 }}
ghost
type="primary"
disabled={!jobId}
>
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://explorer.chain.link/job-runs?search=${jobId}`}
>
Chainlink Explorer
</a>
</Button>
<Button style={{ marginRight: 10 }} ghost type="primary">
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://market.link/search/nodes?&name=${data.name}`}
>
Market.link
</a>
</Button>
{options.network === 'mainnet' && (
<>
<Button
style={{ marginRight: 10 }}
ghost
type="primary"
disabled={!jobId}
>
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://explorer.chain.link/job-runs?search=${jobId}`}
>
Chainlink Explorer
</a>
</Button>
<Button style={{ marginRight: 10 }} ghost type="primary">
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://market.link/search/nodes?&name=${data.name}`}
>
Market.link
</a>
</Button>{' '}
</>
)}
<Button ghost type="primary">
<a
target="_BLANK"
rel="noopener noreferrer"
href={`https://etherscan.io/address/${data.address}`}
href={etherscanAddress(options.network, data.address)}
>
Etherscan
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ function NetworkGraphInfo({
options,
pendingAnswerId,
}) {
const updateTime =
updateHeight && updateHeight.timestamp
? moment.unix(updateHeight.timestamp).format('hh:mm:ss A')
: '...'
const updateTime = updateHeight
? moment.unix(updateHeight).format('hh:mm:ss A')
: '...'

const updateDate =
updateHeight && updateHeight.timestamp
? moment.unix(updateHeight.timestamp).format('MMM Do YYYY')
: '...'
const updateDate = updateHeight
? moment.unix(updateHeight).format('MMM Do YYYY')
: '...'

const getCurrentResponses = () => {
if (!oracleResponse) {
Expand Down
Loading

0 comments on commit 3f17f68

Please sign in to comment.