From d7da816c8261004012d3c15268ee62e1666af323 Mon Sep 17 00:00:00 2001 From: "philip.cline" Date: Wed, 15 Feb 2023 16:13:56 -0500 Subject: [PATCH 001/142] fix(error handling): fix editor lock regression --- lib/common/actions/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/common/actions/index.js b/lib/common/actions/index.js index b6cf4c266..7434c6650 100644 --- a/lib/common/actions/index.js +++ b/lib/common/actions/index.js @@ -131,7 +131,7 @@ function getErrorMessageFromJson ( } // re-assign error message after it gets used in the detail. errorMessage = json.message || JSON.stringify(json) - if (json.detail.includes('conflicts with an existing trip id')) { + if (json.detail && json.detail.includes('conflicts with an existing trip id')) { action = 'DEFAULT' } } From 6023cc8dffbcc0ea08f953383297e74d447ae789 Mon Sep 17 00:00:00 2001 From: "philip.cline" Date: Fri, 17 Feb 2023 11:05:20 -0500 Subject: [PATCH 002/142] fix(Deployment servers): Fix dep server regression --- lib/manager/actions/projects.js | 8 -------- lib/manager/reducers/status.js | 3 +-- lib/types/reducers.js | 3 +-- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/manager/actions/projects.js b/lib/manager/actions/projects.js index 54016256a..50e174f3a 100644 --- a/lib/manager/actions/projects.js +++ b/lib/manager/actions/projects.js @@ -109,14 +109,6 @@ export function fetchProject (projectId: string, unsecure: ?boolean) { export function fetchProjectWithFeeds (projectId: string, unsecure: ?boolean, isSaving: ?boolean) { return function (dispatch: dispatchFn, getState: getStateFn) { - // Don't fetch project or feeds if project and feeds are already present and the feed sources and projects aren't being actively saved - const state = getState() - const project = state.projects.all.find(p => p.id === projectId) - const isSaving = state.status.message && state.status.saving - if (!isSaving && project && project.feedSources && project.feedSourceCount && project.feedSources.length <= project.feedSourceCount) { - return - } - dispatch(requestingProject()) const apiRoot = unsecure ? 'public' : 'secure' const url = `/api/manager/${apiRoot}/project/${projectId}` diff --git a/lib/manager/reducers/status.js b/lib/manager/reducers/status.js index f56c920cc..e693a609c 100644 --- a/lib/manager/reducers/status.js +++ b/lib/manager/reducers/status.js @@ -31,7 +31,6 @@ const config = (state: StatusState = defaultState, action: Action): StatusState case 'REQUESTING_PROJECT': case 'REQUESTING_FEEDSOURCES': case 'REQUESTING_FEEDSOURCE': - return {...state, saving: false, message: messages(action.type)} case 'SAVING_PROJECT': case 'SAVING_FEEDSOURCE': case 'DELETING_FEEDSOURCE': @@ -73,7 +72,7 @@ const config = (state: StatusState = defaultState, action: Action): StatusState case 'UPDATING_SERVER': case 'FETCHING_ALL_JOBS': case 'REQUEST_RTD_ALERTS': - return {...state, saving: true, message: messages(action.type)} + return {...state, message: messages(action.type)} // STATUS MODAL UPDATES (TYPICALLY SET ON JOB COMPLETION) case 'SET_ERROR_MESSAGE': diff --git a/lib/types/reducers.js b/lib/types/reducers.js index de232a4cd..83d0c8ad0 100644 --- a/lib/types/reducers.js +++ b/lib/types/reducers.js @@ -572,8 +572,7 @@ export type StatusState = { applicationRequests: Array, jobMonitor: JobStatusState, message: ?string, - modal: ?ModalStatus, - saving: ?boolean + modal: ?ModalStatus } export type UiState = { From e1459222e04ad7fee2cf3671a365b1773aedc243 Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Tue, 21 Feb 2023 14:38:00 -0500 Subject: [PATCH 003/142] add initial framework for displaying mobility data --- .../components/validation/GtfsValidationViewer.js | 11 +++++++++++ .../validation/MobilityDataValidationResult.js | 10 ++++++++++ lib/types/index.js | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 lib/manager/components/validation/MobilityDataValidationResult.js diff --git a/lib/manager/components/validation/GtfsValidationViewer.js b/lib/manager/components/validation/GtfsValidationViewer.js index ffbf19c60..0621dea82 100644 --- a/lib/manager/components/validation/GtfsValidationViewer.js +++ b/lib/manager/components/validation/GtfsValidationViewer.js @@ -30,6 +30,7 @@ import type {Props as FeedVersionViewerProps} from '../version/FeedVersionViewer import type {ValidationResult} from '../../../types' import ValidationErrorItem from './ValidationErrorItem' +import MobilityDataValidationResult from './MobilityDataValidationResult' const DEFAULT_LIMIT = 10 @@ -269,6 +270,16 @@ export default class GtfsValidationViewer extends Component { {this.messages('title')} {validationContent} + Mobility Data + + {version.mobilityDataResult && version.mobilityDataResult.notices.map(notice => ( + + )) } + + This is the no validation errors message that should only appear if there are none. + + + ) } diff --git a/lib/manager/components/validation/MobilityDataValidationResult.js b/lib/manager/components/validation/MobilityDataValidationResult.js new file mode 100644 index 000000000..f493dc75d --- /dev/null +++ b/lib/manager/components/validation/MobilityDataValidationResult.js @@ -0,0 +1,10 @@ +import React from 'react' +import { ListGroupItem } from 'react-bootstrap' + +const MobilityDataValidationResult = (props) => { + const {notice} = props + + return

{notice.code}

+} + +export default MobilityDataValidationResult \ No newline at end of file diff --git a/lib/types/index.js b/lib/types/index.js index 7ef9b4ca1..0dc090cb3 100644 --- a/lib/types/index.js +++ b/lib/types/index.js @@ -542,6 +542,8 @@ export type FeedVersion = FeedVersionSummary & { nextVersionId: ?string, noteCount: number, notes: Array, + // TODO: Type + mobilityDataResult: ?any, previousVersionId: ?string, processedByExternalPublisher: ?number, sentToExternalPublisher: ?number, From fe4264e3800ae5c8065f6376aad5f0056f97c3ba Mon Sep 17 00:00:00 2001 From: miles-grant-ibigroup Date: Thu, 23 Feb 2023 09:30:24 -0500 Subject: [PATCH 004/142] remove useless log button --- lib/manager/components/deployment/CurrentDeploymentPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/manager/components/deployment/CurrentDeploymentPanel.js b/lib/manager/components/deployment/CurrentDeploymentPanel.js index ca9487b41..94674840f 100644 --- a/lib/manager/components/deployment/CurrentDeploymentPanel.js +++ b/lib/manager/components/deployment/CurrentDeploymentPanel.js @@ -273,11 +273,11 @@ class DeployJobSummary extends Component<{ onClick={this._onClickDownloadGraph}> Graph.obj - + */} {/* TODO: otp-runner uploads these?