Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8699 enabled maintenance banners #1410

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions client/app/components/auth/login-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Component from '@ember/component';
import { computed } from '@ember/object';
import ENV from 'labs-zap-search/config/environment';

/* eslint-disable no-unused-vars */
const MAINTENANCE_RANGE = ENV.maintenanceTimes;

export default Component.extend({
Expand All @@ -14,9 +15,9 @@ export default Component.extend({
}),

hasUpcomingMaintenance: computed(function() {
const [, end] = MAINTENANCE_RANGE.map(string => new Date(string));
const [start, end] = MAINTENANCE_RANGE.map(string => new Date(string));
const now = new Date();

return now < end;
return now < start;
}),
});
9 changes: 9 additions & 0 deletions client/app/styles/modules/_m-modal-controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,12 @@
padding-left: 8px;
}
}

// maintenance notice
.maintenance-wrapper {
background-color: #E5E5E5;

p {
padding: 3px 5px 0 5px;
}
}
15 changes: 14 additions & 1 deletion client/app/templates/components/auth/login-dialog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,20 @@
<p>Once you're signed in, you'll be redirected back here, where you'll see your list of assigned projects.</p>

{{#if this.hasUpcomingMaintenance}}
<h1>Please note: This portal will be down for 24 hours of system maintenance starting Monday, June 28 at 7PM.</h1>
<div class="maintenance-wrapper">
<p>
Please be advised that there will be scheduled maintenance on ZAP Search and the Applicant Portal from June 1, 2022, 3:00 pm to June 1, 2022, 4:00 pm. During that time, you will not be able to sign in to your account. Thank you for your understanding. For help, please email <a href="mailto:[email protected]">[email protected]</a>
</p>
</div>

{{/if}}

{{#if this.isMaintenancePeriod}}
<div class="maintenance-wrapper">
<p>
Please be advised that we are currently performing scheduled maintenance from June 1, 2022, 3:00 pm to June 1, 2022, 4:00 pm. During this time, you will not be able to sign in to your account. Thank you for your understanding. For help, please email <a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
{{/if}}

<a
Expand Down
12 changes: 10 additions & 2 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
command = "yarn build --environment=production"

[context.develop]
environment = { HOST ="https://zap-api-staging.herokuapp.com", NYCID_CLIENT_ID="lup-portal-staging", NYC_ID_HOST="https://accounts-nonprd.nyc.gov/account" }
environment = { HOST="https://zap-api-staging.herokuapp.com", NYCID_CLIENT_ID="lup-portal-staging", NYC_ID_HOST="https://accounts-nonprd.nyc.gov/account", MAINTENANCE_START='06/01/22 15:00', MAINTENANCE_END='06/01/22 16:00' }

[context.master]
environment = { HOST ="https://zap-api-production.herokuapp.com", NYCID_CLIENT_ID="lup-portal-production", NYC_ID_HOST="https://www1.nyc.gov/account" }
environment = { HOST="https://zap-api-production.herokuapp.com", NYCID_CLIENT_ID="lup-portal-production", NYC_ID_HOST="https://www1.nyc.gov/account", MAINTENANCE_START='06/01/22 15:00', MAINTENANCE_END='06/01/22 16:00' }

# qa team
[context.qa]
environment = { HOST="https://zap-api-staging.herokuapp.com", NYCID_CLIENT_ID="lup-portal-staging", NYC_ID_HOST="https://accounts-nonprd.nyc.gov/account", MAINTENANCE_START='06/01/22 15:00', MAINTENANCE_END='06/01/22 16:00' }

# deploy-preview
[context.deploy-preview]
environment = { HOST="https://zap-api-staging.herokuapp.com", NYCID_CLIENT_ID="lup-portal-staging", NYC_ID_HOST="https://accounts-nonprd.nyc.gov/account", MAINTENANCE_START='06/01/22 15:00', MAINTENANCE_END='06/01/22 16:00' }