Skip to content

Commit

Permalink
feat: Add SWB version and date to top bar (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyen102 committed Apr 12, 2021
1 parent fd7c3ff commit 7d38236
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file.

## [2.2.0] - 2021-04-12

### Added
- feat: Display SWB Version in UI's Top Bar

## [2.1.5] - 2021-04-08

Expand Down
14 changes: 13 additions & 1 deletion addons/addon-base-ui/packages/base-ui/src/helpers/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,16 @@ const branding = {
},
};

export { awsRegion, apiPath, isLocalDev, websiteUrl, stage, region, branding, autoLogoutTimeoutInMinutes };
const versionAndDate = process.env.REACT_APP_VERSION_AND_DATE;

export {
awsRegion,
apiPath,
isLocalDev,
websiteUrl,
stage,
region,
branding,
autoLogoutTimeoutInMinutes,
versionAndDate,
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Menu, Icon, Image } from 'semantic-ui-react';

import { createLink } from '../helpers/routing';
import { displayError } from '../helpers/notification';
import { branding } from '../helpers/settings';
import { branding, versionAndDate } from '../helpers/settings';

// expected props
// - userStore (via injection)
Expand Down Expand Up @@ -87,6 +87,7 @@ class MainLayout extends React.Component {
style={{ height: '40px', width: 'auto' }}
/>
<span style={{ paddingLeft: '5px' }}>{branding.main.title}</span>
<span style={{ paddingLeft: '20px' }}>{versionAndDate}</span>
</Menu.Item>
<Menu.Menu position="right">
<Menu.Item>
Expand Down
8 changes: 7 additions & 1 deletion main/config/settings/.defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,10 @@ auditQldbName: ${self:custom.settings.namespace}-audit
createServiceCatalogPortfolio: true

# Version number of current release
customUserAgent: AwsLabs/SO0144/2.1.4
versionNumber: '2.2.0'

# Release date of current release
versionDate: '2021-04-12'

# Metadata provided with AWS SDK calls
customUserAgent: 'AwsLabs/SO0144/${self:custom.settings.versionNumber}'
1 change: 1 addition & 0 deletions main/solution/ui/config/environment/env-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ REACT_APP_BRAND_LOGIN_SUBTITLE: ${self:custom.settings.brandLoginSubtitle}
REACT_APP_AUTO_LOGOUT_TIMEOUT_IN_MINUTES: ${self:custom.settings.autoLogoutTimeoutInMinutes}
REACT_APP_ENV_MGMT_ROLE_NAME: ${self:custom.settings.envMgmtRoleName}
REACT_APP_ENABLE_BUILT_IN_WORKSPACES: ${self:custom.settings.enableBuiltInWorkspaces}
REACT_APP_VERSION_AND_DATE: ${self:custom.settings.versionAndDate}

# ========================================================================
# Overrides for .env.local
Expand Down
2 changes: 2 additions & 0 deletions main/solution/ui/config/settings/.defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ brandMainTitle: 'Service Workbench on AWS (${self:custom.settings.envName}/${sel
brandLoginTitle: 'Service Workbench'
brandLoginSubtitle: 'Service Workbench on AWS (${self:custom.settings.envName}/${self:custom.settings.awsRegion})'

versionAndDate: 'Version ${self:custom.settings.versionNumber} (${self:custom.settings.versionDate})'

# After how many minutes should the auto logout dialog be displayed? once displayed the user has 1 minute to dismiss
# the dialog, otherwise they will be automatically logged out
autoLogoutTimeoutInMinutes: 30

0 comments on commit 7d38236

Please sign in to comment.