Global and Local Clear (#2418)

* first proto of global clear, working on tables

* global clear works on plots

* styling

* Status bar migration to top of layout, WIP

- Refine and remove legacy styles for Indicators;
- Significant cleanup in Indicator markup;
- Remove unnecessary wrapper component StatusBar.vue;
- Move collapse-button styles to a more general location in _controls
.scss;
- New hasMenu mixin to allow easier application of disclosure control
styling;

* Status bar migration to top of layout, WIP

- Refine styles and markup for Indicators;
- Better separation of styles for clickable and non-clickable
Indicators;

* Status bar migration to top of layout, WIP

- Added tracking style to indicator-template;
- Moved click action to button in label of globalClearIndicator;
- Removed unnecessary markup in Indicators.vue;
- Commented out __head collapse button for now in Layout.vue;

* Status Bar Migration WIP

- Significant progress styling Indicators and their hover bubbles;
- Pull back from clickable Indicators to hover approach;
- Better theme-based constants for Indicator menu-related colors;

* Status Bar Migration WIP

- Significant refactor of label element naming in multiple indicator
markup files;
- Refactor label-related CSS;
- Better class naming: no-collapse > no-minify;
- Refactor example *-launch files to use buttons instead of <a> tags;
- Significant progress on expanding shell head and button styling;

* Status Bar Migration WIP

- Cleanups, sanding on Indicator CSS;
- Added local storage retention for head expanded state;
- Adjust dark theme colors for $colorWarningHi for better legibility;
- Other minor tweaks and fixes;

* Status Bar Migration WIP

- Suppress background in Indicators;
- Restore Snow as default theme;

* add a local clear action, rename plugin

* objectViews extends eventemitter, table view provider provides an onClearData function that is called from ObjectView when clear event is emitted. TODO - support plots

* add support for plots via legacy view provider

* add test for clearDataAction

* remove focus from test file

* install the following plugins by default:
Import Export
Folder View
Tabs View
Flexible Layout
LAD Table
Go To Original Action

* update test to include plugin level tests

* remove focus from unit test
This commit is contained in:
Deep Tailor
2019-07-11 16:40:26 -07:00
committed by Andrew Henry
parent 9517c1f2cd
commit 362e565a09
37 changed files with 550 additions and 280 deletions

View File

@ -377,6 +377,19 @@ define([
delete this.unsubscribe;
}
this.fetch();
},
/**
* Clears the plot series, unsubscribes and resubscribes
* @public
*/
refresh: function () {
this.reset();
if (this.unsubscribe) {
this.unsubscribe();
delete this.unsubscribe;
}
this.fetch();
}
});

View File

@ -63,8 +63,11 @@ define([
$scope.pending = 0;
this.clearData = this.clearData.bind(this);
this.listenTo($scope, 'user:viewport:change:end', this.onUserViewportChangeEnd, this);
this.listenTo($scope, '$destroy', this.destroy, this);
this.listenTo($scope, 'clearData', this.clearData);
this.config = this.getConfig(this.$scope.domainObject);
this.listenTo(this.config.series, 'add', this.addSeries, this);
@ -74,6 +77,7 @@ define([
this.followTimeConductor();
this.newStyleDomainObject = $scope.domainObject.useCapability('adapter');
this.keyString = this.openmct.objects.makeKeyString(this.newStyleDomainObject.identifier);
this.filterObserver = this.openmct.objects.observe(
this.newStyleDomainObject,
@ -263,6 +267,12 @@ define([
});
};
PlotController.prototype.clearData = function () {
this.config.series.forEach(function (series) {
series.refresh();
});
};
/**
* Export view as JPG.
*/