mirror of
https://github.com/nasa/openmct.git
synced 2025-06-30 20:49:19 +00:00
Compare commits
13 Commits
drag-and-d
...
tables-rem
Author | SHA1 | Date | |
---|---|---|---|
49eba13f0d | |||
89e97cfadc | |||
dec95a5a18 | |||
cb1a1c2616 | |||
ce6c1f173e | |||
30a4888363 | |||
b0917a9866 | |||
464e5de947 | |||
47a07da17d | |||
ec4c443299 | |||
3122168b0e | |||
da3af4b3db | |||
d026bc2134 |
@ -37,25 +37,25 @@ define([
|
|||||||
},
|
},
|
||||||
LIMITS = {
|
LIMITS = {
|
||||||
rh: {
|
rh: {
|
||||||
cssClass: "s-limit-upr s-limit-red",
|
cssClass: "is-limit--upr is-limit--red",
|
||||||
low: RED,
|
low: RED,
|
||||||
high: Number.POSITIVE_INFINITY,
|
high: Number.POSITIVE_INFINITY,
|
||||||
name: "Red High"
|
name: "Red High"
|
||||||
},
|
},
|
||||||
rl: {
|
rl: {
|
||||||
cssClass: "s-limit-lwr s-limit-red",
|
cssClass: "is-limit--lwr is-limit--red",
|
||||||
high: -RED,
|
high: -RED,
|
||||||
low: Number.NEGATIVE_INFINITY,
|
low: Number.NEGATIVE_INFINITY,
|
||||||
name: "Red Low"
|
name: "Red Low"
|
||||||
},
|
},
|
||||||
yh: {
|
yh: {
|
||||||
cssClass: "s-limit-upr s-limit-yellow",
|
cssClass: "is-limit--upr is-limit--yellow",
|
||||||
low: YELLOW,
|
low: YELLOW,
|
||||||
high: RED,
|
high: RED,
|
||||||
name: "Yellow High"
|
name: "Yellow High"
|
||||||
},
|
},
|
||||||
yl: {
|
yl: {
|
||||||
cssClass: "s-limit-lwr s-limit-yellow",
|
cssClass: "is-limit--lwr is-limit--yellow",
|
||||||
low: -RED,
|
low: -RED,
|
||||||
high: -YELLOW,
|
high: -YELLOW,
|
||||||
name: "Yellow Low"
|
name: "Yellow Low"
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
openmct.install(openmct.plugins.FolderView());
|
openmct.install(openmct.plugins.FolderView());
|
||||||
openmct.install(openmct.plugins.Tabs());
|
openmct.install(openmct.plugins.Tabs());
|
||||||
openmct.install(openmct.plugins.FlexibleLayout());
|
openmct.install(openmct.plugins.FlexibleLayout());
|
||||||
|
openmct.install(openmct.plugins.LADTable());
|
||||||
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
|
openmct.time.clock('local', {start: -THIRTY_MINUTES, end: 0});
|
||||||
openmct.time.timeSystem('utc');
|
openmct.time.timeSystem('utc');
|
||||||
openmct.start();
|
openmct.start();
|
||||||
|
@ -32,7 +32,6 @@ define([
|
|||||||
"./src/actions/SaveAndStopEditingAction",
|
"./src/actions/SaveAndStopEditingAction",
|
||||||
"./src/actions/SaveAsAction",
|
"./src/actions/SaveAsAction",
|
||||||
"./src/actions/CancelAction",
|
"./src/actions/CancelAction",
|
||||||
"./src/policies/EditActionPolicy",
|
|
||||||
"./src/policies/EditPersistableObjectsPolicy",
|
"./src/policies/EditPersistableObjectsPolicy",
|
||||||
"./src/representers/EditRepresenter",
|
"./src/representers/EditRepresenter",
|
||||||
"./src/capabilities/EditorCapability",
|
"./src/capabilities/EditorCapability",
|
||||||
@ -64,7 +63,6 @@ define([
|
|||||||
SaveAndStopEditingAction,
|
SaveAndStopEditingAction,
|
||||||
SaveAsAction,
|
SaveAsAction,
|
||||||
CancelAction,
|
CancelAction,
|
||||||
EditActionPolicy,
|
|
||||||
EditPersistableObjectsPolicy,
|
EditPersistableObjectsPolicy,
|
||||||
EditRepresenter,
|
EditRepresenter,
|
||||||
EditorCapability,
|
EditorCapability,
|
||||||
@ -225,10 +223,6 @@ define([
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"policies": [
|
"policies": [
|
||||||
{
|
|
||||||
"category": "action",
|
|
||||||
"implementation": EditActionPolicy
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"category": "action",
|
"category": "action",
|
||||||
"implementation": EditPersistableObjectsPolicy,
|
"implementation": EditPersistableObjectsPolicy,
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Policy controlling when the `edit` and/or `properties` actions
|
|
||||||
* can appear as applicable actions of the `view-control` category
|
|
||||||
* (shown as buttons in the top-right of browse mode.)
|
|
||||||
* @memberof platform/commonUI/edit
|
|
||||||
* @constructor
|
|
||||||
* @implements {Policy.<Action, ActionContext>}
|
|
||||||
*/
|
|
||||||
function EditActionPolicy(policyService) {
|
|
||||||
this.policyService = policyService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a count of views which are not flagged as non-editable.
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
EditActionPolicy.prototype.countEditableViews = function (context) {
|
|
||||||
var domainObject = context.domainObject,
|
|
||||||
count = 0,
|
|
||||||
type, views;
|
|
||||||
|
|
||||||
if (!domainObject) {
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
type = domainObject.getCapability('type');
|
|
||||||
views = domainObject.useCapability('view');
|
|
||||||
|
|
||||||
|
|
||||||
// A view is editable unless explicitly flagged as not
|
|
||||||
(views || []).forEach(function (view) {
|
|
||||||
if (isEditable(view) ||
|
|
||||||
(view.key === 'plot' && type.getKey() === 'telemetry.panel') ||
|
|
||||||
(view.key === 'table' && type.getKey() === 'table') ||
|
|
||||||
(view.key === 'rt-table' && type.getKey() === 'rttable')
|
|
||||||
) {
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function isEditable(view) {
|
|
||||||
if (typeof view.editable === Function) {
|
|
||||||
return view.editable(domainObject.useCapability('adapter'));
|
|
||||||
} else {
|
|
||||||
return view.editable === true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return count;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the domain object is currently being edited. If
|
|
||||||
* so, the edit action is not applicable.
|
|
||||||
* @param context
|
|
||||||
* @returns {*|boolean}
|
|
||||||
*/
|
|
||||||
function isEditing(context) {
|
|
||||||
var domainObject = (context || {}).domainObject;
|
|
||||||
return domainObject &&
|
|
||||||
domainObject.hasCapability('editor') &&
|
|
||||||
domainObject.getCapability('editor').isEditContextRoot();
|
|
||||||
}
|
|
||||||
|
|
||||||
EditActionPolicy.prototype.allow = function (action, context) {
|
|
||||||
var key = action.getMetadata().key,
|
|
||||||
category = (context || {}).category;
|
|
||||||
|
|
||||||
// Restrict 'edit' to cases where there are editable
|
|
||||||
// views (similarly, restrict 'properties' to when
|
|
||||||
// the converse is true), and where the domain object is not
|
|
||||||
// already being edited.
|
|
||||||
if (key === 'edit') {
|
|
||||||
return this.countEditableViews(context) > 0 && !isEditing(context);
|
|
||||||
} else if (key === 'properties' && category === 'view-control') {
|
|
||||||
return this.countEditableViews(context) < 1 && !isEditing(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Like all policies, allow by default.
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
return EditActionPolicy;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,49 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
[],
|
|
||||||
function () {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Policy controlling which views should be visible in Edit mode.
|
|
||||||
* @memberof platform/commonUI/edit
|
|
||||||
* @constructor
|
|
||||||
* @implements {Policy.<View, DomainObject>}
|
|
||||||
*/
|
|
||||||
function EditableViewPolicy() {
|
|
||||||
}
|
|
||||||
|
|
||||||
EditableViewPolicy.prototype.allow = function (view, domainObject) {
|
|
||||||
// If a view is flagged as non-editable, only allow it
|
|
||||||
// while we're not in Edit mode.
|
|
||||||
if ((view || {}).editable === false) {
|
|
||||||
return !(domainObject.hasCapability('editor') && domainObject.getCapability('editor').inEditContext());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Like all policies, allow by default.
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
|
|
||||||
return EditableViewPolicy;
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,138 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
["../../src/policies/EditActionPolicy"],
|
|
||||||
function (EditActionPolicy) {
|
|
||||||
|
|
||||||
describe("The Edit action policy", function () {
|
|
||||||
var editableView,
|
|
||||||
nonEditableView,
|
|
||||||
testViews,
|
|
||||||
testContext,
|
|
||||||
mockDomainObject,
|
|
||||||
mockEditAction,
|
|
||||||
mockPropertiesAction,
|
|
||||||
mockTypeCapability,
|
|
||||||
mockEditorCapability,
|
|
||||||
capabilities,
|
|
||||||
plotView,
|
|
||||||
policy;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
|
||||||
'domainObject',
|
|
||||||
[
|
|
||||||
'useCapability',
|
|
||||||
'hasCapability',
|
|
||||||
'getCapability'
|
|
||||||
]
|
|
||||||
);
|
|
||||||
mockEditorCapability = jasmine.createSpyObj('editorCapability', ['isEditContextRoot']);
|
|
||||||
mockTypeCapability = jasmine.createSpyObj('type', ['getKey']);
|
|
||||||
capabilities = {
|
|
||||||
'editor': mockEditorCapability,
|
|
||||||
'type': mockTypeCapability
|
|
||||||
};
|
|
||||||
|
|
||||||
mockEditAction = jasmine.createSpyObj('edit', ['getMetadata']);
|
|
||||||
mockPropertiesAction = jasmine.createSpyObj('edit', ['getMetadata']);
|
|
||||||
|
|
||||||
mockDomainObject.getCapability.and.callFake(function (capability) {
|
|
||||||
return capabilities[capability];
|
|
||||||
});
|
|
||||||
mockDomainObject.hasCapability.and.callFake(function (capability) {
|
|
||||||
return !!capabilities[capability];
|
|
||||||
});
|
|
||||||
|
|
||||||
editableView = { editable: true };
|
|
||||||
nonEditableView = { editable: false };
|
|
||||||
plotView = { key: "plot", editable: false };
|
|
||||||
testViews = [];
|
|
||||||
|
|
||||||
mockDomainObject.useCapability.and.callFake(function (c) {
|
|
||||||
// Provide test views, only for the view capability
|
|
||||||
return c === 'view' && testViews;
|
|
||||||
});
|
|
||||||
|
|
||||||
mockEditAction.getMetadata.and.returnValue({ key: 'edit' });
|
|
||||||
mockPropertiesAction.getMetadata.and.returnValue({ key: 'properties' });
|
|
||||||
|
|
||||||
testContext = {
|
|
||||||
domainObject: mockDomainObject,
|
|
||||||
category: 'view-control'
|
|
||||||
};
|
|
||||||
|
|
||||||
policy = new EditActionPolicy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows the edit action when there are editable views", function () {
|
|
||||||
testViews = [editableView];
|
|
||||||
expect(policy.allow(mockEditAction, testContext)).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows the edit properties action when there are no editable views", function () {
|
|
||||||
testViews = [nonEditableView, nonEditableView];
|
|
||||||
expect(policy.allow(mockPropertiesAction, testContext)).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("disallows the edit action when there are no editable views", function () {
|
|
||||||
testViews = [nonEditableView, nonEditableView];
|
|
||||||
expect(policy.allow(mockEditAction, testContext)).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("disallows the edit properties action when there are" +
|
|
||||||
" editable views", function () {
|
|
||||||
testViews = [editableView];
|
|
||||||
expect(policy.allow(mockPropertiesAction, testContext)).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("disallows the edit action when object is already being" +
|
|
||||||
" edited", function () {
|
|
||||||
testViews = [editableView];
|
|
||||||
mockEditorCapability.isEditContextRoot.and.returnValue(true);
|
|
||||||
expect(policy.allow(mockEditAction, testContext)).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows editing of panels in plot view", function () {
|
|
||||||
testViews = [plotView];
|
|
||||||
mockTypeCapability.getKey.and.returnValue('telemetry.panel');
|
|
||||||
|
|
||||||
expect(policy.allow(mockEditAction, testContext)).toBe(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
it("disallows editing of plot view when object not a panel type", function () {
|
|
||||||
testViews = [plotView];
|
|
||||||
mockTypeCapability.getKey.and.returnValue('something.else');
|
|
||||||
|
|
||||||
expect(policy.allow(mockEditAction, testContext)).toBe(false);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
it("allows the edit properties outside of the 'view-control' category", function () {
|
|
||||||
testViews = [nonEditableView];
|
|
||||||
testContext.category = "something-else";
|
|
||||||
expect(policy.allow(mockPropertiesAction, testContext)).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -1,79 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
|
||||||
* Administration. All rights reserved.
|
|
||||||
*
|
|
||||||
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
* License for the specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*
|
|
||||||
* Open MCT includes source code licensed under additional open source
|
|
||||||
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
||||||
* this source code distribution or the Licensing information page available
|
|
||||||
* at runtime from the About dialog for additional information.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
define(
|
|
||||||
["../../src/policies/EditableViewPolicy"],
|
|
||||||
function (EditableViewPolicy) {
|
|
||||||
|
|
||||||
describe("The editable view policy", function () {
|
|
||||||
var mockDomainObject,
|
|
||||||
testMode,
|
|
||||||
policy;
|
|
||||||
|
|
||||||
beforeEach(function () {
|
|
||||||
testMode = true; // Act as if we're in Edit mode by default
|
|
||||||
mockDomainObject = jasmine.createSpyObj(
|
|
||||||
'domainObject',
|
|
||||||
['hasCapability', 'getCapability']
|
|
||||||
);
|
|
||||||
mockDomainObject.getCapability.and.returnValue({
|
|
||||||
inEditContext: function () {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
mockDomainObject.hasCapability.and.callFake(function (c) {
|
|
||||||
return (c === 'editor') && testMode;
|
|
||||||
});
|
|
||||||
|
|
||||||
policy = new EditableViewPolicy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("disallows views in edit mode that are flagged as non-editable", function () {
|
|
||||||
expect(policy.allow({ editable: false }, mockDomainObject))
|
|
||||||
.toBeFalsy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows views in edit mode that are flagged as editable", function () {
|
|
||||||
expect(policy.allow({ editable: true }, mockDomainObject))
|
|
||||||
.toBeTruthy();
|
|
||||||
});
|
|
||||||
|
|
||||||
it("allows any view outside of edit mode", function () {
|
|
||||||
var testViews = [
|
|
||||||
{ editable: false },
|
|
||||||
{ editable: true },
|
|
||||||
{ someKey: "some value" }
|
|
||||||
];
|
|
||||||
testMode = false; // Act as if we're not in Edit mode
|
|
||||||
|
|
||||||
testViews.forEach(function (testView) {
|
|
||||||
expect(policy.allow(testView, mockDomainObject)).toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it("treats views with no defined 'editable' property as editable", function () {
|
|
||||||
expect(policy.allow({ someKey: "some value" }, mockDomainObject))
|
|
||||||
.toBeTruthy();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
@ -19,16 +19,14 @@
|
|||||||
this source code distribution or the Licensing information page available
|
this source code distribution or the Licensing information page available
|
||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div class="l-time-display l-digital l-clock s-clock" ng-controller="ClockController as clock">
|
<div class="c-clock l-time-display" ng-controller="ClockController as clock">
|
||||||
<div class="l-elem-wrapper">
|
<div class="c-clock__timezone">
|
||||||
<span class="l-elem timezone">
|
{{clock.zone()}}
|
||||||
{{clock.zone()}}
|
</div>
|
||||||
</span>
|
<div class="c-clock__value">
|
||||||
<span class="l-elem value active">
|
{{clock.text()}}
|
||||||
{{clock.text()}}
|
</div>
|
||||||
</span>
|
<div class="c-clock__ampm">
|
||||||
<span class="l-elem ampm">
|
{{clock.ampm()}}
|
||||||
{{clock.ampm()}}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,21 +19,19 @@
|
|||||||
this source code distribution or the Licensing information page available
|
this source code distribution or the Licensing information page available
|
||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div class="l-time-display l-digital l-timer s-timer s-state-{{timer.timerState}}" ng-controller="TimerController as timer">
|
<div class="c-timer is-{{timer.timerState}}" ng-controller="TimerController as timer">
|
||||||
<div class="l-elem-wrapper l-flex-row">
|
<div class="c-timer__controls">
|
||||||
<div class="l-elem-wrapper l-flex-row controls">
|
<button ng-click="timer.clickStopButton()"
|
||||||
<a ng-click="timer.clickStopButton()"
|
ng-hide="timer.timerState == 'stopped'"
|
||||||
title="Stop"
|
title="Reset"
|
||||||
class="flex-elem s-icon-button t-btn-stop icon-box"></a>
|
class="c-timer__ctrl-reset c-click-icon c-click-icon--major icon-reset"></button>
|
||||||
<a ng-click="timer.clickButton()"
|
<button ng-click="timer.clickButton()"
|
||||||
title="{{timer.buttonText()}}"
|
title="{{timer.buttonText()}}"
|
||||||
class="flex-elem s-icon-button t-btn-pauseplay {{timer.buttonCssClass()}}"></a>
|
class="c-timer__ctrl-pause-play c-click-icon c-click-icon--major {{timer.buttonCssClass()}}"></button>
|
||||||
</div>
|
</div>
|
||||||
<span class="flex-elem l-value {{timer.signClass()}}">
|
<div class="c-timer__direction {{timer.signClass()}}"
|
||||||
<span class="value"
|
ng-hide="!timer.signClass()"></div>
|
||||||
ng-class="{ active:timer.text() }">{{timer.text() || "--:--:--"}}
|
<div class="c-timer__value">{{timer.text() || "--:--:--"}}
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<span ng-controller="RefreshingController"></span>
|
|
||||||
</div>
|
</div>
|
||||||
|
<span class="c-timer__ng-controller u-contents" ng-controller="RefreshingController"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,6 +62,7 @@ define([
|
|||||||
//Don't trigger self
|
//Don't trigger self
|
||||||
this.eventEmitter.off('mutation', handleMutation);
|
this.eventEmitter.off('mutation', handleMutation);
|
||||||
this.eventEmitter.emit(newStyleObject.identifier.key + ":*", newStyleObject);
|
this.eventEmitter.emit(newStyleObject.identifier.key + ":*", newStyleObject);
|
||||||
|
this.eventEmitter.emit('mutation', newStyleObject);
|
||||||
this.eventEmitter.on('mutation', handleMutation);
|
this.eventEmitter.on('mutation', handleMutation);
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@ define([
|
|||||||
name: legacyView.name,
|
name: legacyView.name,
|
||||||
cssClass: legacyView.cssClass,
|
cssClass: legacyView.cssClass,
|
||||||
description: legacyView.description,
|
description: legacyView.description,
|
||||||
editable: legacyView.editable,
|
canEdit: function () {
|
||||||
|
return legacyView.editable === true;
|
||||||
|
},
|
||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
if (!domainObject || !domainObject.identifier) {
|
if (!domainObject || !domainObject.identifier) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -46,6 +46,7 @@ define([
|
|||||||
function DefaultCompositionProvider(publicAPI, compositionAPI) {
|
function DefaultCompositionProvider(publicAPI, compositionAPI) {
|
||||||
this.publicAPI = publicAPI;
|
this.publicAPI = publicAPI;
|
||||||
this.listeningTo = {};
|
this.listeningTo = {};
|
||||||
|
this.onMutation = this.onMutation.bind(this);
|
||||||
|
|
||||||
this.cannotContainDuplicates = this.cannotContainDuplicates.bind(this);
|
this.cannotContainDuplicates = this.cannotContainDuplicates.bind(this);
|
||||||
this.cannotContainItself = this.cannotContainItself.bind(this);
|
this.cannotContainItself = this.cannotContainItself.bind(this);
|
||||||
@ -208,9 +209,10 @@ define([
|
|||||||
if (this.topicListener) {
|
if (this.topicListener) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var topic = this.publicAPI.$injector.get('topic');
|
this.publicAPI.objects.eventEmitter.on('mutation', this.onMutation);
|
||||||
var mutation = topic('mutation');
|
this.topicListener = () => {
|
||||||
this.topicListener = mutation.listen(this.onMutation.bind(this));
|
this.publicAPI.objects.eventEmitter.off('mutation', this.onMutation)
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -220,7 +222,7 @@ define([
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
DefaultCompositionProvider.prototype.onMutation = function (oldDomainObject) {
|
DefaultCompositionProvider.prototype.onMutation = function (oldDomainObject) {
|
||||||
var id = oldDomainObject.getId();
|
var id = objectUtils.makeKeyString(oldDomainObject.identifier);
|
||||||
var listeners = this.listeningTo[id];
|
var listeners = this.listeningTo[id];
|
||||||
|
|
||||||
if (!listeners) {
|
if (!listeners) {
|
||||||
@ -228,7 +230,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
var oldComposition = listeners.composition.map(objectUtils.makeKeyString);
|
var oldComposition = listeners.composition.map(objectUtils.makeKeyString);
|
||||||
var newComposition = oldDomainObject.getModel().composition.map(objectUtils.makeKeyString);
|
var newComposition = oldDomainObject.composition.map(objectUtils.makeKeyString);
|
||||||
|
|
||||||
var added = _.difference(newComposition, oldComposition).map(objectUtils.parseKeyString);
|
var added = _.difference(newComposition, oldComposition).map(objectUtils.parseKeyString);
|
||||||
var removed = _.difference(oldComposition, newComposition).map(objectUtils.parseKeyString);
|
var removed = _.difference(oldComposition, newComposition).map(objectUtils.parseKeyString);
|
||||||
|
@ -83,18 +83,17 @@ define([
|
|||||||
this.object = newObject;
|
this.object = newObject;
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
|
//Emit wildcard event
|
||||||
|
this.eventEmitter.emit(qualifiedEventName(this.object, '*'), this.object);
|
||||||
|
//Emit a general "any object" event
|
||||||
|
this.eventEmitter.emit(ANY_OBJECT_EVENT, this.object);
|
||||||
|
|
||||||
this.eventEmitter.on(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
this.eventEmitter.on(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
||||||
|
|
||||||
//Emit event specific to property
|
//Emit event specific to property
|
||||||
this.eventEmitter.emit(qualifiedEventName(this.object, path), value);
|
this.eventEmitter.emit(qualifiedEventName(this.object, path), value);
|
||||||
|
|
||||||
this.eventEmitter.off(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
this.eventEmitter.off(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
||||||
|
|
||||||
//Emit wildcare event
|
|
||||||
this.eventEmitter.emit(qualifiedEventName(this.object, '*'), this.object);
|
|
||||||
|
|
||||||
//Emit a general "any object" event
|
|
||||||
this.eventEmitter.emit(ANY_OBJECT_EVENT, this.object);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return MutableObject;
|
return MutableObject;
|
||||||
|
67
src/plugins/LADTable/LADTableSetViewProvider.js
Normal file
67
src/plugins/LADTable/LADTableSetViewProvider.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
define([
|
||||||
|
'./components/LadTableSet.vue',
|
||||||
|
'vue'
|
||||||
|
], function (
|
||||||
|
LadTableSet,
|
||||||
|
Vue
|
||||||
|
) {
|
||||||
|
function LADTableSetViewProvider(openmct) {
|
||||||
|
return {
|
||||||
|
key: 'LadTableSet',
|
||||||
|
name: 'LAD Table Set',
|
||||||
|
cssClass: 'icon-tabular-lad-set',
|
||||||
|
canView: function (domainObject) {
|
||||||
|
return domainObject.type === 'LadTableSet';
|
||||||
|
},
|
||||||
|
view: function (domainObject) {
|
||||||
|
let component;
|
||||||
|
|
||||||
|
return {
|
||||||
|
show: function (element) {
|
||||||
|
component = new Vue({
|
||||||
|
components: {
|
||||||
|
LadTableSet: LadTableSet.default
|
||||||
|
},
|
||||||
|
provide: {
|
||||||
|
openmct,
|
||||||
|
domainObject
|
||||||
|
},
|
||||||
|
el: element,
|
||||||
|
template: '<lad-table-set></lad-table-set>'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
destroy: function (element) {
|
||||||
|
component.$destroy();
|
||||||
|
component = undefined;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
priority: function () {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return LADTableSetViewProvider;
|
||||||
|
});
|
67
src/plugins/LADTable/LADTableViewProvider.js
Normal file
67
src/plugins/LADTable/LADTableViewProvider.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
define([
|
||||||
|
'./components/LadTable.vue',
|
||||||
|
'vue'
|
||||||
|
], function (
|
||||||
|
LadTableComponent,
|
||||||
|
Vue
|
||||||
|
) {
|
||||||
|
function LADTableViewProvider(openmct) {
|
||||||
|
return {
|
||||||
|
key: 'LadTable',
|
||||||
|
name: 'LAD Table',
|
||||||
|
cssClass: 'icon-tabular-lad',
|
||||||
|
canView: function (domainObject) {
|
||||||
|
return domainObject.type === 'LadTable';
|
||||||
|
},
|
||||||
|
view: function (domainObject) {
|
||||||
|
let component;
|
||||||
|
|
||||||
|
return {
|
||||||
|
show: function (element) {
|
||||||
|
component = new Vue({
|
||||||
|
components: {
|
||||||
|
LadTableComponent: LadTableComponent.default
|
||||||
|
},
|
||||||
|
provide: {
|
||||||
|
openmct,
|
||||||
|
domainObject
|
||||||
|
},
|
||||||
|
el: element,
|
||||||
|
template: '<lad-table-component></lad-table-component>'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
destroy: function (element) {
|
||||||
|
component.$destroy();
|
||||||
|
component = undefined;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
priority: function () {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return LADTableViewProvider;
|
||||||
|
});
|
120
src/plugins/LADTable/components/LADRow.vue
Normal file
120
src/plugins/LADTable/components/LADRow.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<tr>
|
||||||
|
<td>{{name}}</td>
|
||||||
|
<td>{{timestamp}}</td>
|
||||||
|
<td :class="valueClass">
|
||||||
|
{{value}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
inject: ['openmct'],
|
||||||
|
props: ['domainObject'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
name: this.domainObject.name,
|
||||||
|
timestamp: '---',
|
||||||
|
value: '---',
|
||||||
|
valueClass: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
updateValues(datum) {
|
||||||
|
this.timestamp = this.formats[this.timestampKey].format(datum);
|
||||||
|
this.value = this.formats[this.valueKey].format(datum);
|
||||||
|
|
||||||
|
var limit = this.limitEvaluator.evaluate(datum, this.valueMetadata);
|
||||||
|
|
||||||
|
if (limit) {
|
||||||
|
this.valueClass = limit.cssClass;
|
||||||
|
} else {
|
||||||
|
this.valueClass = '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
updateName(name){
|
||||||
|
this.name = name;
|
||||||
|
},
|
||||||
|
updateTimeSystem(timeSystem) {
|
||||||
|
this.value = '---';
|
||||||
|
this.timestamp = '---';
|
||||||
|
this.valueClass = '';
|
||||||
|
this.timestampKey = timeSystem.key;
|
||||||
|
|
||||||
|
this.openmct
|
||||||
|
.telemetry
|
||||||
|
.request(this.domainObject, {strategy: 'latest'})
|
||||||
|
.then((array) => this.updateValues(array[array.length - 1]));
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.metadata = this.openmct.telemetry.getMetadata(this.domainObject);
|
||||||
|
this.formats = this.openmct.telemetry.getFormatMap(this.metadata);
|
||||||
|
|
||||||
|
this.limitEvaluator = openmct
|
||||||
|
.telemetry
|
||||||
|
.limitEvaluator(this.domainObject);
|
||||||
|
|
||||||
|
this.stopWatchingMutation = openmct
|
||||||
|
.objects
|
||||||
|
.observe(
|
||||||
|
this.domainObject,
|
||||||
|
'*',
|
||||||
|
this.updateName
|
||||||
|
);
|
||||||
|
|
||||||
|
this.openmct.time.on('timeSystem', this.updateTimeSystem);
|
||||||
|
|
||||||
|
this.timestampKey = this.openmct.time.timeSystem().key;
|
||||||
|
|
||||||
|
this.valueMetadata = this
|
||||||
|
.metadata
|
||||||
|
.valuesForHints(['range'])[0];
|
||||||
|
|
||||||
|
this.valueKey = this.valueMetadata.key
|
||||||
|
|
||||||
|
this.unsubscribe = this.openmct
|
||||||
|
.telemetry
|
||||||
|
.subscribe(this.domainObject, this.updateValues);
|
||||||
|
|
||||||
|
this.openmct
|
||||||
|
.telemetry
|
||||||
|
.request(this.domainObject, {strategy: 'latest'})
|
||||||
|
.then((array) => this.updateValues(array[array.length - 1]));
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
this.stopWatchingMutation();
|
||||||
|
this.unsubscribe();
|
||||||
|
this.openmct.off('timeSystem', this.updateTimeSystem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
82
src/plugins/LADTable/components/LADTable.vue
Normal file
82
src/plugins/LADTable/components/LADTable.vue
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<table class="c-table c-lad-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Timestamp</th>
|
||||||
|
<th>Value</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<lad-row
|
||||||
|
v-for="item in items"
|
||||||
|
:key="item.key"
|
||||||
|
:domainObject="item.domainObject">
|
||||||
|
</lad-row>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import lodash from 'lodash';
|
||||||
|
import LadRow from './LadRow.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
inject: ['openmct', 'domainObject'],
|
||||||
|
components: {
|
||||||
|
LadRow
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
items: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addItem(domainObject) {
|
||||||
|
let item = {};
|
||||||
|
item.domainObject = domainObject;
|
||||||
|
item.key = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||||
|
|
||||||
|
this.items.push(item);
|
||||||
|
},
|
||||||
|
removeItem(identifier) {
|
||||||
|
let index = _.findIndex(this.items, (item) => this.openmct.objects.makeKeyString(identifier) === item.key);
|
||||||
|
|
||||||
|
this.items.splice(index, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.composition = this.openmct.composition.get(this.domainObject);
|
||||||
|
this.composition.on('add', this.addItem);
|
||||||
|
this.composition.on('remove', this.removeItem);
|
||||||
|
this.composition.load();
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
this.composition.off('add', this.addItem);
|
||||||
|
this.composition.off('remove', this.removeItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
135
src/plugins/LADTable/components/LadTableSet.vue
Normal file
135
src/plugins/LADTable/components/LadTableSet.vue
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<table class="c-table c-lad-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Timestamp</th>
|
||||||
|
<th>Value</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<template
|
||||||
|
v-for="primary in primaryTelemetryObjects">
|
||||||
|
<tr class="c-table__group-header"
|
||||||
|
:key="primary.key">
|
||||||
|
<td colspan="10">{{primary.domainObject.name}}</td>
|
||||||
|
</tr>
|
||||||
|
<lad-row
|
||||||
|
v-for="secondary in secondaryTelemetryObjects[primary.key]"
|
||||||
|
:key="secondary.key"
|
||||||
|
:domainObject="secondary.domainObject">
|
||||||
|
</lad-row>
|
||||||
|
</template>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import lodash from 'lodash';
|
||||||
|
import LadRow from './LadRow.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
inject: ['openmct', 'domainObject'],
|
||||||
|
components: {
|
||||||
|
LadRow
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
primaryTelemetryObjects: [],
|
||||||
|
secondaryTelemetryObjects: {},
|
||||||
|
compositions: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
addPrimary(domainObject) {
|
||||||
|
let primary = {};
|
||||||
|
primary.domainObject = domainObject;
|
||||||
|
primary.key = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||||
|
|
||||||
|
this.$set(this.secondaryTelemetryObjects, primary.key, []);
|
||||||
|
this.primaryTelemetryObjects.push(primary);
|
||||||
|
|
||||||
|
let composition = openmct.composition.get(primary.domainObject),
|
||||||
|
addCallback = this.addSecondary(primary),
|
||||||
|
removeCallback = this.removeSecondary(primary);
|
||||||
|
|
||||||
|
composition.on('add', addCallback);
|
||||||
|
composition.on('remove', removeCallback);
|
||||||
|
composition.load();
|
||||||
|
|
||||||
|
this.compositions.push({composition, addCallback, removeCallback});
|
||||||
|
},
|
||||||
|
removePrimary(identifier) {
|
||||||
|
let index = _.findIndex(this.primaryTelemetryObjects, (primary) => this.openmct.objects.makeKeyString(identifier) === primary.key),
|
||||||
|
primary = this.primaryTelemetryObjects[index];
|
||||||
|
|
||||||
|
this.$set(this.secondaryTelemetryObjects, primary.key, undefined);
|
||||||
|
this.primaryTelemetryObjects.splice(index,1);
|
||||||
|
primary = undefined;
|
||||||
|
},
|
||||||
|
addSecondary(primary) {
|
||||||
|
return (domainObject) => {
|
||||||
|
let secondary = {};
|
||||||
|
secondary.key = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||||
|
secondary.domainObject = domainObject;
|
||||||
|
|
||||||
|
let array = this.secondaryTelemetryObjects[primary.key];
|
||||||
|
array.push(secondary);
|
||||||
|
|
||||||
|
this.$set(this.secondaryTelemetryObjects, primary.key, array);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeSecondary(primary) {
|
||||||
|
return (identifier) => {
|
||||||
|
let array = this.secondaryTelemetryObjects[primary.key],
|
||||||
|
index = _.findIndex(array, (secondary) => this.openmct.objects.makeKeyString(identifier) === secondary.key);
|
||||||
|
|
||||||
|
array.splice(index, 1);
|
||||||
|
|
||||||
|
this.$set(this.secondaryTelemetryObjects, primary.key, array);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.composition = this.openmct.composition.get(this.domainObject);
|
||||||
|
this.composition.on('add', this.addPrimary);
|
||||||
|
this.composition.on('remove', this.removePrimary);
|
||||||
|
this.composition.load();
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
this.composition.off('add', this.addPrimary);
|
||||||
|
this.composition.off('remove', this.removePrimary);
|
||||||
|
this.compositions.forEach(c => {
|
||||||
|
c.composition.off('add', c.addCallback);
|
||||||
|
c.composition.off('remove', c.removeCallback);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
56
src/plugins/LADTable/plugin.js
Normal file
56
src/plugins/LADTable/plugin.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
define([
|
||||||
|
'./LADTableViewProvider',
|
||||||
|
'./LADTableSetViewProvider'
|
||||||
|
], function (
|
||||||
|
LADTableViewProvider,
|
||||||
|
LADTableSetViewProvider
|
||||||
|
) {
|
||||||
|
return function plugin() {
|
||||||
|
return function install(openmct) {
|
||||||
|
openmct.objectViews.addProvider(new LADTableViewProvider(openmct));
|
||||||
|
openmct.objectViews.addProvider(new LADTableSetViewProvider(openmct));
|
||||||
|
|
||||||
|
openmct.types.addType('LadTable', {
|
||||||
|
name: "LAD Table",
|
||||||
|
creatable: true,
|
||||||
|
description: "A Latest Available Data tabular view in which each row displays the values for one or more contained telemetry objects.",
|
||||||
|
cssClass: 'icon-tabular-lad',
|
||||||
|
initialize(domainObject) {
|
||||||
|
domainObject.composition = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
openmct.types.addType('LadTableSet', {
|
||||||
|
name: "LAD Table Set",
|
||||||
|
creatable: true,
|
||||||
|
description: "A Latest Available Data tabular view in which each row displays the values for one or more contained telemetry objects.",
|
||||||
|
cssClass: 'icon-tabular-lad-set',
|
||||||
|
initialize(domainObject) {
|
||||||
|
domainObject.composition = [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
});
|
@ -125,11 +125,41 @@ define([], function () {
|
|||||||
let separator = {
|
let separator = {
|
||||||
control: "separator"
|
control: "separator"
|
||||||
};
|
};
|
||||||
|
let remove = {
|
||||||
|
control: "button",
|
||||||
|
domainObject: selectedParent,
|
||||||
|
icon: "icon-trash",
|
||||||
|
title: "Delete the selected object",
|
||||||
|
method: function () {
|
||||||
|
let removeItem = selection[1].context.removeItem;
|
||||||
|
let prompt = openmct.overlays.dialog({
|
||||||
|
iconClass: 'alert',
|
||||||
|
message: `Warning! This action will remove this item from the Display Layout. Do you want to continue?`,
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Ok',
|
||||||
|
emphasis: 'true',
|
||||||
|
callback: function () {
|
||||||
|
removeItem(layoutItem, layoutItemIndex);
|
||||||
|
prompt.dismiss();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Cancel',
|
||||||
|
callback: function () {
|
||||||
|
prompt.dismiss();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
if (layoutItem.type === 'subobject-view') {
|
if (layoutItem.type === 'subobject-view') {
|
||||||
if (toolbar.length > 0) {
|
if (toolbar.length > 0) {
|
||||||
toolbar.push(separator);
|
toolbar.push(separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.push({
|
toolbar.push({
|
||||||
control: "toggle-button",
|
control: "toggle-button",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
@ -147,6 +177,8 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
toolbar.push(separator);
|
||||||
|
toolbar.push(remove);
|
||||||
} else {
|
} else {
|
||||||
const TEXT_SIZE = [9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96];
|
const TEXT_SIZE = [9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96];
|
||||||
let fill = {
|
let fill = {
|
||||||
@ -263,7 +295,9 @@ define([], function () {
|
|||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
height,
|
height,
|
||||||
width
|
width,
|
||||||
|
separator,
|
||||||
|
remove
|
||||||
];
|
];
|
||||||
} else if (layoutItem.type === 'text-view' ) {
|
} else if (layoutItem.type === 'text-view' ) {
|
||||||
let text = {
|
let text = {
|
||||||
@ -286,7 +320,9 @@ define([], function () {
|
|||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
separator,
|
separator,
|
||||||
text
|
text,
|
||||||
|
separator,
|
||||||
|
remove
|
||||||
];
|
];
|
||||||
} else if (layoutItem.type === 'box-view') {
|
} else if (layoutItem.type === 'box-view') {
|
||||||
toolbar = [
|
toolbar = [
|
||||||
@ -296,7 +332,9 @@ define([], function () {
|
|||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
height,
|
height,
|
||||||
width
|
width,
|
||||||
|
separator,
|
||||||
|
remove
|
||||||
];
|
];
|
||||||
} else if (layoutItem.type === 'image-view') {
|
} else if (layoutItem.type === 'image-view') {
|
||||||
let url = {
|
let url = {
|
||||||
@ -315,7 +353,9 @@ define([], function () {
|
|||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
separator,
|
separator,
|
||||||
url
|
url,
|
||||||
|
separator,
|
||||||
|
remove
|
||||||
];
|
];
|
||||||
} else if (layoutItem.type === 'line-view') {
|
} else if (layoutItem.type === 'line-view') {
|
||||||
let x2 = {
|
let x2 = {
|
||||||
@ -340,7 +380,9 @@ define([], function () {
|
|||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
x2,
|
x2,
|
||||||
y2
|
y2,
|
||||||
|
separator,
|
||||||
|
remove
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,16 +75,22 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
index(newIndex) {
|
||||||
|
if (!this.context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.index = newIndex;
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let context = {
|
this.context = {
|
||||||
layoutItem: this.item,
|
layoutItem: this.item,
|
||||||
index: this.index
|
index: this.index
|
||||||
};
|
};
|
||||||
this.removeSelectable = this.openmct.selection.selectable(
|
this.removeSelectable = this.openmct.selection.selectable(
|
||||||
this.$el,
|
this.$el, this.context, this.initSelect);
|
||||||
context,
|
|
||||||
this.initSelect
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
if (this.removeSelectable) {
|
if (this.removeSelectable) {
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
<component v-for="(item, index) in layoutItems"
|
<component v-for="(item, index) in layoutItems"
|
||||||
:is="item.type"
|
:is="item.type"
|
||||||
:item="item"
|
:item="item"
|
||||||
|
:key="item.id"
|
||||||
:gridSize="gridSize"
|
:gridSize="gridSize"
|
||||||
:initSelect="initSelectIndex === index"
|
:initSelect="initSelectIndex === index"
|
||||||
:index="index"
|
:index="index"
|
||||||
@ -76,7 +77,7 @@
|
|||||||
.l-shell__main-container {
|
.l-shell__main-container {
|
||||||
> .l-layout {
|
> .l-layout {
|
||||||
[s-selected] {
|
[s-selected] {
|
||||||
border: $browseBorderSelected;
|
border: $browseSelectedBorder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,6 +227,7 @@
|
|||||||
addItem(itemType, ...options) {
|
addItem(itemType, ...options) {
|
||||||
let item = getItemDefinition(itemType, this.openmct, this.gridSize, ...options);
|
let item = getItemDefinition(itemType, this.openmct, this.gridSize, ...options);
|
||||||
item.type = itemType;
|
item.type = itemType;
|
||||||
|
item.id = uuid();
|
||||||
this.trackItem(item);
|
this.trackItem(item);
|
||||||
this.layoutItems.push(item);
|
this.layoutItems.push(item);
|
||||||
this.openmct.objects.mutate(this.internalDomainObject, "configuration.items", this.layoutItems);
|
this.openmct.objects.mutate(this.internalDomainObject, "configuration.items", this.layoutItems);
|
||||||
@ -233,11 +235,46 @@
|
|||||||
},
|
},
|
||||||
trackItem(item) {
|
trackItem(item) {
|
||||||
if (item.type === "telemetry-view") {
|
if (item.type === "telemetry-view") {
|
||||||
this.telemetryViewMap[this.openmct.objects.makeKeyString(item.identifier)] = true;
|
let keyString = this.openmct.objects.makeKeyString(item.identifier);
|
||||||
|
let count = this.telemetryViewMap[keyString] || 0;
|
||||||
|
this.telemetryViewMap[keyString] = ++count;
|
||||||
} else if (item.type === "subobject-view") {
|
} else if (item.type === "subobject-view") {
|
||||||
this.objectViewMap[this.openmct.objects.makeKeyString(item.identifier)] = true;
|
this.objectViewMap[this.openmct.objects.makeKeyString(item.identifier)] = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
removeItem(item, index) {
|
||||||
|
this.initSelectIndex = -1;
|
||||||
|
this.layoutItems.splice(index, 1);
|
||||||
|
this.mutate("configuration.items", this.layoutItems);
|
||||||
|
this.untrackItem(item);
|
||||||
|
this.$el.click();
|
||||||
|
},
|
||||||
|
untrackItem(item) {
|
||||||
|
if (!item.identifier) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let keyString = this.openmct.objects.makeKeyString(item.identifier);
|
||||||
|
|
||||||
|
if (item.type === 'telemetry-view') {
|
||||||
|
let count = --this.telemetryViewMap[keyString];
|
||||||
|
|
||||||
|
if (count === 0) {
|
||||||
|
delete this.telemetryViewMap[keyString];
|
||||||
|
this.removeFromComposition(keyString);
|
||||||
|
}
|
||||||
|
} else if (item.type === 'subobject-view') {
|
||||||
|
delete this.objectViewMap[keyString];
|
||||||
|
this.removeFromComposition(keyString);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeFromComposition(keyString) {
|
||||||
|
let composition = _.get(this.internalDomainObject, 'composition');
|
||||||
|
composition = composition.filter(identifier => {
|
||||||
|
return this.openmct.objects.makeKeyString(identifier) !== keyString;
|
||||||
|
});
|
||||||
|
this.mutate("composition", composition);
|
||||||
|
},
|
||||||
initializeItems() {
|
initializeItems() {
|
||||||
this.telemetryViewMap = {};
|
this.telemetryViewMap = {};
|
||||||
this.objectViewMap = {};
|
this.objectViewMap = {};
|
||||||
@ -254,7 +291,26 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeChild(identifier) {
|
removeChild(identifier) {
|
||||||
// TODO: implement
|
let keyString = this.openmct.objects.makeKeyString(identifier);
|
||||||
|
|
||||||
|
if (this.objectViewMap[keyString]) {
|
||||||
|
delete this.objectViewMap[keyString];
|
||||||
|
this.removeFromConfiguration(keyString);
|
||||||
|
} else if (this.telemetryViewMap[keyString]) {
|
||||||
|
delete this.telemetryViewMap[keyString];
|
||||||
|
this.removeFromConfiguration(keyString);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
removeFromConfiguration(keyString) {
|
||||||
|
let layoutItems = this.layoutItems.filter(item => {
|
||||||
|
if (!item.identifier) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return this.openmct.objects.makeKeyString(item.identifier) !== keyString;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.mutate("configuration.items", layoutItems);
|
||||||
|
this.$el.click();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -77,13 +77,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
index(newIndex) {
|
||||||
|
if (!this.context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.index = newIndex;
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let context = {
|
this.context = {
|
||||||
layoutItem: this.item,
|
layoutItem: this.item,
|
||||||
index: this.index
|
index: this.index
|
||||||
};
|
};
|
||||||
this.removeSelectable = this.openmct.selection.selectable(
|
this.removeSelectable = this.openmct.selection.selectable(
|
||||||
this.$el, context, this.initSelect);
|
this.$el, this.context, this.initSelect);
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
if (this.removeSelectable) {
|
if (this.removeSelectable) {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="l-layout__frame c-frame has-local-controls"
|
<div class="l-layout__frame c-frame"
|
||||||
:class="{
|
:class="{
|
||||||
'no-frame': !item.hasFrame,
|
'no-frame': !item.hasFrame,
|
||||||
'u-inspectable': inspectable,
|
'u-inspectable': inspectable,
|
||||||
|
@ -21,10 +21,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="l-layout__frame c-frame has-local-controls no-frame"
|
<div class="l-layout__frame c-frame no-frame"
|
||||||
:style="style">
|
:style="style">
|
||||||
<svg width="100%"
|
<svg width="100%" height="100%">
|
||||||
height="100%">
|
|
||||||
<line v-bind="linePosition"
|
<line v-bind="linePosition"
|
||||||
:stroke="item.stroke"
|
:stroke="item.stroke"
|
||||||
stroke-width="2">
|
stroke-width="2">
|
||||||
@ -101,9 +100,6 @@
|
|||||||
top: `${top}px`,
|
top: `${top}px`,
|
||||||
width: `${width}px`,
|
width: `${width}px`,
|
||||||
height: `${height}px`,
|
height: `${height}px`,
|
||||||
minWidth: `${width}px`,
|
|
||||||
minHeight: `${height}px`,
|
|
||||||
position: 'absolute'
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
startHandleClass() {
|
startHandleClass() {
|
||||||
@ -210,17 +206,22 @@
|
|||||||
return dragPosition;
|
return dragPosition;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
index(newIndex) {
|
||||||
|
if (!this.context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.index = newIndex;
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let context = {
|
this.context = {
|
||||||
layoutItem: this.item,
|
layoutItem: this.item,
|
||||||
index: this.index
|
index: this.index
|
||||||
};
|
};
|
||||||
|
|
||||||
this.removeSelectable = this.openmct.selection.selectable(
|
this.removeSelectable = this.openmct.selection.selectable(
|
||||||
this.$el,
|
this.$el, this.context, this.initSelect);
|
||||||
context,
|
|
||||||
this.initSelect
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
if (this.removeSelectable) {
|
if (this.removeSelectable) {
|
||||||
|
@ -85,21 +85,29 @@
|
|||||||
ObjectFrame,
|
ObjectFrame,
|
||||||
LayoutFrame
|
LayoutFrame
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
index(newIndex) {
|
||||||
|
if (!this.context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.index = newIndex;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setObject(domainObject) {
|
setObject(domainObject) {
|
||||||
this.domainObject = domainObject;
|
this.domainObject = domainObject;
|
||||||
this.objectPath = [this.domainObject].concat(this.openmct.router.path);
|
this.objectPath = [this.domainObject].concat(this.openmct.router.path);
|
||||||
let context = {
|
this.context = {
|
||||||
item: domainObject,
|
item: domainObject,
|
||||||
layoutItem: this.item,
|
layoutItem: this.item,
|
||||||
index: this.index
|
index: this.index
|
||||||
};
|
};
|
||||||
this.removeSelectable = this.openmct.selection.selectable(
|
this.removeSelectable = this.openmct.selection.selectable(
|
||||||
this.$el, context, this.initSelect);
|
this.$el, this.context, this.initSelect);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.item);
|
|
||||||
this.openmct.objects.get(this.item.identifier)
|
this.openmct.objects.get(this.item.identifier)
|
||||||
.then(this.setObject);
|
.then(this.setObject);
|
||||||
},
|
},
|
||||||
|
@ -160,6 +160,15 @@
|
|||||||
domainObject: undefined
|
domainObject: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
index(newIndex) {
|
||||||
|
if (!this.context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.index = newIndex;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
requestHistoricalData() {
|
requestHistoricalData() {
|
||||||
let bounds = this.openmct.time.bounds();
|
let bounds = this.openmct.time.bounds();
|
||||||
@ -205,13 +214,13 @@
|
|||||||
this.requestHistoricalData();
|
this.requestHistoricalData();
|
||||||
this.subscribeToObject();
|
this.subscribeToObject();
|
||||||
|
|
||||||
let context = {
|
this.context = {
|
||||||
item: domainObject,
|
item: domainObject,
|
||||||
layoutItem: this.item,
|
layoutItem: this.item,
|
||||||
index: this.index
|
index: this.index
|
||||||
};
|
};
|
||||||
this.removeSelectable = this.openmct.selection.selectable(
|
this.removeSelectable = this.openmct.selection.selectable(
|
||||||
this.$el, context, this.initSelect);
|
this.$el, this.context, this.initSelect);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -82,13 +82,22 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
index(newIndex) {
|
||||||
|
if (!this.context) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.index = newIndex;
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
let context = {
|
this.context = {
|
||||||
layoutItem: this.item,
|
layoutItem: this.item,
|
||||||
index: this.index
|
index: this.index
|
||||||
};
|
};
|
||||||
this.removeSelectable = this.openmct.selection.selectable(
|
this.removeSelectable = this.openmct.selection.selectable(
|
||||||
this.$el, context, this.initSelect);
|
this.$el, this.context, this.initSelect);
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
if (this.removeSelectable) {
|
if (this.removeSelectable) {
|
||||||
|
@ -33,6 +33,9 @@ export default function () {
|
|||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
return domainObject.type === 'layout';
|
return domainObject.type === 'layout';
|
||||||
},
|
},
|
||||||
|
canEdit: function (domainObject) {
|
||||||
|
return domainObject.type === 'layout';
|
||||||
|
},
|
||||||
view: function (domainObject) {
|
view: function (domainObject) {
|
||||||
let component;
|
let component;
|
||||||
return {
|
return {
|
||||||
@ -57,7 +60,8 @@ export default function () {
|
|||||||
getSelectionContext() {
|
getSelectionContext() {
|
||||||
return {
|
return {
|
||||||
item: domainObject,
|
item: domainObject,
|
||||||
addElement: component && component.$refs.displayLayout.addElement
|
addElement: component && component.$refs.displayLayout.addElement,
|
||||||
|
removeItem: component && component.$refs.displayLayout.removeItem
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
|
@ -35,6 +35,9 @@ define([
|
|||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
return domainObject.type === 'flexible-layout';
|
return domainObject.type === 'flexible-layout';
|
||||||
},
|
},
|
||||||
|
canEdit: function (domainObject) {
|
||||||
|
return domainObject.type === 'flexible-layout';
|
||||||
|
},
|
||||||
view: function (domainObject) {
|
view: function (domainObject) {
|
||||||
let component;
|
let component;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ define([
|
|||||||
function FolderGridView(openmct) {
|
function FolderGridView(openmct) {
|
||||||
return {
|
return {
|
||||||
key: 'grid',
|
key: 'grid',
|
||||||
name: 'Grid Vue',
|
name: 'Grid View',
|
||||||
cssClass: 'icon-thumbs-strip',
|
cssClass: 'icon-thumbs-strip',
|
||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
return domainObject.type === 'folder';
|
return domainObject.type === 'folder';
|
||||||
|
@ -32,7 +32,7 @@ define([
|
|||||||
function FolderListView(openmct) {
|
function FolderListView(openmct) {
|
||||||
return {
|
return {
|
||||||
key: 'list-view',
|
key: 'list-view',
|
||||||
name: 'List Vue',
|
name: 'List View',
|
||||||
cssClass: 'icon-list-view',
|
cssClass: 'icon-list-view',
|
||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
return domainObject.type === 'folder';
|
return domainObject.type === 'folder';
|
||||||
|
@ -42,7 +42,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<list-item v-for="(item,index) in sortedItems"
|
<list-item v-for="item in sortedItems"
|
||||||
|
:key="item.objectKeyString"
|
||||||
:item="item"
|
:item="item"
|
||||||
:object-path="item.objectPath">
|
:object-path="item.objectPath">
|
||||||
</list-item>
|
</list-item>
|
||||||
@ -99,9 +100,20 @@ export default {
|
|||||||
mixins: [compositionLoader],
|
mixins: [compositionLoader],
|
||||||
inject: ['domainObject', 'openmct'],
|
inject: ['domainObject', 'openmct'],
|
||||||
data() {
|
data() {
|
||||||
|
let sortBy = 'model.name',
|
||||||
|
ascending = true,
|
||||||
|
persistedSortOrder = window.localStorage.getItem('openmct-listview-sort-order');
|
||||||
|
|
||||||
|
if (persistedSortOrder) {
|
||||||
|
let parsed = JSON.parse(persistedSortOrder);
|
||||||
|
|
||||||
|
sortBy = parsed.sortBy;
|
||||||
|
ascending = parsed.ascending;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sortBy: 'model.name',
|
sortBy,
|
||||||
ascending: true
|
ascending
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -121,6 +133,17 @@ export default {
|
|||||||
this.sortBy = field;
|
this.sortBy = field;
|
||||||
this.ascending = defaultDirection;
|
this.ascending = defaultDirection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.localStorage
|
||||||
|
.setItem(
|
||||||
|
'openmct-listview-sort-order',
|
||||||
|
JSON.stringify(
|
||||||
|
{
|
||||||
|
sortBy: this.sortBy,
|
||||||
|
ascending: this.ascending
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,8 @@ export default {
|
|||||||
model: child,
|
model: child,
|
||||||
type: type.definition,
|
type: type.definition,
|
||||||
isAlias: this.domainObject.identifier.key !== child.location,
|
isAlias: this.domainObject.identifier.key !== child.location,
|
||||||
objectPath: [child].concat(openmct.router.path)
|
objectPath: [child].concat(this.openmct.router.path),
|
||||||
|
objectKeyString: this.openmct.objects.makeKeyString(child.identifier)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
remove(identifier) {
|
remove(identifier) {
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="c-ne__local-controls--hidden">
|
<div class="c-ne__local-controls--hidden">
|
||||||
<button class="c-click-icon icon-trash"
|
<button class="c-click-icon c-click-icon--major icon-trash"
|
||||||
title="Delete this entry"
|
title="Delete this entry"
|
||||||
v-on:click="deleteEntry"></button>
|
v-on:click="deleteEntry"></button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div class="gl-plot plot-legend-{{legend.get('position')}} {{legend.get('expanded')? 'plot-legend-expanded' : 'plot-legend-collapsed'}}">
|
<div class="gl-plot plot-legend-{{legend.get('position')}} {{legend.get('expanded')? 'plot-legend-expanded' : 'plot-legend-collapsed'}}">
|
||||||
<div class="gl-plot-legend flex-elem l-flex-row"
|
<div class="gl-plot-legend"
|
||||||
ng-class="{ 'hover-on-plot': !!highlights.length }"
|
ng-class="{ 'hover-on-plot': !!highlights.length }"
|
||||||
ng-show="legend.get('position') !== 'hidden'">
|
ng-show="legend.get('position') !== 'hidden'">
|
||||||
<span class="view-control flex-elem"
|
<div class="gl-plot-legend__view-control c-disclosure-triangle is-enabled"
|
||||||
ng-class="{ expanded: legend.get('expanded') }"
|
ng-class="{ 'c-disclosure-triangle--expanded': legend.get('expanded') }"
|
||||||
ng-click="legend.set('expanded', !legend.get('expanded'));">
|
ng-click="legend.set('expanded', !legend.get('expanded'));">
|
||||||
</span>
|
</div>
|
||||||
|
|
||||||
<!-- COLLAPSED PLOT LEGEND -->
|
<!-- COLLAPSED PLOT LEGEND -->
|
||||||
<div class="plot-wrapper-collapsed-legend">
|
<div class="plot-wrapper-collapsed-legend">
|
||||||
@ -52,7 +52,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- EXPANDED PLOT LEGEND -->
|
<!-- EXPANDED PLOT LEGEND -->
|
||||||
<div class="plot-wrapper-expanded-legend flex-elem grows">
|
<div class="plot-wrapper-expanded-legend">
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -133,7 +133,9 @@
|
|||||||
ng-style="{
|
ng-style="{
|
||||||
left: (tickWidth + 30) + 'px'
|
left: (tickWidth + 30) + 'px'
|
||||||
}">
|
}">
|
||||||
<span class="t-object-alert t-alert-unsynced" title="This plot is not currently displaying the latest data. Reset Pan/zoom to return to view latest data."></span>
|
<span class="t-object-alert t-alert-unsynced"
|
||||||
|
title="This plot is not currently displaying the latest data.
|
||||||
|
Reset Pan/zoom to return to view latest data."></span>
|
||||||
<div class="gl-plot-display-area">
|
<div class="gl-plot-display-area">
|
||||||
<mct-ticks axis="xAxis">
|
<mct-ticks axis="xAxis">
|
||||||
<div class="gl-plot-hash hash-v"
|
<div class="gl-plot-hash hash-v"
|
||||||
|
@ -20,20 +20,20 @@
|
|||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div ng-controller="PlotOptionsController">
|
<div ng-controller="PlotOptionsController">
|
||||||
<ul class="tree">
|
<ul class="tree c-tree">
|
||||||
<h2 title="Plot series display properties in this object">Plot Series</h2>
|
<h2 title="Plot series display properties in this object">Plot Series</h2>
|
||||||
<li ng-repeat="series in config.series.models">
|
<li ng-repeat="series in config.series.models">
|
||||||
<span class="tree-item menus-to-left">
|
<div class="c-tree__item menus-to-left">
|
||||||
<span class='ui-symbol view-control flex-elem'
|
<span class='c-disclosure-triangle is-enabled flex-elem'
|
||||||
ng-class="{ expanded: series.expanded }"
|
ng-class="{ 'c-disclosure-triangle--expanded': series.expanded }"
|
||||||
ng-click="series.expanded = !series.expanded">
|
ng-click="series.expanded = !series.expanded">
|
||||||
</span>
|
</span>
|
||||||
<mct-representation
|
<mct-representation
|
||||||
class="rep-object-label"
|
class="rep-object-label c-tree__item__label"
|
||||||
key="'label'"
|
key="'label'"
|
||||||
mct-object="series.oldObject">
|
mct-object="series.oldObject">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
</span>
|
</div>
|
||||||
<ul class="grid-properties" ng-show="series.expanded">
|
<ul class="grid-properties" ng-show="series.expanded">
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
@ -70,17 +70,9 @@
|
|||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="The plot line and marker color for this series.">Color</div>
|
title="The plot line and marker color for this series.">Color</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<!-- TODO: get this into a class -->
|
<span class="c-color-swatch"
|
||||||
<span class="color-swatch"
|
|
||||||
ng-style="{
|
ng-style="{
|
||||||
'background': series.get('color').asHexString(),
|
'background': series.get('color').asHexString()
|
||||||
'display': 'inline-block',
|
|
||||||
'border': '1px solid rgba(255, 255, 255, 0.2)',
|
|
||||||
'height': '10px',
|
|
||||||
'width': '10px',
|
|
||||||
'vertical-align': 'middle',
|
|
||||||
'margin-left': '3px',
|
|
||||||
'margin-top': -'2px'
|
|
||||||
}">
|
}">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -20,21 +20,21 @@
|
|||||||
at runtime from the About dialog for additional information.
|
at runtime from the About dialog for additional information.
|
||||||
-->
|
-->
|
||||||
<div ng-controller="PlotOptionsController">
|
<div ng-controller="PlotOptionsController">
|
||||||
<ul class="tree l-inspector-part">
|
<ul class="tree c-tree">
|
||||||
<h2 title="Display properties for this object">Plot Series Options</h2>
|
<h2 title="Display properties for this object">Plot Series</h2>
|
||||||
<li ng-repeat="series in plotSeries"
|
<li ng-repeat="series in plotSeries"
|
||||||
ng-controller="PlotSeriesFormController"
|
ng-controller="PlotSeriesFormController"
|
||||||
form-model="series">
|
form-model="series">
|
||||||
<span class="tree-item menus-to-left">
|
<div class="c-tree__item menus-to-left">
|
||||||
<span class='ui-symbol view-control flex-elem'
|
<span class='c-disclosure-triangle is-enabled flex-elem'
|
||||||
ng-class="{ expanded: expanded }"
|
ng-class="{ 'c-disclosure-triangle--expanded': expanded }"
|
||||||
ng-click="expanded = !expanded">
|
ng-click="expanded = !expanded">
|
||||||
</span>
|
</span>
|
||||||
<mct-representation class="rep-object-label"
|
<mct-representation class="rep-object-label c-tree__item__label"
|
||||||
key="'label'"
|
key="'label'"
|
||||||
mct-object="series.oldObject">
|
mct-object="series.oldObject">
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
</span>
|
</div>
|
||||||
<ul class="grid-properties" ng-show="expanded">
|
<ul class="grid-properties" ng-show="expanded">
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<!-- Value to be displayed -->
|
<!-- Value to be displayed -->
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<li class="grid-row" ng-show="form.markers || form.alarmMarkers">
|
<li class="grid-row" ng-show="form.markers || form.alarmMarkers">
|
||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="The size of regular and alarm markers for this series.">Marker Size:</div>
|
title="The size of regular and alarm markers for this series.">Marker Size:</div>
|
||||||
<div class="grid-cell value"><input class="sm" type="text" ng-model="form.markerSize"/></div>
|
<div class="grid-cell value"><input class="c-input--flex" type="text" ng-model="form.markerSize"/></div>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid-row"
|
<li class="grid-row"
|
||||||
ng-controller="ClickAwayController as toggle"
|
ng-controller="ClickAwayController as toggle"
|
||||||
@ -86,14 +86,14 @@
|
|||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="Manually set the plot line and marker color for this series.">Color</div>
|
title="Manually set the plot line and marker color for this series.">Color</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<div class="s-menu-button" ng-click="toggle.toggle()">
|
<div class="c-click-swatch c-click-swatch--menu" ng-click="toggle.toggle()">
|
||||||
<span class="color-swatch" ng-style="{ background: series.get('color').asHexString() }">
|
<span class="c-color-swatch"
|
||||||
|
ng-style="{ background: series.get('color').asHexString() }">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="l-inline-palette" ng-show="toggle.isActive()">
|
<div class="c-palette--inline c-palette__items" ng-show="toggle.isActive()">
|
||||||
<!-- TODO: redo this as a grid -->
|
<div class="u-contents" ng-repeat="group in config.series.palette.groups()">
|
||||||
<div class="l-palette-row" ng-repeat="group in config.series.palette.groups()">
|
<div class="c-palette__item"
|
||||||
<div class="l-palette-item s-palette-item"
|
|
||||||
ng-repeat="color in group"
|
ng-repeat="color in group"
|
||||||
ng-class="{ 'selected': series.get('color').equalTo(color) }"
|
ng-class="{ 'selected': series.get('color').equalTo(color) }"
|
||||||
ng-style="{ background: color.asHexString() }"
|
ng-style="{ background: color.asHexString() }"
|
||||||
@ -115,7 +115,7 @@
|
|||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="Manually override how the Y axis is labeled.">Label</div>
|
title="Manually override how the Y axis is labeled.">Label</div>
|
||||||
<div class="grid-cell value"><input class="control" type="text" ng-model="form.label"/></div>
|
<div class="grid-cell value"><input class="c-input--flex" type="text" ng-model="form.label"/></div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="l-inspector-part">
|
<ul class="l-inspector-part">
|
||||||
@ -130,7 +130,7 @@
|
|||||||
title="Percentage of padding above and below plotted min and max values. 0.1, 1.0, etc.">
|
title="Percentage of padding above and below plotted min and max values. 0.1, 1.0, etc.">
|
||||||
Padding</div>
|
Padding</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<input class="sm" type="text" ng-model="form.autoscalePadding"/>
|
<input class="c-input--flex" type="text" ng-model="form.autoscalePadding"/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -143,13 +143,13 @@
|
|||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="Minimum Y axis value.">Minimum Value</div>
|
title="Minimum Y axis value.">Minimum Value</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<input class="sm" type="number" ng-model="form.range.min"/>
|
<input class="c-input--flex" type="number" ng-model="form.range.min"/>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="Maximum Y axis value.">Maximum Value</div>
|
title="Maximum Y axis value.">Maximum Value</div>
|
||||||
<div class="grid-cell value"><input class="sm" type="number" ng-model="form.range.max"/></div>
|
<div class="grid-cell value"><input class="c-input--flex" type="number" ng-model="form.range.max"/></div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -40,6 +40,7 @@ define([
|
|||||||
'./flexibleLayout/plugin',
|
'./flexibleLayout/plugin',
|
||||||
'./tabs/plugin',
|
'./tabs/plugin',
|
||||||
'../../platform/features/fixed/plugin',
|
'../../platform/features/fixed/plugin',
|
||||||
|
'./LADTable/plugin',
|
||||||
'./preview/plugin'
|
'./preview/plugin'
|
||||||
], function (
|
], function (
|
||||||
_,
|
_,
|
||||||
@ -61,6 +62,7 @@ define([
|
|||||||
FlexibleLayout,
|
FlexibleLayout,
|
||||||
Tabs,
|
Tabs,
|
||||||
FixedView,
|
FixedView,
|
||||||
|
LADTable,
|
||||||
PreviewPlugin
|
PreviewPlugin
|
||||||
) {
|
) {
|
||||||
var bundleMap = {
|
var bundleMap = {
|
||||||
@ -176,6 +178,7 @@ define([
|
|||||||
plugins.Tabs = Tabs;
|
plugins.Tabs = Tabs;
|
||||||
plugins.FixedView = FixedView;
|
plugins.FixedView = FixedView;
|
||||||
plugins.FlexibleLayout = FlexibleLayout;
|
plugins.FlexibleLayout = FlexibleLayout;
|
||||||
|
plugins.LADTable = LADTable;
|
||||||
plugins.Preview = PreviewPlugin.default;
|
plugins.Preview = PreviewPlugin.default;
|
||||||
|
|
||||||
return plugins;
|
return plugins;
|
||||||
|
@ -20,6 +20,9 @@ define([
|
|||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
return domainObject.type === 'summary-widget';
|
return domainObject.type === 'summary-widget';
|
||||||
},
|
},
|
||||||
|
canEdit: function (domainObject) {
|
||||||
|
return domainObject.type === 'summary-widget';
|
||||||
|
},
|
||||||
view: function (domainObject) {
|
view: function (domainObject) {
|
||||||
var statusService = openmct.$injector.get('statusService');
|
var statusService = openmct.$injector.get('statusService');
|
||||||
var objectId = objectUtils.makeKeyString(domainObject.identifier);
|
var objectId = objectUtils.makeKeyString(domainObject.identifier);
|
||||||
@ -32,7 +35,6 @@ define([
|
|||||||
return new SummaryWidgetView(domainObject, openmct);
|
return new SummaryWidgetView(domainObject, openmct);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editable: true,
|
|
||||||
priority: function (domainObject) {
|
priority: function (domainObject) {
|
||||||
if (domainObject.type === 'summary-widget') {
|
if (domainObject.type === 'summary-widget') {
|
||||||
return Number.MAX_VALUE;
|
return Number.MAX_VALUE;
|
||||||
|
@ -35,6 +35,9 @@ define([
|
|||||||
canView: function (domainObject) {
|
canView: function (domainObject) {
|
||||||
return domainObject.type === 'tabs';
|
return domainObject.type === 'tabs';
|
||||||
},
|
},
|
||||||
|
canEdit: function (domainObject) {
|
||||||
|
return domainObject.type === 'tabs';
|
||||||
|
},
|
||||||
view: function (domainObject) {
|
view: function (domainObject) {
|
||||||
let component;
|
let component;
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ define([
|
|||||||
|
|
||||||
loadComposition() {
|
loadComposition() {
|
||||||
this.tableComposition = this.openmct.composition.get(this.domainObject);
|
this.tableComposition = this.openmct.composition.get(this.domainObject);
|
||||||
if (this.tableComposition !== undefined){
|
if (this.tableComposition !== undefined) {
|
||||||
this.tableComposition.load().then((composition)=>{
|
this.tableComposition.load().then((composition) => {
|
||||||
composition = composition.filter(this.isTelemetryObject);
|
composition = composition.filter(this.isTelemetryObject);
|
||||||
|
|
||||||
this.configuration.addColumnsForAllObjects(composition);
|
this.configuration.addColumnsForAllObjects(composition);
|
||||||
@ -122,7 +122,6 @@ define([
|
|||||||
|
|
||||||
let telemetryRows = telemetryData.map(datum => new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator));
|
let telemetryRows = telemetryData.map(datum => new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator));
|
||||||
this.boundedRows.add(telemetryRows);
|
this.boundedRows.add(telemetryRows);
|
||||||
console.log('Loaded %i rows', telemetryRows.length);
|
|
||||||
this.decrementOutstandingRequests();
|
this.decrementOutstandingRequests();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -131,7 +130,7 @@ define([
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
incrementOutstandingRequests() {
|
incrementOutstandingRequests() {
|
||||||
if (this.outstandingRequests === 0){
|
if (this.outstandingRequests === 0) {
|
||||||
this.emit('outstanding-requests', true);
|
this.emit('outstanding-requests', true);
|
||||||
}
|
}
|
||||||
this.outstandingRequests++;
|
this.outstandingRequests++;
|
||||||
@ -143,7 +142,7 @@ define([
|
|||||||
decrementOutstandingRequests() {
|
decrementOutstandingRequests() {
|
||||||
this.outstandingRequests--;
|
this.outstandingRequests--;
|
||||||
|
|
||||||
if (this.outstandingRequests === 0){
|
if (this.outstandingRequests === 0) {
|
||||||
this.emit('outstanding-requests', false);
|
this.emit('outstanding-requests', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,6 +64,7 @@ define([
|
|||||||
objectMutated(object) {
|
objectMutated(object) {
|
||||||
//Synchronize domain object reference. Duplicate object otherwise change detection becomes impossible.
|
//Synchronize domain object reference. Duplicate object otherwise change detection becomes impossible.
|
||||||
this.domainObject = object;
|
this.domainObject = object;
|
||||||
|
//Was it the configuration that changed?
|
||||||
if (!_.eq(object.configuration, this.oldConfiguration)) {
|
if (!_.eq(object.configuration, this.oldConfiguration)) {
|
||||||
//Make copy of configuration, otherwise change detection is impossible if shared instance is being modified.
|
//Make copy of configuration, otherwise change detection is impossible if shared instance is being modified.
|
||||||
this.oldConfiguration = JSON.parse(JSON.stringify(this.getConfiguration()));
|
this.oldConfiguration = JSON.parse(JSON.stringify(this.getConfiguration()));
|
||||||
@ -91,16 +92,19 @@ define([
|
|||||||
let columnsToRemove = this.columns[objectKeyString];
|
let columnsToRemove = this.columns[objectKeyString];
|
||||||
|
|
||||||
delete this.columns[objectKeyString];
|
delete this.columns[objectKeyString];
|
||||||
|
|
||||||
|
let configuration = this.domainObject.configuration;
|
||||||
|
let configurationChanged = false;
|
||||||
columnsToRemove.forEach((column) => {
|
columnsToRemove.forEach((column) => {
|
||||||
//There may be more than one column with the same key (eg. time system columns)
|
//There may be more than one column with the same key (eg. time system columns)
|
||||||
if (!this.hasColumnWithKey(column.getKey())) {
|
if (!this.hasColumnWithKey(column.getKey())) {
|
||||||
let configuration = this.domainObject.configuration;
|
|
||||||
delete configuration.hiddenColumns[column.getKey()];
|
delete configuration.hiddenColumns[column.getKey()];
|
||||||
// If there are no more columns with this key, delete any configuration, and trigger
|
configurationChanged = true;
|
||||||
// a column refresh.
|
|
||||||
this.openmct.objects.mutate(this.domainObject, 'configuration', configuration);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (configurationChanged) {
|
||||||
|
this.updateConfiguration(configuration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hasColumnWithKey(columnKey) {
|
hasColumnWithKey(columnKey) {
|
||||||
|
@ -36,13 +36,13 @@ define([
|
|||||||
key: 'table',
|
key: 'table',
|
||||||
name: 'Telemetry Table',
|
name: 'Telemetry Table',
|
||||||
cssClass: 'icon-tabular-realtime',
|
cssClass: 'icon-tabular-realtime',
|
||||||
editable: function(domainObject) {
|
canView(domainObject) {
|
||||||
return domainObject.type === 'table';
|
|
||||||
},
|
|
||||||
canView: function (domainObject) {
|
|
||||||
return domainObject.type === 'table' || domainObject.hasOwnProperty('telemetry');
|
return domainObject.type === 'table' || domainObject.hasOwnProperty('telemetry');
|
||||||
},
|
},
|
||||||
view: function (domainObject) {
|
canEdit(domainObject) {
|
||||||
|
return domainObject.type === 'table';
|
||||||
|
},
|
||||||
|
view(domainObject) {
|
||||||
let csvExporter = new CSVExporter.default();
|
let csvExporter = new CSVExporter.default();
|
||||||
let table = new TelemetryTable(domainObject, openmct);
|
let table = new TelemetryTable(domainObject, openmct);
|
||||||
let component;
|
let component;
|
||||||
@ -67,7 +67,7 @@ define([
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
priority: function () {
|
priority() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,6 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import "~styles/sass-base";
|
@import "~styles/sass-base";
|
||||||
@import "~styles/table";
|
|
||||||
|
|
||||||
.c-telemetry-table__drop-target {
|
.c-telemetry-table__drop-target {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -119,6 +118,9 @@
|
|||||||
|
|
||||||
.c-telemetry-table {
|
.c-telemetry-table {
|
||||||
// Table that displays telemetry in a scrolling body area
|
// Table that displays telemetry in a scrolling body area
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
justify-content: flex-start;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
th, td {
|
th, td {
|
||||||
@ -128,6 +130,10 @@
|
|||||||
vertical-align: middle; // This is crucial to hiding f**king 4px height injected by browser by default
|
vertical-align: middle; // This is crucial to hiding f**king 4px height injected by browser by default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
color: $colorTelemFresh;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************* WRAPPERS */
|
/******************************* WRAPPERS */
|
||||||
&__headers-w {
|
&__headers-w {
|
||||||
// Wraps __headers table
|
// Wraps __headers table
|
||||||
|
@ -56,6 +56,7 @@ $basicCr: 4px;
|
|||||||
// Base colors
|
// Base colors
|
||||||
$colorBodyBg: #393939;
|
$colorBodyBg: #393939;
|
||||||
$colorBodyFg: #aaa;
|
$colorBodyFg: #aaa;
|
||||||
|
$colorBodyFgEm: #fff;
|
||||||
$colorGenBg: #222;
|
$colorGenBg: #222;
|
||||||
$colorHeadBg: #262626;
|
$colorHeadBg: #262626;
|
||||||
$colorHeadFg: $colorBodyFg;
|
$colorHeadFg: $colorBodyFg;
|
||||||
@ -110,6 +111,7 @@ $colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
|||||||
// Base Colors
|
// Base Colors
|
||||||
$dlSpread: 20%;
|
$dlSpread: 20%;
|
||||||
$editColor: #00c7c3;
|
$editColor: #00c7c3;
|
||||||
|
$editColorAlt: #9971ff;
|
||||||
$editColorBgBase: darken($editColor, $dlSpread);
|
$editColorBgBase: darken($editColor, $dlSpread);
|
||||||
$editColorBg: rgba($editColorBgBase, 0.2);
|
$editColorBg: rgba($editColorBgBase, 0.2);
|
||||||
$editColorFg: lighten($editColor, $dlSpread);
|
$editColorFg: lighten($editColor, $dlSpread);
|
||||||
@ -126,16 +128,17 @@ $editSelectableColorSelected: $editSelectableColorHov;
|
|||||||
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 30%);
|
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 30%);
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
||||||
$editSelectableBorder: 1px dotted $editSelectableColor;
|
$editSelectableBorder: 1px dotted $editSelectableColor;
|
||||||
$editSelectableBorderHov: 1px dotted $editColor;
|
$editSelectableBorderHov: 1px dotted $editColorAlt;
|
||||||
$editSelectableBorderSelected: 1px solid $editColor;
|
$editSelectableBorderSelected: 1px solid $editColor;
|
||||||
|
$editSelectableShdwSelected: rgba($editColor, 0.75) 0 0 0 1px;
|
||||||
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
||||||
$editBorderDrilledIn: 1px dashed #9971ff;
|
$editBorderDrilledIn: 1px dashed $editColorAlt;
|
||||||
$colorGridLines: rgba($editColor, 0.2);
|
$colorGridLines: rgba($editColor, 0.2);
|
||||||
|
|
||||||
/************************************************** BROWSING */
|
/************************************************** BROWSING */
|
||||||
$browseBorderSelectableHov: 1px dotted rgba($colorBodyFg, 0.2);
|
$browseSelectableBorderHov: 1px dotted rgba($colorBodyFg, 0.2);
|
||||||
$browseShdwSelectableHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
$browseSelectableShdwHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
||||||
$browseBorderSelected: 1px solid rgba($colorBodyFg, 0.6);
|
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.6);
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
$colorIconAlias: #4af6f3;
|
$colorIconAlias: #4af6f3;
|
||||||
@ -165,6 +168,8 @@ $colorDropHint: $colorKey;
|
|||||||
$colorDropHintBg: darken($colorDropHint, 10%);
|
$colorDropHintBg: darken($colorDropHint, 10%);
|
||||||
$colorDropHintBgHov: $colorDropHint;
|
$colorDropHintBgHov: $colorDropHint;
|
||||||
$colorDropHintFg: lighten($colorDropHint, 40%);
|
$colorDropHintFg: lighten($colorDropHint, 40%);
|
||||||
|
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
||||||
|
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
$colorMenuBg: lighten($colorBodyBg, 15%);
|
$colorMenuBg: lighten($colorBodyBg, 15%);
|
||||||
@ -219,18 +224,31 @@ $overlayBrightnessAdjust: brightness(1.3);
|
|||||||
|
|
||||||
// Indicator colors
|
// Indicator colors
|
||||||
$colorIndicatorAvailable: $colorKey;
|
$colorIndicatorAvailable: $colorKey;
|
||||||
$colorIndicatorDisabled: #444;
|
$colorIndicatorDisabled: #555555;
|
||||||
$colorIndicatorOn: $colorOk;
|
$colorIndicatorOn: $colorOk;
|
||||||
$colorIndicatorOff: #666;
|
$colorIndicatorOff: #777777;
|
||||||
|
|
||||||
// Limits and staleness colors//
|
// Staleness
|
||||||
$colorTelemFresh: lighten($colorBodyFg, 20%);
|
$colorTelemFresh: lighten($colorBodyFg, 20%);
|
||||||
$colorTelemStale: darken($colorBodyFg, 20%);
|
$colorTelemStale: darken($colorBodyFg, 20%);
|
||||||
$styleTelemStale: italic;
|
$styleTelemStale: italic;
|
||||||
$colorLimitYellowBg: rgba(#ffaa00, 0.3);
|
|
||||||
$colorLimitYellowIc: #ffaa00;
|
// Limits
|
||||||
$colorLimitRedBg: rgba(red, 0.3);
|
$colorLimitYellowBg: #ac7300;
|
||||||
$colorLimitRedIc: red;
|
$colorLimitYellowFg: #ffe64d;
|
||||||
|
$colorLimitYellowIc: #ffb607;
|
||||||
|
$colorLimitRedBg: #940000;
|
||||||
|
$colorLimitRedFg: #ffa489;
|
||||||
|
$colorLimitRedIc: #ff4222;
|
||||||
|
|
||||||
|
// Status
|
||||||
|
$colorAlert: #ff3c00;
|
||||||
|
$colorWarningHi: #990000;
|
||||||
|
$colorWarningLo: #ff9900;
|
||||||
|
$colorDiagnostic: #a4b442;
|
||||||
|
$colorCommand: #3693bd;
|
||||||
|
$colorInfo: #2294a2;
|
||||||
|
$colorOk: #33cc33;
|
||||||
|
|
||||||
// Bubble colors
|
// Bubble colors
|
||||||
$colorInfoBubbleBg: $colorMenuBg;
|
$colorInfoBubbleBg: $colorMenuBg;
|
||||||
@ -250,8 +268,10 @@ $colorTabBorder: lighten($colorBodyBg, 10%);
|
|||||||
$colorTabBodyBg: $colorBodyBg;
|
$colorTabBodyBg: $colorBodyBg;
|
||||||
$colorTabBodyFg: lighten($colorBodyFg, 20%);
|
$colorTabBodyFg: lighten($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBg: lighten($colorBodyBg, 10%);
|
$colorTabHeaderBg: lighten($colorBodyBg, 10%);
|
||||||
$colorTabHeaderFg: lighten($colorBodyFg, 20%);
|
$colorTabHeaderFg: $colorBodyFg;
|
||||||
$colorTabHeaderBorder: $colorBodyBg;
|
$colorTabHeaderBorder: $colorBodyBg;
|
||||||
|
$colorTabGroupHeaderBg: lighten($colorBodyBg, 5%);
|
||||||
|
$colorTabGroupHeaderFg: darken($colorTabHeaderFg, 10%);
|
||||||
|
|
||||||
// Plot
|
// Plot
|
||||||
$colorPlotBg: rgba(black, 0.05);
|
$colorPlotBg: rgba(black, 0.05);
|
||||||
@ -261,7 +281,6 @@ $opacityPlotHash: 0.2;
|
|||||||
$stylePlotHash: dashed;
|
$stylePlotHash: dashed;
|
||||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||||
$colorPlotLabelFg: darken($colorPlotFg, 20%);
|
$colorPlotLabelFg: darken($colorPlotFg, 20%);
|
||||||
$legendCollapsedNameMaxW: 50%;
|
|
||||||
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
||||||
|
|
||||||
// Tree
|
// Tree
|
||||||
@ -277,8 +296,8 @@ $colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
|||||||
$colorItemTreeEditingBg: darken($editColor, 20%);
|
$colorItemTreeEditingBg: darken($editColor, 20%);
|
||||||
$colorItemTreeEditingFg: $editColorFg;
|
$colorItemTreeEditingFg: $editColorFg;
|
||||||
$colorItemTreeEditingIcon: $editColorFg;
|
$colorItemTreeEditingIcon: $editColorFg;
|
||||||
$colorItemTreeVC: rgba($colorBodyFg, 0.5);
|
$colorItemTreeVC: $colorDisclosureCtrl;
|
||||||
$colorItemTreeVCHover: $colorKey;
|
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
@ -366,14 +385,3 @@ $sliderColorRangeValHovFg: $colorBodyFg;
|
|||||||
$sliderKnobW: 15px;
|
$sliderKnobW: 15px;
|
||||||
$sliderKnobR: 2px;
|
$sliderKnobR: 2px;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Content status
|
|
||||||
/*
|
|
||||||
$colorAlert: #ff3c00;
|
|
||||||
$colorWarningHi: #990000;
|
|
||||||
$colorWarningLo: #ff9900;
|
|
||||||
$colorDiagnostic: #a4b442;
|
|
||||||
$colorCommand: #3693bd;
|
|
||||||
$colorInfo: #2294a2;
|
|
||||||
$colorOk: #33cc33;
|
|
||||||
*/
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/************************************************** MAELSTROM2 THEME CONSTANTS */
|
/************************************************** MAELSTROM THEME CONSTANTS */
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
@import url('https://fonts.googleapis.com/css?family=Chakra+Petch:400,600,700|Michroma|Teko:400,700');
|
@import url('https://fonts.googleapis.com/css?family=Chakra+Petch:400,600,700|Michroma|Teko:400,700');
|
||||||
@ -60,6 +60,7 @@ $basicCr: 4px;
|
|||||||
// Base colors
|
// Base colors
|
||||||
$colorBodyBg: #393939;
|
$colorBodyBg: #393939;
|
||||||
$colorBodyFg: #ccc;
|
$colorBodyFg: #ccc;
|
||||||
|
$colorBodyFgEm: #fff;
|
||||||
$colorGenBg: #222;
|
$colorGenBg: #222;
|
||||||
$colorHeadBg: #262626;
|
$colorHeadBg: #262626;
|
||||||
$colorHeadFg: $colorBodyFg;
|
$colorHeadFg: $colorBodyFg;
|
||||||
@ -114,12 +115,14 @@ $colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
|||||||
// Base Colors
|
// Base Colors
|
||||||
$dlSpread: 20%;
|
$dlSpread: 20%;
|
||||||
$editColor: #00c7c3;
|
$editColor: #00c7c3;
|
||||||
$editColorBg: darken($editColor, $dlSpread);
|
$editColorAlt: #9971ff;
|
||||||
|
$editColorBgBase: darken($editColor, $dlSpread);
|
||||||
|
$editColorBg: rgba($editColorBgBase, 0.2);
|
||||||
$editColorFg: lighten($editColor, $dlSpread);
|
$editColorFg: lighten($editColor, $dlSpread);
|
||||||
$editColorHov: lighten($editColor, 20%);
|
$editColorHov: lighten($editColor, 20%);
|
||||||
// Canvas
|
// Canvas
|
||||||
$editCanvasColorBg: #002524;
|
$editCanvasColorBg: $editColorBg; //#002524;
|
||||||
$editCanvasColorGrid: darken($editCanvasColorBg, 2%);
|
$editCanvasColorGrid: rgba($editColorBgBase, 0.4); //lighten($editCanvasColorBg, 3%);
|
||||||
// Selectable
|
// Selectable
|
||||||
$editSelectableColor: #006563;
|
$editSelectableColor: #006563;
|
||||||
$editSelectableColorFg: lighten($editSelectableColor, 20%);
|
$editSelectableColorFg: lighten($editSelectableColor, 20%);
|
||||||
@ -129,16 +132,17 @@ $editSelectableColorSelected: $editSelectableColorHov;
|
|||||||
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 30%);
|
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 30%);
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
||||||
$editSelectableBorder: 1px dotted $editSelectableColor;
|
$editSelectableBorder: 1px dotted $editSelectableColor;
|
||||||
$editSelectableBorderHov: 1px dotted $editColor;
|
$editSelectableBorderHov: 1px dotted $editColorAlt;
|
||||||
$editSelectableBorderSelected: 1px solid $editColor;
|
$editSelectableBorderSelected: 1px solid $editColor;
|
||||||
|
$editSelectableShdwSelected: rgba($editColor, 0.75) 0 0 0 1px;
|
||||||
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
||||||
$editBorderDrilledIn: 1px dashed #9971ff;
|
$editBorderDrilledIn: 1px dashed $editColorAlt;
|
||||||
$colorGridLines: rgba($editColor, 0.2);
|
$colorGridLines: rgba($editColor, 0.2);
|
||||||
|
|
||||||
/************************************************** BROWSING */
|
/************************************************** BROWSING */
|
||||||
$browseBorderSelectableHov: 1px dotted rgba($colorBodyFg, 0.2);
|
$browseSelectableBorderHov: 1px dotted rgba($colorBodyFg, 0.2);
|
||||||
$browseShdwSelectableHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
$browseSelectableShdwHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
||||||
$browseBorderSelected: 1px solid rgba($colorBodyFg, 0.6);
|
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.6);
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
$colorIconAlias: #4af6f3;
|
$colorIconAlias: #4af6f3;
|
||||||
@ -168,6 +172,8 @@ $colorDropHint: $colorKey;
|
|||||||
$colorDropHintBg: darken($colorDropHint, 10%);
|
$colorDropHintBg: darken($colorDropHint, 10%);
|
||||||
$colorDropHintBgHov: $colorDropHint;
|
$colorDropHintBgHov: $colorDropHint;
|
||||||
$colorDropHintFg: lighten($colorDropHint, 40%);
|
$colorDropHintFg: lighten($colorDropHint, 40%);
|
||||||
|
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
||||||
|
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
$colorMenuBg: lighten($colorBodyBg, 15%);
|
$colorMenuBg: lighten($colorBodyBg, 15%);
|
||||||
@ -222,18 +228,31 @@ $overlayBrightnessAdjust: brightness(1.3);
|
|||||||
|
|
||||||
// Indicator colors
|
// Indicator colors
|
||||||
$colorIndicatorAvailable: $colorKey;
|
$colorIndicatorAvailable: $colorKey;
|
||||||
$colorIndicatorDisabled: #444;
|
$colorIndicatorDisabled: #555555;
|
||||||
$colorIndicatorOn: $colorOk;
|
$colorIndicatorOn: $colorOk;
|
||||||
$colorIndicatorOff: #666;
|
$colorIndicatorOff: #777777;
|
||||||
|
|
||||||
// Limits and staleness colors//
|
// Staleness
|
||||||
$colorTelemFresh: lighten($colorBodyFg, 20%);
|
$colorTelemFresh: lighten($colorBodyFg, 20%);
|
||||||
$colorTelemStale: darken($colorBodyFg, 20%);
|
$colorTelemStale: darken($colorBodyFg, 20%);
|
||||||
$styleTelemStale: italic;
|
$styleTelemStale: italic;
|
||||||
$colorLimitYellowBg: rgba(#ffaa00, 0.3);
|
|
||||||
$colorLimitYellowIc: #ffaa00;
|
// Limits
|
||||||
$colorLimitRedBg: rgba(red, 0.3);
|
$colorLimitYellowBg: #ac7300;
|
||||||
$colorLimitRedIc: red;
|
$colorLimitYellowFg: #ffe64d;
|
||||||
|
$colorLimitYellowIc: #ffb607;
|
||||||
|
$colorLimitRedBg: #940000;
|
||||||
|
$colorLimitRedFg: #ffa489;
|
||||||
|
$colorLimitRedIc: #ff4222;
|
||||||
|
|
||||||
|
// Status
|
||||||
|
$colorAlert: #ff3c00;
|
||||||
|
$colorWarningHi: #990000;
|
||||||
|
$colorWarningLo: #ff9900;
|
||||||
|
$colorDiagnostic: #a4b442;
|
||||||
|
$colorCommand: #3693bd;
|
||||||
|
$colorInfo: #2294a2;
|
||||||
|
$colorOk: #33cc33;
|
||||||
|
|
||||||
// Bubble colors
|
// Bubble colors
|
||||||
$colorInfoBubbleBg: $colorMenuBg;
|
$colorInfoBubbleBg: $colorMenuBg;
|
||||||
@ -253,8 +272,10 @@ $colorTabBorder: lighten($colorBodyBg, 10%);
|
|||||||
$colorTabBodyBg: $colorBodyBg;
|
$colorTabBodyBg: $colorBodyBg;
|
||||||
$colorTabBodyFg: lighten($colorBodyFg, 20%);
|
$colorTabBodyFg: lighten($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBg: lighten($colorBodyBg, 10%);
|
$colorTabHeaderBg: lighten($colorBodyBg, 10%);
|
||||||
$colorTabHeaderFg: lighten($colorBodyFg, 20%);
|
$colorTabHeaderFg: $colorBodyFg;
|
||||||
$colorTabHeaderBorder: $colorBodyBg;
|
$colorTabHeaderBorder: $colorBodyBg;
|
||||||
|
$colorTabGroupHeaderBg: lighten($colorBodyBg, 5%);
|
||||||
|
$colorTabGroupHeaderFg: darken($colorTabHeaderFg, 10%);
|
||||||
|
|
||||||
// Plot
|
// Plot
|
||||||
$colorPlotBg: rgba(black, 0.05);
|
$colorPlotBg: rgba(black, 0.05);
|
||||||
@ -264,7 +285,6 @@ $opacityPlotHash: 0.2;
|
|||||||
$stylePlotHash: dashed;
|
$stylePlotHash: dashed;
|
||||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||||
$colorPlotLabelFg: darken($colorPlotFg, 20%);
|
$colorPlotLabelFg: darken($colorPlotFg, 20%);
|
||||||
$legendCollapsedNameMaxW: 50%;
|
|
||||||
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
||||||
|
|
||||||
// Tree
|
// Tree
|
||||||
@ -280,8 +300,8 @@ $colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
|||||||
$colorItemTreeEditingBg: darken($editColor, 20%);
|
$colorItemTreeEditingBg: darken($editColor, 20%);
|
||||||
$colorItemTreeEditingFg: $editColorFg;
|
$colorItemTreeEditingFg: $editColorFg;
|
||||||
$colorItemTreeEditingIcon: $editColorFg;
|
$colorItemTreeEditingIcon: $editColorFg;
|
||||||
$colorItemTreeVC: rgba($colorBodyFg, 0.5);
|
$colorItemTreeVC: $colorDisclosureCtrl;
|
||||||
$colorItemTreeVCHover: $colorKey;
|
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
|
@ -56,6 +56,7 @@ $basicCr: 4px;
|
|||||||
// Base colors
|
// Base colors
|
||||||
$colorBodyBg: #fcfcfc;
|
$colorBodyBg: #fcfcfc;
|
||||||
$colorBodyFg: #666;
|
$colorBodyFg: #666;
|
||||||
|
$colorBodyFgEm: #333;
|
||||||
$colorGenBg: #fff;
|
$colorGenBg: #fff;
|
||||||
$colorHeadBg: #eee;
|
$colorHeadBg: #eee;
|
||||||
$colorHeadFg: $colorBodyFg;
|
$colorHeadFg: $colorBodyFg;
|
||||||
@ -110,6 +111,7 @@ $colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
|||||||
// Base Colors
|
// Base Colors
|
||||||
$dlSpread: 20%;
|
$dlSpread: 20%;
|
||||||
$editColor: #00c7c3;
|
$editColor: #00c7c3;
|
||||||
|
$editColorAlt: #9971ff;
|
||||||
$editColorBgBase: darken($editColor, $dlSpread);
|
$editColorBgBase: darken($editColor, $dlSpread);
|
||||||
$editColorBg: darken($editColor, $dlSpread);
|
$editColorBg: darken($editColor, $dlSpread);
|
||||||
$editColorFg: lighten($editColor, $dlSpread);
|
$editColorFg: lighten($editColor, $dlSpread);
|
||||||
@ -122,20 +124,21 @@ $editSelectableColor: #acdad6;
|
|||||||
$editSelectableColorFg: darken($editSelectableColor, 20%);
|
$editSelectableColorFg: darken($editSelectableColor, 20%);
|
||||||
$editSelectableColorHov: darken($editSelectableColor, 10%);
|
$editSelectableColorHov: darken($editSelectableColor, 10%);
|
||||||
// Selectable selected
|
// Selectable selected
|
||||||
$editSelectableColorSelected: $editColor; //$editSelectableColorHov;
|
$editSelectableColorSelected: $editColor;
|
||||||
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 50%);
|
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 50%);
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
||||||
$editSelectableBorder: 1px dotted $editSelectableColor;
|
$editSelectableBorder: 1px dotted $editSelectableColor;
|
||||||
$editSelectableBorderHov: 1px dotted $editColor;
|
$editSelectableBorderHov: 1px dotted $editColorAlt;
|
||||||
$editSelectableBorderSelected: 1px solid $editColor;
|
$editSelectableBorderSelected: 1px solid $editColor;
|
||||||
|
$editSelectableShdwSelected: rgba($editColor, 0.75) 0 0 0 1px;
|
||||||
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
||||||
$editBorderDrilledIn: 1px dashed #9971ff;
|
$editBorderDrilledIn: 1px dashed $editColorAlt;
|
||||||
$colorGridLines: rgba($editColor, 0.2);
|
$colorGridLines: rgba($editColor, 0.2);
|
||||||
|
|
||||||
/************************************************** BROWSING */
|
/************************************************** BROWSING */
|
||||||
$browseBorderSelectableHov: 1px dotted rgba($colorBodyFg, 0.2);
|
$browseSelectableBorderHov: 1px dotted rgba($colorBodyFg, 0.2);
|
||||||
$browseShdwSelectableHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
$browseSelectableShdwHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
||||||
$browseBorderSelected: 1px solid rgba($colorBodyFg, 0.6);
|
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.6);
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
$colorIconAlias: #4af6f3;
|
$colorIconAlias: #4af6f3;
|
||||||
@ -165,6 +168,8 @@ $colorDropHint: $colorKey;
|
|||||||
$colorDropHintBg: lighten($colorDropHint, 30%);
|
$colorDropHintBg: lighten($colorDropHint, 30%);
|
||||||
$colorDropHintBgHov: lighten($colorDropHint, 40%);
|
$colorDropHintBgHov: lighten($colorDropHint, 40%);
|
||||||
$colorDropHintFg: lighten($colorDropHint, 0);
|
$colorDropHintFg: lighten($colorDropHint, 0);
|
||||||
|
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
||||||
|
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
$colorMenuBg: lighten($colorBodyBg, 10%);
|
$colorMenuBg: lighten($colorBodyBg, 10%);
|
||||||
@ -223,14 +228,27 @@ $colorIndicatorDisabled: #444;
|
|||||||
$colorIndicatorOn: $colorOk;
|
$colorIndicatorOn: $colorOk;
|
||||||
$colorIndicatorOff: #666;
|
$colorIndicatorOff: #666;
|
||||||
|
|
||||||
// Limits and staleness colors//
|
// Staleness
|
||||||
$colorTelemFresh: darken($colorBodyFg, 20%);
|
$colorTelemFresh: darken($colorBodyFg, 20%);
|
||||||
$colorTelemStale: lighten($colorBodyFg, 20%);
|
$colorTelemStale: lighten($colorBodyFg, 20%);
|
||||||
$styleTelemStale: italic;
|
$styleTelemStale: italic;
|
||||||
$colorLimitYellowBg: rgba(#ffaa00, 0.3);
|
|
||||||
$colorLimitYellowIc: #ffaa00;
|
// Limits
|
||||||
$colorLimitRedBg: rgba(red, 0.3);
|
$colorLimitYellowBg: #ffe64d;
|
||||||
$colorLimitRedIc: red;
|
$colorLimitYellowFg: #7f4f20;
|
||||||
|
$colorLimitYellowIc: #e7a115;
|
||||||
|
$colorLimitRedBg: #ff0000;
|
||||||
|
$colorLimitRedFg: #fff;
|
||||||
|
$colorLimitRedIc: #ffa99a;
|
||||||
|
|
||||||
|
// Status
|
||||||
|
$colorAlert: #ff3c00;
|
||||||
|
$colorWarningHi: #990000;
|
||||||
|
$colorWarningLo: #ff9900;
|
||||||
|
$colorDiagnostic: #a4b442;
|
||||||
|
$colorCommand: #3693bd;
|
||||||
|
$colorInfo: #2294a2;
|
||||||
|
$colorOk: #33cc33;
|
||||||
|
|
||||||
// Bubble colors
|
// Bubble colors
|
||||||
$colorInfoBubbleBg: $colorMenuBg;
|
$colorInfoBubbleBg: $colorMenuBg;
|
||||||
@ -252,6 +270,8 @@ $colorTabBodyFg: darken($colorBodyFg, 20%);
|
|||||||
$colorTabHeaderBg: darken($colorBodyBg, 10%);
|
$colorTabHeaderBg: darken($colorBodyBg, 10%);
|
||||||
$colorTabHeaderFg: darken($colorBodyFg, 20%);
|
$colorTabHeaderFg: darken($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBorder: $colorBodyBg;
|
$colorTabHeaderBorder: $colorBodyBg;
|
||||||
|
$colorTabGroupHeaderBg: darken($colorBodyBg, 5%);
|
||||||
|
$colorTabGroupHeaderFg: darken($colorTabGroupHeaderBg, 40%);
|
||||||
|
|
||||||
// Plot
|
// Plot
|
||||||
$colorPlotBg: rgba(black, 0.05);
|
$colorPlotBg: rgba(black, 0.05);
|
||||||
@ -261,7 +281,6 @@ $opacityPlotHash: 0.2;
|
|||||||
$stylePlotHash: dashed;
|
$stylePlotHash: dashed;
|
||||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||||
$colorPlotLabelFg: lighten($colorPlotFg, 20%);
|
$colorPlotLabelFg: lighten($colorPlotFg, 20%);
|
||||||
$legendCollapsedNameMaxW: 50%;
|
|
||||||
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
||||||
|
|
||||||
// Tree
|
// Tree
|
||||||
@ -277,8 +296,8 @@ $colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
|||||||
$colorItemTreeEditingBg: $editColor;
|
$colorItemTreeEditingBg: $editColor;
|
||||||
$colorItemTreeEditingFg: $editColorFg;
|
$colorItemTreeEditingFg: $editColorFg;
|
||||||
$colorItemTreeEditingIcon: $editColorFg;
|
$colorItemTreeEditingIcon: $editColorFg;
|
||||||
$colorItemTreeVC: rgba($colorBodyFg, 0.5);
|
$colorItemTreeVC: $colorDisclosureCtrl;
|
||||||
$colorItemTreeVCHover: $colorKey;
|
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
@ -353,19 +372,6 @@ $createBtnTextTransform: uppercase;
|
|||||||
|
|
||||||
|
|
||||||
/**************************************************** NOT USED, LEAVE FOR NOW */
|
/**************************************************** NOT USED, LEAVE FOR NOW */
|
||||||
// Slider controls, not in use
|
|
||||||
/*
|
|
||||||
$sliderColorBase: $colorKey;
|
|
||||||
$sliderColorRangeHolder: rgba(black, 0.07);
|
|
||||||
$sliderColorRange: rgba($sliderColorBase, 0.2);
|
|
||||||
$sliderColorRangeHov: rgba($sliderColorBase, 0.4);
|
|
||||||
$sliderColorKnob: lighten($sliderColorBase, 20%);
|
|
||||||
$sliderColorKnobHov: rgba($sliderColorBase, 0.7);
|
|
||||||
$sliderColorRangeValHovBg: $sliderColorRange;
|
|
||||||
$sliderColorRangeValHovFg: $colorBodyFg;
|
|
||||||
$sliderKnobW: 15px;
|
|
||||||
$sliderKnobR: 2px;
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Content status
|
// Content status
|
||||||
/*
|
/*
|
||||||
|
@ -50,6 +50,15 @@ $gridItemMobile: 32px;
|
|||||||
$tabularHeaderH: 22px;
|
$tabularHeaderH: 22px;
|
||||||
$tabularTdPadLR: $itemPadLR;
|
$tabularTdPadLR: $itemPadLR;
|
||||||
$tabularTdPadTB: 2px;
|
$tabularTdPadTB: 2px;
|
||||||
|
/*************** Plots */
|
||||||
|
$plotYBarW: 60px;
|
||||||
|
$plotYLabelMinH: 20px;
|
||||||
|
$plotYLabelW: 10px;
|
||||||
|
$plotXBarH: 20px;
|
||||||
|
$plotLegendH: 20px;
|
||||||
|
$plotSwatchD: 8px;
|
||||||
|
$plotDisplayArea: (0, 0, $plotXBarH, $plotYBarW); // 1: Top, 2: right, 3: bottom, 4: left
|
||||||
|
$plotMinH: 95px;
|
||||||
|
|
||||||
/************************** MOBILE */
|
/************************** MOBILE */
|
||||||
$mobileMenuIconD: 24px; // Used
|
$mobileMenuIconD: 24px; // Used
|
||||||
|
@ -31,11 +31,13 @@ button {
|
|||||||
@include cButton();
|
@include cButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-button--menu {
|
.c-button {
|
||||||
&:after {
|
&--menu {
|
||||||
content: $glyph-icon-arrow-down;
|
&:after {
|
||||||
font-family: symbolsfont;
|
content: $glyph-icon-arrow-down;
|
||||||
opacity: 0.5;
|
font-family: symbolsfont;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,23 +46,25 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/********* Icon Buttons */
|
/********* Icon Buttons */
|
||||||
.c-click-icon {
|
.c-click-icon,
|
||||||
|
.c-click-swatch {
|
||||||
@include cClickIcon();
|
@include cClickIcon();
|
||||||
|
|
||||||
.c-click-icon__label {
|
|
||||||
margin-left: $interiorMargin;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--menu {
|
&--menu {
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: $glyph-icon-arrow-down;
|
content: $glyph-icon-arrow-down;
|
||||||
font-family: symbolsfont;
|
font-family: symbolsfont;
|
||||||
font-size: 0.6em;
|
font-size: 0.7em;
|
||||||
margin-left: floor($interiorMarginSm * 0.8);
|
margin-left: floor($interiorMarginSm * 0.8);
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-click-icon {
|
||||||
|
.c-click-icon__label {
|
||||||
|
margin-left: $interiorMargin;
|
||||||
|
}
|
||||||
|
|
||||||
&--swatched {
|
&--swatched {
|
||||||
// Color control, show swatch element
|
// Color control, show swatch element
|
||||||
@ -101,9 +105,10 @@ button {
|
|||||||
}
|
}
|
||||||
/********* Disclosure Triangle */
|
/********* Disclosure Triangle */
|
||||||
// Provides an arrow icon that when clicked expands an element to reveal its contents.
|
// Provides an arrow icon that when clicked expands an element to reveal its contents.
|
||||||
// Used in tree items. Always placed BEFORE an element.
|
// Used in tree items, plot legends. Always placed BEFORE an element.
|
||||||
.c-disclosure-triangle {
|
.c-disclosure-triangle {
|
||||||
$d: 12px;
|
$d: 12px;
|
||||||
|
color: $colorDisclosureCtrl;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -111,15 +116,22 @@ button {
|
|||||||
width: $d;
|
width: $d;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&.is-enabled:before {
|
&.is-enabled {
|
||||||
$s: .65;
|
cursor: pointer;
|
||||||
content: $glyph-icon-arrow-right-equilateral;
|
|
||||||
display: block;
|
&:hover {
|
||||||
font-family: symbolsfont;
|
color: $colorDisclosureCtrlHov;
|
||||||
font-size: 1rem * $s;
|
}
|
||||||
position: absolute;
|
|
||||||
transform-origin: floor(($d / 2) * $s); // This is slightly better than 'center'
|
&:before {
|
||||||
transition: transform 100ms ease-in-out;
|
$s: .65;
|
||||||
|
content: $glyph-icon-arrow-right-equilateral;
|
||||||
|
display: block;
|
||||||
|
font-family: symbolsfont;
|
||||||
|
font-size: 1rem * $s;
|
||||||
|
transform-origin: center;
|
||||||
|
transition: transform 100ms ease-in-out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--expanded {
|
&--expanded {
|
||||||
@ -154,6 +166,11 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.c-input {
|
.c-input {
|
||||||
|
&--flex {
|
||||||
|
width: 100%;
|
||||||
|
min-width: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
&--datetime {
|
&--datetime {
|
||||||
// Sized for values such as 2018-09-28 22:32:33.468Z
|
// Sized for values such as 2018-09-28 22:32:33.468Z
|
||||||
width: 160px;
|
width: 160px;
|
||||||
@ -252,6 +269,7 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
color: $colorMenuHovIc;
|
color: $colorMenuHovIc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
color: $colorMenuIc;
|
color: $colorMenuIc;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
@ -335,16 +353,16 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
&__items {
|
&__items {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(10, [col] auto );
|
grid-template-columns: repeat(auto-fill, 12px);
|
||||||
grid-gap: 1px;
|
grid-gap: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
$d: 16px;
|
$d: 12px;
|
||||||
|
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 16px; height: 16px;
|
min-width: $d; min-height: $d;
|
||||||
transition: $transOut;
|
transition: $transOut;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@ -375,6 +393,12 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************** SWATCHES */
|
||||||
|
.c-color-swatch {
|
||||||
|
border: 1px solid rgba(#fff, 0.2);
|
||||||
|
box-shadow: rgba(#000, 0.2) 0 0 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************** TOOLBAR */
|
/******************************************************** TOOLBAR */
|
||||||
.c-ctrl-wrapper {
|
.c-ctrl-wrapper {
|
||||||
@include cCtrlWrapper();
|
@include cCtrlWrapper();
|
||||||
@ -441,6 +465,10 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
margin-left: $interiorMargin;
|
margin-left: $interiorMargin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-palette {
|
||||||
|
min-width: 136px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/********* Button Sets */
|
/********* Button Sets */
|
||||||
@ -453,10 +481,6 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
> * {
|
> * {
|
||||||
// Assume buttons are immediate descendants
|
// Assume buttons are immediate descendants
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
|
|
||||||
+ * {
|
|
||||||
// margin-left: $interiorMarginSm;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ .c-button-set {
|
+ .c-button-set {
|
||||||
@ -497,6 +521,54 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
> * + * { margin-left: $interiorMargin; }
|
> * + * { margin-left: $interiorMargin; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************** SLIDERS AND RANGE */
|
||||||
|
@mixin sliderKnobRound() {
|
||||||
|
$h: 12px;
|
||||||
|
@include themedButton();
|
||||||
|
cursor: pointer;
|
||||||
|
width: $h;
|
||||||
|
height: $h;
|
||||||
|
border-radius: 50% !important;
|
||||||
|
transform: translateY(-42%);
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="range"] {
|
||||||
|
// HTML5 range inputs
|
||||||
|
-webkit-appearance: none; /* Hides the slider so that custom slider can be made */
|
||||||
|
background: transparent; /* Otherwise white in Chrome */
|
||||||
|
&:focus {
|
||||||
|
outline: none; /* Removes the blue border. */
|
||||||
|
}
|
||||||
|
|
||||||
|
// Thumb
|
||||||
|
&::-webkit-slider-thumb {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
@include sliderKnobRound();
|
||||||
|
}
|
||||||
|
&::-moz-range-thumb {
|
||||||
|
border: none;
|
||||||
|
@include sliderKnobRound();
|
||||||
|
}
|
||||||
|
&::-ms-thumb {
|
||||||
|
border: none;
|
||||||
|
@include sliderKnobRound();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Track
|
||||||
|
&::-webkit-slider-runnable-track {
|
||||||
|
width: 100%;
|
||||||
|
height: 3px;
|
||||||
|
@include sliderTrack();
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-moz-range-track {
|
||||||
|
width: 100%;
|
||||||
|
height: 3px;
|
||||||
|
@include sliderTrack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************** DRAG AND DROP */
|
/***************************************************** DRAG AND DROP */
|
||||||
.c-drop-hint {
|
.c-drop-hint {
|
||||||
// Used in Tabs View, Flexible Grid Layouts
|
// Used in Tabs View, Flexible Grid Layouts
|
||||||
@ -545,3 +617,27 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***************************************************** LEGACY */
|
||||||
|
|
||||||
|
.l-btn-set {
|
||||||
|
// Fixes
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.h-local-controls {
|
||||||
|
&-overlay-content {
|
||||||
|
box-shadow: $colorBodyBg 0 0 0 2px;
|
||||||
|
display: inline-block;
|
||||||
|
position: absolute;
|
||||||
|
right: $interiorMargin; top: $interiorMargin;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-trans {
|
||||||
|
// Has a translucent background plate
|
||||||
|
background: rgba($colorBodyBg, 0.8);
|
||||||
|
border-radius: $controlCr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -141,17 +141,22 @@ li {
|
|||||||
// Local Controls: Controls placed in proximity to or overlaid on components and views
|
// Local Controls: Controls placed in proximity to or overlaid on components and views
|
||||||
body.desktop .has-local-controls {
|
body.desktop .has-local-controls {
|
||||||
// Provides hover ability to show local controls
|
// Provides hover ability to show local controls
|
||||||
&:hover [class*="local-controls--hidden"] {
|
[class*='local-controls--hidden'] {
|
||||||
transition: opacity 50ms ease-in-out;
|
|
||||||
opacity: 1;
|
|
||||||
pointer-events: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
[class*="local-controls--hidden"] {
|
|
||||||
transition: opacity 500ms ease-in-out;
|
transition: opacity 500ms ease-in-out;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Look down up to two levels and display hidden LC's on hover
|
||||||
|
&:hover {
|
||||||
|
> [class*='local-controls--hidden'],
|
||||||
|
> * > [class*='local-controls--hidden'],
|
||||||
|
> * > * > [class*='local-controls--hidden'] {
|
||||||
|
transition: opacity 50ms ease-in-out;
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************** ICON BACKGROUNDS */
|
/******************************************************** ICON BACKGROUNDS */
|
||||||
@ -174,30 +179,6 @@ body.desktop .has-local-controls {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[class*="local-controls"] {
|
|
||||||
// // An explicit outer holder for controls. Typically placed in upper right.
|
|
||||||
// //font-size: 0.7rem;
|
|
||||||
// display: flex;
|
|
||||||
// align-items: center;
|
|
||||||
// justify-content: flex-end;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// &.h-local-controls-overlay-content {
|
|
||||||
// // Imagery controls
|
|
||||||
// $p: $interiorMargin;
|
|
||||||
// position: absolute;
|
|
||||||
// top: $p; right: $p;
|
|
||||||
// z-index: 2;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//.l-btn-set,
|
|
||||||
//.s-button {
|
|
||||||
// &:not(:first-child) {
|
|
||||||
// margin-left: $interiorMargin;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//}
|
|
||||||
|
|
||||||
/******************************************************** SELECTION AND EDITING */
|
/******************************************************** SELECTION AND EDITING */
|
||||||
// Provides supporting styles for Display Layouts and augmented legacy Fixed Position view
|
// Provides supporting styles for Display Layouts and augmented legacy Fixed Position view
|
||||||
|
|
||||||
@ -217,7 +198,7 @@ body.desktop .has-local-controls {
|
|||||||
/*************************** SELECTION */
|
/*************************** SELECTION */
|
||||||
.u-inspectable {
|
.u-inspectable {
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: $browseShdwSelectableHov;
|
box-shadow: $browseSelectableShdwHov;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,13 +207,14 @@ body.desktop .has-local-controls {
|
|||||||
*:not(.is-drilled-in).c-frame {
|
*:not(.is-drilled-in).c-frame {
|
||||||
border: $editSelectableBorder;
|
border: $editSelectableBorder;
|
||||||
|
|
||||||
&:hover {
|
&:not([s-selected]) {
|
||||||
border: $editSelectableBorderHov;
|
&:hover {
|
||||||
|
border: $editSelectableBorderHov;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&[s-selected],
|
&[s-selected] {
|
||||||
&.is-selected {
|
box-shadow: $editSelectableShdwSelected;
|
||||||
border: $editSelectableBorderSelected;
|
|
||||||
|
|
||||||
> .c-frame-edit {
|
> .c-frame-edit {
|
||||||
display: block; // Show the editing rect and handles
|
display: block; // Show the editing rect and handles
|
||||||
@ -244,7 +226,7 @@ body.desktop .has-local-controls {
|
|||||||
border: $editBorderDrilledIn;
|
border: $editBorderDrilledIn;
|
||||||
}
|
}
|
||||||
|
|
||||||
*[s-selected] {
|
.is-moveable {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -526,42 +508,3 @@ a.disabled {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************** TEMP LEGACY FIXES */
|
|
||||||
.overlay {
|
|
||||||
.outer-holder {
|
|
||||||
background: $colorMenuBg;
|
|
||||||
color: $colorMenuFg !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.form .form-row {
|
|
||||||
.label {
|
|
||||||
color: $colorMenuFg !important;
|
|
||||||
}
|
|
||||||
.selector-list {
|
|
||||||
@include reactive-input();
|
|
||||||
background: $colorInputBg !important;
|
|
||||||
color: $colorInputFg !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui-symbol.view-control {
|
|
||||||
display: block;
|
|
||||||
transform-origin: center center;
|
|
||||||
|
|
||||||
&:before { content: $glyph-icon-arrow-right-equilateral; }
|
|
||||||
|
|
||||||
&.expanded {
|
|
||||||
transform: rotate(90deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.t-imagery {
|
|
||||||
display: contents;
|
|
||||||
}
|
|
||||||
|
|
||||||
.t-frame-outer {
|
|
||||||
min-width: 200px;
|
|
||||||
min-height: 200px;
|
|
||||||
}
|
|
||||||
|
614
src/styles-new/_legacy.scss
Normal file
614
src/styles-new/_legacy.scss
Normal file
@ -0,0 +1,614 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
/********************************************************************* PLOTS */
|
||||||
|
mct-plot {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
|
/********************************************* STACKED PLOT LAYOUT */
|
||||||
|
.t-plot-stacked {
|
||||||
|
.l-view-section {
|
||||||
|
// Make this a flex container
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
.gl-plot.child-frame {
|
||||||
|
mct-plot {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
flex: 1 1 auto;
|
||||||
|
&:not(:first-child) {
|
||||||
|
margin-top: $interiorMargin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.s-status-timeconductor-unsynced .holder-plot {
|
||||||
|
.t-object-alert.t-alert-unsynced {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot {
|
||||||
|
color: $colorPlotFg;
|
||||||
|
display: flex;
|
||||||
|
font-size: 0.7rem;
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
min-height: $plotMinH;
|
||||||
|
|
||||||
|
/********************************************* AXIS AND DISPLAY AREA */
|
||||||
|
.plot-wrapper-axis-and-display-area {
|
||||||
|
margin-top: $interiorMargin; // Keep the top tick label from getting clipped
|
||||||
|
position: relative;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
.t-object-alert {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
font-size: 1.5em;
|
||||||
|
top: $interiorMarginSm;
|
||||||
|
left: $interiorMarginSm;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-wrapper-display-area-and-x-axis {
|
||||||
|
// Holds the plot area and the X-axis only
|
||||||
|
position: absolute;
|
||||||
|
top: nth($plotDisplayArea, 1);
|
||||||
|
right:0; //nth($plotDisplayArea, 2);
|
||||||
|
bottom: 0;
|
||||||
|
left: nth($plotDisplayArea, 4);
|
||||||
|
|
||||||
|
.gl-plot-display-area {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: nth($plotDisplayArea, 3);
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-axis-area.gl-plot-x {
|
||||||
|
top: auto;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: $plotXBarH;
|
||||||
|
width: auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-axis-area {
|
||||||
|
position: absolute;
|
||||||
|
&.gl-plot-y {
|
||||||
|
top: nth($plotDisplayArea, 1);
|
||||||
|
right: auto;
|
||||||
|
bottom: nth($plotDisplayArea, 3);
|
||||||
|
left: 0;
|
||||||
|
width: $plotYBarW;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-coords {
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: $controlCr;
|
||||||
|
background: black;
|
||||||
|
color: lighten($colorBodyFg, 30%);
|
||||||
|
padding: 2px 5px;
|
||||||
|
position: absolute;
|
||||||
|
top: nth($plotDisplayArea,1) + $interiorMarginLg;
|
||||||
|
right: auto;
|
||||||
|
bottom: auto;
|
||||||
|
left: nth($plotDisplayArea,4) + $interiorMarginLg;
|
||||||
|
z-index: 10;
|
||||||
|
&:empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-label,
|
||||||
|
.l-plot-label {
|
||||||
|
color: $colorPlotLabelFg;
|
||||||
|
position: absolute;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&.gl-plot-x-label,
|
||||||
|
&.l-plot-x-label {
|
||||||
|
top: auto;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.gl-plot-y-label,
|
||||||
|
&.l-plot-y-label {
|
||||||
|
$x: -50%;
|
||||||
|
$r: -90deg;
|
||||||
|
transform-origin: 50% 0;
|
||||||
|
transform: translateX($x) rotate($r);
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: $interiorMargin; // Kick off the left edge
|
||||||
|
left: 0;
|
||||||
|
top: 50%;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-x-options,
|
||||||
|
.gl-plot-y-options {
|
||||||
|
$h: 24px;
|
||||||
|
position: absolute;
|
||||||
|
height: $h;
|
||||||
|
min-height: $h;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-x-options {
|
||||||
|
transform: translateX(-50%);
|
||||||
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-y-options {
|
||||||
|
transform: translateY(-50%);
|
||||||
|
min-width: 150px; // Need this due to enclosure of .select
|
||||||
|
top: 50%;
|
||||||
|
left: $plotYLabelW + $interiorMargin * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-plot-display-controls {
|
||||||
|
position: absolute;
|
||||||
|
top: $interiorMargin;
|
||||||
|
right: $interiorMargin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-hash {
|
||||||
|
position: absolute;
|
||||||
|
opacity: $opacityPlotHash;
|
||||||
|
&.hash-v {
|
||||||
|
border-right: 1px $colorPlotHash $stylePlotHash;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
&.hash-h {
|
||||||
|
border-bottom: 1px $colorPlotHash $stylePlotHash;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-display-area,
|
||||||
|
.plot-display-area {
|
||||||
|
@if $colorPlotBg != none {
|
||||||
|
background-color: $colorPlotBg;
|
||||||
|
}
|
||||||
|
cursor: crosshair;
|
||||||
|
border: 1px solid $colorPlotAreaBorder;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tick {
|
||||||
|
position: absolute;
|
||||||
|
border: 0 $colorPlotHash solid;
|
||||||
|
&.tick-x {
|
||||||
|
border-right-width: 1px;
|
||||||
|
height: 100%; // Assumption is that the tick will be in a holder that will set it's height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-tick,
|
||||||
|
.tick-label {
|
||||||
|
@include reverseEllipsis();
|
||||||
|
font-size: 0.7rem;
|
||||||
|
position: absolute;
|
||||||
|
&.gl-plot-x-tick-label,
|
||||||
|
&.tick-label-x {
|
||||||
|
right: auto;
|
||||||
|
bottom: auto;
|
||||||
|
left: auto;
|
||||||
|
height: auto;
|
||||||
|
width: 20%;
|
||||||
|
margin-left: -10%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
&.gl-plot-y-tick-label,
|
||||||
|
&.tick-label-y {
|
||||||
|
top: auto;
|
||||||
|
height: 1em;
|
||||||
|
width: auto;
|
||||||
|
margin-bottom: -0.5em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-tick {
|
||||||
|
&.gl-plot-x-tick-label {
|
||||||
|
top: $interiorMargin;
|
||||||
|
}
|
||||||
|
&.gl-plot-y-tick-label {
|
||||||
|
right: $interiorMargin;
|
||||||
|
left: $interiorMargin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tick-label {
|
||||||
|
&.tick-label-x {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
&.tick-label-y {
|
||||||
|
right: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.export-plot {
|
||||||
|
$bg: white;
|
||||||
|
$fg: black;
|
||||||
|
$gry: #999;
|
||||||
|
|
||||||
|
background: $bg !important;
|
||||||
|
z-index: -10;
|
||||||
|
|
||||||
|
.l-view-section {
|
||||||
|
$m: $interiorMargin;
|
||||||
|
top: $m !important;
|
||||||
|
right: $m;
|
||||||
|
bottom: $m;
|
||||||
|
left: $m;
|
||||||
|
|
||||||
|
.s-status-timeconductor-unsynced .holder-plot {
|
||||||
|
.t-object-alert.t-alert-unsynced {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot-display-area {
|
||||||
|
background: none !important;
|
||||||
|
border-color: $gry !important;
|
||||||
|
|
||||||
|
.gl-plot-local-controls,
|
||||||
|
.h-local-controls {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot {
|
||||||
|
color: $fg;
|
||||||
|
|
||||||
|
.gl-plot-hash {
|
||||||
|
opacity: 0.1;
|
||||||
|
border-color: $fg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
thead {
|
||||||
|
border-bottom: none;
|
||||||
|
|
||||||
|
th {
|
||||||
|
background: #eee;
|
||||||
|
border-left-color: $bg;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tbody {
|
||||||
|
tr {
|
||||||
|
border-top: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
color: $fg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************************************** _LEGEND.SCSS */
|
||||||
|
.gl-plot-legend {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
|
&__view-control {
|
||||||
|
padding-top: 2px;
|
||||||
|
margin-right: $interiorMarginSm;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
table-layout: fixed;
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
@include ellipsize(); // Note: this won't work if table-layout uses anything other than fixed.
|
||||||
|
padding: 1px 3px; // Tighter than standard tabular padding
|
||||||
|
//width: 1%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.hover-on-plot {
|
||||||
|
// User is hovering over the plot to get a value at a point
|
||||||
|
.hover-value-enabled {
|
||||||
|
background-color: $legendHoverValueBg;
|
||||||
|
border-radius: $smallCr;
|
||||||
|
padding: 0 $interiorMarginSm;
|
||||||
|
|
||||||
|
&.value-to-display-min:before {
|
||||||
|
content: 'MIN ';
|
||||||
|
}
|
||||||
|
&.value-to-display-max:before {
|
||||||
|
content: 'MAX ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************** GENERAL STYLES, ALL STATES */
|
||||||
|
.plot-legend-item {
|
||||||
|
// General styles for legend items, both expanded and collapsed legend states
|
||||||
|
.plot-series-color-swatch {
|
||||||
|
border-radius: $smallCr;
|
||||||
|
border: 1px solid $colorBodyBg;
|
||||||
|
display: inline-block;
|
||||||
|
height: $plotSwatchD;
|
||||||
|
width: $plotSwatchD;
|
||||||
|
}
|
||||||
|
.plot-series-name {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plot-series-value {
|
||||||
|
@include ellipsize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.plot-wrapper-expanded-legend {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gl-plot {
|
||||||
|
&.plot-legend-collapsed .plot-wrapper-expanded-legend { display: none; }
|
||||||
|
&.plot-legend-expanded .plot-wrapper-collapsed-legend { display: none; }
|
||||||
|
|
||||||
|
/***************** GENERAL STYLES, COLLAPSED */
|
||||||
|
&.plot-legend-collapsed {
|
||||||
|
// .plot-legend-item is a span of spans.
|
||||||
|
&.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; }
|
||||||
|
&.plot-legend-left .gl-plot-legend { margin-right: $interiorMargin; }
|
||||||
|
|
||||||
|
.plot-legend-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: stretch;
|
||||||
|
&:not(:first-child) {
|
||||||
|
margin-left: $interiorMarginLg;
|
||||||
|
}
|
||||||
|
.plot-series-swatch-and-name,
|
||||||
|
.plot-series-value {
|
||||||
|
@include ellipsize();
|
||||||
|
flex: 1 1 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plot-series-swatch-and-name {
|
||||||
|
margin-right: $interiorMarginSm;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plot-series-value {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************** GENERAL STYLES, EXPANDED */
|
||||||
|
&.plot-legend-expanded {
|
||||||
|
.gl-plot-legend {
|
||||||
|
max-height: 70%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plot-wrapper-expanded-legend {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************** TOP OR BOTTOM */
|
||||||
|
&.plot-legend-top,
|
||||||
|
&.plot-legend-bottom {
|
||||||
|
// General styles when legend is on the top or bottom
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
&.plot-legend-collapsed {
|
||||||
|
// COLLAPSED ON TOP OR BOTTOM
|
||||||
|
.plot-wrapper-collapsed-legend {
|
||||||
|
display: flex;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************** EITHER SIDE */
|
||||||
|
&.plot-legend-left,
|
||||||
|
&.plot-legend-right {
|
||||||
|
// If the legend is expanded, use flex-col instead so that the legend gets the width it needs.
|
||||||
|
&.plot-legend-expanded {
|
||||||
|
// EXPANDED, ON EITHER SIDE
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.plot-legend-collapsed {
|
||||||
|
// COLLAPSED, ON EITHER SIDE
|
||||||
|
.gl-plot-legend {
|
||||||
|
max-height: inherit;
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
.plot-wrapper-collapsed-legend {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.plot-legend-item {
|
||||||
|
margin-bottom: 1px;
|
||||||
|
margin-left: 0;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.plot-series-swatch-and-name {
|
||||||
|
flex: 0 1 auto;
|
||||||
|
min-width: 20%;
|
||||||
|
}
|
||||||
|
.plot-series-value {
|
||||||
|
flex: 0 1 auto;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/***************** ON BOTTOM OR RIGHT */
|
||||||
|
&.plot-legend-right:not(.plot-legend-expanded),
|
||||||
|
&.plot-legend-bottom {
|
||||||
|
.gl-plot-legend {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
.plot-wrapper-axis-and-display-area {
|
||||||
|
order: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/********************************************************* CLOCKS AND TIMERS */
|
||||||
|
.c-clock,
|
||||||
|
.c-timer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 1.25em;
|
||||||
|
|
||||||
|
> * {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__value {
|
||||||
|
color: $colorBodyFgEm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-clock {
|
||||||
|
> * + * { margin-left: $interiorMargin; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-timer {
|
||||||
|
$ctrlW: 22px;
|
||||||
|
|
||||||
|
&__controls {
|
||||||
|
margin-right: 0;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: $transOut;
|
||||||
|
width: 0;
|
||||||
|
|
||||||
|
.c-click-icon:before { font-size: 1em; }
|
||||||
|
}
|
||||||
|
|
||||||
|
&__direction {
|
||||||
|
font-size: 0.9em;
|
||||||
|
margin-right: $interiorMargin;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__ng-controller {
|
||||||
|
font-size: 0;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.c-timer__controls {
|
||||||
|
transition: $transOut; // On purpose: want this to take a bit longer
|
||||||
|
margin-right: $interiorMargin;
|
||||||
|
width: $ctrlW * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-stopped .c-timer__controls { width: $ctrlW; }
|
||||||
|
}
|
||||||
|
|
||||||
|
&__direction,
|
||||||
|
&__value {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-started {
|
||||||
|
.c-timer {
|
||||||
|
&__direction,
|
||||||
|
&__value {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************* VARIOUS */
|
||||||
|
.overlay {
|
||||||
|
.outer-holder {
|
||||||
|
background: $colorMenuBg;
|
||||||
|
color: $colorMenuFg !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form .form-row {
|
||||||
|
.label {
|
||||||
|
color: $colorMenuFg !important;
|
||||||
|
}
|
||||||
|
.selector-list {
|
||||||
|
@include reactive-input();
|
||||||
|
background: $colorInputBg !important;
|
||||||
|
color: $colorInputFg !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ui-symbol.view-control {
|
||||||
|
display: block;
|
||||||
|
transform-origin: center center;
|
||||||
|
|
||||||
|
&:before { content: $glyph-icon-arrow-right-equilateral; }
|
||||||
|
|
||||||
|
&.expanded {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-imagery {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-frame-outer {
|
||||||
|
min-width: 200px;
|
||||||
|
min-height: 200px;
|
||||||
|
}
|
||||||
|
|
@ -133,6 +133,12 @@
|
|||||||
background-repeat: $repeatDir;
|
background-repeat: $repeatDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin sliderTrack($bg: $scrollbarTrackColorBg) {
|
||||||
|
border-radius: 2px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: $bg;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin bgVertStripes($c: yellow, $a: 0.1, $d: 40px) {
|
@mixin bgVertStripes($c: yellow, $a: 0.1, $d: 40px) {
|
||||||
background-image: linear-gradient(-90deg,
|
background-image: linear-gradient(-90deg,
|
||||||
rgba($c, $a) 0%, rgba($c, $a) 50%,
|
rgba($c, $a) 0%, rgba($c, $a) 50%,
|
||||||
@ -288,7 +294,7 @@
|
|||||||
padding: $interiorMargin floor($interiorMargin * 1.25);
|
padding: $interiorMargin floor($interiorMargin * 1.25);
|
||||||
|
|
||||||
&:after,
|
&:after,
|
||||||
> * {
|
> * + * {
|
||||||
margin-left: $interiorMarginSm;
|
margin-left: $interiorMarginSm;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -327,7 +333,6 @@
|
|||||||
background: none;
|
background: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius: $controlCr;
|
border-radius: $controlCr;
|
||||||
color: $colorKey;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: $pTB $pLR ;
|
padding: $pTB $pLR ;
|
||||||
|
|
||||||
@ -342,6 +347,10 @@
|
|||||||
// Needed for c-togglebutton.
|
// Needed for c-togglebutton.
|
||||||
font-size: 1.25em;
|
font-size: 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[class*="--major"] {
|
||||||
|
color: $colorKey;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin cCtrlWrapper {
|
@mixin cCtrlWrapper {
|
||||||
@ -500,5 +509,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin test($c: deeppink, $a: 0.3) {
|
@mixin test($c: deeppink, $a: 0.3) {
|
||||||
|
background: rgba($c, $a) !important;
|
||||||
background-color: rgba($c, $a) !important;
|
background-color: rgba($c, $a) !important;
|
||||||
|
box-shadow: deeppink 0 0 10px 1px !important;
|
||||||
}
|
}
|
||||||
|
113
src/styles-new/_status.scss
Normal file
113
src/styles-new/_status.scss
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
||||||
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
|
* Administration. All rights reserved.
|
||||||
|
*
|
||||||
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
* Open MCT includes source code licensed under additional open source
|
||||||
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
||||||
|
* this source code distribution or the Licensing information page available
|
||||||
|
* at runtime from the About dialog for additional information.
|
||||||
|
*****************************************************************************/
|
||||||
|
/*************************************************** MIXINS */
|
||||||
|
@mixin statusStyle($bg, $fg, $ic) {
|
||||||
|
background: $bg !important;
|
||||||
|
background-color: $bg !important;
|
||||||
|
color: $fg !important;
|
||||||
|
&:before {
|
||||||
|
color: $ic;
|
||||||
|
display: inline-block;
|
||||||
|
font-family: symbolsfont;
|
||||||
|
font-size: 0.7em;
|
||||||
|
margin-right: $interiorMargin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin elementStatusColors($c) {
|
||||||
|
// Sets bg and icon colors for elements
|
||||||
|
background: rgba($c, 0.5) !important;
|
||||||
|
&:before {
|
||||||
|
color: $c !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin indicatorStatusColors($c) {
|
||||||
|
&:before, .count {
|
||||||
|
color: $c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-limit--yellow {
|
||||||
|
@include statusStyle($colorLimitYellowBg, $colorLimitYellowFg, $colorLimitYellowIc);
|
||||||
|
&.is-limit--upr:before { content: $glyph-icon-arrow-up; }
|
||||||
|
&.is-limit--lwr:before { content: $glyph-icon-arrow-down; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-limit--red {
|
||||||
|
@include statusStyle($colorLimitRedBg, $colorLimitRedFg, $colorLimitRedIc);
|
||||||
|
&.is-limit--upr:before { content: $glyph-icon-arrow-double-up; }
|
||||||
|
&.is-limit--lwr:before { content: $glyph-icon-arrow-double-down; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************** STATUS */
|
||||||
|
[class*='s-status'] {
|
||||||
|
&:before {
|
||||||
|
margin-right: $interiorMargin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.s-status-warning-hi, .s-status-icon-warning-hi { @include elementStatusColors($colorWarningHi); }
|
||||||
|
.s-status-warning-lo, .s-status-icon-warning-lo { @include elementStatusColors($colorWarningLo); }
|
||||||
|
.s-status-diagnostic, .s-status-icon-diagnostic { @include elementStatusColors($colorDiagnostic); }
|
||||||
|
.s-status-info, .s-status-icon-info { @include elementStatusColors($colorInfo); }
|
||||||
|
.s-status-ok, .s-status-icon-ok { @include elementStatusColors($colorOk); }
|
||||||
|
|
||||||
|
.s-status-icon-warning-hi:before { content: $glyph-icon-alert-triangle; }
|
||||||
|
.s-status-icon-warning-lo:before { content: $glyph-icon-alert-rect; }
|
||||||
|
.s-status-icon-diagnostic:before { content: $glyph-icon-eye-open; }
|
||||||
|
.s-status-icon-info:before { content: $glyph-icon-info; }
|
||||||
|
.s-status-icon-ok:before { content: $glyph-icon-check; }
|
||||||
|
|
||||||
|
/*************************************************** INDICATOR COLORING */
|
||||||
|
.ls-indicator {
|
||||||
|
&.s-status-info {
|
||||||
|
@include indicatorStatusColors($colorInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.s-status-disabled {
|
||||||
|
@include indicatorStatusColors($colorIndicatorDisabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.s-status-available {
|
||||||
|
@include indicatorStatusColors($colorIndicatorAvailable);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.s-status-on,
|
||||||
|
&.s-status-enabled {
|
||||||
|
@include indicatorStatusColors($colorIndicatorOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.s-status-off {
|
||||||
|
@include indicatorStatusColors($colorIndicatorOff);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.s-status-caution,
|
||||||
|
&.s-status-warning,
|
||||||
|
&.s-status-alert {
|
||||||
|
@include indicatorStatusColors($colorStatusAlert);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.s-status-error {
|
||||||
|
@include indicatorStatusColors($colorStatusError);
|
||||||
|
}
|
||||||
|
}
|
@ -21,15 +21,41 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
/******************************************************** TABLE */
|
/******************************************************** TABLE */
|
||||||
|
table {
|
||||||
|
$minW: 50px;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
thead {
|
||||||
|
background: $colorTabHeaderBg;
|
||||||
|
th + th {
|
||||||
|
border-left: 1px solid $colorTabHeaderBorder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tbody {
|
||||||
|
tr + tr {
|
||||||
|
border-top: 1px solid $colorTabBorder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: $minW;
|
||||||
|
padding: $tabularTdPadTB $tabularTdPadLR;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.c-table {
|
.c-table {
|
||||||
// Can be used by any type of table, scrolling, LAD, etc.
|
// Can be used by any type of table, scrolling, LAD, etc.
|
||||||
$min-w: 50px;
|
$min-w: 50px;
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column nowrap;
|
|
||||||
justify-content: flex-start;
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0; right: 0; bottom: 0; left: 0;
|
top: 0; right: 0; bottom: 0; left: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
&__control-bar,
|
&__control-bar,
|
||||||
&__headers-w {
|
&__headers-w {
|
||||||
@ -37,21 +63,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/******************************* ELEMENTS */
|
/******************************* ELEMENTS */
|
||||||
th, td {
|
|
||||||
white-space: nowrap;
|
|
||||||
min-width: $min-w;
|
|
||||||
padding: $tabularTdPadTB $tabularTdPadLR;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
color: $colorTelemFresh;
|
|
||||||
vertical-align: top;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__control-bar {
|
&__control-bar {
|
||||||
margin-bottom: $interiorMarginSm;
|
margin-bottom: $interiorMarginSm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thead tr,
|
||||||
[class*="__header"] {
|
[class*="__header"] {
|
||||||
background: $colorTabHeaderBg;
|
background: $colorTabHeaderBg;
|
||||||
|
|
||||||
@ -62,14 +79,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tbody,
|
||||||
&__body {
|
&__body {
|
||||||
tr {
|
tr:not(.c-table__group-header) + tr:not(.c-table__group-header) {
|
||||||
&:not(:first-child) {
|
border-top: 1px solid $colorTabBorder;
|
||||||
border-top: 1px solid $colorTabBorder;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__group-header {
|
||||||
|
// tr element found in LAD Table Sets
|
||||||
|
border-top: 1px solid $colorTabHeaderBorder;
|
||||||
|
background: $colorTabGroupHeaderBg;
|
||||||
|
td { color: $colorTabGroupHeaderFg; }
|
||||||
|
}
|
||||||
|
|
||||||
&--sortable {
|
&--sortable {
|
||||||
.is-sorting {
|
.is-sorting {
|
||||||
&:after {
|
&:after {
|
||||||
@ -89,3 +112,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-lad-table {
|
||||||
|
th, td {
|
||||||
|
width: 33%; // Needed to prevent size jumping as values dynamically update
|
||||||
|
}
|
||||||
|
}
|
@ -26,7 +26,10 @@
|
|||||||
/******************** RENDERS CSS */
|
/******************** RENDERS CSS */
|
||||||
@import "glyphs";
|
@import "glyphs";
|
||||||
@import "global";
|
@import "global";
|
||||||
|
@import "status";
|
||||||
@import "controls";
|
@import "controls";
|
||||||
|
@import "table";
|
||||||
|
@import "legacy";
|
||||||
|
|
||||||
/******************** LEGACY CSS */
|
/******************** LEGACY CSS */
|
||||||
$output-bourbon-deprecation-warnings: false;
|
$output-bourbon-deprecation-warnings: false;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
//@import "../styles/about";
|
//@import "../styles/about";
|
||||||
//@import "../styles/text";
|
//@import "../styles/text";
|
||||||
@import "../styles/icons";
|
@import "../styles/icons";
|
||||||
@import "../styles/status";
|
//@import "../styles/status";
|
||||||
@import "../styles/data-status";
|
@import "../styles/data-status";
|
||||||
@import "../styles/helpers/bubbles";
|
@import "../styles/helpers/bubbles";
|
||||||
@import "../styles/helpers/splitter";
|
@import "../styles/helpers/splitter";
|
||||||
@ -57,8 +57,8 @@
|
|||||||
//!********************************* VIEWS *!
|
//!********************************* VIEWS *!
|
||||||
@import "../styles/fixed-position";
|
@import "../styles/fixed-position";
|
||||||
//@import "../styles/lists/tabular";
|
//@import "../styles/lists/tabular";
|
||||||
@import "../styles/plots/plots-main";
|
//@import "../styles/plots/plots-main";
|
||||||
@import "../styles/plots/legend";
|
//@import "../styles/plots/legend";
|
||||||
@import "../styles/iframe";
|
@import "../styles/iframe";
|
||||||
@import "../styles/views";
|
@import "../styles/views";
|
||||||
@import "../styles/items/item";
|
@import "../styles/items/item";
|
||||||
@ -69,11 +69,9 @@
|
|||||||
//!********************************* TO BE MOVED *!
|
//!********************************* TO BE MOVED *!
|
||||||
@import "../styles/autoflow";
|
@import "../styles/autoflow";
|
||||||
@import "../styles/features/imagery";
|
@import "../styles/features/imagery";
|
||||||
@import "../styles/features/time-display";
|
//@import "../styles/features/time-display";
|
||||||
@import "../styles/widgets";
|
@import "../styles/widgets";
|
||||||
//
|
//
|
||||||
//!********************************* APP STARTUP *!
|
//!********************************* APP STARTUP *!
|
||||||
//@import "../styles/app-start";
|
//@import "../styles/app-start";
|
||||||
|
|
||||||
@import "../styles/conductor/time-conductor-snow";
|
|
||||||
//@import "../styles/notebook/notebook-snow";
|
|
@ -53,7 +53,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
> .abs.outer-holder {
|
> .abs.outer-holder {
|
||||||
z-index: 72;
|
z-index: 70;
|
||||||
> .abs.inner-holder {
|
> .abs.inner-holder {
|
||||||
$m: $overlayMargin;
|
$m: $overlayMargin;
|
||||||
top: $m;
|
top: $m;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
<template>
|
<template>
|
||||||
<div class="u-contents c-so-view"
|
<div class="u-contents c-so-view has-local-controls"
|
||||||
:class="{
|
:class="{
|
||||||
'c-so-view--no-frame': !hasFrame
|
'c-so-view--no-frame': !hasFrame
|
||||||
}">
|
}">
|
||||||
|
@ -35,6 +35,11 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type='text'],
|
||||||
|
input[type='search'] {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
|
this.openmct.selection.off('change', this.showSelection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -49,6 +49,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-color-swatch {
|
||||||
|
$d: 12px;
|
||||||
|
display: block;
|
||||||
|
flex: 0 0 auto;
|
||||||
|
width: $d;
|
||||||
|
height: $d;
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************** LEGACY */
|
/************************************************************** LEGACY */
|
||||||
// TODO: refactor when legacy properties markup can be converted
|
// TODO: refactor when legacy properties markup can be converted
|
||||||
.inspector-location {
|
.inspector-location {
|
||||||
@ -128,9 +136,6 @@
|
|||||||
grid-column: 1 / 3;
|
grid-column: 1 / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+ .c-properties {
|
+ .c-properties {
|
||||||
// Margin between components
|
// Margin between components
|
||||||
margin-top: $interiorMarginLg;
|
margin-top: $interiorMarginLg;
|
||||||
@ -176,6 +181,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/********************************************* LEGACY SUPPORT */
|
||||||
|
.c-inspector {
|
||||||
|
li.grid-row + li.grid-row {
|
||||||
|
> * {
|
||||||
|
border-top: 1px solid $colorInspectorSectionHeaderBg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
li.grid-row .label {
|
||||||
|
color: $colorInspectorPropName;
|
||||||
|
}
|
||||||
|
|
||||||
|
li.grid-row .value {
|
||||||
|
color: $colorInspectorPropVal;
|
||||||
|
word-break: break-all;
|
||||||
|
&:first-child {
|
||||||
|
// If there is no preceding .label element, make value span columns
|
||||||
|
grid-column: 1 / 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="l-browse-bar">
|
<div class="l-browse-bar">
|
||||||
<div class="l-browse-bar__start">
|
<div class="l-browse-bar__start">
|
||||||
<button class="l-browse-bar__nav-to-parent-button c-click-icon icon-pointer-left"></button>
|
<button class="l-browse-bar__nav-to-parent-button c-click-icon c-click-icon--major icon-pointer-left"></button>
|
||||||
<div class="l-browse-bar__object-name--w"
|
<div class="l-browse-bar__object-name--w"
|
||||||
:class="type.cssClass">
|
:class="type.cssClass">
|
||||||
<span
|
<span
|
||||||
@ -43,7 +43,7 @@
|
|||||||
title="New Notebook entry"
|
title="New Notebook entry"
|
||||||
@click="snapshot()">
|
@click="snapshot()">
|
||||||
</button>
|
</button>
|
||||||
<button class="l-browse-bar__actions__notebook-entry c-button c-button--major icon-pencil" title="Edit" v-if="!isEditing" @click="edit()"></button>
|
<button class="l-browse-bar__actions__notebook-entry c-button c-button--major icon-pencil" title="Edit" v-if="isViewEditable & !isEditing" @click="edit()"></button>
|
||||||
<button class="l-browse-bar__actions c-button c-button--major icon-save" title="Save and Finish Editing" v-if="isEditing" @click="saveAndFinishEditing()"></button>
|
<button class="l-browse-bar__actions c-button c-button--major icon-save" title="Save and Finish Editing" v-if="isEditing" @click="saveAndFinishEditing()"></button>
|
||||||
<button class="l-browse-bar__actions c-button icon-x" title="Cancel Editing" v-if="isEditing" @click="cancelEditing()"></button>
|
<button class="l-browse-bar__actions c-button icon-x" title="Cancel Editing" v-if="isEditing" @click="cancelEditing()"></button>
|
||||||
</div>
|
</div>
|
||||||
@ -128,6 +128,14 @@ import NotebookSnapshot from '../utils/notebook-snapshot';
|
|||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
return objectType.definition;
|
return objectType.definition;
|
||||||
|
},
|
||||||
|
isViewEditable() {
|
||||||
|
let currentViewKey = this.currentView.key;
|
||||||
|
if (currentViewKey !== undefined) {
|
||||||
|
let currentViewProvider = this.openmct.objectViews.getByProviderKey(currentViewKey);
|
||||||
|
return currentViewProvider.canEdit && currentViewProvider.canEdit(this.domainObject);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
|
@ -5,11 +5,11 @@
|
|||||||
<div class="l-shell__head">
|
<div class="l-shell__head">
|
||||||
<CreateButton class="l-shell__create-button"></CreateButton>
|
<CreateButton class="l-shell__create-button"></CreateButton>
|
||||||
<div class="l-shell__controls">
|
<div class="l-shell__controls">
|
||||||
<button class="c-click-icon icon-new-window" title="Open in a new browser tab"
|
<button class="c-click-icon c-click-icon--major icon-new-window" title="Open in a new browser tab"
|
||||||
@click="openInNewTab"
|
@click="openInNewTab"
|
||||||
target="_blank">
|
target="_blank">
|
||||||
</button>
|
</button>
|
||||||
<button v-bind:class="['c-click-icon', fullScreen ? 'icon-fullscreen-collapse' : 'icon-fullscreen-expand']"
|
<button v-bind:class="['c-click-icon c-click-icon--major', fullScreen ? 'icon-fullscreen-collapse' : 'icon-fullscreen-expand']"
|
||||||
v-bind:title="`${fullScreen ? 'Exit' : 'Enable'} full screen mode`"
|
v-bind:title="`${fullScreen ? 'Exit' : 'Enable'} full screen mode`"
|
||||||
@click="fullScreenToggle">
|
@click="fullScreenToggle">
|
||||||
</button>
|
</button>
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__view-control {
|
&__view-control {
|
||||||
color: $colorItemTreeVC;
|
|
||||||
margin-right: $interiorMarginSm;
|
margin-right: $interiorMarginSm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,6 +170,18 @@ define([], function () {
|
|||||||
* otherwise 'false'.
|
* otherwise 'false'.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An optional function that defines whether or not this view can be used to edit a given object.
|
||||||
|
* If not provided, will default to `false` and the view will not support editing.
|
||||||
|
*
|
||||||
|
* @method canEdit
|
||||||
|
* @memberof module:openmct.ViewProvider#
|
||||||
|
* @param {module:openmct.DomainObject} domainObject the domain object
|
||||||
|
* to be edited
|
||||||
|
* @returns {boolean} 'true' if the view can be used to edit the provided object,
|
||||||
|
* otherwise 'false'.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional method determining the priority of a given view. If this
|
* Optional method determining the priority of a given view. If this
|
||||||
* function is not defined on a view provider, then a default priority
|
* function is not defined on a view provider, then a default priority
|
||||||
|
Reference in New Issue
Block a user