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

show a delete service instance banner #535

Merged
Merged
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
1 change: 1 addition & 0 deletions packages/apollo/src/assets/i18n/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2813,6 +2813,7 @@
"mig_test_txt": "3. Next check if the new console is working. Open a new tab to the new console and click on each of the node tiles. You will need to associate each node with an appropriate identity from your wallet. Compare the Fabric related content seen on the new console with the content seen on this console, it should be identical. If the new console is missing content double check that the correct identity was associated and switch the identity if needed.",
"mig_delete_txt": "4. If the new console is working well it's time to delete this console. Go to your [[IBM Cloud resources]](https://cloud.ibm.com/resources) dashboard, under \"Blockchain\" find the row for this console, and open it. You should be on the page which used to have the blue button that launches the console. This page should now have the text \"This console has been migrated!\". If so then it is safe to delete by using the \"Actions...\" dropdown and the \"Delete service\" option. If this text is missing contact support.",
"audit_logs": "Audit logs",
"threat_message":"This service instance must be deleted by Oct 31, 2023 to avoid a blockchain network outage",
"hide_archived_channels": "Hide Archived Channels",
"show_archived_channels": "Show Archived Channels"
}
11 changes: 11 additions & 0 deletions packages/apollo/src/components/PageHeader/PageHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export class PageHeader extends Component {
migratedConsoleUrl: resp ? resp.migrated_console_url : '',
showDeleteBanner: false,
migrationType: this.detectBannerType(resp ? resp.deadline : 0),
showThreat: resp ? resp.migration_enabled : false,
};
migrationState.showDeleteBanner = migrationState.isMigrationComplete;
migrationState.showReadOnlyBanner = migrationState.isMigrationComplete;
Expand All @@ -123,6 +124,7 @@ export class PageHeader extends Component {
migrationState.showMigrationBanner = false;
migrationState.showDeleteBanner = false;
migrationState.showReadOnlyBanner = false;
migrationState.showThreat = false;
}

this.props.updateState(SCOPE, migrationState);
Expand Down Expand Up @@ -412,6 +414,14 @@ export class PageHeader extends Component {
title={translate('migration_done_title')}
/>
)}
{this.props.showAnnouncement && this.props.showThreat && (
<InlineNotification
className='threat-style'
kind="error"
hideCloseButton
title={translate('threat_message')}
/>
)}
{this.props.showAnnouncement && this.props.showReadOnlyBanner && (
<InlineNotification
kind="warning"
Expand Down Expand Up @@ -493,6 +503,7 @@ const dataProps = {
showCertUpdateNotice: PropTypes.bool,
upCompList: PropTypes.string,
migrationType: PropTypes.string,
showThreat: PropTypes.bool,
};

PageHeader.propTypes = {
Expand Down
25 changes: 25 additions & 0 deletions packages/apollo/src/components/PageHeader/_pageHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,28 @@
line-height: 1.125rem;
margin-top: 0.5rem;
}

.threat-style {
background: #000 !important;
.bx--inline-notification__text-wrapper {
color: #cc0000;
animation: color-change 3s infinite;
}
}

@keyframes color-change {
0% {
color: #cc0000;
font-weight: 900;
}

50% {
color: #fff;
font-weight: 300;
}

100% {
color: #cc0000;
font-weight: 900;
}
}