Skip to content
Open
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
6 changes: 3 additions & 3 deletions mcf-browser/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"files": {
"main.css": "/tools/mcf-browser/static/css/main.99adb5c8.css",
"main.js": "/tools/mcf-browser/static/js/main.90bf540b.js",
"main.js": "/tools/mcf-browser/static/js/main.d9dac956.js",
"index.html": "/tools/mcf-browser/index.html",
"main.99adb5c8.css.map": "/tools/mcf-browser/static/css/main.99adb5c8.css.map",
"main.90bf540b.js.map": "/tools/mcf-browser/static/js/main.90bf540b.js.map"
"main.d9dac956.js.map": "/tools/mcf-browser/static/js/main.d9dac956.js.map"
},
"entrypoints": [
"static/css/main.99adb5c8.css",
"static/js/main.90bf540b.js"
"static/js/main.d9dac956.js"
]
}
2 changes: 1 addition & 1 deletion mcf-browser/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/tools/mcf-browser/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/tools/mcf-browser/logo192.png"/><link rel="manifest" href="/tools/mcf-browser/manifest.json"/><title>MCF PreViewer</title><script defer="defer" src="/tools/mcf-browser/static/js/main.90bf540b.js"></script><link href="/tools/mcf-browser/static/css/main.99adb5c8.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/tools/mcf-browser/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/tools/mcf-browser/logo192.png"/><link rel="manifest" href="/tools/mcf-browser/manifest.json"/><title>MCF PreViewer</title><script defer="defer" src="/tools/mcf-browser/static/js/main.d9dac956.js"></script><link href="/tools/mcf-browser/static/css/main.99adb5c8.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
36 changes: 16 additions & 20 deletions mcf-browser/src/TimelineExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,13 @@ class TimelineExplorer extends Component<
}
}

const labelPromises = locations.map((location) => {
return ((location.startsWith('dcid:') ?
getName(location.slice(5)) :
getName(location)
));
const labels = await getName(locations);
return locations.map((location, i) => {
return {
value: location,
label: labels[i],
};
});

return Promise.all(labelPromises).then(
(labels) => {
return locations.map((location, i) => {
return {
value: location,
label: labels[i],
};
});
},
);
}


Expand Down Expand Up @@ -384,14 +374,19 @@ class TimelineExplorer extends Component<
<button
className="button"
onClick={() => {
const locations = this.state.locationOptions.map(
(option: SelectOption) => option.value,
);
const page = 0;
const statVarGroups = Object.values(
this.getVariableToSeries(locations),
) as Series[][];

this.setState(() => {
const locations = this.state.locationOptions.map(
(option: SelectOption) => option.value,
);
const page = 0;
return {
locations,
page,
statVarGroups,
};
});
}}
Expand All @@ -401,6 +396,7 @@ class TimelineExplorer extends Component<
onClick={() => {
this.setState({
locations: [],
statVarGroups: [],
page: 0,
});
}}
Expand Down
Loading