mirror of
https://github.com/nasa/openmct.git
synced 2025-01-31 08:25:31 +00:00
[Testing] Move ExportImageController into constructor for dependency injection
This commit is contained in:
parent
26c14d2bca
commit
fecf419f83
@ -25,6 +25,7 @@ define([
|
|||||||
"./src/PlotController",
|
"./src/PlotController",
|
||||||
"./src/policies/PlotViewPolicy",
|
"./src/policies/PlotViewPolicy",
|
||||||
"./src/PlotOptionsController",
|
"./src/PlotOptionsController",
|
||||||
|
"./src/services/ExportImageService",
|
||||||
"text!./res/templates/plot.html",
|
"text!./res/templates/plot.html",
|
||||||
"text!./res/templates/plot-options-browse.html",
|
"text!./res/templates/plot-options-browse.html",
|
||||||
'legacyRegistry'
|
'legacyRegistry'
|
||||||
@ -33,6 +34,7 @@ define([
|
|||||||
PlotController,
|
PlotController,
|
||||||
PlotViewPolicy,
|
PlotViewPolicy,
|
||||||
PlotOptionsController,
|
PlotOptionsController,
|
||||||
|
ExportImageService,
|
||||||
plotTemplate,
|
plotTemplate,
|
||||||
plotOptionsBrowseTemplate,
|
plotOptionsBrowseTemplate,
|
||||||
legacyRegistry
|
legacyRegistry
|
||||||
@ -71,6 +73,7 @@ define([
|
|||||||
"depends": [
|
"depends": [
|
||||||
"$scope",
|
"$scope",
|
||||||
"$element",
|
"$element",
|
||||||
|
"ExportImageService",
|
||||||
"telemetryFormatter",
|
"telemetryFormatter",
|
||||||
"telemetryHandler",
|
"telemetryHandler",
|
||||||
"throttle",
|
"throttle",
|
||||||
@ -85,6 +88,13 @@ define([
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"services": [
|
||||||
|
{
|
||||||
|
"key": "ExportImageService",
|
||||||
|
"implementation": ExportImageService,
|
||||||
|
"depends": []
|
||||||
|
}
|
||||||
|
],
|
||||||
"constants": [
|
"constants": [
|
||||||
{
|
{
|
||||||
"key": "PLOT_FIXED_DURATION",
|
"key": "PLOT_FIXED_DURATION",
|
||||||
|
@ -32,8 +32,7 @@ define(
|
|||||||
"./elements/PlotLimitTracker",
|
"./elements/PlotLimitTracker",
|
||||||
"./elements/PlotTelemetryFormatter",
|
"./elements/PlotTelemetryFormatter",
|
||||||
"./modes/PlotModeOptions",
|
"./modes/PlotModeOptions",
|
||||||
"./SubPlotFactory",
|
"./SubPlotFactory"
|
||||||
"./services/ExportImageService"
|
|
||||||
],
|
],
|
||||||
function (
|
function (
|
||||||
PlotUpdater,
|
PlotUpdater,
|
||||||
@ -42,8 +41,7 @@ define(
|
|||||||
PlotLimitTracker,
|
PlotLimitTracker,
|
||||||
PlotTelemetryFormatter,
|
PlotTelemetryFormatter,
|
||||||
PlotModeOptions,
|
PlotModeOptions,
|
||||||
SubPlotFactory,
|
SubPlotFactory
|
||||||
ExportImageService
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var AXIS_DEFAULTS = [
|
var AXIS_DEFAULTS = [
|
||||||
@ -66,6 +64,7 @@ define(
|
|||||||
function PlotController(
|
function PlotController(
|
||||||
$scope,
|
$scope,
|
||||||
$element,
|
$element,
|
||||||
|
ExportImageService,
|
||||||
telemetryFormatter,
|
telemetryFormatter,
|
||||||
telemetryHandler,
|
telemetryHandler,
|
||||||
throttle,
|
throttle,
|
||||||
@ -250,7 +249,7 @@ define(
|
|||||||
|
|
||||||
self.pending = true;
|
self.pending = true;
|
||||||
self.$element = $element;
|
self.$element = $element;
|
||||||
self.ExportImageService = new ExportImageService();
|
self.ExportImageService = ExportImageService;
|
||||||
|
|
||||||
// Initialize axes; will get repopulated when telemetry
|
// Initialize axes; will get repopulated when telemetry
|
||||||
// metadata becomes available.
|
// metadata becomes available.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user