Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove project-wide deployment settings #1023

Merged
merged 5 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ jobs:
- name: Run e2e tests
if: inputs.e2e
run: |
(echo "E2E Test Attempt 1" && docker-compose --env-file __tests__/e2e/.env -f __tests__/e2e/docker-compose.yml up --abort-on-container-exit) || \
(echo "E2E Test Attempt 2" && docker-compose --env-file __tests__/e2e/.env -f __tests__/e2e/docker-compose.yml up --abort-on-container-exit) || \
(echo "E2E Test Attempt 3" && docker-compose --env-file __tests__/e2e/.env -f __tests__/e2e/docker-compose.yml up --abort-on-container-exit) || \
(echo "E2E Test Attempt 1" && docker compose --env-file __tests__/e2e/.env -f __tests__/e2e/docker-compose.yml up --abort-on-container-exit) || \
(echo "E2E Test Attempt 2" && docker compose --env-file __tests__/e2e/.env -f __tests__/e2e/docker-compose.yml up --abort-on-container-exit) || \
(echo "E2E Test Attempt 3" && docker compose --env-file __tests__/e2e/.env -f __tests__/e2e/docker-compose.yml up --abort-on-container-exit) || \
(echo "E2E Tests Failed" && exit 1)
# At this point, the build is successful.
- name: Semantic Release
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A pre-configured datatools instance can be lauched via Docker by running
```bash
cd docker
cp ../configurations/default/env.yml.tmp ../configurations/default/env.yml
docker-compose up
docker compose up
```

from the datatools-ui directory. Datatools will then be running on port `9966`.
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ yarn start -- --config /path/to/config

## E2E tests

The e2e tests have been Dockerized, which allows them to be run easily anywhere `docker-compose` works. To run them on localhost, first create a `.env` file in the `__tests__/e2e`. `docker-compose` will alert you as to which variables must be present.
The e2e tests have been Dockerized, which allows them to be run easily anywhere `docker compose` works. To run them on localhost, first create a `.env` file in the `__tests__/e2e`. `docker compose` will alert you as to which variables must be present.

To run the tests, run `docker-compose -f docker-compose.yml up --abort-on-container-exit` in the `__tests__/e2e/` directory.
To run the tests, run `docker compose -f docker compose.yml up --abort-on-container-exit` in the `__tests__/e2e/` directory.
44 changes: 0 additions & 44 deletions i18n/english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,49 +135,6 @@ components:
danger: Danger!
success: Success!
warning: Warning!
DeploymentSettings:
boundsPlaceholder: 'min_lon, min_lat, max_lon, max_lat'
buildConfig:
elevationBucket:
accessKey: Access Key
bucketName: S3 Bucket Name
secretKey: Secret Key
fares: Fares
fetchElevationUS: Fetch Elevation
save: Save
stationTransfers: Sta. Transfers
subwayAccessTime: Subway Access Time
title: Build Config
clear: Clear
manageServers: Manage deployment servers
osm:
bounds: Custom Extract Bounds
custom: Use Custom Extract Bounds
gtfs: Use GTFS-Derived Extract Bounds
title: OSM Extract
routerConfig:
brandingUrlRoot: Branding URL Root
carDropoffTime: Car Dropoff Time
driveDistanceReluctance: Drive Distance Reluctance
numItineraries: '# of itineraries'
requestLogFile: Request log file
stairsReluctance: Stairs Reluctance
title: Router Config
itineraryFilters:
nonTransitGeneralizedCostLimit: Non-Transit Generalized Cost Limit
updaters:
$index:
feedId: Feed ID
frequencySec: Frequency (in seconds)
sourceType: Source type
type: Type
url: URL
new: Add updater
title: Real-time updaters
placeholder: Updater name
walkSpeed: Walk Speed
save: Save
title: Deployment
DeploymentVersionsTable:
dateRetrieved: Date Retrieved
errorCount: Error Count
Expand Down Expand Up @@ -578,7 +535,6 @@ components:
custom: Use Custom Extract Bounds
gtfs: Use GTFS-Derived Extract Bounds
title: OSM Extract
title: Deployment
routerConfig:
brandingUrlRoot: Branding URL Root
carDropoffTime: Car Dropoff Time
Expand Down
40 changes: 0 additions & 40 deletions i18n/german.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,46 +136,6 @@ components:
danger: Gefahr!
success: Erfolg!
warning: Warnung!
DeploymentSettings:
boundsPlaceholder: min_lon, min_lat, max_lon, max_lat
buildConfig:
elevationBucket:
accessKey: Zugangs-Schlüssel
bucketName: S3 Bucket Name
secretKey: Secret Key
fares: Tarife
fetchElevationUS: Höhenmodell abrufen
save: Speichern
stationTransfers: Umstiege
subwayAccessTime: U-Bahn-Zugangszeiten
title: Build-Konfiguration
clear: Zurücksetzen
manageServers: Deployment-Server verwalten
osm:
bounds: Selbst-definierte Extrakt-Grenzen
custom: Benutze selbst-definierte Extrakt-Grenzen
gtfs: Grenzen aus GTFS ableiten
title: OSM-Extrakt
routerConfig:
brandingUrlRoot: Branding-URL Wurzel
carDropoffTime: PKW-Rückgabe-Zeit
numItineraries: '# of Reisevorschläge'
requestLogFile: Log-Datei anfordern
stairsReluctance: Treppen-Abneigung
title: Router Konfiguration
updaters:
$index:
defaultAgencyId: Standard-Betreiber ID
frequencySec: Frequenz (in Sekunden)
sourceType: Quellen-Typ
type: Typ
url: URL
new: Aktualisierer hinzufügen
placeholder: Aktualisierer-Name
title: Echtzeit-Aktualisierungs-Updater
walkSpeed: Geh-Geschwindigkeit
save: Speichern
title: Deployment
DeploymentVersionsTable:
dateRetrieved: Abrufdatum
errorCount: Fehlerzahl
Expand Down
40 changes: 0 additions & 40 deletions i18n/polish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,46 +139,6 @@ components:
danger: Uwaga!
success: Sukces!
warning: Ostrzeżenie!
DeploymentSettings:
boundsPlaceholder: min_lon, min_lat, max_lon, max_lat
buildConfig:
elevationBucket:
accessKey: Access Key
bucketName: S3 Bucket Name
secretKey: Secret Key
fares: Taryfy
fetchElevationUS: Fetch Elevation
save: Zapisz
stationTransfers: Transfery na stacji
subwayAccessTime: Godziny otwarcia metra
title: Build Config
clear: Wyczyść
manageServers: Manage deployment servers
osm:
bounds: Custom Extract Bounds
custom: Use Custom Extract Bounds
gtfs: Use GTFS-Derived Extract Bounds
title: Wyciąg z OSM
routerConfig:
brandingUrlRoot: Branding URL Root
carDropoffTime: Car Dropoff Time
numItineraries: '# of itineraries'
requestLogFile: Request log file
stairsReluctance: Stairs Reluctance
title: Router Config
updaters:
$index:
defaultAgencyId: Domyślny ID przewoźnika
frequencySec: Częstotliwość (w sekundach)
sourceType: Rodzaj źródła
type: Typ
url: URL
new: Add updater
placeholder: Updater name
title: Real-time updaters
walkSpeed: Walk Speed
save: Zapisz
title: Wdrożenie
DeploymentVersionsTable:
dateRetrieved: Data pozyskania
errorCount: Licznik błędów
Expand Down
72 changes: 16 additions & 56 deletions lib/manager/components/ProjectSettings.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
// @flow

import React, { Component } from 'react'
import { Row, Col, Panel, ListGroup, ListGroupItem } from 'react-bootstrap'
import { LinkContainer } from 'react-router-bootstrap'
import { Row, Col } from 'react-bootstrap'

import * as projectActions from '../actions/projects'
import {
getComponentMessages,
isModuleEnabled
} from '../../common/util/config'
import type { ManagerUserState } from '../../types/reducers'
import type { Project } from '../../types'

import DeploymentSettings from './deployment/DeploymentSettings'
import ProjectSettingsForm from './ProjectSettingsForm'

type Props = {
activeSettingsPanel?: ?string,
deleteProject: typeof projectActions.deleteProject,
project: Project,
projectEditDisabled: boolean,
Expand All @@ -25,66 +18,33 @@ type Props = {
}

export default class ProjectSettings extends Component<Props> {
messages = getComponentMessages('ProjectSettings')
miles-grant-ibigroup marked this conversation as resolved.
Show resolved Hide resolved

_updateProjectSettings = (project: Project, settings: Object) => {
const {updateProject} = this.props
const { updateProject } = this.props
// Update project and re-fetch feeds.
updateProject(project.id, settings, true)
}

render () {
const {
activeSettingsPanel,
miles-grant-ibigroup marked this conversation as resolved.
Show resolved Hide resolved
deleteProject,
project,
projectEditDisabled,
updateProject,
user
} = this.props
const activePanel = !activeSettingsPanel
? <ProjectSettingsForm
deleteProject={deleteProject}
editDisabled={projectEditDisabled}
onCancelUrl={`project/${project.id}/`}
project={project}
updateProject={updateProject}
showDangerZone
user={user}
/>
: <DeploymentSettings
project={project}
updateProject={updateProject}
editDisabled={projectEditDisabled} />
return (
<Row>
<Col xs={12} sm={3}>
<Panel>
<ListGroup>
<LinkContainer
to={`/project/${project.id}/settings`}>
<ListGroupItem>
{this.messages('title')}
</ListGroupItem>
</LinkContainer>
{isModuleEnabled('deployment')
? (
<LinkContainer
data-test-id='deployment-settings-link'
to={`/project/${project.id}/settings/deployment`}
>
<ListGroupItem>{this.messages('deployment.title')}</ListGroupItem>
</LinkContainer>
)
: null
}
</ListGroup>
</Panel>
</Col>
<Col xs={12} sm={7}>
{activePanel}
</Col>
</Row>
)
return <Row>
<Col xs={12} sm={2} />
<Col xs={12} sm={7}>
<ProjectSettingsForm
deleteProject={deleteProject}
editDisabled={projectEditDisabled}
onCancelUrl={`project/${project.id}/`}
project={project}
updateProject={updateProject}
showDangerZone
user={user}
/>
</Col>
</Row>
}
}
2 changes: 0 additions & 2 deletions lib/manager/components/ProjectViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ export default class ProjectViewer extends Component<Props, State> {
render () {
const {
activeComponent,
activeSubComponent,
createFeedSource,
isFetching,
project,
Expand Down Expand Up @@ -265,7 +264,6 @@ export default class ProjectViewer extends Component<Props, State> {
// keyboard listener is not active while form is not visible.
activeComponent === 'settings' && (
<ProjectSettings
activeSettingsPanel={activeSubComponent}
projectEditDisabled={projectEditDisabled}
{...this.props}
/>
Expand Down
Loading
Loading