* Initial commit of plot refactor for vuejs * Use es6 classes instead of using extend * Use classList api to add and remove classes * Remove angular specific event mechanisms * Refactor plot legend into smaller components * Refactor moving config into MctPlot component. Fix Legend issues. * Refactor XAxis and YAxis into their own components * Remove commented out code * Remove empty initialize method * Fix grid lines and initialize function revert. * Check that plots views are available only to domainObjects that have range and domain * Make css class a computed property * Remove unnecessary legacyObject conversion * Remove comments and commented out code * Remove use of private for vue methods * Remove console logs * Fixes Y-axis ticks display * Adds stacked plots and overlay plots * Fix css for stacked plots * Disable Vue plots * Rename Stacked plot item component * Address Review comment: Remove unnecessary event emitted * Address review comments: Add a note about why nextTick is needed * Fix bug with legend when multiple plots are being displayed * Change LinearScale to a class * Remove duplicated comment * Adds missing copyright info * Revert change to stackedplotItem * Adds basic tests * Fixes broken test. * Adds new test * Fix linting errors. Adds tests * Adds tests * Adds tests for stacked plots * Adds more tests * Removes fdescribe * Adds tests for y-axis ticks * Tests for addition of series to plots * Adds more tests * Adds cursor guides test * Adds tests for interceptors * Adds more plots tests for x and y scale * Use config store * Adding goToOriginalAction tests * Modified tests to increase coverage, and added teardown for application router * Fixed linting issues Co-authored-by: Andrew Henry <akhenry@gmail.com>
65 lines
2.4 KiB
JavaScript
65 lines
2.4 KiB
JavaScript
/*****************************************************************************
|
|
* Open MCT, Copyright (c) 2014-2020, 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.
|
|
*****************************************************************************/
|
|
|
|
import StackedPlot from './StackedPlot.vue';
|
|
import Vue from 'vue';
|
|
|
|
export default function StackedPlotViewProvider(openmct) {
|
|
return {
|
|
key: 'plot-stacked',
|
|
name: 'Stacked Plot',
|
|
cssClass: 'icon-telemetry',
|
|
canView(domainObject) {
|
|
return domainObject.type === 'telemetry.plot.stacked';
|
|
},
|
|
|
|
canEdit(domainObject) {
|
|
return domainObject.type === 'telemetry.plot.stacked';
|
|
},
|
|
|
|
view: function (domainObject) {
|
|
let component;
|
|
|
|
return {
|
|
show: function (element) {
|
|
component = new Vue({
|
|
el: element,
|
|
components: {
|
|
StackedPlot
|
|
},
|
|
provide: {
|
|
openmct,
|
|
domainObject,
|
|
composition: openmct.composition.get(domainObject)
|
|
},
|
|
template: '<stacked-plot></stacked-plot>'
|
|
});
|
|
},
|
|
destroy: function () {
|
|
component.$destroy();
|
|
component = undefined;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}
|