From e2d566fb90a86f0884de826e8f7dbff8c90e8b1e Mon Sep 17 00:00:00 2001 From: Kevin Moses Date: Tue, 30 Jan 2018 15:51:01 -0500 Subject: [PATCH] Permalinks for bounce and scale modals --- .../app/components/common/modalButtons/BounceModal.jsx | 6 ++++++ .../app/components/common/modalButtons/ScaleModal.jsx | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/SingularityUI/app/components/common/modalButtons/BounceModal.jsx b/SingularityUI/app/components/common/modalButtons/BounceModal.jsx index 33ac6b18e8..9141e5b4a1 100644 --- a/SingularityUI/app/components/common/modalButtons/BounceModal.jsx +++ b/SingularityUI/app/components/common/modalButtons/BounceModal.jsx @@ -11,6 +11,12 @@ class BounceModal extends Component { bounceRequest: PropTypes.func.isRequired }; + componentDidMount() { + if (window.location.search.includes('bounce=true')) { + this.show(); + } + } + show() { this.refs.bouceModal.show(); } diff --git a/SingularityUI/app/components/common/modalButtons/ScaleModal.jsx b/SingularityUI/app/components/common/modalButtons/ScaleModal.jsx index 88455b5752..e34672e990 100644 --- a/SingularityUI/app/components/common/modalButtons/ScaleModal.jsx +++ b/SingularityUI/app/components/common/modalButtons/ScaleModal.jsx @@ -32,6 +32,12 @@ class ScaleModal extends Component { } }; + componentDidMount() { + if (window.location.search.includes('scale=true')) { + this.show(); + } + } + handleScale(data) { const { instances, durationMillis, message, bounce, incremental } = data; const isIncremental = incremental === 'incremental';