Compare commits
3 Commits
mct5263-up
...
vista-r4.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
488beb5b3f | ||
|
|
2f63718385 | ||
|
|
433f1bf28e |
@@ -39,8 +39,10 @@ export default class ConditionSetViewProvider {
|
||||
return isConditionSet && this.openmct.router.isNavigatedObject(objectPath);
|
||||
}
|
||||
|
||||
canEdit(domainObject) {
|
||||
return domainObject.type === 'conditionSet';
|
||||
canEdit(domainObject, objectPath) {
|
||||
const isConditionSet = domainObject.type === 'conditionSet';
|
||||
|
||||
return isConditionSet && this.openmct.router.isNavigatedObject(objectPath);
|
||||
}
|
||||
|
||||
view(domainObject, objectPath) {
|
||||
|
||||
@@ -99,6 +99,7 @@ export default class CreateAction extends PropertiesAction {
|
||||
*/
|
||||
async _navigateAndEdit(domainObject, parentDomainObjectpath) {
|
||||
let objectPath;
|
||||
let self = this;
|
||||
if (parentDomainObjectpath) {
|
||||
objectPath = parentDomainObjectpath && [domainObject].concat(parentDomainObjectpath);
|
||||
} else {
|
||||
@@ -110,13 +111,18 @@ export default class CreateAction extends PropertiesAction {
|
||||
.reverse()
|
||||
.join('/');
|
||||
|
||||
this.openmct.router.navigate(url);
|
||||
function editObject() {
|
||||
const objectView = self.openmct.objectViews.get(domainObject, objectPath)[0];
|
||||
const canEdit = objectView && objectView.canEdit && objectView.canEdit(domainObject, objectPath);
|
||||
|
||||
const objectView = this.openmct.objectViews.get(domainObject, objectPath)[0];
|
||||
const canEdit = objectView && objectView.canEdit && objectView.canEdit(domainObject, objectPath);
|
||||
if (canEdit) {
|
||||
this.openmct.editor.edit();
|
||||
if (canEdit) {
|
||||
self.openmct.editor.edit();
|
||||
}
|
||||
}
|
||||
|
||||
this.openmct.router.once('afterNavigation', editObject);
|
||||
|
||||
this.openmct.router.navigate(url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,10 +29,9 @@ define(
|
||||
}
|
||||
|
||||
SummaryWidgetsCompositionPolicy.prototype.allow = function (parent, child) {
|
||||
const parentType = parent.getCapability('type');
|
||||
const newStyleChild = child.useCapability('adapter');
|
||||
const parentType = parent.type;
|
||||
|
||||
if (parentType.instanceOf('summary-widget') && !this.openmct.telemetry.isTelemetryObject(newStyleChild)) {
|
||||
if (parentType === 'summary-widget' && !this.openmct.telemetry.isTelemetryObject(child)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
export const COLOR_PALETTE = [
|
||||
[0x00, 0x37, 0xFF],
|
||||
[0x43, 0xB0, 0xFF],
|
||||
[0xF0, 0x60, 0x00],
|
||||
[0x00, 0x70, 0x40],
|
||||
[0xFB, 0x49, 0x49],
|
||||
@@ -30,25 +30,25 @@ export const COLOR_PALETTE = [
|
||||
[0xFF, 0xA6, 0x3D],
|
||||
[0x05, 0xA3, 0x00],
|
||||
[0xF0, 0x00, 0x6C],
|
||||
[0x77, 0x17, 0x7A],
|
||||
[0xAC, 0x54, 0xAE],
|
||||
[0x23, 0xA9, 0xDB],
|
||||
[0xFA, 0xF0, 0x6F],
|
||||
[0x4E, 0xF0, 0x48],
|
||||
[0xC7, 0xBE, 0x52],
|
||||
[0x5A, 0xBD, 0x56],
|
||||
[0xAD, 0x50, 0x72],
|
||||
[0x94, 0x25, 0xEA],
|
||||
[0x21, 0x87, 0x82],
|
||||
[0x8F, 0x6E, 0x47],
|
||||
[0xf0, 0x59, 0xcb],
|
||||
[0x34, 0xB6, 0x7D],
|
||||
[0x6A, 0x36, 0xFF],
|
||||
[0x56, 0xF0, 0xE8],
|
||||
[0x7F, 0x52, 0xFF],
|
||||
[0x46, 0xC7, 0xC0],
|
||||
[0xA1, 0x8C, 0x1C],
|
||||
[0xCB, 0xE1, 0x44],
|
||||
[0x95, 0xB1, 0x26],
|
||||
[0xFF, 0x84, 0x9E],
|
||||
[0xB7, 0x79, 0xE7],
|
||||
[0x8C, 0xC9, 0xFD],
|
||||
[0xDB, 0xAA, 0x6E],
|
||||
[0xB8, 0xDF, 0x97],
|
||||
[0x93, 0xB5, 0x77],
|
||||
[0xFF, 0xBC, 0xDA],
|
||||
[0xD3, 0xB6, 0xDE]
|
||||
];
|
||||
|
||||
@@ -445,6 +445,10 @@ export default {
|
||||
}
|
||||
|
||||
// sorting composition items
|
||||
if (!a.name || !b.name) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (a.name.toLowerCase()
|
||||
> b.name.toLowerCase()) {
|
||||
return 1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import objectPathToUrl from '/src/tools/url';
|
||||
import objectPathToUrl from '../../tools/url';
|
||||
|
||||
export default {
|
||||
inject: ['openmct'],
|
||||
|
||||
Reference in New Issue
Block a user