diff --git a/.babelrc b/.babelrc deleted file mode 100644 index 14ddaa388..000000000 --- a/.babelrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "presets": ["es2015", "stage-0", "react"], - "env": { - "development": { - "plugins": ["transform-decorators-legacy", ["react-transform", { - "transforms": [{ - "transform": "react-transform-hmr", - // if you use React Native, pass "react-native" instead: - "imports": ["react"], - // this is important for Webpack HMR: - "locals": ["module"] - }] - // note: you can put more transforms into array - // this is just one of them! - }]] - } - } -} diff --git a/.gitignore b/.gitignore index e776b729a..b0a66b15a 100644 --- a/.gitignore +++ b/.gitignore @@ -3,15 +3,11 @@ node_modules/ dist *.log coverage -.idea -server_config.js -src/main/client/config.js -src/main/resources/public -application.conf target/ -.java-version -datatools.iml src/main/client/config.js datatools-manager.iml config.yml config_server.yml +configurations/* +!configurations/default +tmp/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..84c6f8a50 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: node_js +notifications: + email: false +node_js: + - '6' +cache: + yarn: true +before_install: + - npm i -g codecov +script: + - yarn run lint + - yarn run cover-client + - codecov + - yarn run build + +# 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) + - yarn run semantic-release diff --git a/config.yml.template b/config.yml.template index b9cbc3920..71703a9f4 100644 --- a/config.yml.template +++ b/config.yml.template @@ -8,6 +8,7 @@ application: gtfs_s3_bucket: bucket-name port: 4000 title: Data Manager + assets_bucket: bucket-name logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png active_project: project-id notifications_enabled: false @@ -16,6 +17,7 @@ application: changelog_url: https://changelog.example.com support_email: support@example.com osm_vex: http://localhost:1000 + r5: http://localhost:8080 date_format: MMM Do YYYY auth0: diff --git a/config_server.yml.template b/config_server.yml.template deleted file mode 100644 index 630e7b494..000000000 --- a/config_server.yml.template +++ /dev/null @@ -1,8 +0,0 @@ -auth0: - client_secret: your-auth0-client-secret - api_token: your-auth0-api-token - -# For email notifications -sparkpost: - key: your-api-key - from_email: email@example.com diff --git a/configurations/default/settings.yml b/configurations/default/settings.yml new file mode 100644 index 000000000..c1f14225a --- /dev/null +++ b/configurations/default/settings.yml @@ -0,0 +1,66 @@ +entries: + - lib/main.js:dist/index.js + - lib/index.css:dist/index.css +application: + data: + mapdb: /path/to/mapdb + gtfs: /path/to/gtfs + editor_mapdb: /path/to/editor + regions: /path/to/regions/geojson + use_s3_storage: false + gtfs_s3_bucket: bucket-name + port: 4000 + title: Data Manager + assets_bucket: bucket-name + logo: http://gtfs-assets-dev.conveyal.com/data_manager.png # defaults to src/main/client/assets/application_logo.png + active_project: project-id + notifications_enabled: false + public_url: http://localhost:9000 + docs_url: http://docs.example.com + changelog_url: https://changelog.example.com + support_email: support@example.com + osm_vex: http://localhost:1000 + r5: http://localhost:8080 + date_format: MMM Do YYYY + +auth0: + domain: your-auth0-domain + client_id: your-auth0-client-id +MAPZEN_TURN_BY_TURN_KEY: API_KEY +mapbox: + access_token: MAPBOX_ACCESS_TOKEN + map_id: conveyal.ie3o67m0 +modules: + enterprise: + enabled: false + editor: + enabled: true + legacy_editor: + enabled: false + url: http://localhost:9001 + alerts: + enabled: false + use_extension: mtc + sign_config: + enabled: false + user_admin: + enabled: true + validator: + enabled: true + deployment: + enabled: false + gtfsapi: + enabled: false + load_on_fetch: false + load_on_startup: false + use_extension: mtc + update_frequency: 3600 # in seconds + +extensions: + transitland: + enabled: true + api: https://transit.land/api/v1/feeds + transitfeeds: + enabled: true + api: http://api.transitfeeds.com/v1/getFeeds + key: your-api-key diff --git a/docs/dev/deployment.md b/docs/dev/deployment.md index b72cd669c..37c6d0abf 100644 --- a/docs/dev/deployment.md +++ b/docs/dev/deployment.md @@ -2,7 +2,7 @@ ## Prerequisites -The application features a Spark-powered Java backend and a Javascript frontend written with React and Redux. To install and deploy the application, you will need Java 8, Maven, Node/npm, and Webpack. +The application features a Spark-powered Java backend and a Javascript frontend written with React and Redux. To install and deploy the application, you will need Java 8, Maven, Node/npm, yarn, and [mastarm](https://github.com/conveyal/mastarm). User athentication is done via [Auth0](http://auth0.com). You will need an Auth0 account and application to use the Data Manager. @@ -95,16 +95,17 @@ To allow for the creation, deletion and editing of users you must generate a tok ## Building and Running the Application -Install the Javascript dependencies using npm: +Install the Javascript dependencies using yarn: ```bash -$ npm install +$ yarn ``` -Build the frontend using webpack: +Build and deploy the frontend to s3 using npm script (which calls [mastarm](https://github.com/conveyal/mastarm)): ```bash -$ webpack +$ npm run deploy -- s3://$S3_BUCKET_NAME/dist +>>>>>>> Stashed changes ``` Package the application using Maven: @@ -119,7 +120,9 @@ Deploy the application with Java: $ java -jar target/datatools.jar ``` -The application should now be accessible at `http://localhost:9000` (or whatever port you specified in `config.yml`). + +The application back-end should now be running at `http://localhost:9000` (or whatever port you specified in `config.yml`). +The front-end assets are pointed to by the back end at whatever s3 bucket name is specified in `config.yml` at `application.assets_bucket`. ## Configuring Modules diff --git a/docs/dev/development.md b/docs/dev/development.md index 98c36686a..873204298 100644 --- a/docs/dev/development.md +++ b/docs/dev/development.md @@ -1,11 +1,13 @@ # Development -## Using `combine-serve` +## mastarm -Spark does not hot-reload static web files, i.e. the application frontend. To make life easier when doing frontend development, we recommend using [combine-serve](https://github.com/conveyal/combine-serve) to serve both the backend and frontend as a unified service. Used in conjunction with `webpack --watch`, this will eliminate the need to constantly rebuild/reload the frontend for testing. +We use Conveyal's front-end JS tool-belt [`mastarm`](https://github.com/conveyal/mastarm) to build, run, and lint while developing. -For example, if running the Java backend on port 9000 (typically via an IDE such as IntelliJ), and you want to serve the combined application on port 9001 for development purposes, use: +To kick off a development server at [http://localhost:9966](http://localhost:9966): ``` -combine-serve --serve / src/main/resources/public/ --proxy / http://localhost:9000 --port 9001 +npm start ``` + +This will use `mastarm` to run a browserify server at the above port along with a proxy for the back-end API, which is assumed to be running on http://localhost:4000. \ No newline at end of file diff --git a/gtfs.yml b/gtfs.yml index a8d82ccfe..5d86bca60 100644 --- a/gtfs.yml +++ b/gtfs.yml @@ -85,7 +85,7 @@ fields: - name: "agency_id" required: false - inputType: ID + inputType: GTFS_ID columnWidth: 12 helpContent: "The agency_id field is an ID that uniquely identifies a transit agency. A transit feed may represent data from more than one agency. The agency_id is dataset unique. This field is optional for transit feeds that only contain data for a single agency." - name: "agency_name" @@ -126,10 +126,10 @@ placeholder: contact@agency.org columnWidth: 12 helpContent: "The agency_email field contains a single valid email address actively monitored by the agency’s customer service department. This email address will be considered a direct contact point where transit riders can reach a customer service representative at the agency." - - name: agencyBrandingUrl + - name: agency_branding_url required: false displayName: Agency branding URL - datatools: true + datatools: false placeholder: https://agency.org/assets/agency/XYZ inputType: URL columnWidth: 12 @@ -141,12 +141,12 @@ fields: - name: "stop_id" required: true - inputType: ID + inputType: GTFS_ID columnWidth: 6 helpContent: "The stop_id field contains an ID that uniquely identifies a stop or station. Multiple routes may use the same stop. The stop_id is dataset unique." - name: "stop_code" required: false - inputType: ID + inputType: GTFS_ID columnWidth: 6 helpContent: "The stop_code field contains short text or a number that uniquely identifies the stop for passengers. Stop codes are often used in phone-based transit information systems or printed on stop signage to make it easier for riders to get a stop schedule or real-time arrival information for a particular stop." - name: "stop_name" @@ -233,16 +233,16 @@ required: true inputType: DROPDOWN options: - - value: 0 + - value: false text: 'No' - - value: 1 + - value: true text: 'Yes' columnWidth: 6 adminOnly: true # helpContent: The route_id field contains an ID that uniquely identifies a route. The route_id is dataset unique. - name: route_id required: true - inputType: ID + inputType: GTFS_ID columnWidth: 5 helpContent: The route_id field contains an ID that uniquely identifies a route. The route_id is dataset unique. - name: route_short_name @@ -309,10 +309,10 @@ text: Black columnWidth: 6 helpContent: The route_text_color field can be used to specify a legible color to use for text drawn against a background of route_color. The color must be provided as a six-character hexadecimal number, for example, FFD700. If no color is specified, the default text color is black (000000). - - name: routeBrandingUrl + - name: route_branding_url required: false displayName: Route branding URL - datatools: true + datatools: false placeholder: https://agency.org/assets/route/1234 inputType: URL columnWidth: 12 @@ -334,7 +334,7 @@ helpContent: "The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes. This value is referenced from thecalendar.txt or calendar_dates.txt file." - name: "trip_id" required: true - inputType: ID + inputType: GTFS_ID columnWidth: 6 helpContent: "The trip_id field contains an ID that identifies a trip. The trip_id is dataset unique." - name: "trip_headsign" @@ -460,7 +460,7 @@ fields: - name: "service_id" required: true - inputType: ID + inputType: GTFS_ID columnWidth: 6 helpContent: "The service_id contains an ID that uniquely identifies a set of dates when service is available for one or more routes. Each service_id value can appear at most once in a calendar.txt file. This value is dataset unique. It is referenced by the trips.txt file." - name: "description" @@ -567,7 +567,7 @@ fields: - name: "fare_id" required: true - inputType: ID + inputType: GTFS_ID columnWidth: 6 helpContent: "The fare_id field contains an ID that uniquely identifies a fare class. The fare_id is dataset unique." - name: "price" diff --git a/gtfsplus.yml b/gtfsplus.yml index 9f15f0264..6d961ff66 100644 --- a/gtfsplus.yml +++ b/gtfsplus.yml @@ -7,8 +7,7 @@ required: true inputType: GTFS_ROUTE columnWidth: 4 - helpContent: From GTFS routes.txt file. This is necessary to maintain relationship - between routes in this file and routes in the standard GTFS routes.txt file. + helpContent: From GTFS routes.txt file. This is necessary to maintain relationship between routes in this file and routes in the standard GTFS routes.txt file. - name: realtime_enabled required: true inputType: DROPDOWN @@ -18,29 +17,21 @@ - value: '1' text: Enabled columnWidth: 2 - helpContent: Standard GTFS does not include a field to indicate real-time status - of a route. This allows the flexibility for agencies to identify routes that - may not have real-time predictions. + helpContent: Standard GTFS does not include a field to indicate real-time status of a route. This allows the flexibility for agencies to identify routes that may not have real-time predictions. - name: realtime_routename required: false inputType: TEXT columnWidth: 3 - helpContent: This field may be empty if route_long_name in GTFS routes.txt file - is provided. Otherwise, it should contain the data defined for route_long_name - in GTFS routes.txt file. + helpContent: This field may be empty if route_long_name in GTFS routes.txt file is provided. Otherwise, it should contain the data defined for route_long_name in GTFS routes.txt file. - name: realtime_routecode required: false inputType: TEXT columnWidth: 3 - helpContent: This field can be empty if real-time route code in MTC’s real-time - feed is the same as route_short_name in GTFS routes.txt file + helpContent: This field can be empty if real-time route code in MTC’s real-time feed is the same as route_short_name in GTFS routes.txt file - id: realtime_stops name: realtime_stops.txt - helpContent: This file helps map regional real-time stop identifiers with the - stop_id in stops.txt file in GTFS. This file can be omitted if GTFS file - stops.txt contains the regional real-time stop id in the optional stop_code - field. + helpContent: This file helps map regional real-time stop identifiers with the stop_id in stops.txt file in GTFS. This file can be omitted if GTFS file stops.txt contains the regional real-time stop id in the optional stop_code field. fields: - name: trip_id required: true @@ -51,8 +42,7 @@ required: true inputType: GTFS_STOP columnWidth: 5 - helpContent: From GTFS stop_times.txt file when the stop_code in standard GTFS - is different from the stop_code used in real-time feed for MTC. + helpContent: From GTFS stop_times.txt file when the stop_code in standard GTFS is different from the stop_code used in real-time feed for MTC. - name: realtime_stop_id required: true inputType: TEXT @@ -61,21 +51,7 @@ - id: directions name: directions.txt - helpContent:
Users of version 1.7 or later must use this file and ignore - realtime_directions.txt file.
-In the standard GTFS, trip direction can be specified as ‘0’ or ‘1’ only. It - does not allow for indication of specific directions such as North, South, etc. - This file captures the direction text for each of the directions in a route.
-Route direction information can be provided through either this directions.txt - OR realtime_directions.txt file, but not both. Users of GTFS+ version 1.7 and - above are required to provide directions.txt file and ignore realtime_directions.txt - file. Users of version 1.6 or earlier may continue to use realtime_directions.txt, - unless they voluntarily choose to upgrade to directions.txt. Only one of - directions.txt or realtime_directions.txt should be included. Also, tripheadsign - field in GTFS trips.txt file should be populated in order to distinguish patterns - within a direction and to provide destination information to passengers.
-When directions.txt file is used, optional direction_id field in GTFS trips.txt - must be filled in.
+ helpContent:Users of version 1.7 or later must use this file and ignore realtime_directions.txt file.
In the standard GTFS, trip direction can be specified as ‘0’ or ‘1’ only. It does not allow for indication of specific directions such as North, South, etc. This file captures the direction text for each of the directions in a route.
Route direction information can be provided through either this directions.txt OR realtime_directions.txt file, but not both. Users of GTFS+ version 1.7 and above are required to provide directions.txt file and ignore realtime_directions.txt file. Users of version 1.6 or earlier may continue to use realtime_directions.txt, unless they voluntarily choose to upgrade to directions.txt. Only one of directions.txt or realtime_directions.txt should be included. Also, tripheadsign field in GTFS trips.txt file should be populated in order to distinguish patterns within a direction and to provide destination information to passengers.
When directions.txt file is used, optional direction_id field in GTFS trips.txt must be filled in.
fields: - name: route_id required: true @@ -89,8 +65,7 @@ - value: '0' - value: '1' columnWidth: 3 - helpContent: Binary direction_id from GTFS trips.txt file. Each (route_id, - direction_id) pair can only appear once in directions.txt. + helpContent: Binary direction_id from GTFS trips.txt file. Each (route_id, direction_id) pair can only appear once in directions.txt. - name: direction required: true inputType: DROPDOWN @@ -115,9 +90,7 @@ - id: realtime_trips name: realtime_trips.txt - helpContent: This file contains real-time identifiers for trips. This file can be - omitted if the GTFS trips.txt file contains the same Trip IDs included in - real-time feed for MTC within the trip_id field. + helpContent: This file contains real-time identifiers for trips. This file can be omitted if the GTFS trips.txt file contains the same Trip IDs included in real-time feed for MTC within the trip_id field. fields: - name: trip_id required: true @@ -133,8 +106,7 @@ - id: stop_attributes name: stop_attributes.txt - helpContent: This file contains additional attributes for a stop. This file is needed - because standard GTFS does not include these fields. + helpContent: This file contains additional attributes for a stop. This file is needed because standard GTFS does not include these fields. fields: - name: stop_id required: true @@ -214,9 +186,7 @@ - id: timepoints name: timepoints.txt - helpContent: This file can be omitted if the GTFS file stop_times.txt has blank - values for arrival_time and departure_time for all the stops that are NOT time - points. This file is needed because standard GTFS does not include these fields. + helpContent: This file can be omitted if the GTFS file stop_times.txt has blank values for arrival_time and departure_time for all the stops that are NOT time points. This file is needed because standard GTFS does not include these fields. fields: - name: trip_id required: true @@ -231,8 +201,7 @@ - id: rider_categories name: rider_categories.txt - helpContent: This file lists the rider categories for fares other than the Regular - category. This file is needed because standard GTFS does not include these fields. + helpContent: This file lists the rider categories for fares other than the Regular category. This file is needed because standard GTFS does not include these fields. fields: - name: rider_category_id required: true @@ -277,24 +246,17 @@ - value: '25' text: Custom (25) columnWidth: 6 - helpContent: Unique rider category ID (agency can assign categories that do not - fall under standard categories) + helpContent: Unique rider category ID (agency can assign categories that do not fall under standard categories) - name: rider_category_description required: true inputType: TEXT maxLength: 256 columnWidth: 6 - helpContent: Rider category as it should appear on 511.org, such as Child (ages 5- - 11), Seniors (Ages 62 & Up) + helpContent: Rider category as it should appear on 511.org, such as Child (ages 5-11), Seniors (Ages 62 & Up) - id: fare_rider_categories name: fare_rider_categories.txt - helpContent: This file specifies attributes for the fares for rider categories. GTFS - file fare_attributes.txt contains the fares for the Regular rider category. Fares - for other rider categories such as Child, Senior, etc will be provided in this plus - file fare_rider_categories.txt. The combination of fare_id and rider_category_id - should be unique in this file. This file is needed because standard GTFS does not - include these fields. + helpContent: This file specifies attributes for the fares for rider categories. GTFS file fare_attributes.txt contains the fares for the Regular rider category. Fares for other rider categories such as Child, Senior, etc will be provided in this plus file fare_rider_categories.txt. The combination of fare_id and rider_category_id should be unique in this file. This file is needed because standard GTFS does not include these fields. fields: - name: fare_id required: true @@ -351,8 +313,7 @@ - id: calendar_attributes name: calendar_attributes.txt - helpContent: This file contains calendar attributes. This file is needed because - standard GTFS does not include these fields. + helpContent: This file contains calendar attributes. This file is needed because standard GTFS does not include these fields. fields: - name: service_id required: true @@ -362,13 +323,11 @@ required: true inputType: TEXT maxLength: 30 - helpContent: Description of the service, as it should appear on 511.org such as - Weekdays, Sunday/Holiday + helpContent: Description of the service, as it should appear on 511.org such as Weekdays, Sunday/Holiday - id: farezone_attributes name: farezone_attributes.txt - helpContent: This file contains fare zone attributes. This file is needed because - standard GTFS does not include these fields. + helpContent: This file contains fare zone attributes. This file is needed because standard GTFS does not include these fields. fields: - name: zone_id required: true @@ -378,5 +337,4 @@ required: true inputType: TEXT maxLength: 35 - helpContent: Public name of the fare zone, as it should appear on 511.org such as - EastBay, WestBay, etc + helpContent: Public name of the fare zone, as it should appear on 511.org such as EastBay, WestBay, etc diff --git a/i18n/english.yml b/i18n/english.yml index 2096a9fdc..ad977d102 100644 --- a/i18n/english.yml +++ b/i18n/english.yml @@ -50,7 +50,9 @@ DeploymentsPanel: deployedTo: Deployed to ProjectViewer: mergeFeeds: Merge all + makePublic: Update public feeds settings: Settings + makePublic: Publish public feeds deployments: Deployments feeds: title: Feed Sources @@ -78,6 +80,7 @@ EditorFeedSourcePanel: date: Date name: Name download: Download + active: Active restore: Make active load: Load for Editing confirmLoad: This will override all active GTFS Editor data for this Feed Source with the data from this version. If there is unsaved work in the Editor you want to keep, you must snapshot the current Editor data first. Are you sure you want to continue? @@ -109,7 +112,6 @@ FeedSourceViewer: FeedVersionViewer: status: Status version: Version - validDates: Valid Dates noVersionsExist: No versions exist for this feed source. timestamp: File Timestamp download: Download @@ -118,11 +120,12 @@ FeedVersionViewer: feed: Feed delete: Delete confirmDelete: Are you sure you want to delete this version? This cannot be undone. - fileSize: File Size +FeedVersionReport: agencyCount: Agency Count routeCount: Route Count tripCount: Trip Count stopTimesCount: Stop time Count + validDates: Valid Dates GtfsValidationExplorer: title: Validation Explorer validationIssues: Validation Issues @@ -148,6 +151,7 @@ ResultTable: problemType: Problem Type priority: Priority affectedIds: Affected ID(s) + line: Line description: Description DeploymentViewer: versions: Feed Versions @@ -217,6 +221,7 @@ ProjectSettings: stairsReluctance: Stairs Reluctance carDropoffTime: Car Dropoff Time brandingUrlRoot: Branding URL Root + requestLogFile: Request log file servers: title: Servers new: Add server @@ -227,6 +232,7 @@ ProjectSettings: public: Public URL internal: Internal URLs admin: Admin access only? + s3Bucket: S3 bucket name osm: title: OSM Extract gtfs: Use GTFS-Derived Extract Bounds @@ -255,21 +261,51 @@ UserAdmin: title: Administration noAccess: You do not have sufficient user privileges to access this area. UserList: + filterByOrg: Filter by org. title: User Management showing: Showing Users of: of search: Search by username +UserRow: + appAdmin: App admin + orgAdmin: Org admin + cancel: Cancel + delete: Delete + deleteConfirm: Are you sure you want to permanently delete this user? + edit: Edit + save: Save UserHomePage: title: Projects noProjects: You currently do not have any projects. createFirst: Create my first project - search: Search projects table: name: Project Name new: New Project help: title: What's a project? content: A project is used to group GTFS feeds. For example, the feeds in a project may be in the same region or they may collectively define a planning scenario. +FeedSourcePanel: + search: Search feeds +OrganizationList: + search: Search orgs + new: Create org +OrganizationSettings: + orgDetails: Organization details + projects: Projects + extensions: Extensions + subDetails: Subscription details + name: + label: Name + placeholder: Big City Transit + logoUrl: + label: Logo URL + placeholder: http://example.com/logo_30x30.png + subscriptionBeginDate: Subscription begins + subscriptionEndDate: Subscription ends + usageTier: + low: Low + medium: Medium + high: High CreateUser: new: Create User @@ -279,6 +315,10 @@ UserSettings: cancel: Cancel save: Save application: Application Settings + org: + admin: Organization administrator + description: Organization administrators have full access to projects within the organization. + billing: Billing admin admin: title: Application Admininistrator description: Application administrators have full access to all projects. diff --git a/i18n/espanol.yml b/i18n/espanol.yml index fa9225ffd..e0b21ebc3 100644 --- a/i18n/espanol.yml +++ b/i18n/espanol.yml @@ -48,6 +48,8 @@ DeploymentsPanel: feedCount: Number of feeds ProjectViewer: mergeFeeds: Merge Feeds + settings: Settings + makePublic: Update public feeds feeds: title: Feed Sources search: Search by name @@ -84,13 +86,21 @@ FeedSourceViewer: update: Update FeedVersionViewer: status: Status - validDates: Valid Dates + version: Version + noVersionsExist: No versions exist for this feed source. timestamp: File Timestamp - size: File Size + download: Download + load: Load for Editing + confirmLoad: This will override all active GTFS Editor data for this Feed Source with the data from this version. If there is unsaved work in the Editor you want to keep, you must snapshot the current Editor data first. Are you sure you want to continue? + feed: Feed + delete: Delete + confirmDelete: Are you sure you want to delete this version? This cannot be undone. +FeedVersionReport: agencyCount: Agency Count routeCount: Route Count tripCount: Trip Count stopTimesCount: Stop time Count + validDates: Valid Dates GtfsValidationExplorer: title: Validation Explorer validationIssues: Validation Issues @@ -113,6 +123,7 @@ ResultTable: problemType: Problem Type priority: Priority affectedIds: Affected ID(s) + line: Line description: Description DeploymentViewer: versions: Feed Versions @@ -182,6 +193,7 @@ ProjectSettings: stairsReluctance: Stairs Reluctance carDropoffTime: Car Dropoff Time brandingUrlRoot: Branding URL Root + requestLogFile: Request log file servers: title: Servers new: Add server @@ -192,6 +204,7 @@ ProjectSettings: public: Public URL internal: Internal URLs admin: Admin access only? + s3Bucket: S3 bucket name osm: title: OSM Extract gtfs: Use GTFS-Derived Extract Bounds @@ -201,10 +214,53 @@ ProjectSettings: UserAdmin: title: User Management UserList: + filterByOrg: Filter by org. title: User Management showing: Showing Users of: of search: Search by username +UserRow: + appAdmin: App admin + orgAdmin: Org admin + cancel: Cancel + delete: Delete + deleteConfirm: Are you sure you want to permanently delete this user? + edit: Edit + save: Save +UserHomePage: + title: Projects + noProjects: You currently do not have any projects. + createFirst: Create my first project + search: Search feeds + table: + name: Project Name + new: New Project + help: + title: What's a project? + content: A project is used to group GTFS feeds. For example, the feeds in a project may be in the same region or they may collectively define a planning scenario. +FeedSourcePanel: + search: Search feeds +OrganizationList: + search: Search orgs + new: Create org +OrganizationSettings: + orgDetails: Organization details + projects: Projects + extensions: Extensions + subDetails: Subscription details + name: + label: Name + placeholder: Big City Transit + logoUrl: + label: Logo URL + placeholder: http://example.com/logo_30x30.png + subscriptionBeginDate: Subscription begins + subscriptionEndDate: Subscription ends + usageTier: + low: Low + medium: Medium + high: High + CreateUser: new: Create User UserSettings: @@ -213,6 +269,10 @@ UserSettings: cancel: Cancel save: Save application: Application Settings + org: + admin: Organization administrator + description: Organization administrators have full access to projects within the organization. + billing: Billing admin admin: title: Application Admininistrator description: Application administrators have full access to all projects. diff --git a/i18n/francais.yml b/i18n/francais.yml index 9dac381ae..3652de509 100644 --- a/i18n/francais.yml +++ b/i18n/francais.yml @@ -48,6 +48,8 @@ DeploymentsPanel: feedCount: Number of feeds ProjectViewer: mergeFeeds: Merge Feeds + settings: Settings + makePublic: Update public feeds feeds: title: Feed Sources search: Search by name @@ -84,13 +86,21 @@ FeedSourceViewer: update: Update FeedVersionViewer: status: Status - validDates: Valid Dates + version: Version + noVersionsExist: No versions exist for this feed source. timestamp: File Timestamp - size: File Size + download: Download + load: Load for Editing + confirmLoad: This will override all active GTFS Editor data for this Feed Source with the data from this version. If there is unsaved work in the Editor you want to keep, you must snapshot the current Editor data first. Are you sure you want to continue? + feed: Feed + delete: Delete + confirmDelete: Are you sure you want to delete this version? This cannot be undone. +FeedVersionReport: agencyCount: Agency Count routeCount: Route Count tripCount: Trip Count stopTimesCount: Stop time Count + validDates: Valid Dates GtfsValidationExplorer: title: Validation Explorer validationIssues: Validation Issues @@ -113,6 +123,7 @@ ResultTable: problemType: Problem Type priority: Priority affectedIds: Affected ID(s) + line: Line description: Description DeploymentViewer: versions: Feed Versions @@ -182,6 +193,7 @@ ProjectSettings: stairsReluctance: Stairs Reluctance carDropoffTime: Car Dropoff Time brandingUrlRoot: Branding URL Root + requestLogFile: Request log file servers: title: Servers new: Add server @@ -192,6 +204,7 @@ ProjectSettings: public: Public URL internal: Internal URLs admin: Admin access only? + s3Bucket: S3 bucket name osm: title: OSM Extract gtfs: Use GTFS-Derived Extract Bounds @@ -201,10 +214,53 @@ ProjectSettings: UserAdmin: title: User Management UserList: + filterByOrg: Filter by org. title: User Management showing: Showing Users of: of search: Search by username +UserRow: + appAdmin: App admin + orgAdmin: Org admin + cancel: Cancel + delete: Delete + deleteConfirm: Are you sure you want to permanently delete this user? + edit: Edit + save: Save +UserHomePage: + title: Projects + noProjects: You currently do not have any projects. + createFirst: Create my first project + search: Search feeds + table: + name: Project Name + new: New Project + help: + title: What's a project? + content: A project is used to group GTFS feeds. For example, the feeds in a project may be in the same region or they may collectively define a planning scenario. +FeedSourcePanel: + search: Search feeds +OrganizationList: + search: Search orgs + new: Create org +OrganizationSettings: + orgDetails: Organization details + projects: Projects + extensions: Extensions + subDetails: Subscription details + name: + label: Name + placeholder: Big City Transit + logoUrl: + label: Logo URL + placeholder: http://example.com/logo_30x30.png + subscriptionBeginDate: Subscription begins + subscriptionEndDate: Subscription ends + usageTier: + low: Low + medium: Medium + high: High + CreateUser: new: Create User UserSettings: @@ -213,6 +269,10 @@ UserSettings: cancel: Cancel save: Save application: Application Settings + org: + admin: Organization administrator + description: Organization administrators have full access to projects within the organization. + billing: Billing admin admin: title: Application Admininistrator description: Application administrators have full access to all projects. diff --git a/index.html b/index.html new file mode 100644 index 000000000..3acf1d168 --- /dev/null +++ b/index.html @@ -0,0 +1,15 @@ + + + + + + ++ +
+ : activeComponent === 'organizations' && isApplicationAdmin && !isModuleEnabled('enterprise') + ?{getMessage(messages, 'noAccess')}
+ :{alert.title}
+ID: #{alert.id} {publishedLabel} {entitiesLabel}
+ ++ {moment(alert.start).format('MMM Do YYYY, h:mm:ssa')} to {moment(alert.end).format('MMM Do YYYY, h:mm:ssa')} + {publishedLabel} {alert.published ? 'Published' : 'Draft'} +
+{alert.description}
+URL: {alert.url}
++ {entitiesLabel} affected service(s) +
+No alerts found.
+ } + +No active jobs.
+ } +Go to Home Page
+Go to Home Page
Go to Home Page
-No snapshots loaded.
+Snapshots are save points you can always revert back to when editing a GTFS feed.
+A snapshot might represent a work-in-progress, future planning scenario or even different service patterns (e.g., summer schedule markup).
+
+
Nulla vitae elit libero, a pharetra augue mollis interdum.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Praesent commodo cursus magna, vel scelerisque nisl consectetur.
@@ -55,7 +59,14 @@ export default class EditorHelpModal extends Component {Specify which routes or zones {activeEntity.fare_id} fare applies to.
+ {activeEntity && activeEntity.fareRules.length} rules apply to this fare +
+ {Math.round(cumulativeTravelTime / 60)} (+{Math.round(patternStop.defaultTravelTime / 60)}{patternStop.defaultDwellTime > 0 ? ` +${Math.round(patternStop.defaultDwellTime / 60)}` : ''})
+ {' '}
+
Stop sequence
+Travel time
+ updateEditSetting('addStops', !editSettings.addStops)}
+ className='small'
+ >
+
this._selectRow(isActive, route, pattern)}>
+
+ No trips for calendar. + {' '} + { + evt.preventDefault() + this.props.addNewRow() + }} + > + Add new trip. + +
++ {activePattern + ? + Choose a calendar to edit timetables or + {' '} + { + e.preventDefault() + this.props.setActiveEntity(feedSource.id, 'calendar', {id: 'new'}) + }} + >create a new one. + + : Choose a trip pattern. + } +
+ } +[Must add stops first]
+ } +No transfers found
+ } + return ( +No transfers found
+ } +} diff --git a/lib/gtfs/components/gtfsmapsearch.js b/lib/gtfs/components/gtfsmapsearch.js new file mode 100644 index 000000000..d15242aee --- /dev/null +++ b/lib/gtfs/components/gtfsmapsearch.js @@ -0,0 +1,105 @@ +import React, { Component, PropTypes } from 'react' +import fetch from 'isomorphic-fetch' +import { Button } from 'react-bootstrap' + +import ActiveGtfsMap from '../containers/ActiveGtfsMap' +import GtfsSearch from './gtfssearch' + +export default class GtfsMapSearch extends Component { + static propTypes = { + placeholder: PropTypes.string + } + constructor (props) { + super(props) + this.state = { + stop: null, + pattern: null, + message: '', + searching: ['stops', 'routes'], + map: {} + } + } + getPatterns (input) { + return fetch(`/api/manager/patterns?route=${input.route.route_id}&feed=${input.route.feed_id}`) + .then((response) => { + return response.json() + }) + .then((json) => { + const pattern = json[0] + // hack to associate route to pattern + pattern.route = input.route + return pattern + }) + } + handleSelection (input) { + if (!input) { + this.setState({stop: null, pattern: null, searchFocus: null}) + } else if (input && input.stop) { + const pattern = null + const stop = input.stop + this.setState({ stop, pattern, searchFocus: stop.stop_id }) + } else if (input && input.route) { + // TODO: replace with GraphQL + return Promise.all([this.getPatterns(input)]).then((results) => { + const pattern = results[0] + const stop = null + this.setState({ pattern, stop, searchFocus: pattern.pattern_id }) + }) + } + } + render () { + let zoomMessage = 'Zoom in to view ' + this.state.searching.join(' and ') + if (this.refs.map && this.refs.map.refs.map) { + const mapZoom = this.refs.map.refs.map.leafletElement.getZoom() + zoomMessage = mapZoom <= 13 ? zoomMessage : '' + } + const searchProps = { + stop: this.state.stop, + pattern: this.state.pattern, + searchFocus: this.state.searchFocus, + entities: this.state.searching + } + return ( +{getMessage(messages, 'table.name')} | +Version | +{getMessage(messages, 'table.dateRetrieved')} | +{getMessage(messages, 'table.loadStatus')} | +{getMessage(messages, 'table.errorCount')} | +{getMessage(messages, 'table.routeCount')} | +{getMessage(messages, 'table.tripCount')} | +{getMessage(messages, 'table.stopTimesCount')} | +{getMessage(messages, 'table.validFrom')} | +{getMessage(messages, 'table.expires')} | ++ |
---|
A collection of feeds can be deployed to OpenTripPlanner (OTP) instances that have been defined in the organization settings.
+{getMessage(messages, 'table.name')} | +{getMessage(messages, 'table.creationDate')} | +{getMessage(messages, 'table.deployedTo')} | +{getMessage(messages, 'table.feedCount')} | ++ |
---|---|---|---|---|
+ |
+ + {dep.dateCreated + ? ({moment(dep.dateCreated).format('MMM Do YYYY')} ({moment(dep.dateCreated).fromNow()})) + : na + } + | ++ {dep.deployedTo + ? () + : na + } + | ++ {dep.feedVersions + ? ({dep.feedVersions.length}) + : na + } + | +
+ |
+
+ No feeds yet.{' '} + {user.permissions.isProjectAdmin(activeProject.id, activeProject.organizationId) && Create one.} +
+Choose a project to view feeds
No feed source found for {this.props.feedSourceId}
+Return to list of projects
+ +This feed source is currently {fs.isPublic ? 'public' : 'private'}.
+Once you delete a feed source, it cannot be recovered.
++ {this.renderIsochroneMessage(version)} +
+ +Number of trips per date of service.
+ +{getMessage(messages, 'noVersionsExist')}
+ + const versionHeader = ( +
+ {version.validationSummary && version.validationSummary.avgDailyRevenueTime
+ ?
{numeral(version.validationSummary[c]).format('0 a')}
+{getMessage(messages, c)}
+ + ))} +{getMessage(messages, 'noVersionsExist')}
+ + if (this.props.listView) { + // List view of feed versions + return ( +Once you delete an organization, the organization and all feed sources it contains cannot be recovered.
+{note.body || '(no content)'}
-{getMessage(messages, 'none')}
} -+ Note: Public feeds page can be viewed here. +
+{getMessage(messages, 'table.name')} | ++ |
---|---|
+
+
+ |
+ + |
+ {getMessage(messages, 'noProjects')}
+ {' '}
+ |
+
Manage, edit, validate and deploy your data in a streamlined workflow.
+
+
{getMessage(messages, 'problemType')} | +//{getMessage(messages, 'priority')} | +//{getMessage(messages, 'affectedIds')} | +//{getMessage(messages, 'line')} | +//{getMessage(messages, 'description')} | +//
---|---|---|---|---|
{val.errorType} | +//{val.priority} | +//{val.affectedEntityId} | +//{val.line} | +//{val.message} | +//