Skip to content

Commit

Permalink
Merge pull request #62 from KPMP/develop
Browse files Browse the repository at this point in the history
Release v1.5
  • Loading branch information
rlreamy authored May 20, 2024
2 parents d0d8824 + ca0c847 commit 0359416
Show file tree
Hide file tree
Showing 14 changed files with 179 additions and 196 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_GLOBUS_INBOX=
32 changes: 32 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm ci
- run: npm run build --if-present
- run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ node_modules
node_modules/*
.project
*.css
.env
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

125 changes: 63 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 12 additions & 19 deletions src/actions/Packages/packageActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,30 @@ import { sendMessageToBackend } from '../Error/errorActions';

const api = Api.getInstance();

export const getPackages = () => {
return (dispatch) => {
api.get('/api/v1/packages?shouldExclude=false')
.then(res => {
dispatch(setPackages(res.data));
})
.catch(err => {
dispatch(sendMessageToBackend(err));
});
};
}
export const getPackagesStateless = () => {

return api.get('/api/v1/packages?shouldExclude=false')
.then(res=> {
return res.data
})
.catch(error => {
console.log(error)
alert("We hit an error getting packages...talk to a dev.")
});
}

export const movePackageFiles = (packageId) => {
return (dispatch) => {
api.post('/api/v1/packages/' + packageId + '/files/move')
.then(res => {
alert(res.data);
alert("Package marked as ready to move.");
})
.catch(err => {
alert("There was a problem moving the files.");
});
}
}

export const setPackages = (packages) => {
return {
type: actionNames.SET_PACKAGES,
payload: packages
}
}

export const setStateDisplayMap = (stateDisplayMap) => {
return {
type: actionNames.SET_STATE_DISPLAY_MAP,
Expand Down
26 changes: 0 additions & 26 deletions src/actions/Validation/validationActions.test.js

This file was deleted.

1 change: 0 additions & 1 deletion src/actions/actionNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const actionNames = {
CLEAR_VALIDATION_RESULT: 'CLEAR_VALIDATION_RESULT',
GET_PACKAGES: 'GET_PACKAGES',
RESET_STATE: 'RESET_STATE',
SET_PACKAGES: 'SET_PACKAGES',
SET_STATE_DISPLAY_MAP: 'SET_STATE_DISPLAY_MAP',
SET_VALIDATION_RESULT: 'SET_VALIDATION_RESULT'
};
Expand Down
3 changes: 1 addition & 2 deletions src/components/PackageDashboard/PackageDashboardPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageTable from './PackageTable';
class PackageDashboardPage extends Component {

componentDidMount() {
this.props.getPackages();
this.props.getStateDisplay();
}

render() {
Expand All @@ -22,7 +22,6 @@ class PackageDashboardPage extends Component {
<Row className='mt-3'>
<Col sm={12}>
<PackageTable
packages={this.props.packages}
movePackageFiles={this.props.movePackageFiles}
stateDisplayMap={this.props.stateDisplayMap}
/>
Expand Down
Loading

0 comments on commit 0359416

Please sign in to comment.