mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 01:42:31 +00:00
[Inspector] Display notes in the inspector if there are notes found on the domainObject (#4520)
Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
This commit is contained in:
parent
8acbcadd5d
commit
0d88bc8531
@ -43,6 +43,7 @@ describe('the inspector', () => {
|
||||
namespace: '',
|
||||
key: 'mock-folder-key'
|
||||
},
|
||||
notes: 'This object should have some notes',
|
||||
created: 1592851063871
|
||||
};
|
||||
|
||||
@ -73,6 +74,7 @@ describe('the inspector', () => {
|
||||
const [
|
||||
title,
|
||||
type,
|
||||
notes,
|
||||
timestamp
|
||||
] = details;
|
||||
|
||||
@ -85,6 +87,8 @@ describe('the inspector', () => {
|
||||
.toEqual('Type');
|
||||
expect(type.value.toLowerCase())
|
||||
.toEqual(folderItem.type);
|
||||
expect(notes.value)
|
||||
.toEqual('This object should have some notes');
|
||||
|
||||
expect(timestamp.name)
|
||||
.toEqual('Created');
|
||||
|
@ -94,6 +94,7 @@ export default {
|
||||
const typeName = this.type ? this.type.definition.name : `Unknown: ${this.domainObject.type}`;
|
||||
const timestampLabel = this.domainObject.modified ? 'Modified' : 'Created';
|
||||
const timestamp = this.domainObject.modified ? this.domainObject.modified : this.domainObject.created;
|
||||
const notes = this.domainObject.notes;
|
||||
|
||||
const details = [
|
||||
{
|
||||
@ -106,6 +107,13 @@ export default {
|
||||
}
|
||||
];
|
||||
|
||||
if (notes) {
|
||||
details.push({
|
||||
name: 'Notes',
|
||||
value: notes
|
||||
});
|
||||
}
|
||||
|
||||
if (timestamp !== undefined) {
|
||||
const formattedTimestamp = Moment.utc(timestamp)
|
||||
.format('YYYY-MM-DD[\n]HH:mm:ss')
|
||||
|
@ -162,7 +162,6 @@
|
||||
|
||||
&__value {
|
||||
color: $colorInspectorPropVal;
|
||||
word-break: break-all;
|
||||
&:first-child {
|
||||
// If there is no preceding .label element, make value span columns
|
||||
grid-column: 1 / 3;
|
||||
|
Loading…
x
Reference in New Issue
Block a user