-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix server routes tests * Fix Gitlab URL in Jenkinsfile - Fix replacement URLs for Sed for API Gateway * Fix Gitlab config to use correct branch * Fix Gitlab credentialsId * Remove POST body from 'prod' code * Add testing code for using ENV variables * Add debugging statements to node server - For debugging in CF * Change gitlab credentials back to bi * Add json:true to node server request * Add family:4 to request options in node server - request/request-promise-native#6 * Remove hardcoded basicAuth values * Fix search enpoint config * Fix formQuery config, no need for & in query * Remove debugging statements, console logs etc. * Add logging config from sbr-ui - Add filename to logs - Use proper morgan logging with Winston logger * Update Jenkinsfile with new configuration - Build node 'GMU' label * Add code for ShowConfetti, in server + frontend (#7) - Copy showConfetti code from sbr-ui
- Loading branch information
Showing
16 changed files
with
144 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Confetti from 'react-confetti'; | ||
import { connect } from 'react-redux'; | ||
|
||
class ShowConfetti extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.state = { | ||
opacity: 1, | ||
count: 0, | ||
}; | ||
this.tick = this.tick.bind(this); | ||
} | ||
componentDidMount() { | ||
if (this.props.showConfetti) { | ||
this.interval = setInterval(this.tick, 250); | ||
} | ||
} | ||
componentWillUnmount() { | ||
clearInterval(this.interval); | ||
} | ||
tick() { | ||
if (this.state.count > (this.props.seconds / 0.25)) { | ||
clearInterval(this.interval); | ||
} | ||
this.setState({ count: this.state.count + 1, opacity: this.state.opacity - (0.25 / this.props.seconds) }); | ||
} | ||
render() { | ||
return ( | ||
<div> | ||
{(this.state.count < (this.props.seconds / 0.25) && this.props.showConfetti) && | ||
<Confetti opacity={this.state.opacity} width={`${window.innerWidth}px`} height={`${window.innerHeight}px`} /> | ||
} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
ShowConfetti.propTypes = { | ||
showConfetti: PropTypes.bool.isRequired, | ||
seconds: PropTypes.number.isRequired, | ||
}; | ||
|
||
function select(state) { | ||
return { | ||
showConfetti: state.login.showConfetti, | ||
}; | ||
} | ||
|
||
export default connect(select)(ShowConfetti); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
const constants = { | ||
ENV: 'Local', | ||
SHOW_CONFETTI_TIME: 10, | ||
}; | ||
|
||
export default constants; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.