fetchSelected -> updateSelected

This commit is contained in:
Lachlan Kermode
2018-12-12 15:52:10 +00:00
parent 1dd6e327d7
commit 0c54e07f8f
3 changed files with 7 additions and 17 deletions

View File

@@ -126,18 +126,14 @@ export function updateDomain(domain) {
}
export function fetchSelected(selected) {
if (!selected || !selected.length || selected.length === 0) {
return updateSelected([])
}
export function fetchSource(source) {
return dispatch => {
dispatch(updateSelected(selected))
if (!SOURCES_URL) {
dispatch(fetchSourceError('No source extension specified.'))
} else {
dispatch(toggleFetchingSources())
fetch(SOURCES_URL)
fetch(`${SOURCES_URL}`)
.then(response => {
if (!response.ok) {
throw new Error('No sources are available at the URL specified in the config specified.')

View File

@@ -51,7 +51,7 @@ class Dashboard extends React.Component {
let eventsToSelect = selected.map(event => this.getEventById(event.id));
eventsToSelect = eventsToSelect.sort((a, b) => parseDate(a.timestamp) - parseDate(b.timestamp))
this.props.actions.fetchSelected(eventsToSelect)
this.props.actions.updateSelected(eventsToSelect)
}
}

View File

@@ -106,7 +106,7 @@ const initial = {
ui: {
style: {
categories: {
default: 'red',
default: 'yellow',
// Add here other categories to differentiate by color, like:
alpha: '#00ff00',
beta: '#ff0000',
@@ -115,17 +115,11 @@ const initial = {
narratives: {
default: {
style: 'dotted', // ['dotted', 'solid']
opacity: 0.9, // range between 0 and 1
stroke: 'red', // Any hex or rgb code
style: 'solid', // ['dotted', 'solid']
opacity: 0.5, // range between 0 and 1
stroke: 'transparent', // Any hex or rgb code
strokeWidth: 2
},
narrative_1: {
style: 'solid', // ['dotted', 'solid']
opacity: 0.4, // range between 0 and 1
stroke: '#f18f01', // Any hex or rgb code
strokeWidth: 2
}
}
},
dom: {