Merge remote-tracking branch 'upstream/master' into feature/display-of-planning-data
This commit is contained in:
commit
c66038c036
@ -95,7 +95,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
placeholder="If yes, add ID"
|
placeholder="If yes, add ID here"
|
||||||
linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } }
|
linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } }
|
||||||
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
||||||
/>
|
/>
|
||||||
@ -155,7 +155,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
placeholder="If yes, add ID"
|
placeholder="If yes, add ID here"
|
||||||
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
|
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
|
||||||
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
||||||
/>
|
/>
|
||||||
|
@ -38,16 +38,16 @@ router.get('/:tileset/:z/:x/:y(\\d+):scale(@\\dx)?.png', handleTileRequest);
|
|||||||
function parseTileParams(params: any): TileParams {
|
function parseTileParams(params: any): TileParams {
|
||||||
const { tileset, z, x, y, scale } = params;
|
const { tileset, z, x, y, scale } = params;
|
||||||
|
|
||||||
if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset');
|
if (!allTilesets.includes(tileset)) throw new Error('Invalid value for tileset: ' + tileset);
|
||||||
|
|
||||||
const intZ = strictParseInt(z);
|
const intZ = strictParseInt(z);
|
||||||
if (isNaN(intZ)) throw new Error('Invalid value for z');
|
if (isNaN(intZ)) throw new Error('Invalid value for z: ' + intZ);
|
||||||
|
|
||||||
const intX = strictParseInt(x);
|
const intX = strictParseInt(x);
|
||||||
if (isNaN(intX)) throw new Error('Invalid value for x');
|
if (isNaN(intX)) throw new Error('Invalid value for x: ' + intX);
|
||||||
|
|
||||||
const intY = strictParseInt(y);
|
const intY = strictParseInt(y);
|
||||||
if (isNaN(intY)) throw new Error('Invalid value for y');
|
if (isNaN(intY)) throw new Error('Invalid value for y: ' + intY);
|
||||||
|
|
||||||
let intScale: number;
|
let intScale: number;
|
||||||
if (scale === '@2x') {
|
if (scale === '@2x') {
|
||||||
|
@ -267,6 +267,11 @@ In your Ubuntu installation where you have been running these setup steps (e.g.
|
|||||||
psql < <dumpfile>
|
psql < <dumpfile>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, if you get errors using the above command, use pg_restore:
|
||||||
|
```bash
|
||||||
|
pg_restore -d <colouringlondondb> <dumpfile>
|
||||||
|
```
|
||||||
|
|
||||||
#### Run migrations
|
#### Run migrations
|
||||||
|
|
||||||
Now run all 'up' migrations to create tables, data types, indexes etc. The `.sql` scripts to
|
Now run all 'up' migrations to create tables, data types, indexes etc. The `.sql` scripts to
|
||||||
@ -276,6 +281,11 @@ do this are located in the `migrations` folder of your local repository.
|
|||||||
ls ~/colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql < $migration; done;
|
ls ~/colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql < $migration; done;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Again, if you get errors, you may need to manually specify the database name
|
||||||
|
|
||||||
|
```bash
|
||||||
|
ls ~/colouring-london/migrations/*.up.sql 2>/dev/null | while read -r migration; do psql -d <colouringlondondb> < $migration; done;
|
||||||
|
```
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
Loading…
Reference in New Issue
Block a user