Fix flavor quota charts in NG Launch Instance

The flavor quota charts aren't rendering correctly
when the instance count is changed in the Angular
Launch Instance modal. The <svg> element was not
available to add slices as 'chartData.showChart'
is originally undefined.

This patches fixes the the issue by using ng-show
instead of ng-if.

Change-Id: I7b24da7942c3d02a55adc732d70a26aeb5b623ec
Closes-Bug: #1518030
This commit is contained in:
Kelly Domico 2015-11-23 17:16:35 -08:00
parent 474bdd710a
commit dd08ca723c
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@
</div>
<svg class="svg-pie-chart"
ng-if="chartData.showChart"
ng-show="chartData.showChart"
ng-attr-height="{$ ::model.settings.diameter $}"
ng-attr-width="{$ ::model.settings.diameter $}">
<g class="chart"

View File

@ -138,8 +138,8 @@
expect($elementTotal.find('svg').length).toBe(1);
});
it('Unlimited quota chart should have no svg element', function () {
expect($elementNoQuota.find('svg').length).toBe(0);
it('Unlimited quota chart should have hidden svg element', function () {
expect($elementNoQuota.find('svg').is(':hidden')).toBe(true);
});
it('Max chart should have 3 path elements', function () {