Skip to content

Commit bfeb6a1

Browse files
author
vikasrohit
authored
Merge pull request #2080 from appirio-tech/hotfix/maintenance_mode_if_project_api_down
Hotfix/maintenance mode if project api down
2 parents f86682e + 4ddc1f9 commit bfeb6a1

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

src/components/Layout/Layout.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ class Layout extends Component {
1818
}
1919
}
2020

21-
const mapStateToProps = ({ loadUser }) => {
21+
const mapStateToProps = ({ loadUser, projectState, projectSearch }) => {
22+
const projectDetailApiCheck = !projectState.isLoading && !!projectState.error
23+
const projectListingApiCheck = !projectSearch.isLoading && !!projectSearch.error
2224
return {
2325
user : loadUser.user,
24-
isLoadingUser: loadUser.isLoading
26+
isLoadingUser: loadUser.isLoading,
27+
maintenanceMode: projectDetailApiCheck || projectListingApiCheck
2528
}
2629
}
2730

src/components/Layout/Layout.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import Footer from '../Footer/Footer'
3-
import { MAINTENANCE_MODE } from '../../config/constants'
3+
// import { MAINTENANCE_MODE } from '../../config/constants'
44
import Alert from 'react-s-alert'
55
import cn from 'classnames'
66
import Maintenance from '../Maintenance/Maintenance'
@@ -12,11 +12,11 @@ import '../../styles/vendors/s-alert-default.css'
1212
import 'react-s-alert/dist/s-alert-css-effects/stackslide.css'
1313

1414
const Layout = (props) => {
15-
const { isLoadingUser } = props
15+
const { isLoadingUser, maintenanceMode } = props
1616

1717
if (isLoadingUser) {
1818
return (<div />)
19-
} else if (MAINTENANCE_MODE) {
19+
} else if (maintenanceMode) {
2020
return <Maintenance />
2121
} else {
2222
return (

src/config/projectQuestions/enterprise_mobile.v1.0.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ const sections = [
337337
{ value: 'confidential', label: 'Confidential Information, Sensitive Financial Data or Personally Identifiable Information (PII) - Will the user be working directly with financial or other protected information such has health records?'},
338338
{ value: 'mdm', label: 'Mobile Device Management (MDM) - Do you employ an MDM solution? If yes, what service do you use?'}
339339
],
340-
description: 'Please select each required security requirement above.',
340+
description: 'Please select each required security requirement above.'
341341
},
342342
{
343343
icon: 'question',

0 commit comments

Comments
 (0)