Skip to content

Commit

Permalink
Merge pull request #49 from catalogueglobal/dev
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
Landon Reed authored Nov 8, 2017
2 parents 113b359 + f78e310 commit cd4ee1c
Show file tree
Hide file tree
Showing 324 changed files with 20,643 additions and 12,354 deletions.
15 changes: 15 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[ignore]
.*/node_modules/auth0-lock/.*
.*/node_modules/config-chain/.*
.*/node_modules/fbjs/flow/.*
.*/node_modules/mapbox.js/docs/examples/.*
.*/node_modules/nock/node_modules/changelog/examples/.*
.*/node_modules/npmconf/.*
.*/node_modules/react-leaflet/src/.*
.*/node_modules/reqwest/.*

[include]

[libs]

[options]
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ node_modules/
.DS_Store
dist
*.log
coverage
coverage*
target/
src/main/client/config.js
datatools-manager.iml
config.yml
config_server.yml
configurations/*
!configurations/default
tmp/

# Optional npm cache directory
Expand All @@ -21,9 +19,12 @@ tmp/
# Configurations
configurations/*
!configurations/default
!configurations/test
dist
assets

# Secret config files
env.yml
env.yml-original
.env
!configurations/test/env.yml
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
language: node_js
notifications:
email: false
slack: conveyal:WQxmWiu8PdmujwLw4ziW72Gc
node_js:
- '6'
cache:
Expand All @@ -10,6 +11,7 @@ before_install:
- pip install --user mkdocs
script:
- yarn run lint
- yarn run flow
- yarn run cover-client
- codecov
- yarn run build
Expand All @@ -18,10 +20,6 @@ script:
# If sudo is disabled, CI runs on container based infrastructure (allows caching &c.)
sudo: false

# Notify us of the build status on the Slack channel
notifications:
slack: conveyal:WQxmWiu8PdmujwLw4ziW72Gc

# Push results to codecov.io
after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ This repository serves as the front end UI for the Data Manager application. It

## Documentation

View the [latest documentation](http://conveyal-data-tools.readthedocs.org/en/latest/) at ReadTheDocs for more info on deployment and development as well as a user guide.
View the [latest release documentation](http://conveyal-data-tools.readthedocs.org/en/latest/) at ReadTheDocs for more info on deployment and development as well as a user guide.

Note: `dev` branch docs can be found [here](http://conveyal-data-tools.readthedocs.org/en/dev/).
11 changes: 1 addition & 10 deletions configurations/default/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ entries:
application:
data:
gtfs_s3_bucket: bucket-name
use_s3_storage: false
title: Data Manager
logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png
active_project: project-id
Expand All @@ -17,20 +18,10 @@ modules:
enabled: false
editor:
enabled: true
alerts:
enabled: false
use_extension: mtc
sign_config:
enabled: false
user_admin:
enabled: true
validator:
enabled: true
deployment:
enabled: false
gtfsapi:
enabled: false
use_extension: mtc
extensions:
transitland:
enabled: false
Expand Down
6 changes: 6 additions & 0 deletions configurations/test/env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
AUTH0_CLIENT_ID: test
AUTH0_DOMAIN: test.com
MAPZEN_TURN_BY_TURN_KEY: test
MAPBOX_ACCESS_TOKEN: test
MAPBOX_MAP_ID: test
MAPBOX_ATTRIBUTION: <a href="https://www.mapbox.com/about/maps/" target="_blank">&copy; Mapbox &copy; OpenStreetMap</a> <a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>
29 changes: 29 additions & 0 deletions configurations/test/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
entries:
- lib/main.js:dist/index.js
- lib/index.css:dist/index.css
application:
data:
gtfs_s3_bucket: bucket-name
use_s3_storage: false
title: Data Manager
logo: http://lorempixel.com/400/200/
active_project: project-id
notifications_enabled: false
docs_url: http://docs.example.com
changelog_url: https://changelog.example.com
support_email: [email protected]
date_format: MMM Do YYYY
modules:
enterprise:
enabled: false
editor:
enabled: true
user_admin:
enabled: true
validator:
enabled: true
extensions:
transitland:
enabled: false
transitfeeds:
enabled: false
11 changes: 11 additions & 0 deletions docs/dev/migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Migration

## Migrating manager application data
datatools-server offers a way to migrate application data (e.g., due to either breaking application schema changes or server changes). **Note:** this process requires temporarily exposing a `GET` request that exposes the entirety of the manager database.

1. Set the config setting `modules:dump:enabled` to `true`.
2. Restart the application.
3. Download copy of application data to local json file `curl localhost:4000/dump > db_backup.json`.
4. Change dump config setting back to `false`.
5. (optional) If looking to reload into the existing server, delete the manager mapdb (`.db` and `.dbp`) files in `application:data:mapdb`
6. Follow instructions in [`/scripts/load.py`](https://github.com/conveyal/datatools-ui/blob/master/scripts/load.py) to upload the json data to the new server.
Binary file added docs/img/password-reset-logged-in.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/password-reset-logged-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 21 additions & 2 deletions docs/user/managing-users.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ Auth0 allows for access via internally defined user accounts as well as third-pa

## User Permissions

The Data Tools suite uses a system of user permissions to regulate access to various functions within the application. Two types of administrator-level users exist:
The Data Tools suite uses a system of user permissions to regulate access to various functions within the application.

### Admin users
Three types of administrator-level users exist:

- **Application-level administrator**: has full access to the Data Tools suite, including access to all projects and feed sources, the ability to create new projects, and the ability to create and manage users.
- **Organization-level administrator**: has full access to all projects and feed sources for an organization. **Note:** this user type is only for users of non-enterprise implementations (i.e., https://gtfs.conveyal.com).
- **Project-level administrator**: has full access to a single project, including all project-level permissions. Is not able to create new projects or administer users.

For non-administrative users, permissions may be assigned on an individual basis. A non-administrative user's permissions can also be set to only apply to particular feeds within a project (note that all users have read-only access to all feeds by default).
### Non-admin users
For non-administrative users, permissions may be assigned on an individual basis by choosing `Custom`. A non-administrative user's permissions can also be set to only apply to particular feeds within a project. All users with project access have read-only access to all project feeds by default.

#### User permissions examples
1. A user may need edit privileges to only one feed source. In this case, the `Edit GTFS feeds` and the specific feed (e.g., Agency X) would be checked.
2. Agencies may wish to grant access to users that can view basic reporting info, but should not have the ability to modify or manage anything in the application. Here, `Custom` should be selected, but no other permissions or feeds should be checked.

## Managing Users

Expand All @@ -31,3 +39,14 @@ To create a new user, click the `Create User` button:
![screenshot](../img/create-user.png)

You will be asked to provide an email address (which serves as the user's username), an initial password for the user, and any initial permission settings. Once created, the user will receive a confirmation email at the specified email address.

## Password Reset
Did you forget your password or need to otherwise change it? While logged out, click the `Log In` button and then "Don't remember your password". After submitting the email address associated with your user account, an email will be sent to you containing a link to reset your password.

![screenshot](../img/password-reset-logged-out.png)

Already logged in, but still need to change your password? Simply click the user icon at the bottom of the lefthand sidebar and click "Change Password" to submit your email address.

![screenshot](../img/password-reset-logged-in.png)

**Note:** if you do receive a password reset email within a few minutes, please check your spam/junk folder.
25 changes: 25 additions & 0 deletions flow-typed/npm/@conveyal/lonlat_v1.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// flow-typed signature: 801d87d0bccd96d1e1a9c0fd6a351c79
// flow-typed version: <<STUB>>/@conveyal/lonlat_v^1.3.0/flow_v0.37.0

declare module '@conveyal/lonlat' {
declare type coordinatesInput = [number, number]
declare type objectInput = {
lat?: number,
latitude?: number,
lon?: number,
lng?: number,
longitude?: number
}
declare type pointInput = {x: number, y: number}
declare type standardizedLonLat = {
lat: number,
lon: number
}

declare export default function normalize(mixed): standardizedLonLat

declare export function isEqual(mixed, mixed, ?number): boolean
declare export function print(mixed): string
declare export function toCoordinates(mixed): [number, number]
declare export function toLeaflet(mixed): {lat: number, lng: number}
}
6 changes: 6 additions & 0 deletions flow-typed/npm/isomorphic-fetch_v2.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// flow-typed signature: 47370d221401bec823c43c3598266e26
// flow-typed version: ec28077c25/isomorphic-fetch_v2.x.x/flow_>=v0.25.x

declare module 'isomorphic-fetch' {
declare module.exports: (input: string | Request | URL, init?: RequestOptions) => Promise<Response>;
}
6 changes: 6 additions & 0 deletions flow-typed/npm/lodash.throttle_v4.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// flow-typed signature: b1bcad4f459d3e23e1460c8b17a4feea
// flow-typed version: <<STUB>>/lodash.throttle_v^4.1.1/flow_v0.37.0

declare module 'lodash.throttle' {
declare export default function throttle<T>((...T) => void, number): (...T) => void
}
3 changes: 3 additions & 0 deletions flow-typed/npm/lodash.tolower_v4.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module 'lodash.tolower' {
declare export default (string) => string
}
3 changes: 3 additions & 0 deletions flow-typed/npm/lodash.upperfirst_v4.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module 'lodash.upperfirst' {
declare export default (string) => string
}
Loading

0 comments on commit cd4ee1c

Please sign in to comment.