mirror of
https://github.com/nasa/openmct.git
synced 2025-02-07 11:30:28 +00:00
Merge pull request #942 from nasa/persist-graph-toggles-908
[Timeline] Persist resource graph toggles
This commit is contained in:
commit
6fb36374f6
@ -29,7 +29,7 @@
|
|||||||
}">
|
}">
|
||||||
<div class="l-cols">
|
<div class="l-cols">
|
||||||
<span class="l-col l-col-icon l-plot-resource"
|
<span class="l-col l-col-icon l-plot-resource"
|
||||||
ng-click="ngModel.toggleGraph()"
|
ng-click="ngModel.toggleGraph(); parameters.commit()"
|
||||||
title="Click to enable or disable inclusion in Resource Graphing">
|
title="Click to enable or disable inclusion in Resource Graphing">
|
||||||
<span class="ui-symbol"
|
<span class="ui-symbol"
|
||||||
ng-show="ngModel.graph()"
|
ng-show="ngModel.graph()"
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
<div class="t-swimlanes-holder l-swimlanes-holder"
|
<div class="t-swimlanes-holder l-swimlanes-holder"
|
||||||
mct-scroll-y="scroll.y">
|
mct-scroll-y="scroll.y">
|
||||||
<mct-include key="'timeline-tabular-swimlane-cols-tree'"
|
<mct-include key="'timeline-tabular-swimlane-cols-tree'"
|
||||||
|
parameters="{ commit: commit }"
|
||||||
ng-repeat="swimlane in timelineController.swimlanes()"
|
ng-repeat="swimlane in timelineController.swimlanes()"
|
||||||
ng-model="swimlane">
|
ng-model="swimlane">
|
||||||
</mct-include>
|
</mct-include>
|
||||||
|
@ -177,10 +177,6 @@ define(
|
|||||||
// representation to store local variables into.
|
// representation to store local variables into.
|
||||||
$scope.representation = {};
|
$scope.representation = {};
|
||||||
|
|
||||||
// Change templates (passing in undefined to clear
|
|
||||||
// if we don't have enough info to show a template.)
|
|
||||||
changeTemplate(canRepresent ? representation : undefined);
|
|
||||||
|
|
||||||
// Any existing representers are no longer valid; release them.
|
// Any existing representers are no longer valid; release them.
|
||||||
destroyRepresenters();
|
destroyRepresenters();
|
||||||
|
|
||||||
@ -226,6 +222,10 @@ define(
|
|||||||
// next change object/key pair changes
|
// next change object/key pair changes
|
||||||
toClear = uses.concat(['model']);
|
toClear = uses.concat(['model']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change templates (passing in undefined to clear
|
||||||
|
// if we don't have enough info to show a template.)
|
||||||
|
changeTemplate(canRepresent ? representation : undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the representation when the key changes (e.g. if a
|
// Update the representation when the key changes (e.g. if a
|
||||||
|
@ -194,6 +194,21 @@ define(
|
|||||||
.toHaveBeenCalledWith(testViews[1]);
|
.toHaveBeenCalledWith(testViews[1]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("exposes configuration before changing templates", function () {
|
||||||
|
var observedConfiguration;
|
||||||
|
|
||||||
|
mockChangeTemplate.andCallFake(function () {
|
||||||
|
observedConfiguration = mockScope.configuration;
|
||||||
|
});
|
||||||
|
|
||||||
|
mockScope.key = "xyz";
|
||||||
|
mockScope.domainObject = mockDomainObject;
|
||||||
|
fireWatch('key', mockScope.key);
|
||||||
|
fireWatch('domainObject', mockDomainObject);
|
||||||
|
|
||||||
|
expect(observedConfiguration).toBeDefined();
|
||||||
|
});
|
||||||
|
|
||||||
it("does not load templates until there is an object", function () {
|
it("does not load templates until there is an object", function () {
|
||||||
mockScope.key = "xyz";
|
mockScope.key = "xyz";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user