Skip to content

Commit

Permalink
Merge pull request #1145 from nasa/develop
Browse files Browse the repository at this point in the history
Release -v12.2.0 to master
  • Loading branch information
vindigo authored Sep 5, 2024
2 parents 1541214 + 515738b commit 5a90d84
Show file tree
Hide file tree
Showing 52 changed files with 10,845 additions and 3,287 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.19.0
20.12.2
57 changes: 55 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,46 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [v12.2.0] - 2024-09-04

This version of the dashboard requires Cumulus API >= v18.4.0

### Changed

- **CUMULUS-3805**
- Updated collections to sort by timestamp instead of duration
- Changed the initialSortField of tables using createdAt to updatedAt
- Removed the duration column from the Collections table
- **CUMULUS-3619**
- Added Accessibility link to footer
- Modified unit tests to accomodate new changes.
- **CUMULUS-3502**
- Upgraded localstack to v3.0.0
- Bumped node version from 14.19.1 to 16.19.0 to match Core
- Upgrade postgres image to 11.13-alpine
- Updated the dashboard to use alpha version `@cumulus/[email protected]` and
`@cumulus/[email protected]` to work with localstack v3.0.0
- **Snyk Security Fix**
- Upgraded axios from 1.6.0 to 1.6.8
- **CUMULUS-3810**
- converted the following files from class to functional components: home.js,
header.js, index.js, oauth.js, app.js, and 404.js
- **CUMULUS-2668**
- Refactored DeleteCollectionModal and BatchAsyncCommands from class to function components.
- Modified unit tests to accomodate new changes.
- **CUMULUS-2356**
- Removed gitc localization
- Allowlisted braces, ws, and fast-xml-parser
- **CUMULUS-3706**
- Bumped node version from 16.19.0 to 20.12.2 to match Core
- Updated the dashboard to use `@cumulus/[email protected]` and `@cumulus/[email protected]`.
- Upgraded postgres image to postgres:13.9-alpine

### Fixed

- **CUMULUS-3855**
- Fixed to show API indicator and tooltip details

## [v12.1.0] - 2023-10-27

### Breaking Changes
Expand All @@ -28,6 +68,17 @@ This version of the dashboard requires Cumulus API >= v18.1.0
- **CUMULUS-3434**
- Fixed `getGranuleRecoveryStatus` action to take granuleId and collectionId.

## [v12.0.2] - 2023-12-13

### Note

This version of the dashboard requires Cumulus API v2 (Core version v16.x.x and v17.x.x)

### Fixed

- **CUMULUS-3265**
- Fixed bulk granule operation modal to correctly pass selected granules into bulk operation

## [v12.0.1] - 2023-05-25

### Breaking Changes
Expand Down Expand Up @@ -1349,8 +1400,10 @@ Fix for serving the dashboard through the Cumulus API.
### Added

- Versioning and changelog [CUMULUS-197] by @kkelly51
[Unreleased]: https://github.com/nasa/cumulus-dashboard/compare/v12.1.0...HEAD
[v12.1.0]: https://github.com/nasa/cumulus-dashboard/compare/v12.0.1...v12.1.0
[Unreleased]: https://github.com/nasa/cumulus-dashboard/compare/v12.2.0...HEAD
[v12.2.0]: https://github.com/nasa/cumulus-dashboard/compare/v12.1.0...v12.2.0
[v12.1.0]: https://github.com/nasa/cumulus-dashboard/compare/v12.0.2...v12.1.0
[v12.0.2]: https://github.com/nasa/cumulus-dashboard/compare/v12.0.1...v12.0.2
[v12.0.1]: https://github.com/nasa/cumulus-dashboard/compare/v12.0.0...v12.0.1
[v12.0.0]: https://github.com/nasa/cumulus-dashboard/compare/v11.0.0...v12.0.0
[v11.0.0]: https://github.com/nasa/cumulus-dashboard/compare/v10.0.0...v11.0.0
Expand Down
65 changes: 63 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Code to generate and deploy the dashboard for the Cumulus API.
- [Deployment](#deployment)
- [Testing](#testing)
- [Create a Dashboard Release](#create-a-dashboard-release)
- [Create a Backport Dashboard Release](#create-a-backport-dashboard-release)


Other pages:
Expand All @@ -32,7 +33,7 @@ Setting the following environment variables can override the default values.
| DAAC\_NAME | An identifier: e.g. LPDAAC, | *Local* |
| ENABLE\_RECOVERY | If true, adds recovery options to the granule and collection pages. | *false* |
| HIDE\_PDR | Whether to hide (or show) the PDR menu. | *true* |
| LABELS | Choose `gitc` or `daac` localization. | *daac* |
| LABELS | Select `daac` localization. | *daac* |
| STAGE | Identifier displayed at top of dashboard page: e.g. PROD, UAT | *development* |
| KIBANAROOT | \<optional\> Points to a Kibana endpoint. | |

Expand Down Expand Up @@ -96,7 +97,7 @@ In this example, the dashboard would be available at `http://localhost:3000/` in

### Build the dashboard

The dashboard uses node v16.19.0. To build/run the dashboard on your local machine, install [nvm](https://github.com/creationix/nvm) and run `nvm install v16.19.0`.
The dashboard uses node v20.12.2. To build/run the dashboard on your local machine, install [nvm](https://github.com/creationix/nvm) and run `nvm install v20.12.2`.

#### install requirements
We use npm for local package management. To install the requirements:
Expand Down Expand Up @@ -395,4 +396,64 @@ It is likely that no branch plan will exist for the `master` branch.
- Choose Branch Name `master` and then click `create`.
- Verify that the build has started for this plan.

## Create a Backport Dashboard Release

### 1. Checkout the tag of the release we want to patch to

```shell
git checkout vMAJOR.MINOR.PATCH

e.g.:
git checkout v12.0.1
```

### 2. Create a new branch for the release

Create a new release branch off of the tag, and name the branch `release-vMAJOR.MINOR.x` (e.g. `release-v12.0.x`).

Note: If we already have the branch from prior backports, check out that branch instead of creating a new one.

```shell
git checkout -b release-vMAJOR.MINOR.x vMAJOR.MINOR.PATCH

e.g.:
git checkout -b release-v12.0.x v12.0.1
```

### 3. Cherry pick the commits relevant to the backport
```shell
git cherry-pick [replace-with-commit-SHA]
```

### 4. Update the version number

When changes are ready to be released, the version number must be updated in `package.json`.

### 5. Bamboo build

Commit all changes and push the release branch (e.g. `release-1.2.x`) to GitHub.

Configure Bamboo to run automated tests against this branch by finding the branch plan for the release branch (`release-1.2.x`) and setting variables:
- `GIT_PR`: `true`

### 6. Manual testing

See instruction in [Create a Dashboard Release](#create-a-dashboard-release)

### 7. Create a git tag for the release

Push a new release tag to Github. The tag should be in the format `v1.2.3`, where `1.2.3` is the new version. After the tag is created, you can create a new release from github.
Create and push a new git tag:

```shell
git tag -a v1.x.x -m "Release 1.x.x"
git push origin v1.x.x
```

### 8. Add the release to GitHub

### 9. Merge changelog to the develop branch

Create a PR that merges **ONLY** the changelog updates back to develop.

<a name="bundlefootnote">1</a>: A dashboard bundle is just a ready-to-deploy compiled version of the dashboard and environment.
30 changes: 10 additions & 20 deletions app/src/js/App.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component } from 'react';
import React, { useState } from 'react';
import { Provider } from 'react-redux';
import { Route, Redirect, Switch } from 'react-router-dom';
import { ConnectedRouter } from 'connected-react-router';
Expand Down Expand Up @@ -47,35 +47,25 @@ const MainRoutes = () => (
);

// generate the root App Component
class App extends Component {
constructor (props) {
super(props);
this.state = {};
this.store = ourConfigureStore({});
this.isLoggedIn = this.isLoggedIn.bind(this);
}
const App = () => {
const [store] = useState(ourConfigureStore({}));
const isLoggedIn = () => store.getState().api.authenticated;

isLoggedIn () {
return this.store.getState().api.authenticated;
}

render () {
return (
return (
// <ErrorBoundary> // Add after troublshooting other errors
// Routes
<div className="routes">
<Provider store={this.store}>
<Provider store={store}>
<ConnectedRouter history={history}>
<Switch>
<Redirect exact from='/login' to='/auth' />
<Route path='/auth' render={() => (this.isLoggedIn() ? <Redirect to='/' /> : <OAuth />)} />
<Route path='/' render={() => (this.isLoggedIn() ? <MainRoutes /> : <Redirect to='/auth' />)} />
<Route path='/auth' render={() => (isLoggedIn() ? <Redirect to='/' /> : <OAuth />)} />
<Route path='/' render={() => (isLoggedIn() ? <MainRoutes /> : <Redirect to='/auth' />)} />
</Switch>
</ConnectedRouter>
</Provider>
</div>
);
}
}
);
};

export default App;
2 changes: 1 addition & 1 deletion app/src/js/actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const checkApiVersion = () => (dispatch, getState) => {
dispatch({
type: types.API_VERSION_INCOMPATIBLE,
payload: {
warning: `This dashboard is incompatible with the current Cumulus API v.${versionNumber}. This dashboard requires a Cumulus API of v.${minCompatibleApiVersion} or later.`
warning: `This dashboard is incompatible with the current Cumulus API v${versionNumber}. This dashboard requires a Cumulus API of v${minCompatibleApiVersion} or later.`
}
});
}
Expand Down
21 changes: 6 additions & 15 deletions app/src/js/components/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,11 @@ import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';

class NotFound extends React.Component {
constructor () {
super();
this.displayName = '404';
}

render () {
return (
<div className='page__404'>
<h1>404</h1>
<p>Sorry page not found.</p>
</div>
);
}
}
const NotFound = () => (
<div className='page__404'>
<h1>404</h1>
<p>Sorry page not found.</p>
</div>
);

export default withRouter(connect((state) => state)(NotFound));
Loading

0 comments on commit 5a90d84

Please sign in to comment.