|
@@ -181,12 +181,17 @@ export namespace KernelStatus {
|
|
|
const oldState = this._getAllState();
|
|
|
const { newValue } = change;
|
|
|
if (newValue !== null) {
|
|
|
- newValue.getSpec().then(spec => {
|
|
|
- // sync setting of status and display name
|
|
|
- this._kernelStatus = newValue.status;
|
|
|
- this._kernelName = spec.display_name;
|
|
|
- this._triggerChange(oldState, this._getAllState());
|
|
|
- });
|
|
|
+ newValue
|
|
|
+ .getSpec()
|
|
|
+ .then(spec => {
|
|
|
+ // sync setting of status and display name
|
|
|
+ this._kernelStatus = newValue.status;
|
|
|
+ this._kernelName = spec.display_name;
|
|
|
+ this._triggerChange(oldState, this._getAllState());
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ throw err;
|
|
|
+ });
|
|
|
} else {
|
|
|
this._kernelStatus = 'unknown';
|
|
|
this._kernelName = 'unknown';
|