Skip to content

Commit

Permalink
Merge pull request #9168 from karlaspuldaro/notebook-kernel-display-2…
Browse files Browse the repository at this point in the history
….2.x

Fix notebook toolbar kernel status on page reload
  • Loading branch information
ajbozarth committed Oct 22, 2020
2 parents d2b45e9 + 3c5816a commit bbc2959
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions packages/apputils/src/toolbar.tsx
Expand Up @@ -730,25 +730,21 @@ namespace Private {

const status = sessionContext.kernelDisplayStatus;

const circleIconProps: LabIcon.IProps = {
container: this.node,
title: `Kernel ${Text.titleCase(status)}`,
stylesheet: 'toolbarButton',
alignSelf: 'normal',
height: '24px'
};

// set the icon
if (this._isBusy(status)) {
circleIcon.element({
container: this.node,
title: `Kernel ${Text.titleCase(status)}`,

stylesheet: 'toolbarButton',
alignSelf: 'normal',
height: '24px'
});
LabIcon.remove(this.node);
circleIcon.element(circleIconProps);
} else {
circleEmptyIcon.element({
container: this.node,
title: `Kernel ${Text.titleCase(status)}`,

stylesheet: 'toolbarButton',
alignSelf: 'normal',
height: '24px'
});
LabIcon.remove(this.node);
circleEmptyIcon.element(circleIconProps);
}
}

Expand All @@ -761,7 +757,9 @@ namespace Private {
status === 'starting' ||
status === 'terminating' ||
status === 'restarting' ||
status === 'initializing'
status === 'initializing' ||
status === 'connecting' ||
status === 'unknown'
);
}
}
Expand Down

0 comments on commit bbc2959

Please sign in to comment.