Disable update for docker containers (#715)

Also add docker info to about page and sentry context
This commit is contained in:
ta264 2019-04-05 16:47:26 +01:00 committed by GitHub
parent 6afece237c
commit 4be01a5a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 101 additions and 30 deletions

View file

@ -16,6 +16,7 @@ class About extends Component {
const {
version,
isMonoRuntime,
isDocker,
runtimeVersion,
migrationVersion,
appData,
@ -42,6 +43,14 @@ class About extends Component {
/>
}
{
isDocker &&
<DescriptionListItem
title="Docker"
data={'True'}
/>
}
<DescriptionListItem
title="DB Migration"
data={migrationVersion}
@ -83,6 +92,7 @@ About.propTypes = {
version: PropTypes.string.isRequired,
isMonoRuntime: PropTypes.bool.isRequired,
runtimeVersion: PropTypes.string.isRequired,
isDocker: PropTypes.bool.isRequired,
migrationVersion: PropTypes.number.isRequired,
appData: PropTypes.string.isRequired,
startupPath: PropTypes.string.isRequired,

View file

@ -24,6 +24,7 @@ class Updates extends Component {
error,
items,
isInstallingUpdate,
isDocker,
shortDateFormat,
onInstallLatestPress
} = this.props;
@ -48,24 +49,34 @@ class Updates extends Component {
{
hasUpdateToInstall &&
<div className={styles.updateAvailable}>
<SpinnerButton
className={styles.updateAvailable}
kind={kinds.PRIMARY}
isSpinning={isInstallingUpdate}
onPress={onInstallLatestPress}
>
Install Latest
</SpinnerButton>
<div className={styles.updateAvailable}>
{
!isDocker &&
<SpinnerButton
className={styles.updateAvailable}
kind={kinds.PRIMARY}
isSpinning={isInstallingUpdate}
onPress={onInstallLatestPress}
>
Install Latest
</SpinnerButton>
}
{
isFetching &&
<LoadingIndicator
className={styles.loading}
size={20}
/>
}
</div>
{
isDocker &&
<div className={styles.upToDateMessage}>
An update is available. Please update your Docker image and re-create the container.
</div>
}
{
isFetching &&
<LoadingIndicator
className={styles.loading}
size={20}
/>
}
</div>
}
{
@ -162,6 +173,7 @@ Updates.propTypes = {
error: PropTypes.object,
items: PropTypes.array.isRequired,
isInstallingUpdate: PropTypes.bool.isRequired,
isDocker: PropTypes.bool.isRequired,
shortDateFormat: PropTypes.string.isRequired,
onInstallLatestPress: PropTypes.func.isRequired
};

View file

@ -6,6 +6,7 @@ import { fetchUpdates } from 'Store/Actions/systemActions';
import { executeCommand } from 'Store/Actions/commandActions';
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
import createUISettingsSelector from 'Store/Selectors/createUISettingsSelector';
import createSystemStatusSelector from 'Store/Selectors/createSystemStatusSelector';
import * as commandNames from 'Commands/commandNames';
import Updates from './Updates';
@ -14,7 +15,8 @@ function createMapStateToProps() {
(state) => state.system.updates,
createUISettingsSelector(),
createCommandExecutingSelector(commandNames.APPLICATION_UPDATE),
(updates, uiSettings, isInstallingUpdate) => {
createSystemStatusSelector(),
(updates, uiSettings, isInstallingUpdate, systemStatus) => {
const {
isFetching,
isPopulated,
@ -28,6 +30,7 @@ function createMapStateToProps() {
error,
items,
isInstallingUpdate,
isDocker: systemStatus.isDocker,
shortDateFormat: uiSettings.shortDateFormat
};
}