diff --git a/app/src/api.js b/app/src/api.js
index bcda0b2b..611cc71b 100644
--- a/app/src/api.js
+++ b/app/src/api.js
@@ -513,12 +513,12 @@ export async function setThrottle(on) {
}
export async function getMapImportStatus() {
- let response = await apiGet(`${API_URI}/map/pbf`);
+ let response = await apiGet(`${API_URI}/map/files`);
return await response.json();
}
-export async function importPbfs(pbfs) {
- let body = {'pbfs': pbfs};
+export async function importMapFiles(paths) {
+ let body = {'files': paths};
let response = await apiPost(`${API_URI}/map/import`, body);
if (response.status === 204) {
return null;
diff --git a/app/src/components/Map.js b/app/src/components/Map.js
index 38b6f36c..3fe25d5d 100644
--- a/app/src/components/Map.js
+++ b/app/src/components/Map.js
@@ -1,7 +1,7 @@
import React from "react";
import {HelpPopup, humanFileSize, minutesToTimestamp, PageContainer, TabLinks, WROLModeMessage} from "./Common";
import {Route} from "react-router-dom";
-import {getMapImportStatus, importPbfs} from "../api";
+import {getMapImportStatus, importMapFiles} from "../api";
import Table from "semantic-ui-react/dist/commonjs/collections/Table";
import {Button, Checkbox, Icon, Loader, Placeholder} from "semantic-ui-react";
import Message from "semantic-ui-react/dist/commonjs/collections/Message";
@@ -10,7 +10,7 @@ class ManageMap extends React.Component {
constructor(props) {
super(props);
this.state = {
- pbfs: null,
+ files: null,
importing: null,
import_running: false,
selectedPaths: [],
@@ -30,7 +30,7 @@ class ManageMap extends React.Component {
fetchImportStatus = async () => {
const importStatus = await getMapImportStatus();
this.setState({
- pbfs: importStatus['pbfs'],
+ files: importStatus['files'],
importing: importStatus['importing'],
import_running: importStatus['import_running'],
dockerized: importStatus['dockerized'],
@@ -41,16 +41,16 @@ class ManageMap extends React.Component {
e.preventDefault();
this.setState({'ready': false});
- const {pbfs, selectedPaths} = this.state;
+ const {files, selectedPaths} = this.state;
if (!selectedPaths || selectedPaths.length === 0) {
- // No PBFs are selected, import all.
+ // No files are selected, import all.
let paths = [];
- for (let i = 0; i < pbfs.length; i++) {
- paths = paths.concat([pbfs[i].path]);
+ for (let i = 0; i < files.length; i++) {
+ paths = paths.concat([files[i].path]);
}
- await importPbfs(paths);
+ await importMapFiles(paths);
} else {
- await importPbfs(selectedPaths);
+ await importMapFiles(selectedPaths);
}
await this.fetchImportStatus();
}
@@ -97,7 +97,7 @@ class ManageMap extends React.Component {
}
render() {
- const {pbfs, selectedPaths, import_running, importing, dockerized} = this.state;
+ const {files, selectedPaths, import_running, importing, dockerized} = this.state;
let dockerWarning;
if (dockerized === true) {
@@ -154,7 +154,7 @@ class ManageMap extends React.Component {
Importing: {importing}
);
- let disabled = dockerized || !pbfs || pbfs.length === 0 || import_running;
+ let disabled = dockerized || !files || files.length === 0 || import_running;
let importButton =