mirror of
https://github.com/nasa/openmct.git
synced 2025-05-31 22:50:49 +00:00
Fix stackplots static style (#5045)
* [4864] Fixes cancelling edit properties console error * Get the style receiver when the styleRuleManager is initialized. This prevents any ambiguity about which element should receive the style * Don't subscribe if the styleRuleManager has been destroyed Co-authored-by: John Hill <john.c.hill@nasa.gov> Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov> Co-authored-by: Nikhil <nikhil.k.mandlik@nasa.gov> Co-authored-by: Andrew Henry <andrew.k.henry@nasa.gov>
This commit is contained in:
parent
04ee6f49d6
commit
40a7451064
@ -31,7 +31,7 @@ commands:
|
|||||||
type: string
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- when:
|
- when:
|
||||||
condition:
|
condition:
|
||||||
equal: [false, << pipeline.parameters.BUST_CACHE >> ]
|
equal: [false, << pipeline.parameters.BUST_CACHE >> ]
|
||||||
steps:
|
steps:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
@ -41,7 +41,7 @@ commands:
|
|||||||
parameters:
|
parameters:
|
||||||
node-version:
|
node-version:
|
||||||
type: string
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
|
key: deps-{{ .Branch }}--<< parameters.node-version >>--{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
|
||||||
paths:
|
paths:
|
||||||
@ -61,7 +61,7 @@ commands:
|
|||||||
upload_code_covio:
|
upload_code_covio:
|
||||||
description: "Command to upload code coverage reports to codecov.io"
|
description: "Command to upload code coverage reports to codecov.io"
|
||||||
steps:
|
steps:
|
||||||
- run: curl -Os https://uploader.codecov.io/latest/linux/codecov;chmod +x codecov;./codecov
|
- run: curl -Os https://uploader.codecov.io/latest/linux/codecov;chmod +x codecov;./codecov
|
||||||
orbs:
|
orbs:
|
||||||
node: circleci/node@4.9.0
|
node: circleci/node@4.9.0
|
||||||
browser-tools: circleci/browser-tools@1.3.0
|
browser-tools: circleci/browser-tools@1.3.0
|
||||||
@ -101,7 +101,7 @@ jobs:
|
|||||||
equal: [ "FirefoxESR", <<parameters.browser>> ]
|
equal: [ "FirefoxESR", <<parameters.browser>> ]
|
||||||
steps:
|
steps:
|
||||||
- browser-tools/install-firefox:
|
- browser-tools/install-firefox:
|
||||||
version: "91.7.1esr" #https://archive.mozilla.org/pub/firefox/releases/
|
version: "91.7.1esr" #https://archive.mozilla.org/pub/firefox/releases/
|
||||||
- when:
|
- when:
|
||||||
condition:
|
condition:
|
||||||
equal: [ "FirefoxHeadless", <<parameters.browser>> ]
|
equal: [ "FirefoxHeadless", <<parameters.browser>> ]
|
||||||
@ -158,7 +158,7 @@ workflows:
|
|||||||
- lint:
|
- lint:
|
||||||
name: node16-lint
|
name: node16-lint
|
||||||
node-version: lts/gallium
|
node-version: lts/gallium
|
||||||
- unit-test:
|
- unit-test:
|
||||||
name: node14-chrome
|
name: node14-chrome
|
||||||
node-version: lts/fermium
|
node-version: lts/fermium
|
||||||
browser: ChromeHeadless
|
browser: ChromeHeadless
|
||||||
|
@ -78,11 +78,13 @@ export default class StyleRuleManager extends EventEmitter {
|
|||||||
this.openmct.objects.get(this.conditionSetIdentifier).then((conditionSetDomainObject) => {
|
this.openmct.objects.get(this.conditionSetIdentifier).then((conditionSetDomainObject) => {
|
||||||
this.openmct.telemetry.request(conditionSetDomainObject)
|
this.openmct.telemetry.request(conditionSetDomainObject)
|
||||||
.then(output => {
|
.then(output => {
|
||||||
if (output && output.length) {
|
if (output && output.length && (this.conditionSetIdentifier && this.openmct.objects.areIdsEqual(conditionSetDomainObject.identifier, this.conditionSetIdentifier))) {
|
||||||
this.handleConditionSetResultUpdated(output[0]);
|
this.handleConditionSetResultUpdated(output[0]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(conditionSetDomainObject, this.handleConditionSetResultUpdated.bind(this));
|
if (this.conditionSetIdentifier && this.openmct.objects.areIdsEqual(conditionSetDomainObject.identifier, this.conditionSetIdentifier)) {
|
||||||
|
this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(conditionSetDomainObject, this.handleConditionSetResultUpdated.bind(this));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,13 @@ export default class EditPropertiesAction extends PropertiesAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
*/
|
||||||
|
_onCancel() {
|
||||||
|
//noop
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
@ -87,6 +94,7 @@ export default class EditPropertiesAction extends PropertiesAction {
|
|||||||
formStructure.title = 'Edit ' + this.domainObject.name;
|
formStructure.title = 'Edit ' + this.domainObject.name;
|
||||||
|
|
||||||
return this.openmct.forms.showForm(formStructure)
|
return this.openmct.forms.showForm(formStructure)
|
||||||
.then(this._onSave.bind(this));
|
.then(this._onSave.bind(this))
|
||||||
|
.catch(this._onCancel.bind(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,9 @@ describe('EditPropertiesAction plugin', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
editPropertiesAction.invoke([domainObject])
|
editPropertiesAction.invoke([domainObject])
|
||||||
|
.then(() => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -208,6 +211,10 @@ describe('EditPropertiesAction plugin', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
editPropertiesAction.invoke([domainObject])
|
editPropertiesAction.invoke([domainObject])
|
||||||
|
.then(() => {
|
||||||
|
expect(domainObject.name).toEqual(name);
|
||||||
|
done();
|
||||||
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
expect(domainObject.name).toEqual(name);
|
expect(domainObject.name).toEqual(name);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user