Compare commits

...

18 Commits

Author SHA1 Message Date
David Tsay
2d19975917 [Plots] Allow changing x-axis metadata for release candidate (#3280)
* refactor toggleYAxisLabel for reusability and add toggleXAxisLabel

* allow change of x-axis metadata in single plots

* Revert "refactor toggleYAxisLabel for reusability and add toggleXAxisLabel"

This reverts commit a94a461235.

* change ticks on x-axis metadata change

* update all visible x-axis ticks when changing x-axis metadata

* fix x-axis change to only update ticks when needed

* change x axis toggle to key from label

* remove comments and unnecessary code

* Minor tweaks

 - Refined position of X label select;
 - Fixed ``:hover` to use ``@include hover`;

* WIP do not re-request data on x-axis metadata change

* change x axis selected option on x key change

* options and timesystem change react correctly

* set display range on change of x axis metadata

* clean up regeneration of ticks on x-axis change

remove commented code

* only enable x key toggle when appropriate

* remove comment

Co-authored-by: charlesh88 <charlesh88@gmail.com>
2020-08-06 13:51:20 -07:00
Deep Tailor
29e7942a4e port regex change to R4.5 (#3281) 2020-08-06 13:30:55 -07:00
Deep Tailor
4f853016d6 fix bug with calculateColumnWidths 2020-08-06 12:01:21 -07:00
Deep Tailor
abbb31f384 Table Row Sizing (#3272)
* working sizingRow  - need style changes

* clear interval on destroy

* Fixes for dynamic table row heights

- Added tr { min-height } to `data-font-size` CSS;
- Refined markup in sizing-row.vue;

* only poll on edit

* fixed small bugs

* fix lint warning

* move sizing row to sizing table

* add reject callbacks to failing tests

* revert changes to elasticsearchproviderspec

Co-authored-by: charlesh88 <charlesh88@gmail.com>
2020-08-06 11:22:10 -07:00
Shefali Joshi
ae8ed2d71f Compare the enum value to the input, not the index of the enumeration (#3278) 2020-08-06 11:20:38 -07:00
Deep Tailor
9ecb257e5d change notification indicator to use v-show 2020-08-06 11:19:07 -07:00
David Tsay
5e2d8106a5 [Time conductor] Better persistence handling for history for release branch (#3260)
* remove unnecessary persist call

* do not update bounds if no zoom range

pass correct bounds prop to history

* fix syncing issues with history and local storage

* Update TelemetryTable config to allow disable multiselect.

* rename for clarity

* [Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078 (#3240)

* [Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078

* #3250 :  [Preview] Preview window should not have any context menu actions

* cleanup: removed redundant code

* New eslint rules auto fix (#3058)

* no-implicit-coercion and no-unneeded-ternary

* End every line with a semicolon

* Spacing and formatting

* Enabled semi-spacing

* Applies npm run lint:fix to code after master merge

* Fix merge issues

* Switched operator-linebreak to 'before'

Co-authored-by: Joshi <simplyrender@gmail.com>

* [Telemetry Tables][Plots] Display units where applicable (#3198)

* added unit columns in telemetry tables

* added unit column hiding in telemetry tables, added units to lad tables and sets

* added units to plots and plot legends

* Revert "Merge branch 'master' into time-conductor-fixes"

This reverts commit 4adde12472, reversing
changes made to 79b20067c1.

Co-authored-by: Mandlik, Nikhil K. (ARC-TI)[KBR Wyle Services, LLC] <nikhil.k.mandlik@nasa.gov>
Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
Co-authored-by: Andrew Henry <akhenry@gmail.com>
Co-authored-by: Joshi <simplyrender@gmail.com>
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2020-08-03 13:58:09 -07:00
Deep Tailor
32aa412d1e Font Styling (#3252)
* working proto for font size

* wip

* Font styling

 - Base classes for font-size and font;
 - WIP!

* working data attribute for fontsize

* Font styling

 - Add `js-style-receiver` to markup, refine style targeting JS for
 better application of styles;
 - Refinements to font and size CSS;
 - WIP!

* Font styling

 - Redo CSS to use `data-*` attributes;
 - New `u-style-receiver` class for use as font-size and font-family CSS
 selector target;
 - New `js-style-receiver` class for use as JS target by ObjectView.vue;
 - New classes added to markup in all Open MCT views;
 - Changed font-size values from 'is-font-size--*' to just the number;
 - Some refinement to individual views to account for font-sizing
 capability;
 - Removed automatic font-size 13px being set by SubobjectView.vue;
 - WIP!

* working mixed styles

* Font styling

 - Added `u-style-receiver` to TelemetryView.vue;
 - Added `icon-font-size` to Font Size dropdown button;
 - TODO: better font-size icon;

* working font-family

* Font styling

 - Art for `icon-font-size` glyph updated;
 - Redefined glyph usage in some Layout toolbar buttons;
 - Updated font-size and font dropdown menus options text;

* Font styling

 - Refined font-size and font dropdown values;
 - Fixed toolbar-select-menu.vue to remove 'px' from non-specific option
  return;

* dont allow font styling on layouts that contain other layouts

* fix lint warning

Co-authored-by: charlesh88 <charlesh88@gmail.com>
2020-07-31 10:37:33 -07:00
Deep Tailor
cb7f431fdf Snapshot outdated objects fix (#3251)
* [Snapshots] Are holding on to outdated domainObjects when clicking on preview #3078

* #3250 :  [Preview] Preview window should not have any context menu actions

* cleanup: removed redundant code

Co-authored-by: Mandlik, Nikhil K. (ARC-TI)[KBR Wyle Services, LLC] <nikhil.k.mandlik@nasa.gov>
2020-07-29 16:34:32 -07:00
Deep Tailor
e667b22b3c remove modified and persisted keys from duplicates (#3241) 2020-07-28 11:05:55 -07:00
Jamie V
7d51d9c1eb parsing datum itself rather than specific key of datum, let telemetry api do the work (#3235) 2020-07-24 13:34:26 -07:00
David Tsay
9124f4f566 allow table row to control object path for context menu actions (#3232)
Need for changes in VISTA
2020-07-24 10:41:36 -07:00
Charles Hacskaylo
d9baa94970 UI enhancement fixes 2 (#3225)
- Fixed incorrect CSS naming: `c-frame-edit__move` changed to
 `c-frame__move-bar`;
 - Fixed `display: contents` that was erroneously applied to
 `u-angular-object-view-wrapper` and preventing styling from being
 applied to plots, renamed class to `.l-angular-ov-wrapper`;
 - Removed commented CSS;
2020-07-22 20:20:17 -07:00
Shefali Joshi
afeb89a51a [VIPEROMCT-16] Creates a closure for telemetryObject so that requests can resolve correctly even if the telemetryObject is destroyed (#3210)
Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
2020-07-22 15:22:31 -07:00
johnriedel
07992f0b2a [Tabs View] add ability to remove tabs from tabs view interface (#3147) (#3148)
* add ability to remove tabs from tabs view interface (#3147)

* an "X" on each tab is visible in edit mode

* replaced custom removeDialog with openmct.overlays.dialog

* Minor mods to markup and CSS

- Changed tab from button to div to allow a cleaner approach to the
nested close button;
- Changed close "icon-x" span to a button and added `c-click-icon` style
tag;
- Tweaked class naming to simplify and align with a more functional/
descriptive approach;

* use ES6 arrow func to avoid self=this

Co-authored-by: Deep Tailor <deep.j.tailor@nasa.gov>
Co-authored-by: charlesh88 <charlesh88@gmail.com>
2020-07-22 15:17:35 -07:00
Deep Tailor
a5c4508578 add minified vue to production (#3183)
Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2020-07-22 14:47:46 -07:00
Charles Hacskaylo
a4fab3ce8a UI enhancement fixes (#3222)
- Added min-width and min-height to Display Layout lines to allow
 easier selection and move when line is purely vertical or horizontal;
 - Fixed spacing, size and icon of overlay close button;
2020-07-22 11:35:06 -07:00
Charles Hacskaylo
97d80f57cc UI enhancements (#3217)
* UI enhancements for #3176

- Large overlay now displays fullscreen;

* UI enhancements for #3176

- Adding new ".is-in-small-container" CSS - VERY WIP!
- TODO: fix table implementation;

* UI fixes for NIRVSS client #170

- Hide table header filter inputs when table is in small container;

* UI fixes for NIRVSS client #170

- Fixing legends and plot layout when small, and within a stacked plot;
- Add new `hideLegendWhenSmall` property;
- Remove 'hidden' from plot legend position options;
- Reduced opacity of tabular headers in Espresso theme;
- VERY, VERY WIP right now!

* UI fixes for NIRVSS client #170

- Fixing legends and plot layout when small, and within a stacked plot;
- Cleanups, indention, removed commented CSS;
- Tightened up spacing in plot Y axis;

* UI enhancements for #3176

- Move local controls for plots and imagery, prevent overlapping with
 view large button when in a hidden frame in a layout;
 - Finesse local control styling for increased legibility;
 - Move l-state-indicators to avoid overlap with repositioned local
 controls, finesse styling;

* UI enhancements for #3176

- Tweak large overlay close button for better visual alignment;

* UI enhancements for #3176

- Significant improvements to lines in Display Layouts;
- Increased border-width for lines and boxes;
- Code enhanced for proper handling of horizontal and
vertical lines - but still isn't working properly;
- Renamed box-view.scss to box-and-line-views.scss;
- VERY WIP!

* Fixed incorrect grid array reference

* UI enhancements for #3176

- Fixed final issue with Display Layout line drawing object, thank you
@deeptailor!;

* UI enhancements for #3176

- Contrast enhancements and markup normalization for `c-object-label`
elements in main view, Layout frames, Inspector and overlay;
- Enhanced `l-overlay-large` layout;
- Tightened up margins and spacing in plots;
- Refined `is-paused` styling in Telemetry Tables;
- Now hide Telemetry Tables 'Export Data' button if rows are selected,
which use a separate export button;
- Layout frames now hide button's text labels when small;
- Layout frames spacing tightened up and improved;

* UI enhancements for #3176

- Tweak Snow theme constants;

* UI enhancements for #3176

- Fixed ObjectFrame getOverlayElement method, added a wrapper div
around the viewed object to properly control resulting layout in the
overlay;
- Simplified preview CSS to remove background, border and padding;
- Layout tweaks to add space between scrollbar and thumbs in Imagery
view;
- Removed dev "-info" element in LineView.vue;

* UI enhancements for #3176

- Improved styling for 'edit lock' button;

* UI enhancements for #3176

- Show Display Layout frame "-move" bar on hover, rather than select, to
 make it easier to select items with hidden frames, and only show -move
  bar's drag grippy when that frame is selected;
- `pointer-events: none` applied to table's body and plot's plot areas
when placed in a Layout and being edited, prevents distracting
interactions (plot zoom/pan, table row selection) when selecting and
moving elements in a Layout;
- Refined hover styles for c-button to use $filterHov, simplified and
normalized hover styling;
- Converted a number of old `<a>` tags to `<buttons>` to normalize
styling and use the appropriate control;
- Edit lock button is now colored when locked;

* Fix linting issue

* Minor tweaks

- Tweaked control positioning;

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
2020-07-21 21:01:38 -07:00
84 changed files with 1342 additions and 374 deletions

View File

@@ -31,13 +31,13 @@
</mct-form>
</div>
<div class="c-overlay__button-bar">
<a class='c-button c-button--major'
<button class='c-button c-button--major'
ng-class="{ disabled: !createForm.$valid }"
ng-click="ngModel.confirm()">
OK
</a>
<a class='c-button '
</button>
<button class='c-button '
ng-click="ngModel.cancel()">
Cancel
</a>
</button>
</div>

View File

@@ -31,13 +31,13 @@
</mct-include>
</div>
<div class="c-overlay__button-bar">
<a ng-repeat="option in ngModel.dialog.options"
<button ng-repeat="option in ngModel.dialog.options"
href=''
class="s-button lg"
title="{{option.description}}"
ng-click="ngModel.confirm(option.key)"
ng-class="{ major: $first, subtle: !$first }">
{{option.name}}
</a>
</button>
</div>
</mct-container>

View File

@@ -24,7 +24,7 @@
<div class="c-overlay__outer">
<button ng-click="ngModel.cancel()"
ng-if="ngModel.cancel"
class="c-click-icon c-overlay__close-button icon-x-in-circle"></button>
class="c-click-icon c-overlay__close-button icon-x"></button>
<div class="c-overlay__contents" ng-transclude></div>
</div>
</div>

View File

@@ -19,7 +19,7 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class="c-clock l-time-display" ng-controller="ClockController as clock">
<div class="c-clock l-time-display u-style-receiver js-style-receiver" ng-controller="ClockController as clock">
<div class="c-clock__timezone">
{{clock.zone()}}
</div>

View File

@@ -19,7 +19,7 @@
this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information.
-->
<div class="c-timer is-{{timer.timerState}}" ng-controller="TimerController as timer">
<div class="c-timer u-style-receiver js-style-receiver is-{{timer.timerState}}" ng-controller="TimerController as timer">
<div class="c-timer__controls">
<button ng-click="timer.clickStopButton()"
ng-hide="timer.timerState == 'stopped'"

View File

@@ -29,9 +29,9 @@
type="text" tabindex="10000"
ng-model="ngModel.input"
ng-keyup="controller.search()"/>
<a class="c-search__clear-input clear-icon icon-x-in-circle"
<button class="c-search__clear-input clear-icon icon-x-in-circle"
ng-class="{show: !(ngModel.input === '' || ngModel.input === undefined)}"
ng-click="ngModel.input = ''; controller.search()"></a>
ng-click="ngModel.input = ''; controller.search()"></button>
<!-- To prevent double triggering of clicks on click away, render
non-clickable version of the button when menu active-->
<a ng-if="!toggle.isActive()" class="menu-icon context-available"
@@ -45,16 +45,16 @@
</mct-include>
</div>
<a class="c-button c-search__btn-cancel"
<button class="c-button c-search__btn-cancel"
ng-show="!(ngModel.input === '' || ngModel.input === undefined)"
ng-click="ngModel.input = ''; ngModel.checkAll = true; menuController.checkAll(); controller.search()">
Cancel</a>
Cancel</button>
</div>
<div class="active-filter-display flex-elem holder"
ng-class="{invisible: ngModel.filtersString === '' || ngModel.filtersString === undefined || !ngModel.search}">
<a class="clear-filters icon-x-in-circle s-icon-button"
ng-click="ngModel.checkAll = true; menuController.checkAll()"></a>Filtered by: {{ ngModel.filtersString }}
<button class="clear-filters icon-x-in-circle s-icon-button"
ng-click="ngModel.checkAll = true; menuController.checkAll()"></button>Filtered by: {{ ngModel.filtersString }}
</div>
<div class="flex-elem holder results-msg" ng-model="ngModel" ng-show="!loading && ngModel.search">
@@ -72,7 +72,7 @@
ng-model="ngModel"
class="l-flex-row flex-elem grows">
</mct-representation>
<a class="load-more-button s-button vsm" ng-if="controller.areMore()" ng-click="controller.loadMore()">More Results</a>
<button class="load-more-button s-button vsm" ng-if="controller.areMore()" ng-click="controller.loadMore()">More Results</button>
</div>
</div>
</div>

View File

@@ -7,7 +7,7 @@
<div class="c-overlay__outer">
<button
v-if="dismissable"
class="c-click-icon c-overlay__close-button icon-x-in-circle"
class="c-click-icon c-overlay__close-button icon-x"
@click="destroy"
></button>
<div

View File

@@ -29,13 +29,12 @@
}
&__close-button {
$p: $interiorMargin;
border-radius: 100% !important;
$p: $interiorMargin + 2px;
color: $overlayColorFg;
display: inline-block;
font-size: 1.25em;
font-size: 1.5em;
position: absolute;
top: $p; right: $p;
z-index: 99;
}
&__contents {
@@ -43,7 +42,7 @@
display: flex;
flex-direction: column;
outline: none;
overflow: hidden;
overflow: auto;
}
&__top-bar {
@@ -87,6 +86,10 @@
.c-click-icon {
filter: $overlayBrightnessAdjust;
}
.c-object-label__name {
filter: $objectLabelNameFilter;
}
}
body.desktop {
@@ -100,7 +103,6 @@ body.desktop {
}
// Overlay types, styling for desktop. Appended to .l-overlay-wrapper element.
.l-overlay-large,
.l-overlay-small,
.l-overlay-fit {
.c-overlay__outer {
@@ -118,8 +120,28 @@ body.desktop {
.l-overlay-large {
// Default
.c-overlay__outer {
@include overlaySizing($overlayOuterMarginLg);
$pad: $interiorMarginLg;
$tbPad: floor($pad * 0.8);
$lrPad: $pad;
.c-overlay {
&__blocker {
display: none;
}
&__outer {
@include overlaySizing($overlayOuterMarginFullscreen);
padding: $tbPad $lrPad;
}
&__close-button {
//top: $interiorMargin;
//right: $interiorMargin;
}
}
.l-browse-bar {
margin-right: 50px; // Don't cover close button
margin-bottom: $interiorMargin;
}
}
@@ -139,4 +161,4 @@ body.desktop {
min-width: 20%;
}
}
}
}

View File

@@ -21,7 +21,7 @@
*****************************************************************************/
<template>
<div class="c-lad-table-wrapper">
<div class="c-lad-table-wrapper u-style-receiver js-style-receiver">
<table class="c-table c-lad-table">
<thead>
<tr>

View File

@@ -127,7 +127,7 @@ export default class AllTelemetryCriterion extends TelemetryCriterion {
if (validatedData) {
if (this.isStalenessCheck()) {
if (this.stalenessSubscription[validatedData.id]) {
if (this.stalenessSubscription && this.stalenessSubscription[validatedData.id]) {
this.stalenessSubscription[validatedData.id].update(validatedData);
}
this.telemetryDataCache[validatedData.id] = false;

View File

@@ -142,12 +142,14 @@ export default class TelemetryCriterion extends EventEmitter {
};
}
let telemetryObject = this.telemetryObject;
return this.openmct.telemetry.request(
this.telemetryObject,
options
).then(results => {
const latestDatum = results.length ? results[results.length - 1] : {};
const normalizedDatum = this.createNormalizedDatum(latestDatum, this.telemetryObject);
const normalizedDatum = this.createNormalizedDatum(latestDatum, telemetryObject);
return {
id: this.id,
@@ -201,7 +203,7 @@ export default class TelemetryCriterion extends EventEmitter {
let inputValue;
if (metadataObject) {
if(metadataObject.enumerations && input.length) {
const enumeration = metadataObject.enumerations[input[0]];
const enumeration = metadataObject.enumerations.find((item) => item.value.toString() === input[0].toString());
if (enumeration !== undefined && enumeration.string) {
inputValue = [enumeration.string];
}

View File

@@ -21,12 +21,14 @@
*****************************************************************************/
import TelemetryCriterion from "./TelemetryCriterion";
import { getMockTelemetry } from "utils/testing";
let openmct = {},
mockListener,
testCriterionDefinition,
testTelemetryObject,
telemetryCriterion;
telemetryCriterion,
mockTelemetry = getMockTelemetry();
describe("The telemetry criterion", function () {
@@ -60,7 +62,7 @@ describe("The telemetry criterion", function () {
};
openmct.objects = jasmine.createSpyObj('objects', ['get', 'makeKeyString']);
openmct.objects.makeKeyString.and.returnValue(testTelemetryObject.identifier.key);
openmct.telemetry = jasmine.createSpyObj('telemetry', ['isTelemetryObject', "subscribe", "getMetadata", "getValueFormatter"]);
openmct.telemetry = jasmine.createSpyObj('telemetry', ['isTelemetryObject', "subscribe", "getMetadata", "getValueFormatter", "request"]);
openmct.telemetry.isTelemetryObject.and.returnValue(true);
openmct.telemetry.subscribe.and.returnValue(function () {});
openmct.telemetry.getValueFormatter.and.returnValue({
@@ -109,4 +111,30 @@ describe("The telemetry criterion", function () {
});
expect(telemetryCriterion.result).toBeTrue();
});
describe('the LAD request', () => {
beforeEach(async () => {
let telemetryRequestResolve;
let telemetryRequestPromise = new Promise((resolve) => {
telemetryRequestResolve = resolve;
});
openmct.telemetry.request.and.callFake(() => {
setTimeout(() => {
telemetryRequestResolve(mockTelemetry);
}, 100);
return telemetryRequestPromise;
});
});
it("returns results for slow LAD requests", async function () {
const criteriaRequest = telemetryCriterion.requestLAD();
telemetryCriterion.destroy();
expect(telemetryCriterion.telemetryObject).toBeUndefined();
setTimeout(() => {
criteriaRequest.then((result) => {
expect(result).toBeDefined();
});
}, 300);
});
});
});

View File

@@ -22,7 +22,7 @@
<template>
<component :is="urlDefined ? 'a' : 'span'"
class="c-condition-widget"
class="c-condition-widget u-style-receiver js-style-receiver"
:href="urlDefined ? internalDomainObject.url : null"
>
<div class="c-condition-widget__label">

View File

@@ -124,7 +124,117 @@ define(['lodash'], function (_) {
'telemetry.plot.overlay-multi': [
VIEW_TYPES['telemetry.plot.stacked']
]
};
},
SMALL_FONT_SIZES = [
{
name: 'Default Size',
value: 'default'
},
{
name: '8px',
value: '8'
},
{
name: '9px',
value: '9'
},
{
name: '10px',
value: '10'
},
{
name: '11px',
value: '11'
},
{
name: '12px',
value: '12'
},
{
name: '13px',
value: '13'
},
{
name: '14px',
value: '14'
},
{
name: '16px',
value: '16'
},
{
name: '18px',
value: '18'
},
{
name: '20px',
value: '20'
},
{
name: '24px',
value: '24'
}
],
LARGE_FONT_SIZES = [
{
name: '28px',
value: '28'
},
{
name: '32px',
value: '32'
},
{
name: '36px',
value: '36'
},
{
name: '42px',
value: '42'
},
{
name: '48px',
value: '48'
},
{
name: '72px',
value: '72'
},
{
name: '96px',
value: '96'
},
{
name: '128px',
value: '128'
}
],
FONTS = [
{
name: 'Default',
value: 'default'
},
{
name: 'Bold',
value: 'default-bold'
},
{
name: 'Narrow',
value: 'narrow'
},
{
name: 'Narrow Bold',
value: 'narrow-bold'
},
{
name: 'Monospace',
value: 'monospace'
},
{
name: 'Monospace Bold',
value: 'monospace-bold'
}
]
function getUserInput(form) {
return openmct.$injector.get('dialogService').getUserInput(form, {});
@@ -378,25 +488,136 @@ define(['lodash'], function (_) {
}
}
function getTextSizeMenu(selectedParent, selection) {
const TEXT_SIZE = [8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96, 128];
return {
control: "select-menu",
domainObject: selectedParent,
applicableSelectedItems: selection.filter(selectionPath => {
let type = selectionPath[0].context.layoutItem.type;
return type === 'text-view' || type === 'telemetry-view';
}),
property: function (selectionPath) {
return getPath(selectionPath) + ".size";
},
title: "Set text size",
options: TEXT_SIZE.map(size => {
return {
value: size + "px"
};
})
};
function getAvailableFontSizeOptions(selection) {
let sizeOptions = 'big';
selection.forEach(selectable => {
if (selectable[0].context.item) {
if (selectable[0].context.item.type.includes('plot') ||
selectable[0].context.item.type.includes('table')) {
sizeOptions = 'small';
}
}
});
if (sizeOptions === 'small') {
return SMALL_FONT_SIZES;
} else {
return SMALL_FONT_SIZES.concat(LARGE_FONT_SIZES);
}
}
function getFontSizeMenu(selectedParent, selection) {
if (selection.length === 1) {
let primary = selection[0][0];
let type = primary.context.layoutItem.type;
if (type === 'subobject-view') {
let objectType = primary.context.item.type;
if (objectType === 'layout' ||
objectType === 'flexible-layout' ||
objectType === 'tabs') {
return;
}
}
return {
control: 'select-menu',
domainObject: selectedParent,
icon: "icon-font-size",
applicableSelectedItems: selection,
property: (selectionPath) => {
return getPath(selectionPath) + '.fontSize';
},
title: "Set font size",
options: getAvailableFontSizeOptions(selection)
};
} else {
return {
control: 'select-menu',
domainObject: selectedParent,
icon: "icon-font-size",
applicableSelectedItems: selection.filter(selectionPath => {
let type = selectionPath[0].context.layoutItem.type;
if (type === 'line-view' || type === 'box-view') {
return false;
} else if (type === 'subobject-view') {
let objectType = selectionPath[0].context.item.type;
if (objectType === 'layout' ||
objectType === 'flexible-layout' ||
objectType === 'tabs') {
return false;
}
}
return true;
}),
property: (selectionPath) => {
return getPath(selectionPath) + '.fontSize';
},
title: "Set font size",
options: getAvailableFontSizeOptions(selection)
}
}
}
function getFontMenu(selectedParent, selection) {
if (selection.length === 1) {
let primary = selection[0][0];
let type = primary.context.layoutItem.type;
if (type === 'subobject-view') {
let objectType = primary.context.item.type;
if (objectType === 'layout' ||
objectType === 'flexible-layout' ||
objectType === 'tabs') {
return;
}
}
return {
control: 'select-menu',
domainObject: selectedParent,
icon: "icon-font",
applicableSelectedItems: selection,
property: (selectionPath) => {
return getPath(selectionPath) + '.font';
},
title: "Set font style",
options: FONTS
}
} else {
return {
control: 'select-menu',
domainObject: selectedParent,
icon: "icon-font",
applicableSelectedItems: selection.filter(selectionPath => {
let type = selectionPath[0].context.layoutItem.type;
if (type === 'line-view' || type === 'box-view') {
return false;
} else if (type === 'subobject-view') {
let objectType = selectionPath[0].context.item.type;
if (objectType === 'layout' ||
objectType === 'flexible-layout' ||
objectType === 'tabs') {
return false;
}
}
return true;
}),
property: (selectionPath) => {
return getPath(selectionPath) + '.font';
},
title: "Set font style",
options: FONTS
}
}
}
function getTextButton(selectedParent, selection) {
@@ -409,7 +630,7 @@ define(['lodash'], function (_) {
property: function (selectionPath) {
return getPath(selectionPath);
},
icon: "icon-font",
icon: "icon-pencil",
title: "Edit text properties",
dialog: DIALOG_FORM.text
};
@@ -586,7 +807,8 @@ define(['lodash'], function (_) {
'display-mode': [],
'telemetry-value': [],
'style': [],
'text-style': [],
'font-size': [],
'font-family': [],
'position': [],
'duplicate': [],
'remove': []
@@ -622,6 +844,16 @@ define(['lodash'], function (_) {
if (toolbar.viewSwitcher.length === 0) {
toolbar.viewSwitcher = [getViewSwitcherMenu(selectedParent, selectionPath, selectedObjects)];
}
if (toolbar['font-size'].length === 0) {
toolbar['font-size'] = [
getFontSizeMenu(selectedParent, selectedObjects)
];
}
if (toolbar['font-family'].length === 0) {
toolbar['font-family'] = [
getFontMenu(selectedParent, selectedObjects)
];
}
} else if (layoutItem.type === 'telemetry-view') {
if (toolbar['display-mode'].length === 0) {
toolbar['display-mode'] = [getDisplayModeMenu(selectedParent, selectedObjects)];
@@ -629,9 +861,14 @@ define(['lodash'], function (_) {
if (toolbar['telemetry-value'].length === 0) {
toolbar['telemetry-value'] = [getTelemetryValueMenu(selectionPath, selectedObjects)];
}
if (toolbar['text-style'].length === 0) {
toolbar['text-style'] = [
getTextSizeMenu(selectedParent, selectedObjects)
if (toolbar['font-size'].length === 0) {
toolbar['font-size'] = [
getFontSizeMenu(selectedParent, selectedObjects)
];
}
if (toolbar['font-family'].length === 0) {
toolbar['font-family'] = [
getFontMenu(selectedParent, selectedObjects)
];
}
if (toolbar.position.length === 0) {
@@ -650,9 +887,14 @@ define(['lodash'], function (_) {
toolbar.viewSwitcher = [getViewSwitcherMenu(selectedParent, selectionPath, selectedObjects)];
}
} else if (layoutItem.type === 'text-view') {
if (toolbar['text-style'].length === 0) {
toolbar['text-style'] = [
getTextSizeMenu(selectedParent, selectedObjects)
if (toolbar['font-size'].length === 0) {
toolbar['font-size'] = [
getFontSizeMenu(selectedParent, selectedObjects)
];
}
if (toolbar['font-family'].length === 0) {
toolbar['font-family'] = [
getFontMenu(selectedParent, selectedObjects)
];
}
if (toolbar.position.length === 0) {

View File

@@ -29,7 +29,7 @@
@endMove="() => $emit('endMove')"
>
<div
class="c-box-view"
class="c-box-view u-style-receiver js-style-receiver"
:class="[styleClass]"
:style="style"
></div>

View File

@@ -22,7 +22,7 @@
<template>
<div
class="l-layout"
class="l-layout u-style-receiver js-style-receiver"
:class="{
'is-multi-selected': selectedLayoutItems.length > 1,
'allow-editing': isEditing
@@ -612,6 +612,13 @@ export default {
object.composition.push(...composition);
}
if (object.modified || object.persisted) {
object.modified = undefined;
object.persisted = undefined;
delete object.modified;
delete object.persisted;
}
object.name = objectName;
object.identifier = identifier;
object.location = parentKeyString;

View File

@@ -81,6 +81,7 @@ export default {
style() {
let backgroundImage = 'url(' + this.item.url + ')';
let border = '1px solid ' + this.item.stroke;
if (this.itemStyle) {
if (this.itemStyle.imageUrl !== undefined) {
backgroundImage = 'url(' + this.itemStyle.imageUrl + ')';

View File

@@ -25,14 +25,14 @@
class="l-layout__frame c-frame"
:class="{
'no-frame': !item.hasFrame,
'u-inspectable': inspectable
'u-inspectable': inspectable,
'is-in-small-container': size.width < 600 || size.height < 600
}"
:style="style"
>
<slot></slot>
<div
class="c-frame-edit__move"
class="c-frame__move-bar"
@mousedown="isEditing ? startMove([1,1], [0,0], $event) : null"
></div>
</div>
@@ -61,6 +61,13 @@ export default {
}
},
computed: {
size() {
let {width, height} = this.item;
return {
width: (this.gridSize[0] * width),
height: (this.gridSize[1] * height)
};
},
style() {
let {x, y, width, height} = this.item;
return {

View File

@@ -22,7 +22,7 @@
<template>
<div
class="l-layout__frame c-frame no-frame"
class="l-layout__frame c-frame no-frame c-line-view"
:class="[styleClass]"
:style="style"
>
@@ -31,14 +31,20 @@
height="100%"
>
<line
class="c-line-view__hover-indicator"
v-bind="linePosition"
vector-effect="non-scaling-stroke"
/>
<line
class="c-line-view__line"
v-bind="linePosition"
:stroke="stroke"
stroke-width="2"
vector-effect="non-scaling-stroke"
/>
</svg>
<div
class="c-frame-edit__move"
class="c-frame__move-bar"
@mousedown="startDrag($event)"
></div>
<div
@@ -49,7 +55,8 @@
class="c-frame-edit__handle"
:class="startHandleClass"
@mousedown="startDrag($event, 'start')"
></div>
>
</div>
<div
class="c-frame-edit__handle"
:class="endHandleClass"
@@ -68,14 +75,18 @@ const START_HANDLE_QUADRANTS = {
1: 'c-frame-edit__handle--sw',
2: 'c-frame-edit__handle--se',
3: 'c-frame-edit__handle--ne',
4: 'c-frame-edit__handle--nw'
4: 'c-frame-edit__handle--nw',
5: 'c-frame-edit__handle--nw',
6: 'c-frame-edit__handle--ne'
};
const END_HANDLE_QUADRANTS = {
1: 'c-frame-edit__handle--ne',
2: 'c-frame-edit__handle--nw',
3: 'c-frame-edit__handle--sw',
4: 'c-frame-edit__handle--se'
4: 'c-frame-edit__handle--se',
5: 'c-frame-edit__handle--sw',
6: 'c-frame-edit__handle--nw'
};
export default {
@@ -158,6 +169,12 @@ export default {
},
vectorQuadrant() {
let {x, y, x2, y2} = this.position;
if (x2 === x) {
return 5; // Vertical line
}
if (y2 === y) {
return 6; // Horizontal line
}
if (x2 > x) {
if (y2 < y) {
return 1;
@@ -170,21 +187,27 @@ export default {
return 3;
},
linePosition() {
return this.vectorQuadrant % 2 !== 0
// odd vectorQuadrant slopes up
? {
x1: '0%',
y1: '100%',
x2: '100%',
y2: '0%'
}
// even vectorQuadrant slopes down
: {
x1: '0%',
y1: '0%',
x2: '100%',
y2: '100%'
};
let pos = {};
switch(this.vectorQuadrant) {
case 1:
case 3:
// slopes up
pos = {x1: '0%', y1: '100%', x2: '100%', y2: '0%'};
break;
case 5:
// vertical
pos = {x1: '0%', y1: '0%', x2: '0%', y2: '100%'};
break;
case 6:
// horizontal
pos = {x1: '0%', y1: '0%', x2: '100%', y2: '0%'};
break;
default:
// slopes down
pos = {x1: '0%', y1: '0%', x2: '100%', y2: '100%'};
break;
}
return pos;
}
},
watch: {
@@ -209,8 +232,7 @@ export default {
layoutItem: this.item,
index: this.index
};
this.removeSelectable = this.openmct.selection.selectable(
this.$el, this.context, this.initSelect);
this.removeSelectable = this.openmct.selection.selectable(this.$el, this.context, this.initSelect);
},
destroyed() {
if (this.removeSelectable) {
@@ -224,12 +246,17 @@ export default {
document.body.addEventListener('mousemove', this.continueDrag);
document.body.addEventListener('mouseup', this.endDrag);
this.startPosition = [event.pageX, event.pageY];
this.dragPosition = {
x: this.item.x,
y: this.item.y,
x2: this.item.x2,
y2: this.item.y2
};
let {x, y, x2, y2} = this.item;
this.dragPosition = {x, y, x2, y2};
if (x === x2 || y === y2) {
if (y > y2 || x < x2) {
if (this.dragging === 'start') {
this.dragging = 'end';
} else if (this.dragging === 'end') {
this.dragging = 'start';
}
}
}
event.preventDefault();
},
continueDrag(event) {
@@ -263,7 +290,7 @@ export default {
},
calculateDragPosition(pxDeltaX, pxDeltaY) {
let gridDeltaX = Math.round(pxDeltaX / this.gridSize[0]);
let gridDeltaY = Math.round(pxDeltaY / this.gridSize[0]); // TODO: should this be gridSize[1]?
let gridDeltaY = Math.round(pxDeltaY / this.gridSize[1]);
let {x, y, x2, y2} = this.item;
let dragPosition = {x, y, x2, y2};

View File

@@ -35,6 +35,8 @@
:object-path="currentObjectPath"
:has-frame="item.hasFrame"
:show-edit-view="false"
:font-size="item.fontSize"
:font="item.font"
/>
</layout-frame>
</template>
@@ -73,6 +75,8 @@ export default {
y: position[1],
identifier: domainObject.identifier,
hasFrame: hasFrameByDefault(domainObject.type),
fontSize: 'default',
font: 'default',
viewKey
};
},
@@ -120,7 +124,6 @@ export default {
if (!this.context) {
return;
}
this.context.layoutItem = newItem;
}
},

View File

@@ -30,12 +30,14 @@
>
<div
v-if="domainObject"
class="c-telemetry-view"
class="u-style-receiver c-telemetry-view"
:class="{
styleClass,
'is-missing': domainObject.status === 'missing'
}"
:style="styleObject"
:data-font-size="item.fontSize"
:data-font="item.font"
@contextmenu.prevent="showContextMenu"
>
<div class="is-missing__indicator"
@@ -89,7 +91,8 @@ export default {
stroke: "",
fill: "",
color: "",
size: "13px"
fontSize: 'default',
font: 'default'
};
},
inject: ['openmct', 'objectPath'],
@@ -136,10 +139,15 @@ export default {
return displayMode === 'all' || displayMode === 'value';
},
styleObject() {
return Object.assign({}, {
fontSize: this.item.size
}, this.itemStyle);
let size;
//for legacy size support
if (!this.item.fontSize) {
size = this.item.size
}
return Object.assign({}, {
size
}, this.itemStyle);
},
fieldName() {
return this.valueMetadata && this.valueMetadata.name;

View File

@@ -29,7 +29,9 @@
@endMove="() => $emit('endMove')"
>
<div
class="c-text-view"
class="c-text-view u-style-receiver js-style-receiver"
:data-font-size="item.fontSize"
:data-font="item.font"
:class="[styleClass]"
:style="style"
>
@@ -47,13 +49,14 @@ export default {
return {
fill: '',
stroke: '',
size: '13px',
color: '',
x: 1,
y: 1,
width: 10,
height: 5,
text: element.text
text: element.text,
fontSize: 'default',
font: 'default'
};
},
inject: ['openmct'],
@@ -84,8 +87,14 @@ export default {
},
computed: {
style() {
let size;
//legacy size support
if (!this.item.fontSize) {
size = this.item.size;
}
return Object.assign({
fontSize: this.item.size
size
}, this.itemStyle);
}
},

View File

@@ -0,0 +1,60 @@
.c-box-view {
border-width: $drawingObjBorderW !important;
display: flex;
align-items: stretch;
.c-frame & {
@include abs();
}
}
.c-line-view {
&.c-frame {
box-shadow: none !important;
}
.c-frame-edit {
border: none;
}
.c-handle-info {
background: rgba(#999, 0.2);
padding: 2px;
position: absolute;
top: 5px; left: 5px;
white-space: nowrap;
}
svg {
// Prevent clipping when line is horizontal and vertical
min-height: 1px;
min-width: 1px;
// Must use !important to counteract setting in normalize.min.css
overflow: visible;
}
&__line {
stroke-linecap: round;
stroke-width: $drawingObjBorderW;
}
&__hover-indicator {
display: none;
opacity: 0.5;
stroke: $editFrameColorHov;
stroke-width: $drawingObjBorderW + 4;
}
.is-editing & {
// Needed to allow line to be moved
$w: 4px;
min-width: $w;
min-height: $w;
&:hover {
[class*='__hover-indicator'] {
display: inline;
}
}
}
}

View File

@@ -1,8 +0,0 @@
.c-box-view {
display: flex;
align-items: stretch;
.c-frame & {
@include abs();
}
}

View File

@@ -7,9 +7,13 @@
> *:first-child {
flex: 1 1 auto;
}
&.is-in-small-container {
//background: rgba(blue, 0.1);
}
}
.c-frame-edit__move {
.c-frame__move-bar {
display: none;
}
@@ -29,7 +33,7 @@
border: $editFrameSelectedBorder;
box-shadow: $editFrameSelectedShdw;
.c-frame-edit__move {
.c-frame__move-bar {
cursor: move;
}
}
@@ -37,7 +41,7 @@
/******************* DEFAULT STYLES FOR -EDIT__MOVE */
// All object types
.c-frame-edit__move {
.c-frame__move-bar {
@include abs();
display: block;
}
@@ -52,7 +56,7 @@
transition-delay: $moveBarOutDelay;
}
+ .c-frame-edit__move {
+ .c-frame__move-bar {
display: none;
}
@@ -61,14 +65,14 @@
.l-layout {
/******************* 0 - 1 ITEM SELECTED */
&:not(.is-multi-selected) {
> .l-layout__frame[s-selected] {
> .l-layout__frame {
> .c-so-view.has-complex-content {
> .c-so-view__local-controls {
transition: transform $transOutTime ease-in-out;
transition-delay: $moveBarOutDelay;
}
+ .c-frame-edit__move {
+ .c-frame__move-bar {
transition: $transOut;
transition-delay: $moveBarOutDelay;
@include userSelectNone();
@@ -89,7 +93,7 @@
$lrOffset: 25%;
@include grippy($editFrameMovebarColorFg);
content: '';
display: block;
display: none;
position: absolute;
top: $tbOffset;
right: $lrOffset;
@@ -111,7 +115,7 @@
transition-delay: 0s;
}
+ .c-frame-edit__move {
+ .c-frame__move-bar {
transition: $transIn;
transition-delay: 0s;
height: $editFrameMovebarH;
@@ -119,12 +123,19 @@
}
}
}
> .l-layout__frame[s-selected] {
> .c-so-view.has-complex-content {
+ .c-frame__move-bar:before {
display: block;
}
}
}
}
/******************* > 1 ITEMS SELECTED */
&.is-multi-selected {
.l-layout__frame[s-selected] {
> .c-so-view.has-complex-content + .c-frame-edit__move {
> .c-so-view.has-complex-content + .c-frame__move-bar {
display: block;
}
}

View File

@@ -29,13 +29,13 @@
>
</div>
<div class="c-imagery__control-bar">
<div class="c-imagery__timestamp">{{ getTime() }}</div>
<div class="c-imagery__timestamp u-style-receiver js-style-receiver">{{ getTime() }}</div>
<div class="h-local-controls flex-elem">
<a
<button
class="c-button icon-pause pause-play"
:class="{'is-paused': paused()}"
@click="paused(!paused())"
></a>
></button>
</div>
</div>
</div>
@@ -228,8 +228,8 @@ export default {
subscribe() {
this.unsubscribe = this.openmct.telemetry
.subscribe(this.domainObject, (datum) => {
let parsedTimestamp = this.timeFormat.parse(datum[this.timeKey]),
bounds = this.openmct.time.bounds();
let parsedTimestamp = this.timeFormat.parse(datum);
let bounds = this.openmct.time.bounds();
if(parsedTimestamp >= bounds.start && parsedTimestamp <= bounds.end) {
this.updateHistory(datum);

View File

@@ -42,6 +42,7 @@
height: 135px;
overflow-x: auto;
overflow-y: hidden;
padding-bottom: $interiorMarginSm;
&.is-paused {
background: rgba($colorPausedBg, 0.4);
@@ -99,7 +100,7 @@
.c-imagery {
.h-local-controls--overlay-content {
position: absolute;
right: $interiorMargin; top: $interiorMargin;
left: $interiorMargin; top: $interiorMargin;
z-index: 2;
background: $colorLocalControlOvrBg;
border-radius: $basicCr;

View File

@@ -248,7 +248,8 @@ export default {
previewEmbed() {
const self = this;
const previewAction = new PreviewAction(self.openmct);
previewAction.invoke(JSON.parse(self.embed.objectPath));
this.openmct.objects.get(self.embed.domainObject.identifier)
.then(domainObject => previewAction.invoke([domainObject]));
},
removeEmbed(success) {
if (!success) {

View File

@@ -95,8 +95,7 @@ export const createNewEmbed = (snapshotMeta, snapshot = '') => {
id: 'embed-' + date,
name,
snapshot,
type,
objectPath: JSON.stringify(objectPath)
type
};
}

View File

@@ -1,6 +1,6 @@
<template>
<div
v-if="notifications.length > 0"
v-show="notifications.length > 0"
class="c-indicator c-indicator--clickable icon-bell"
:class="[severityClass]"
>

View File

@@ -21,8 +21,11 @@
-->
<div class="gl-plot plot-legend-{{legend.get('position')}} {{legend.get('expanded')? 'plot-legend-expanded' : 'plot-legend-collapsed'}}">
<div class="c-plot-legend gl-plot-legend"
ng-class="{ 'hover-on-plot': !!highlights.length }"
ng-show="legend.get('position') !== 'hidden'">
ng-class="{
'hover-on-plot': !!highlights.length,
'is-legend-hidden': legend.get('hideLegendWhenSmall')
}"
>
<div class="c-plot-legend__view-control gl-plot-legend__view-control c-disclosure-triangle is-enabled"
ng-class="{ 'c-disclosure-triangle--expanded': legend.get('expanded') }"
ng-click="legend.set('expanded', !legend.get('expanded'));">
@@ -36,11 +39,13 @@
ng-class="{'is-cursor-locked': !!lockHighlightPoint }">
<div class="c-state-indicator__alert-cursor-lock icon-cursor-lock" title="Cursor is point locked. Click anywhere in the plot to unlock."></div>
<div class="plot-legend-item"
ng-class="{'is-missing': series.domainObject.status === 'missing'}"
ng-class="{
'is-missing': series.domainObject.status === 'missing'
}"
ng-repeat="series in series track by $index"
>
<div class="plot-series-swatch-and-name">
<span class="plot-series-color-swatch "
<span class="plot-series-color-swatch"
ng-style="{ 'background-color': series.get('color').asHexString() }">
</span>
<span class="is-missing__indicator" title="This item is missing"></span>
@@ -86,7 +91,9 @@
</thead>
<tr ng-repeat="series in series"
class="plot-legend-item"
ng-class="{'is-missing': series.domainObject.status === 'missing'}"
ng-class="{
'is-missing': series.domainObject.status === 'missing'
}"
>
<td class="plot-series-swatch-and-name">
<span class="plot-series-color-swatch"
@@ -128,7 +135,7 @@
<div class="plot-wrapper-axis-and-display-area flex-elem grows">
<div class="gl-plot-axis-area gl-plot-y has-local-controls"
ng-style="{
width: (tickWidth + 30) + 'px'
width: (tickWidth + 20) + 'px'
}">
<div class="gl-plot-label gl-plot-y-label"
@@ -146,7 +153,6 @@
</option>
</select>
<mct-ticks axis="yAxis">
<div ng-repeat="tick in ticks track by tick.value"
class="gl-plot-tick gl-plot-y-tick-label"
@@ -159,17 +165,15 @@
</div>
<div class="gl-plot-wrapper-display-area-and-x-axis"
ng-style="{
left: (tickWidth + 30) + 'px'
}">
<div class="l-state-indicators">
<span class="l-state-indicators__alert-no-lad t-object-alert t-alert-unsynced icon-alert-triangle"
title="This plot is not currently displaying the latest data. Reset pan/zoom to view latest data."></span>
<span class="l-state-indicators__alert-cursor-lock icon-cursor-lock"
title="Telemetry point selection is locked. Click anywhere in the plot to unlock."
ng-if="lockHighlightPoint"></span>
</div>
left: (tickWidth + 20) + 'px'
}">
<div class="gl-plot-display-area has-local-controls has-cursor-guides">
<div class="l-state-indicators">
<span class="l-state-indicators__alert-no-lad t-object-alert t-alert-unsynced icon-alert-triangle"
title="This plot is not currently displaying the latest data. Reset pan/zoom to view latest data."></span>
</div>
<mct-ticks axis="xAxis">
<div class="gl-plot-hash hash-v"
ng-repeat="tick in ticks track by tick.value"
@@ -228,9 +232,9 @@
</div>
</div>
<div class="gl-plot-axis-area gl-plot-x">
<div class="gl-plot-axis-area gl-plot-x has-local-controls">
<mct-ticks axis="xAxis">
<div ng-repeat="tick in ticks track by tick.value"
<div ng-repeat="tick in ticks track by tick.text"
class="gl-plot-tick gl-plot-x-tick-label"
ng-style="{
left: (100 * (tick.value - min) / interval) + '%'
@@ -240,9 +244,21 @@
</div>
</mct-ticks>
<div class="gl-plot-label gl-plot-x-label">
<div
class="gl-plot-label gl-plot-x-label"
ng-class="{'icon-gear': (xKeyOptions.length > 1 && series.length === 1)}"
>
{{ xAxis.get('label') }}
</div>
<select
ng-if="plot.isEnabledXKeyToggle()"
ng-model="selectedXKeyOption.key"
ng-change="plot.toggleXKeyOption()"
class="gl-plot-x-label__select local-controls--hidden"
ng-options="option.key as option.name for option in xKeyOptions"
>
</select>
</div>
</div>

View File

@@ -114,6 +114,11 @@
title="The position of the legend relative to the plot display area.">Position</div>
<div class="grid-cell value capitalize">{{ config.legend.get('position') }}</div>
</li>
<li class="grid-row">
<div class="grid-cell label"
title="Hide the legend when the plot is small">Hide when plot small</div>
<div class="grid-cell value">{{ config.legend.get('hideLegendWhenSmall') ? "Yes" : "No" }}</div>
</li>
<li class="grid-row">
<div class="grid-cell label"
title="Show the legend expanded by default">Expand by Default</div>

View File

@@ -174,7 +174,6 @@
title="The position of the legend relative to the plot display area.">Position</div>
<div class="grid-cell value">
<select ng-model="form.position">
<option value="hidden">Hidden</option>
<option value="top">Top</option>
<option value="right">Right</option>
<option value="bottom">Bottom</option>
@@ -182,6 +181,11 @@
</select>
</div>
</li>
<li class="grid-row">
<div class="grid-cell label"
title="Hide the legend when the plot is small">Hide when plot small</div>
<div class="grid-cell value"><input type="checkbox" ng-model="form.hideLegendWhenSmall"/></div>
</li>
<li class="grid-row">
<div class="grid-cell label"
title="Show the legend expanded by default">Expand by default</div>

View File

@@ -41,7 +41,7 @@
</button>
</div>
<div class="l-view-section">
<div class="l-view-section u-style-receiver js-style-receiver">
<div class="c-loading--overlay loading"
ng-show="!!pending"></div>
<mct-plot config="controller.config"

View File

@@ -40,7 +40,7 @@
title="Toggle cursor guides">
</button>
</div>
<div class="l-view-section">
<div class="l-view-section u-style-receiver js-style-receiver">
<div class="c-loading--overlay loading"
ng-show="!!currentRequest.pending"></div>
<div class="gl-plot child-frame u-inspectable"

View File

@@ -68,7 +68,6 @@ function (
this.listenTo(this.config.series, 'add', this.onSeriesAdd, this);
this.listenTo(this.config.series, 'remove', this.onSeriesRemove, this);
this.listenTo(this.config.yAxis, 'change:key', this.clearOffset, this);
this.listenTo(this.config.xAxis, 'change:key', this.clearOffset, this);
this.listenTo(this.config.yAxis, 'change', this.scheduleDraw);
this.listenTo(this.config.xAxis, 'change', this.scheduleDraw);
this.$scope.$watch('highlights', this.scheduleDraw);
@@ -81,7 +80,14 @@ function (
MCTChartController.$inject = ['$scope'];
MCTChartController.prototype.reDraw = function (mode, o, series) {
this.changeInterpolate(mode, o, series);
this.changeMarkers(mode, o, series);
this.changeAlarmMarkers(mode, o, series);
};
MCTChartController.prototype.onSeriesAdd = function (series) {
this.listenTo(series, 'change:xKey', this.reDraw, this);
this.listenTo(series, 'change:interpolate', this.changeInterpolate, this);
this.listenTo(series, 'change:markers', this.changeMarkers, this);
this.listenTo(series, 'change:alarmMarkers', this.changeAlarmMarkers, this);

View File

@@ -48,6 +48,7 @@ define([
return {
position: 'top',
expandByDefault: false,
hideLegendWhenSmall: false,
valueToShowWhenCollapsed: 'nearestValue',
showTimestampWhenExpanded: true,
showValueWhenExpanded: true,

View File

@@ -415,6 +415,19 @@ define([
this.filters = deepCopiedFilters;
}
},
getDisplayRange: function (xKey) {
const unsortedData = this.data;
this.data = [];
unsortedData.forEach(point => this.add(point, false));
const minValue = this.getXVal(this.data[0]);
const maxValue = this.getXVal(this.data[this.data.length-1]);
return {
min: minValue,
max: maxValue
};
},
markerOptionsDisplayText: function () {
const showMarkers = this.get('markers');
if (!showMarkers) {

View File

@@ -48,6 +48,7 @@ define([
this.set('range', this.get('range'));
}
this.listenTo(this, 'change:key', this.changeKey, this);
this.listenTo(this, 'resetSeries', this.resetSeries, this);
},
changeKey: function (newKey) {
var series = this.plot.series.first();
@@ -62,8 +63,13 @@ define([
});
this.set('label', newKey);
}
this.plot.series.forEach(function (plotSeries) {
plotSeries.set('xKey', newKey);
});
},
resetSeries: function () {
this.plot.series.forEach(function (plotSeries) {
plotSeries.reset();
});
},

View File

@@ -32,6 +32,11 @@ define([
modelProp: 'position',
objectPath: 'configuration.legend.position'
},
{
modelProp: 'hideLegendWhenSmall',
coerce: Boolean,
objectPath: 'configuration.legend.hideLegendWhenSmall'
},
{
modelProp: 'expandByDefault',
coerce: Boolean,

View File

@@ -101,12 +101,32 @@ define([
this.listenTo(this.$scope, 'plot:tickWidth', this.onTickWidthChange, this);
this.listenTo(this.$scope, 'plot:highlight:set', this.onPlotHighlightSet, this);
this.listenTo(this.$scope, 'plot:reinitializeCanvas', this.initCanvas, this);
this.listenTo(this.config.xAxis, 'resetSeries', this.setUpXAxisOptions, this);
this.listenTo(this.config.xAxis, 'change:displayRange', this.onXAxisChange, this);
this.listenTo(this.config.yAxis, 'change:displayRange', this.onYAxisChange, this);
this.setUpXAxisOptions();
this.setUpYAxisOptions();
};
MCTPlotController.prototype.setUpXAxisOptions = function () {
const xAxisKey = this.config.xAxis.get('key');
if (this.$scope.series.length === 1) {
let metadata = this.$scope.series[0].metadata;
this.$scope.xKeyOptions = metadata
.valuesForHints(['domain'])
.map(function (o) {
return {
name: o.name,
key: o.key
};
});
this.$scope.selectedXKeyOption = this.getXKeyOption(xAxisKey);
}
};
MCTPlotController.prototype.setUpYAxisOptions = function () {
if (this.$scope.series.length === 1) {
let metadata = this.$scope.series[0].metadata;
@@ -520,6 +540,22 @@ define([
this.cursorGuide = !this.cursorGuide;
};
MCTPlotController.prototype.getXKeyOption = function (key) {
return this.$scope.xKeyOptions.find(option => option.key === key);
};
MCTPlotController.prototype.isEnabledXKeyToggle = function () {
const isSinglePlot = this.$scope.xKeyOptions.length > 1 && this.$scope.series.length === 1;
const isFrozen = this.config.xAxis.get('frozen');
const inRealTimeMode = this.config.openmct.time.clock();
return isSinglePlot && !isFrozen && !inRealTimeMode;
};
MCTPlotController.prototype.toggleXKeyOption = function () {
this.config.xAxis.set('key', this.$scope.selectedXKeyOption.key);
};
MCTPlotController.prototype.toggleYAxisLabel = function (label, options, series) {
let yAxisObject = options.filter(o => o.name === label)[0];

View File

@@ -122,6 +122,7 @@ define([
this.tickUpdate = false;
this.listenTo(this.axis, 'change:displayRange', this.updateTicks, this);
this.listenTo(this.axis, 'change:format', this.updateTicks, this);
this.listenTo(this.axis, 'change:key', this.updateTicksForceRegeneration, this);
this.listenTo(this.$scope, '$destroy', this.stopListening, this);
this.updateTicks();
}
@@ -133,12 +134,18 @@ define([
/**
* Determine whether ticks should be regenerated for a given range.
* Ticks are updated a) if they don't exist, b) if the existing ticks are
* outside of given range, or c) if the range exceeds the size of the tick
* range by more than one tick step.
* Ticks are updated
* a) if they don't exist,
* b) if existing ticks are outside of given range,
* c) if range exceeds size of tick range by more than one tick step,
* d) if forced to regenerate (ex. changing x-axis metadata).
*
* @private
*/
MCTTicksController.prototype.shouldRegenerateTicks = function (range) {
MCTTicksController.prototype.shouldRegenerateTicks = function (range, forceRegeneration) {
if (forceRegeneration) {
return true;
}
if (!this.tickRange || !this.$scope.ticks || !this.$scope.ticks.length) {
return true;
}
@@ -166,7 +173,11 @@ define([
return ticks(range.min, range.max, number);
};
MCTTicksController.prototype.updateTicks = function () {
MCTTicksController.prototype.updateTicksForceRegeneration = function () {
this.updateTicks(true);
}
MCTTicksController.prototype.updateTicks = function (forceRegeneration = false) {
var range = this.axis.get('displayRange');
if (!range) {
delete this.$scope.min;
@@ -184,7 +195,7 @@ define([
this.$scope.min = range.min;
this.$scope.max = range.max;
this.$scope.interval = Math.abs(range.min - range.max);
if (this.shouldRegenerateTicks(range)) {
if (this.shouldRegenerateTicks(range, forceRegeneration)) {
var newTicks = this.getTicks();
this.tickRange = {
min: Math.min.apply(Math, newTicks),
@@ -242,6 +253,7 @@ define([
this.$scope.$emit('plot:tickWidth', tickWidth);
this.shouldCheckWidth = false;
}
this.$scope.$digest();
this.tickUpdate = false;
};

View File

@@ -130,6 +130,9 @@ define([
};
PlotController.prototype.addSeries = function (series) {
this.listenTo(series, 'change:xKey', function (xKey) {
this.setDisplayRange(series, xKey);
}, this);
this.listenTo(series, 'change:yKey', function () {
this.loadSeriesData(series);
}, this);
@@ -141,6 +144,16 @@ define([
this.loadSeriesData(series);
};
PlotController.prototype.setDisplayRange = function (series, xKey) {
if (this.config.series.models.length !== 1) {
return;
}
const displayRange = series.getDisplayRange(xKey);
this.config.xAxis.set('range', displayRange);
};
PlotController.prototype.removeSeries = function (plotSeries) {
this.stopListening(plotSeries);
};
@@ -162,6 +175,7 @@ define([
PlotController.prototype.onTimeSystemChange = function (timeSystem) {
this.config.xAxis.set('key', timeSystem.key);
this.config.xAxis.emit('resetSeries');
};
PlotController.prototype.destroy = function () {

View File

@@ -17,6 +17,19 @@
margin-right: $interiorMarginSm;
opacity: 0.7;
}
&__label {
flex: 1 1 auto;
}
&__close-btn {
flex: 0 0 auto;
pointer-events: all;
}
> * + * {
margin-left: $interiorMargin;
}
}
&__object-holder {

View File

@@ -19,7 +19,7 @@
>
Drag objects here to add them to this view.
</div>
<button
<div
v-for="(tab,index) in tabsList"
:key="index"
class="c-tab c-tabs-view__tab"
@@ -28,19 +28,12 @@
}"
@click="showTab(tab, index)"
>
<div class="c-object-label"
:class="{'is-missing': tab.domainObject.status === 'missing'}"
>
<div class="c-object-label__type-icon"
:class="tab.type.definition.cssClass"
>
<span class="is-missing__indicator"
title="This item is missing"
></span>
</div>
<span class="c-button__label c-object-label__name">{{ tab.domainObject.name }}</span>
</div>
</button>
<span class="c-button__label c-tabs-view__tab__label">{{ tab.domainObject.name }}</span>
<button v-if="isEditing"
class="icon-x c-click-icon c-tabs-view__tab__close-btn"
@click="showRemoveDialog(index)"
></button>
</div>
</div>
<div
v-for="(tab, index) in tabsList"
@@ -59,6 +52,7 @@
<script>
import ObjectView from '../../../ui/components/ObjectView.vue';
import RemoveAction from '../../remove/RemoveAction.js';
import {
getSearchParam,
setSearchParam,
@@ -123,6 +117,7 @@ export default {
this.unsubscribe = this.openmct.objects.observe(this.internalDomainObject, '*', this.updateInternalDomainObject);
this.RemoveAction = new RemoveAction(this.openmct);
document.addEventListener('dragstart', this.dragstart);
document.addEventListener('dragend', this.dragend);
},
@@ -153,6 +148,38 @@ export default {
this.currentTab = tab;
},
showRemoveDialog(index) {
if(!this.tabsList[index]) {
return;
}
let activeTab = this.tabsList[index];
let childDomainObject = activeTab.domainObject
let prompt = this.openmct.overlays.dialog({
iconClass: 'alert',
message: `This action will remove this tab from the Tabs Layout. Do you want to continue?`,
buttons: [
{
label: 'Ok',
emphasis: 'true',
callback: () => {
this.removeFromComposition(childDomainObject);
prompt.dismiss();
}
},
{
label: 'Cancel',
callback: () => {
prompt.dismiss();
}
}
]
});
},
removeFromComposition(childDomainObject) {
this.composition.remove(childDomainObject);
},
addItem(domainObject) {
let type = this.openmct.types.get(domainObject.type) || unknownObjectType,
tabItem = {

View File

@@ -74,6 +74,10 @@ define([], function () {
return this.cellLimitClasses;
}
getContextualDomainObject(openmct, objectKeyString) {
return openmct.objects.get(objectKeyString);
}
getContextMenuActions() {
return [];
}

View File

@@ -46,11 +46,23 @@ define(
filter = filter.trim().toLowerCase();
let rowsToFilter = this.getRowsToFilter(columnKey, filter);
if (filter.length === 0) {
delete this.columnFilters[columnKey];
} else {
this.columnFilters[columnKey] = filter;
}
this.rows = rowsToFilter.filter(this.matchesFilters, this);
this.emit('filter');
}
setColumnRegexFilter(columnKey, filter) {
filter = filter.trim();
let rowsToFilter = this.masterCollection.getRows();
this.columnFilters[columnKey] = new RegExp(filter);
this.rows = rowsToFilter.filter(this.matchesFilters, this);
this.emit('filter');
}
@@ -70,6 +82,10 @@ define(
* @private
*/
isSubsetOfCurrentFilter(columnKey, filter) {
if (this.columnFilters[columnKey] instanceof RegExp) {
return false;
}
return this.columnFilters[columnKey] &&
filter.startsWith(this.columnFilters[columnKey]) &&
// startsWith check will otherwise fail when filter cleared
@@ -96,7 +112,11 @@ define(
return false;
}
doesMatchFilters = formattedValue.toLowerCase().indexOf(this.columnFilters[key]) !== -1;
if (this.columnFilters[key] instanceof RegExp) {
doesMatchFilters = this.columnFilters[key].test(formattedValue);
} else {
doesMatchFilters = formattedValue.toLowerCase().indexOf(this.columnFilters[key]) !== -1;
}
});
return doesMatchFilters;
}

View File

@@ -0,0 +1,56 @@
<template>
<tr class="c-telemetry-table__sizing-tr"><td>SIZING ROW</td></tr>
</template>
<script>
export default {
props: {
isEditing: {
type: Boolean,
default: false
}
},
watch: {
isEditing: function (isEditing) {
if (isEditing) {
this.pollForRowHeight();
} else {
this.clearPoll();
}
}
},
mounted() {
this.$nextTick().then(() => {
this.height = this.$el.offsetHeight;
this.$emit('change-height', this.height);
});
if (this.isEditing) {
this.pollForRowHeight();
}
},
destroyed() {
this.clearPoll();
},
methods: {
pollForRowHeight() {
this.clearPoll();
this.pollID = window.setInterval(this.heightPoll, 300);
},
clearPoll() {
if (this.pollID) {
window.clearInterval(this.pollID);
this.pollID = undefined;
}
},
heightPoll() {
let height = this.$el.offsetHeight;
if (height !== this.height) {
this.$emit('change-height', height);
this.height = height;
}
}
}
}
</script>

View File

@@ -171,7 +171,7 @@ export default {
showContextMenu: function (event) {
event.preventDefault();
this.openmct.objects.get(this.row.objectKeyString).then((domainObject) => {
this.row.getContextualDomainObject(this.openmct, this.row.objectKeyString).then(domainObject => {
let contextualObjectPath = this.objectPath.slice();
contextualObjectPath.unshift(domainObject);

View File

@@ -9,6 +9,9 @@
.c-telemetry-table {
// Table that displays telemetry in a scrolling body area
@include fontAndSize();
display: flex;
flex-flow: column nowrap;
justify-content: flex-start;
@@ -54,6 +57,16 @@
width: 100%;
}
}
&__filter {
.c-table__search {
padding-top: 0;
padding-bottom: 0;
}
.is-in-small-container & {
display: none;
}
}
}
&__headers__label {
@@ -86,6 +99,10 @@
height: 0; // Fixes Chrome 73 overflow bug
overflow-x: auto;
overflow-y: scroll;
.is-editing & {
pointer-events: none;
}
}
/******************************* TABLES */
@@ -98,7 +115,7 @@
display: flex; // flex-flow defaults to row nowrap (which is what we want) so no need to define
align-items: stretch;
position: absolute;
height: 18px; // Needed when a row has empty values in its cells
min-height: 18px; // Needed when a row has empty values in its cells
&.is-selected {
background-color: $colorSelectedBg !important;
@@ -136,9 +153,15 @@
white-space: nowrap;
}
}
&__sizing-tr {
// A row element used to determine sizing of rows based on font size
visibility: hidden;
pointer-events: none;
}
}
/******************************* EDITING */
/******************************* SPECIFIC CASE WRAPPERS */
.is-editing {
.c-telemetry-table__headers__labels {
th[draggable],
@@ -158,8 +181,10 @@
}
}
.paused {
border: 1px solid #ff9900;
.is-paused {
.c-table__body-w {
border: 1px solid rgba($colorPausedBg, 0.8);
}
}
/******************************* LEGACY */

View File

@@ -20,13 +20,16 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
<template>
<div class="c-table-wrapper">
<div class="c-table-wrapper"
:class="{ 'is-paused': paused }"
>
<!-- main contolbar start-->
<div v-if="!marking.useAlternateControlBar"
class="c-table-control-bar c-control-bar"
>
<button
v-if="allowExport"
v-show="!markedRows.length"
class="c-button icon-download labeled"
title="Export this view's data"
@click="exportAllDataAsCSV()"
@@ -122,10 +125,10 @@
<!-- alternate controlbar end -->
<div
class="c-table c-telemetry-table c-table--filterable c-table--sortable has-control-bar"
class="c-table c-telemetry-table c-table--filterable c-table--sortable has-control-bar u-style-receiver js-style-receiver"
:class="{
'loading': loading,
'paused' : paused
'is-paused' : paused
}"
>
<div :style="{ 'max-width': widthWithScroll, 'min-width': '150px'}">
@@ -187,7 +190,17 @@
class="c-table__search"
@input="filterChanged(key)"
@clear="clearFilter(key)"
/>
>
<button
class="c-search__use-regex"
:class="{ 'is-active': enableRegexSearch[key] }"
title="Click to enable regex: enter a string with slashes, like this: /regex_exp/"
@click="toggleRegex(key)"
>
/R/
</button>
</search>
</table-column-header>
</tr>
</thead>
@@ -231,6 +244,10 @@
class="c-telemetry-table__sizing js-telemetry-table__sizing"
:style="sizingTableWidth"
>
<sizing-row
:is-editing="isEditing"
@change-height="setRowHeight"
/>
<tr>
<template v-for="(title, key) in headers">
<th
@@ -263,6 +280,7 @@ import TelemetryFilterIndicator from './TelemetryFilterIndicator.vue';
import CSVExporter from '../../../exporters/CSVExporter.js';
import _ from 'lodash';
import ToggleSwitch from '../../../ui/components/ToggleSwitch.vue';
import SizingRow from './sizing-row.vue';
const VISIBLE_ROW_COUNT = 100;
const ROW_HEIGHT = 17;
@@ -275,7 +293,8 @@ export default {
TableColumnHeader,
search,
TelemetryFilterIndicator,
ToggleSwitch
ToggleSwitch,
SizingRow
},
inject: ['table', 'openmct', 'objectPath'],
props: {
@@ -338,7 +357,8 @@ export default {
paused: false,
markedRows: [],
isShowingMarkedRowsOnly: false,
hideHeaders: configuration.hideHeaders
hideHeaders: configuration.hideHeaders,
enableRegexSearch: {}
}
},
computed: {
@@ -490,7 +510,7 @@ export default {
let columnWidths = {},
totalWidth = 0,
headerKeys = Object.keys(this.headers),
sizingTableRow = this.sizingTable.children[0],
sizingTableRow = this.sizingTable.children[1],
sizingCells = sizingTableRow.children;
headerKeys.forEach((headerKey, headerIndex, array)=>{
@@ -547,6 +567,17 @@ export default {
},
filterChanged(columnKey) {
this.table.filteredRows.setColumnFilter(columnKey, this.filters[columnKey]);
if (this.enableRegexSearch[columnKey]) {
if (this.isCompleteRegex(this.filters[columnKey])) {
this.table.filteredRows.setColumnRegexFilter(columnKey, this.filters[columnKey].slice(1,-1));
} else {
return;
}
} else {
this.table.filteredRows.setColumnFilter(columnKey, this.filters[columnKey]);
}
this.setHeight();
},
clearFilter(columnKey) {
@@ -873,6 +904,23 @@ export default {
this.isAutosizeEnabled = true;
this.$nextTick().then(this.calculateColumnWidths);
},
setRowHeight(height) {
this.rowHeight = height;
this.setHeight();
this.calculateTableSize();
this.clearRowsAndRerender();
},
toggleRegex(key) {
this.$set(this.filters, key, '');
if (this.enableRegexSearch[key] === undefined) {
this.$set(this.enableRegexSearch, key, true)
} else {
this.$set(this.enableRegexSearch, key, !this.enableRegexSearch[key]);
}
},
isCompleteRegex(string) {
return (string.length > 2 && string[0] === '/' && string[string.length - 1] === '/')
}
}
}

View File

@@ -143,7 +143,7 @@
<ConductorHistory
v-if="isFixed"
class="c-conductor__history-select"
:bounds="openmct.time.bounds()"
:bounds="bounds"
:time-system="timeSystem"
/>
</div>
@@ -190,6 +190,10 @@ export default {
start: offsets && durationFormatter.format(Math.abs(offsets.start)),
end: offsets && durationFormatter.format(Math.abs(offsets.end))
},
bounds: {
start: bounds.start,
end: bounds.end
},
formattedBounds: {
start: timeFormatter.format(bounds.start),
end: timeFormatter.format(bounds.end)
@@ -210,7 +214,7 @@ export default {
document.addEventListener('keydown', this.handleKeyDown);
document.addEventListener('keyup', this.handleKeyUp);
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
this.openmct.time.on('bounds', this.setViewFromBounds);
this.openmct.time.on('bounds', this.handleNewBounds);
this.openmct.time.on('timeSystem', this.setTimeSystem);
this.openmct.time.on('clock', this.setViewFromClock);
this.openmct.time.on('clockOffsets', this.setViewFromOffsets)
@@ -220,6 +224,13 @@ export default {
document.removeEventListener('keyup', this.handleKeyUp);
},
methods: {
handleNewBounds(bounds) {
this.setBounds(bounds);
this.setViewFromBounds(bounds);
},
setBounds(bounds) {
this.bounds = bounds;
},
handleKeyDown(event) {
if (event.key === 'Alt') {
this.altPressed = true;
@@ -246,10 +257,13 @@ export default {
this.formattedBounds.end = this.timeFormatter.format(bounds.end);
},
endZoom(bounds) {
const _bounds = bounds ? bounds : this.openmct.time.bounds();
this.isZooming = false;
this.openmct.time.bounds(_bounds);
if (bounds) {
this.handleNewBounds(bounds);
} else {
this.setViewFromBounds(this.bounds);
}
},
setTimeSystem(timeSystem) {
this.timeSystem = timeSystem

View File

@@ -207,7 +207,7 @@ export default {
this.$emit('panAxis', panBounds);
},
endPan() {
const panBounds = this.dragStartX && this.dragX && this.dragStartX !== this.dragX
const panBounds = this.isChangingViewBounds()
? this.getPanBounds()
: undefined;
this.$emit('endPan', panBounds);
@@ -251,16 +251,14 @@ export default {
});
},
endZoom() {
const zoomRange = this.dragStartX && this.dragX && this.dragStartX !== this.dragX
? this.getZoomRange()
: undefined;
const zoomBounds = zoomRange
? {
let zoomBounds;
if (this.isChangingViewBounds()) {
const zoomRange = this.getZoomRange();
zoomBounds = {
start: this.scaleToBounds(zoomRange.start),
end: this.scaleToBounds(zoomRange.end)
}
: this.openmct.time.bounds();
};
}
this.zoomStyle = {};
this.$emit('endZoom', zoomBounds);
@@ -289,6 +287,9 @@ export default {
const offset = valueDelta / this.width * timeDelta;
return bounds.start + offset;
},
isChangingViewBounds() {
return this.dragStartX && this.dragX && this.dragStartX !== this.dragX;
},
resize() {
if (this.$refs.axisHolder.clientWidth !== this.width) {
this.setAxisDimensions();

View File

@@ -84,7 +84,12 @@ export default {
},
data() {
return {
history: {}, // contains arrays of timespans {start, end}, array key is time system key
/**
* previous bounds entries available for easy re-use
* @history array of timespans
* @timespans {start, end} number representing timestamp
*/
history: this.getHistoryFromLocalStorage(),
presets: []
}
},
@@ -111,22 +116,20 @@ export default {
this.addTimespan();
},
deep: true
},
history: {
handler() {
this.persistHistoryToLocalStorage();
},
deep: true
}
},
mounted() {
this.getHistoryFromLocalStorage();
this.initializeHistoryIfNoHistory();
},
methods: {
getHistoryFromLocalStorage() {
if (localStorage.getItem(LOCAL_STORAGE_HISTORY_KEY)) {
this.history = JSON.parse(localStorage.getItem(LOCAL_STORAGE_HISTORY_KEY))
} else {
const localStorageHistory = localStorage.getItem(LOCAL_STORAGE_HISTORY_KEY);
const history = localStorageHistory ? JSON.parse(localStorageHistory) : undefined;
return history;
},
initializeHistoryIfNoHistory() {
if (!this.history) {
this.history = {};
this.persistHistoryToLocalStorage();
}
@@ -156,6 +159,8 @@ export default {
currentHistory.unshift(timespan);
this.history[key] = currentHistory;
this.persistHistoryToLocalStorage();
},
selectTimespan(timespan) {
this.openmct.time.bounds(timespan);

View File

@@ -84,6 +84,10 @@ $filterHov: brightness(1.3); // Tree, location items
$colorSelectedBg: pushBack($colorKey, 10%);
$colorSelectedFg: pullForward($colorBodyFg, 20%);
// Object labels
$objectLabelTypeIconOpacity: 0.7;
$objectLabelNameFilter: brightness(1.3);
// Layout
$shellMainPad: 4px 0;
$shellPanePad: $interiorMargin, 7px;
@@ -94,7 +98,7 @@ $sideBarHeaderBg: rgba($colorBodyFg, 0.2);
$sideBarHeaderFg: rgba($colorBodyFg, 0.7);
// Status colors, mainly used for messaging and item ancillary symbols
$colorStatusFg: #999;
$colorStatusFg: #888;
$colorStatusDefault: #ccc;
$colorStatusInfo: #60ba7b;
$colorStatusInfoFilter: invert(58%) sepia(44%) saturate(405%) hue-rotate(85deg) brightness(102%) contrast(92%);
@@ -205,9 +209,9 @@ $colorBtnMajorBg: $colorKey;
$colorBtnMajorBgHov: $colorKeyHov;
$colorBtnMajorFg: $colorKeyFg;
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
$colorBtnCautionBg: #f16f6f;
$colorBtnCautionBg: $colorStatusAlert;
$colorBtnCautionBgHov: #f1504e;
$colorBtnCautionFg: $colorBtnFg;
$colorBtnCautionFg: $colorBtnBg;
$colorBtnActiveBg: $colorOk;
$colorBtnActiveFg: $colorOkFg;
$colorBtnSelectedBg: $colorSelectedBg;
@@ -335,7 +339,7 @@ $shdwItemText: none;
$colorTabBorder: pullForward($colorBodyBg, 10%);
$colorTabBodyBg: $colorBodyBg;
$colorTabBodyFg: pullForward($colorBodyFg, 20%);
$colorTabHeaderBg: rgba($colorBodyFg, 0.2);
$colorTabHeaderBg: rgba($colorBodyFg, 0.15);
$colorTabHeaderFg: $colorBodyFg;
$colorTabHeaderBorder: $colorBodyBg;
$colorTabGroupHeaderBg: pullForward($colorBodyBg, 5%);
@@ -353,7 +357,7 @@ $stylePlotHash: dashed;
$colorPlotAreaBorder: $colorInteriorBorder;
$colorPlotLabelFg: pushBack($colorPlotFg, 20%);
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
$legendTableHeadBg: rgba($colorBodyFg, 0.15);
$legendTableHeadBg: $colorTabHeaderBg;
// Tree
$colorTreeBg: transparent;

View File

@@ -88,6 +88,10 @@ $filterHov: brightness(1.3); // Tree, location items
$colorSelectedBg: pushBack($colorKey, 10%);
$colorSelectedFg: pullForward($colorBodyFg, 20%);
// Object labels
$objectLabelTypeIconOpacity: 0.7;
$objectLabelNameFilter: brightness(1.3);
// Layout
$shellMainPad: 4px 0;
$shellPanePad: $interiorMargin, 7px;
@@ -209,9 +213,9 @@ $colorBtnMajorBg: $colorKey;
$colorBtnMajorBgHov: $colorKeyHov;
$colorBtnMajorFg: $colorKeyFg;
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
$colorBtnCautionBg: #f16f6f;
$colorBtnCautionBg: $colorStatusAlert;
$colorBtnCautionBgHov: #f1504e;
$colorBtnCautionFg: $colorBtnFg;
$colorBtnCautionFg: $colorBtnBg;
$colorBtnActiveBg: $colorOk;
$colorBtnActiveFg: $colorOkFg;
$colorBtnSelectedBg: $colorSelectedBg;
@@ -339,7 +343,7 @@ $shdwItemText: none;
$colorTabBorder: pullForward($colorBodyBg, 10%);
$colorTabBodyBg: $colorBodyBg;
$colorTabBodyFg: pullForward($colorBodyFg, 20%);
$colorTabHeaderBg: rgba($colorBodyFg, 0.2);
$colorTabHeaderBg: rgba($colorBodyFg, 0.15);
$colorTabHeaderFg: $colorBodyFg;
$colorTabHeaderBorder: $colorBodyBg;
$colorTabGroupHeaderBg: pullForward($colorBodyBg, 5%);

View File

@@ -80,10 +80,14 @@ $uiColor: #289fec; // Resize bars, splitter bars, etc.
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
$colorA: #999;
$colorAHov: $colorKey;
$filterHov: brightness(1.3); // Tree, location items
$filterHov: brightness(0.8) contrast(2); // Tree, location items
$colorSelectedBg: pushBack($colorKey, 40%);
$colorSelectedFg: pullForward($colorBodyFg, 10%);
// Object labels
$objectLabelTypeIconOpacity: 0.5;
$objectLabelNameFilter: brightness(0.5);
// Layout
$shellMainPad: 4px 0;
$shellPanePad: $interiorMargin, 7px;
@@ -224,7 +228,7 @@ $colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
$btnStdH: 24px;
$colorCursorGuide: rgba(black, 0.6);
$shdwCursorGuide: rgba(white, 0.4) 0 0 2px;
$colorLocalControlOvrBg: rgba($colorBodyFg, 0.8);
$colorLocalControlOvrBg: rgba($colorBodyBg, 0.8);
$colorSelectBg: $colorBtnBg; // This must be a solid color, not a gradient, due to usage of SVG bg in selects
$colorSelectFg: $colorBtnFg;
$colorSelectArw: lighten($colorBtnBg, 20%);

View File

@@ -40,11 +40,10 @@ $inputTextP: $inputTextPTopBtm $inputTextPLeftRight;
$menuLineH: 1.5rem;
$treeItemIndent: 16px;
$treeTypeIconW: 18px;
$overlayOuterMarginLg: 5%;
$overlayOuterMarginFullscreen: 0%;
$overlayOuterMarginDialog: 20%;
$overlayInnerMargin: 25px;
$mainViewPad: 2px;
$mainViewPad: 0px;
/*************** Items */
$itemPadLR: 5px;
$gridItemDesk: 175px;
@@ -57,7 +56,7 @@ $tabularTdPadTB: 2px;
$plotYBarW: 60px;
$plotYLabelMinH: 20px;
$plotYLabelW: 10px;
$plotXBarH: 35px;
$plotXBarH: 32px;
$plotLegendH: 20px;
$plotLegendWidthCollapsed: 20%;
$plotLegendWidthExpanded: 50%;
@@ -90,6 +89,8 @@ $messageIconD: 80px;
$messageListIconD: 32px;
/*************** Tables */
$tableResizeColHitareaD: 6px;
/*************** Misc */
$drawingObjBorderW: 3px;
/************************** MOBILE */
$mobileMenuIconD: 24px; // Used
@@ -101,6 +102,8 @@ $colorProgressBarHolder: rgba(black, 0.1);
$colorProgressBar: #0085ad;
$progressAnimW: 500px;
$progressBarMinH: 6px;
/************************** FONT STYLING */
$listFontSizes: 8,9,10,11,12,13,14,16,18,20,24,28,32,36,42,48,72,96,128;
/************************** GLYPH CHAR UNICODES */
$glyph-icon-alert-rect: '\e900';

View File

@@ -57,11 +57,6 @@ button {
line-height: 90%;
padding: 3px 10px;
@include hover() {
background: $colorBtnBgHov;
color: $colorBtnFgHov;
}
@include desktop() {
font-size: 6px;
}

View File

@@ -96,6 +96,37 @@ body.desktop {
}
}
/******************************************************** FONTS */
@mixin fontAndSize() {
@each $size in $listFontSizes {
&[data-font-size="#{$size}"] {
font-size: #{$size}px;
// Set row heights in telemetry tables
tr {
min-height: #{$size + ($tabularTdPadTB * 2)};
}
}
}
&[data-font*="bold"] {
font-weight: bold;
}
&[data-font*="narrow"] {
font-family: 'Arial Narrow', sans-serif;
}
&[data-font*="monospace"] {
font-family: 'Andale Mono', sans-serif;
}
}
.u-style-receiver {
@include fontAndSize();
}
/******************************************************** HTML ENTITIES */
a {
color: $colorA;
@@ -206,10 +237,6 @@ body.desktop .has-local-controls {
&:hover {
box-shadow: $browseSelectableShdwHov;
}
&[s-selected] {
border: $browseSelectedBorder;
}
}
/**************************** EDITING */
@@ -230,7 +257,7 @@ body.desktop .has-local-controls {
}
/******************************************************** STATES */
@mixin spinner($b: 5px, $c: $colorKey) {
@mixin spinner($b: 5, $c: $colorKey) {
animation-name: rotation-centered;
animation-duration: 0.5s;
animation-iteration-count: infinite;
@@ -280,13 +307,13 @@ body.desktop .has-local-controls {
}
&.c-tree__item {
$d: $waitSpinnerTreeD;
$spinnerL: 19px + $d/2;
$spinnerL: 19 + $d/2;
display: flex;
align-items: center;
padding-left: $spinnerL + $d/2 + $interiorMargin;
background: $colorLoadingBg;
min-height: 5px + $d;
min-height: 5 + $d;
.c-tree__item__label {
font-style: italic;
@@ -295,7 +322,7 @@ body.desktop .has-local-controls {
&:before {
height: $d;
width: $d;
border-width: 4px;
border-width: 4;
left: $spinnerL;
}
&:after {

View File

@@ -1,5 +1,5 @@
/*****************************************************************************
* Open MCT, Copyright (c) 2014-2018, United States Government
* Open MCT, Copyright (c) 2014-2020, United States Government
* as represented by the Administrator of the National Aeronautics and Space
* Administration. All rights reserved.
*
@@ -27,18 +27,21 @@ mct-plot {
/*********************** STACKED PLOT LAYOUT */
.is-editing {
.gl-plot.child-frame {
&:hover {
@include hover {
background: rgba($editUIColorBg, 0.1);
box-shadow: inset rgba($editUIColorBg, 0.8) 0 0 0 1px;
box-shadow: inset rgba($editUIColorBg, 0.3) 0 0 0 1px;
}
&[s-selected] {
border: 1px solid $editUIColorFg !important;
color: $editUIColorFg !important;
box-shadow: $editFrameSelectedShdw;
background: rgba($editUIColorBg, 0.2);
box-shadow: inset rgba($editUIColorBg, 0.8) 0 0 0 1px;
z-index: 2;
}
}
.plot-wrapper-axis-and-display-area {
pointer-events: none;
}
}
.c-plot,
@@ -49,6 +52,7 @@ mct-plot {
.c-control-bar {
display: none;
}
.gl-plot-x-label__select,
.gl-plot-y-label__select {
display: none;
}
@@ -67,20 +71,14 @@ mct-plot {
}
.c-plot {
//$p: $mainViewPad;
@include abs($mainViewPad);
//position: absolute;
//top: $p; right: $p; bottom: $p; left: $p;
display: flex;
flex-direction: column;
> * + * {
margin-top: $interiorMargin;
}
.l-control-bar {
.c-control-bar {
flex: 0 0 auto;
margin-bottom: $interiorMargin;
}
.l-view-section {
@@ -114,6 +112,12 @@ mct-plot {
}
}
}
.is-in-small-container & {
.c-control-bar {
display: none;
}
}
}
.gl-plot {
@@ -169,6 +173,14 @@ mct-plot {
}
}
}
&.gl-plot-x {
@include hover {
.gl-plot-x-label__select {
display: block;
}
}
}
}
.gl-plot-coords {
@@ -205,7 +217,6 @@ mct-plot {
&.gl-plot-y-label {
display: block;
left: 0; top: 0; right: auto; bottom: 0;
padding-left: 5px;
text-orientation: mixed;
writing-mode: vertical-lr;
&:before {
@@ -215,11 +226,19 @@ mct-plot {
}
}
.gl-plot-x-label__select {
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
z-index: 10;
}
.gl-plot-y-label__select {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 20px;
left: 0;
z-index: 10;
}
@@ -271,7 +290,7 @@ mct-plot {
align-items: center;
position: absolute;
top: $m;
right: $m;
left: $m;
z-index: 9;
&__reset {
@@ -284,15 +303,18 @@ mct-plot {
top: $m;
right: $m;
}
.c-button {
box-shadow: $colorLocalControlOvrBg 0 0 0 2px;
}
}
.l-state-indicators {
color: $colorPausedBg;
position: absolute;
display: block;
font-size: 1.5em;
pointer-events: none;
top: $interiorMarginSm;
cursor: help;
font-size: 1.2em;
bottom: $interiorMarginSm;
left: $interiorMarginSm;
z-index: 2;
@@ -351,11 +373,11 @@ mct-plot {
.gl-plot-tick {
&.gl-plot-x-tick-label {
top: $interiorMargin;
top: $interiorMarginSm;
}
&.gl-plot-y-tick-label {
right: $interiorMargin;
left: $interiorMargin;
right: $interiorMarginSm;
left: auto;
}
}
@@ -452,8 +474,22 @@ mct-plot {
@include propertiesHeader();
margin-bottom: $interiorMarginSm;
}
.is-in-small-container & {
&.is-legend-hidden {
display: none;
}
}
}
.c-plot--stacked {
.is-legend-hidden {
// Always show the legend in a stacked plot
display: flex !important;
}
}
.gl-plot-legend {
display: flex;
align-items: flex-start;
@@ -525,10 +561,19 @@ mct-plot {
flex: 1 1 auto;
}
.gl-plot {
.plot-legend-top .gl-plot-legend { margin-bottom: $interiorMargin; }
.plot-legend-bottom .gl-plot-legend { margin-top: $interiorMargin; }
.plot-legend-left .gl-plot-legend { margin-right: $interiorMargin; }
.plot-legend-right .gl-plot-legend { margin-left: $interiorMargin; }
.gl-plot,
.c-plot {
&.plot-legend-collapsed .plot-wrapper-expanded-legend { display: none; }
&.plot-legend-expanded .plot-wrapper-collapsed-legend { display: none; }
&.plot-legend-collapsed .icon-cursor-lock::before { padding-right: 5px; }
&.plot-legend-expanded .icon-cursor-lock::before { padding-right: 5px; }
&.plot-legend-top .gl-plot-legend { margin-bottom: $interiorMargin; }
&.plot-legend-bottom .gl-plot-legend { margin-top: $interiorMargin; }
&.plot-legend-right .gl-plot-legend { margin-left: $interiorMargin; }
@@ -540,7 +585,6 @@ mct-plot {
.plot-legend-item {
display: flex;
align-items: center;
justify-content: stretch;
.plot-series-swatch-and-name,
@@ -569,8 +613,10 @@ mct-plot {
/***************** TOP OR BOTTOM */
&.plot-legend-top,
&.plot-legend-bottom {
&.plot-legend-bottom,
&.plot-legend-hidden {
// General styles when legend is on the top or bottom
// -hidden included for legacy plots
flex-direction: column;
&.plot-legend-collapsed {
@@ -592,6 +638,7 @@ mct-plot {
&.plot-legend-left,
&.plot-legend-right {
// General styles when legend is on left or right
.gl-plot-legend {
max-height: inherit;
}
@@ -622,6 +669,7 @@ mct-plot {
}
}
.plot-legend-item {
margin-bottom: $interiorMarginSm;
margin-left: 0;
flex-wrap: nowrap;
.plot-series-swatch-and-name {
@@ -649,6 +697,31 @@ mct-plot {
}
}
/***************** STACKED PLOT LEGEND OVERRIDES */
.c-plot--stacked {
// Always show the legend on top, ignore any position setting
.c-plot,
.gl-plot {
flex-direction: column !important;
.c-plot-legend,
.gl-plot-legend {
margin: 0;
margin-bottom: $interiorMargin;
order: 1 !important;
width: 100% !important;
.plot-wrapper-collapsed-legend {
flex-direction: row !important;
}
}
.plot-wrapper-axis-and-display-area {
order: 2 !important;
}
}
}
/***************** CURSOR GUIDES */
[class*='c-cursor-guide'] {
box-shadow: $shdwCursorGuide;

View File

@@ -52,6 +52,7 @@
$ctrlW: 22px;
&__controls {
font-size: 1rem !important;
margin-right: 0;
min-width: 0;
overflow: hidden;
@@ -62,7 +63,7 @@
}
&__direction {
font-size: 0.9em;
font-size: 0.9rem !important;
margin-right: $interiorMargin;
}

View File

@@ -443,28 +443,18 @@
}
@include hover() {
background: $colorBtnBgHov;
color: $colorBtnFgHov;
filter: $filterHov;
}
&[class*="--major"],
&[class*='is-active']{
background: $colorBtnMajorBg;
color: $colorBtnMajorFg;
@include hover() {
background: $colorBtnMajorBgHov;
color: $colorBtnMajorFgHov;
}
}
&[class*='--caution'] {
background: $colorBtnCautionBg;
color: $colorBtnCautionFg;
&:hover {
background: $colorBtnCautionBgHov;
}
background: $colorBtnCautionBg !important;
color: $colorBtnCautionFg !important;
}
}

View File

@@ -90,14 +90,28 @@ div.c-table {
flex: 1 1 auto;
}
> * + * {
margin-top: $interiorMarginSm;
.is-in-small-container & {
&:not(.is-paused) {
.c-table-control-bar {
display: none;
}
}
.c-table-control-bar {
.c-click-icon,
.c-button {
&__label {
display: none;
}
}
}
}
}
.c-table-control-bar {
display: flex;
flex: 0 0 auto;
//margin-bottom: $interiorMarginSm; // This approach to allow margin to go away when control bar is hidden
padding: $interiorMarginSm 0;
> * + * {
margin-left: $interiorMarginSm;

View File

@@ -2,7 +2,7 @@
"metadata": {
"name": "Open MCT Symbols 16px",
"lastOpened": 0,
"created": 1593102875898
"created": 1596146160781
},
"iconSets": [
{
@@ -752,7 +752,7 @@
"tempChar": ""
},
{
"order": 114,
"order": 189,
"id": 4,
"name": "icon-font-size",
"prevSize": 24,
@@ -2686,17 +2686,26 @@
{
"id": 4,
"paths": [
"M842.841 380.048h-120.956l-52.382 139.676 52.918 141.12 59.942-159.84 62.361 166.314h-119.884l34.019 90.717h119.884l39.695 105.836h105.836l-181.434-483.823z",
"M263.903 160.129l-263.903 703.742h153.944l57.729-153.944h280.397l57.729 153.944h153.944l-263.903-703.742zM261.154 577.976l90.717-241.911 90.717 241.911z"
"M1148 416h-152l-65.82 175.54 66.5 177.32 75.32-200.86 78.38 209h-150.66l42.76 114h150.64l49.88 133h133l-228-608z",
"M384 0l-384 1024h224l84-224h408l84 224h224l-384-1024zM380 608l132-352 132 352z"
],
"attrs": [
{},
{}
],
"attrs": [],
"grid": 16,
"tags": [
"icon-font-size-alt1"
],
"isMulticolor": false,
"isMulticolor2": false,
"colorPermutations": {
"12552552551": []
}
"12552552551": [
{},
{}
]
},
"width": 1376
},
{
"id": 141,

View File

@@ -100,7 +100,7 @@
<glyph unicode="&#xea2c;" glyph-name="icon-frame-hide" d="M128 642h420l104 128h-652v-802.4l128 157.4zM896 2h-420l-104-128h652v802.4l-128-157.4zM832 834l-832-1024h192l832 1024zM392 450l104 128h-304v-128z" />
<glyph unicode="&#xea2d;" glyph-name="icon-import" d="M832 639.6v-639.4c0-0.2-0.2-0.2-0.4-0.4h-319.6v-192h320c105.6 0 192 86.4 192 192v640.2c0 105.6-86.4 192-192 192h-320v-192h319.6c0.2 0 0.4-0.2 0.4-0.4zM192 128v-192l384 384-384 384v-192h-192v-384z" />
<glyph unicode="&#xea2e;" glyph-name="icon-export" d="M192 0.34v639.32l0.34 0.34h319.66v192h-320c-105.6 0-192-86.4-192-192v-640c0-105.6 86.4-192 192-192h320v192h-319.66zM1024 320l-384 384v-192h-192v-384h192v-192l384 384z" />
<glyph unicode="&#xea2f;" glyph-name="icon-font-size" d="M842.841 451.952h-120.956l-52.382-139.676 52.918-141.12 59.942 159.84 62.361-166.314h-119.884l34.019-90.717h119.884l39.695-105.836h105.836l-181.434 483.823zM263.903 671.871l-263.903-703.742h153.944l57.729 153.944h280.397l57.729-153.944h153.944l-263.903 703.742zM261.154 254.024l90.717 241.911 90.717-241.911z" />
<glyph unicode="&#xea2f;" glyph-name="icon-font-size" horiz-adv-x="1376" d="M1148 416h-152l-65.82-175.54 66.5-177.32 75.32 200.86 78.38-209h-150.66l42.76-114h150.64l49.88-133h133l-228 608zM384 832l-384-1024h224l84 224h408l84-224h224l-384 1024zM380 224l132 352 132-352z" />
<glyph unicode="&#xea30;" glyph-name="icon-clear-data" d="M632 520l-120-120-120 120-80-80 120-120-120-120 80-80 120 120 120-120 80 80-120 120 120 120-80 80zM512 832c-282.76 0-512-86-512-192v-640c0-106 229.24-192 512-192s512 86 512 192v640c0 106-229.24 192-512 192zM512 0c-176.731 0-320 143.269-320 320s143.269 320 320 320c176.731 0 320-143.269 320-320v0c0-176.731-143.269-320-320-320v0z" />
<glyph unicode="&#xea31;" glyph-name="icon-history" d="M576 768c-247.4 0-448-200.6-448-448h-128l192-192 192 192h-128c0 85.4 33.2 165.8 93.8 226.2 60.4 60.6 140.8 93.8 226.2 93.8s165.8-33.2 226.2-93.8c60.6-60.4 93.8-140.8 93.8-226.2s-33.2-165.8-93.8-226.2c-60.4-60.6-140.8-93.8-226.2-93.8s-165.8 33.2-226.2 93.8l-90.6-90.6c81-81 193-131.2 316.8-131.2 247.4 0 448 200.6 448 448s-200.6 448-448 448zM576 560c-26.6 0-48-21.4-48-48v-211.8l142-142c9.4-9.4 21.6-14 34-14s24.6 4.6 34 14c18.8 18.8 18.8 49.2 0 67.8l-114 114v172c0 26.6-21.4 48-48 48z" />
<glyph unicode="&#xea32;" glyph-name="icon-arrow-up-to-parent" horiz-adv-x="1056" d="M643.427 6.739c-81.955 0.697-148.179 67.065-148.642 149.010v395.872l296.871-247.393v197.914l-395.828 329.857-395.828-328.62v-197.502l296.871 246.156v-396.241c0-190.905 155.239-346.556 346.144-346.968l412.321-0.825 0.412 197.914z" />

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -3,7 +3,7 @@
@import "../plugins/condition/components/conditionals.scss";
@import "../plugins/conditionWidget/components/condition-widget.scss";
@import "../plugins/condition/components/inspector/conditional-styles.scss";
@import "../plugins/displayLayout/components/box-view.scss";
@import "../plugins/displayLayout/components/box-and-line-views";
@import "../plugins/displayLayout/components/display-layout.scss";
@import "../plugins/displayLayout/components/edit-marquee.scss";
@import "../plugins/displayLayout/components/image-view.scss";

View File

@@ -66,6 +66,8 @@
:object="domainObject"
:show-edit-view="showEditView"
:object-path="objectPath"
:font-size="fontSize"
:font="font"
/>
</div>
</template>
@@ -103,6 +105,14 @@ export default {
showEditView: {
type: Boolean,
default: true
},
fontSize: {
type: String,
default: ''
},
font: {
type: String,
default: ''
}
},
data() {
@@ -142,8 +152,11 @@ export default {
getOverlayElement(childElement) {
const fragment = new DocumentFragment();
const header = this.getPreviewHeader();
const wrapper = document.createElement('div');
wrapper.classList.add('l-preview-window__object-view');
wrapper.append(childElement);
fragment.append(header);
fragment.append(childElement);
fragment.append(wrapper);
return fragment;
},

View File

@@ -20,12 +20,30 @@ export default {
default: () => {
return [];
}
},
fontSize: {
type: String,
default: ''
},
font: {
type: String,
default: ''
}
},
watch: {
object(newObject, oldObject) {
this.currentObject = newObject;
this.debounceUpdateView();
},
fontSize(newSize, oldSize) {
if (newSize !== oldSize) {
this.setFontSize(newSize);
}
},
font(newFont, oldFont) {
if (newFont !== oldFont) {
this.setFont(newFont);
}
}
},
destroyed() {
@@ -63,8 +81,9 @@ export default {
if (this.currentObject) {
//This is to apply styles to subobjects in a layout
this.initObjectStyles();
this.setFontSize(this.fontSize);
this.setFont(this.font);
}
},
methods: {
clear() {
@@ -91,6 +110,15 @@ export default {
this.openmct.objectViews.off('clearData', this.clearData);
},
getStyleReceiver() {
let styleReceiver = this.$el.querySelector('.js-style-receiver');
if (!styleReceiver) {
styleReceiver = this.$el.querySelector(':first-child');
}
return styleReceiver;
},
invokeEditModeHandler(editMode) {
let edit;
@@ -111,20 +139,20 @@ export default {
return;
}
let keys = Object.keys(styleObj);
let elemToStyle = this.getStyleReceiver();
keys.forEach(key => {
let firstChild = this.$el.querySelector(':first-child');
if (firstChild) {
if (elemToStyle) {
if ((typeof styleObj[key] === 'string') && (styleObj[key].indexOf('__no_value') > -1)) {
if (firstChild.style[key]) {
firstChild.style[key] = '';
if (elemToStyle.style[key]) {
elemToStyle.style[key] = '';
}
} else {
if (!styleObj.isStyleInvisible && firstChild.classList.contains(STYLE_CONSTANTS.isStyleInvisible)) {
firstChild.classList.remove(STYLE_CONSTANTS.isStyleInvisible);
} else if (styleObj.isStyleInvisible && !firstChild.classList.contains(styleObj.isStyleInvisible)) {
firstChild.classList.add(styleObj.isStyleInvisible);
if (!styleObj.isStyleInvisible && elemToStyle.classList.contains(STYLE_CONSTANTS.isStyleInvisible)) {
elemToStyle.classList.remove(STYLE_CONSTANTS.isStyleInvisible);
} else if (styleObj.isStyleInvisible && !elemToStyle.classList.contains(styleObj.isStyleInvisible)) {
elemToStyle.classList.add(styleObj.isStyleInvisible);
}
firstChild.style[key] = styleObj[key];
elemToStyle.style[key] = styleObj[key];
}
}
});
@@ -142,7 +170,7 @@ export default {
}
this.viewContainer = document.createElement('div');
this.viewContainer.classList.add('u-angular-object-view-wrapper');
this.viewContainer.classList.add('l-angular-ov-wrapper');
this.$el.append(this.viewContainer);
let provider = this.getViewProvider();
if (!provider) {
@@ -305,6 +333,14 @@ export default {
parentObject = objectPath[1];
return [browseObject, parentObject, this.currentObject].every(object => object && !object.locked);
},
setFontSize(newSize) {
let elemToStyle = this.getStyleReceiver();
elemToStyle.dataset.fontSize = newSize;
},
setFont(newFont) {
let elemToStyle = this.getStyleReceiver();
elemToStyle.dataset.font = newFont;
}
}
}

View File

@@ -10,25 +10,21 @@
&__header {
flex: 0 0 auto;
display: flex;
font-size: 1.05em;
align-items: center;
margin-bottom: $interiorMargin;
margin-bottom: $interiorMarginSm;
padding: 1px 2px;
&__icon {
flex: 0 0 auto;
margin-right: $interiorMarginSm;
opacity: 0.5;
}
&__name {
@include headerFont(1em);
@include ellipsize();
flex: 0 1 auto;
.c-object-label {
&__name {
filter: $objectLabelNameFilter;
}
}
}
&:not(.c-so-view--no-frame) {
border: $browseFrameBorder;
padding: $interiorMargin;
padding: 0 $interiorMarginSm;
.is-editing & {
background: rgba($colorBodyBg, 0.8);
@@ -40,10 +36,6 @@
display: none;
}
> .c-so-view__local-controls {
top: $interiorMarginSm; right: $interiorMarginSm;
}
&.is-missing {
@include isMissing($absPos: true);
@@ -55,9 +47,19 @@
}
&__local-controls {
// View Large button
box-shadow: $colorLocalControlOvrBg 0 0 0 2px;
position: absolute;
top: $interiorMargin; right: $interiorMargin;
z-index: 2;
z-index: 10;
}
.c-click-icon,
.c-button {
// Shrink buttons a bit when they appear in a frame
border-radius: $smallCr !important;
font-size: 0.9em;
padding: 3px 5px;
}
&__view-large {
@@ -68,7 +70,6 @@
> .c-so-view__view-large { display: block; }
}
/*************************** OBJECT VIEW */
&__object-view {
flex: 1 1 auto;
height: 0; // Chrome 73 overflow bug fix
@@ -79,15 +80,10 @@
@include abs();
}
}
.c-click-icon,
.c-button {
// Shrink buttons a bit when they appear in a frame
font-size: 0.9em;
padding: 3px 5px;
}
}
.u-angular-object-view-wrapper {
display: contents;
.l-angular-ov-wrapper {
// This element is the recipient for object styling; cannot be display: contents
height: 100%;
overflow: hidden;
}

View File

@@ -19,6 +19,7 @@
display: block;
flex: 0 0 auto;
font-size: 1.1em;
opacity: $objectLabelTypeIconOpacity;
}
&.is-missing {

View File

@@ -1,3 +1,9 @@
@mixin visibleRegexButton {
opacity: 1;
padding: 1px 3px;
width: 24px;
}
.c-search {
@include wrappedInput();
@@ -9,8 +15,39 @@
content: $glyph-icon-magnify;
}
&__use-regex {
// Button
$c: $colorBodyFg;
background: rgba($c, 0.2);
border: 1px solid rgba($c, 0.3);
color: $c;
border-radius: $controlCr;
font-weight: bold;
letter-spacing: 1px;
font-size: 0.8em;
margin-left: $interiorMarginSm;
min-width: 0;
opacity: 0;
order: 2;
overflow: hidden;
padding: 1px 0;
transform-origin: left;
transition: $transOut;
width: 0;
&.is-active {
$c: $colorBtnActiveBg;
@include visibleRegexButton();
background: rgba($c, 0.3);
border-color: $c;
color: $c;
}
}
&__clear-input {
display: none;
order: 99;
padding: 1px 0;
}
&.is-active {
@@ -21,6 +58,15 @@
input[type='text'],
input[type='search'] {
margin-left: $interiorMargin;
order: 3;
text-align: left;
}
&:hover {
.c-search__use-regex {
@include visibleRegexButton();
transition: $transIn;
}
}
}

View File

@@ -15,6 +15,7 @@
class="c-search__clear-input icon-x-in-circle"
@click="clearInput"
></a>
<slot></slot>
</div>
</template>

View File

@@ -1,8 +1,8 @@
<template>
<div class="c-inspector__header">
<div v-if="!multiSelect"
class="c-inspector__selected-w c-object-label"
:class="{'is-missing': domainObject.status === 'missing' }"
class="c-inspector__selected c-object-label"
:class="{'is-missing': domainObject && domainObject.status === 'missing' }"
>
<div class="c-object-label__type-icon"
:class="typeCssClass"
@@ -11,17 +11,20 @@
title="This item is missing"
></span>
</div>
<span v-if="!singleSelectNonObject"
class="c-inspector__selected c-object-label__name"
>{{ item.name }}</span>
<span v-if="singleSelectNonObject"
class="c-inspector__selected c-object-label__name c-inspector__selected--non-domain-object"
>Layout Object</span>
<div v-if="singleSelectNonObject"
class="c-inspector__selected c-inspector__selected--non-domain-object c-object-label"
>
<span class="c-object-label__type-icon"
:class="typeCssClass"
></span>
<span class="c-object-label__name">Layout Object</span>
</div>
</div>
<div v-if="multiSelect"
class="c-inspector__multiple-selected-w"
class="c-inspector__multiple-selected"
>
{{ itemsSelected }} items selected
</div>

View File

@@ -8,13 +8,13 @@
margin-top: $interiorMargin;
}
&__selected-w,
&__multiple-selected-w {
&__selected,
&__multiple-selected {
@include headerFont(1.1em);
padding: $interiorMarginSm 0;
}
&__multiple-selected-w {
&__multiple-selected {
$p: $interiorMarginLg;
background: rgba($colorWarningLo, 0.3);
border-radius: $basicCr;
@@ -25,10 +25,11 @@
}
&__selected {
@include ellipsize();
flex: 1 1 auto;
.c-object-label__name {
filter: $objectLabelNameFilter;
}
&--non-domain-object {
&--non-domain-object .c-object-label__name {
font-style: italic;
}
}

View File

@@ -55,7 +55,7 @@
:title="lockedOrUnlocked"
class="c-button"
:class="{
'icon-lock': domainObject.locked,
'icon-lock c-button--caution': domainObject.locked,
'icon-unlocked': !domainObject.locked
}"
@click="toggleLock(!domainObject.locked)"

View File

@@ -313,6 +313,13 @@
&__actions,
&__end {
.c-button {
&[class*='icon-']:before {
min-width: 1em;
text-align: center;
}
}
> * + * {
margin-left: $interiorMargin;
}
@@ -350,6 +357,10 @@
flex: 0 1 auto;
}
.c-object-label__name {
filter: $objectLabelNameFilter;
}
&__object-name--w {
@include headerFont(1.4em);
min-width: 0;

View File

@@ -95,7 +95,7 @@ export default {
this.viewKey = view.key;
this.viewContainer = document.createElement('div');
this.viewContainer.classList.add('u-angular-object-view-wrapper');
this.viewContainer.classList.add('l-angular-ov-wrapper');
this.$refs.objectView.append(this.viewContainer);
this.view = this.currentView.view(this.domainObject, this.objectPath);

View File

@@ -1,14 +1,15 @@
<template>
<div class="l-browse-bar">
<div class="c-preview-header l-browse-bar">
<div class="l-browse-bar__start">
<div
class="l-browse-bar__object-name--w"
:class="type.cssClass"
class="l-browse-bar__object-name--w c-object-label"
>
<span class="l-browse-bar__object-name">
<div class="c-object-label__type-icon"
:class="type.cssClass"
></div>
<span class="l-browse-bar__object-name c-object-label__name">
{{ domainObject.name }}
</span>
<context-menu-drop-down :object-path="objectPath" />
</div>
</div>
<div class="l-browse-bar__end">
@@ -19,12 +20,6 @@
:current-view="currentView"
@setView="setView"
/>
<NotebookMenuSwitcher v-if="showNotebookMenuSwitcher"
:domain-object="domainObject"
:ignore-link="true"
:object-path="objectPath"
class="c-notebook-snapshot-menubutton"
/>
</div>
</div>
</div>
@@ -32,18 +27,13 @@
<script>
import ContextMenuDropDown from '../../ui/components/contextMenuDropDown.vue';
import NotebookMenuSwitcher from '@/plugins/notebook/components/notebook-menu-switcher.vue';
import ViewSwitcher from '../../ui/layout/ViewSwitcher.vue';
export default {
inject: [
'openmct',
'objectPath'
'openmct'
],
components: {
ContextMenuDropDown,
NotebookMenuSwitcher,
ViewSwitcher
},
props: {
@@ -65,12 +55,6 @@ export default {
return false;
}
},
showNotebookMenuSwitcher: {
type: Boolean,
default: () => {
return false;
}
},
views: {
type: Array,
default: () => {

View File

@@ -13,11 +13,9 @@
}
&__object-view {
background: $colorBodyBg;
border: 1px solid $colorInteriorBorder;
flex: 1 1 auto;
height: 0; // Chrome 73
overflow: auto;
padding: $interiorMargin;
> div:not([class]) {
// Target an immediate child div without a class and make it display: contents

View File

@@ -50,7 +50,7 @@ export default {
return selectedOption.name || selectedOption.value
}
// If no selected option, then options are non-specific
return '??px';
return '??';
},
nonSpecific() {
return this.options.nonSpecific === true;

View File

@@ -14,6 +14,9 @@ const gitRevision = require('child_process')
const gitBranch = require('child_process')
.execSync('git rev-parse --abbrev-ref HEAD')
.toString().trim();
const vueFile = devMode ?
path.join(__dirname, "node_modules/vue/dist/vue.js") :
path.join(__dirname, "node_modules/vue/dist/vue.min.js");
const webpackConfig = {
mode: devMode ? 'development' : 'production',
@@ -37,7 +40,7 @@ const webpackConfig = {
"csv": "comma-separated-values",
"EventEmitter": "eventemitter3",
"bourbon": "bourbon.scss",
"vue": path.join(__dirname, "node_modules/vue/dist/vue.js"),
"vue": vueFile,
"d3-scale": path.join(__dirname, "node_modules/d3-scale/build/d3-scale.min.js"),
"printj": path.join(__dirname, "node_modules/printj/dist/printj.min.js"),
"styles": path.join(__dirname, "src/styles"),