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 3 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.
1 change: 0 additions & 1 deletion i18n/english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,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
71 changes: 16 additions & 55 deletions lib/manager/components/ProjectSettings.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
// @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 = {
Expand All @@ -25,66 +19,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>
}
}
Loading
Loading