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