Skip to content

Commit

Permalink
Some further cleanup to show titles correctly on empty charts/charts
Browse files Browse the repository at this point in the history
  • Loading branch information
h-kataria committed Nov 9, 2017
1 parent 261105d commit ffac729
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 19 deletions.
Expand Up @@ -2,7 +2,7 @@
.card-pf
.card-pf-heading
%h2.card-pf-title
{{vm.data.config.title}}
{{vm.config.headTitle}}
.card-pf-body
%pf-line-chart{'ng-if' => "vm.loadingDone", 'ng-attr-id' => "{{vm.id}}", 'config' => "vm.config", 'chart-data' => "vm.data", 'set-area-chart' => "vm.custAreaChart", 'show-x-axis' => "vm.custShowXAxis", 'show-y-axis' => "vm.custShowYAxis"}
%span.trend-footer-pf{"ng-class" => "{ 'chart-transparent-text': vm.data.dataAvailable === false }"}
Expand Down
2 changes: 1 addition & 1 deletion app/views/ems_container/_recent-pods-line-chart.html.haml
Expand Up @@ -2,7 +2,7 @@
.card-pf
.card-pf-heading
%h2.card-pf-title
{{vm.data.config.title}}
{{vm.config.headTitle}}
.card-pf-body
%pf-line-chart{'ng-if' => "vm.loadingDone", 'ng-attr-id' => "{{vm.id}}", 'config' => "vm.config", 'chart-data' => "vm.data", 'set-area-chart' => "vm.custAreaChart", 'show-x-axis' => "vm.custShowXAxis", 'show-y-axis' => "vm.custShowYAxis"}
%span.trend-footer-pf{"ng-class" => "{ 'chart-transparent-text': vm.data.dataAvailable === false }"}
Expand Down
2 changes: 1 addition & 1 deletion app/views/ems_container/_trends-chart.html.haml
Expand Up @@ -2,6 +2,6 @@
.card-pf
.card-pf-heading
%h2.card-pf-title
{{vm.data.config.title}}
{{vm.config.headTitle}}
.card-pf-body
%pf-trends-chart{'ng-if' => "vm.dataAvailable !== false", 'config' => "vm.config", 'chart-data' => "vm.data", 'show-x-axis' => "vm.custShowXAxis", 'show-y-axis' => "vm.custShowYAxis"}
2 changes: 0 additions & 2 deletions app/views/static/pf_charts/line-chart.html.haml
@@ -1,6 +1,4 @@
%span
.h3{'ng-if' => "$ctrl.chartData.dataAvailable === false"}
{{$ctrl.chartConfig.headTitle}}
%div{"ng-if" => "!$ctrl.loadingDone", :class => "spinner spinner-lg loading"}
%pf-c3-chart{'id' => "{{$ctrl.lineChartId}}", 'ng-if' => "$ctrl.chartData.dataAvailable !== false && $ctrl.loadingDone", 'config' => "$ctrl.chartConfig"}
%pf-empty-chart{'ng-if' => "$ctrl.chartData.dataAvailable === false", 'chart-height' => "$ctrl.chartConfig.size.height"}
14 changes: 0 additions & 14 deletions app/views/static/pf_charts/trends-chart.html.haml
@@ -1,6 +1,4 @@
%ng-switch{'on' => "$ctrl.config.layout", 'ng-class' => "{'data-unavailable-pf': $ctrl.chartData.dataAvailable === false}"}
.h3{'ng-if' => "$ctrl.chartData.dataAvailable === false"}
{{$ctrl.config.headTitle}}
%div{:class => 'ng-switch-default', 'ng-class' => "{'trend-card-large-pf': $ctrl.showLargeCardLayout,'trend-card-small-pf': $ctrl.showSmallCardLayout}"}

%span{:class => "trend-header-pf", 'ng-if' => "$ctrl.config.title"}
Expand Down Expand Up @@ -55,15 +53,3 @@
'show-x-axis' => "$ctrl.showXAxis", 'show-y-axis' => "$ctrl.showYAxis"}
%pf-empty-chart{'ng-if' => "$ctrl.chartData.dataAvailable === false", 'chart-height' => "$ctrl.getChartHeight()"}

%div{:class => "col-sm-4 trend-flat-col"}
%div{:class =>"trend-flat-details"}
%div{:class => "trend-flat-details-cell"}
%span{:class => "trend-title-flat-big-pf"}
{{$ctrl.getPercentageValue() + '%'}}

%div{:class => "trend-flat-details-cell"}
%span{:class => "trend-label-flat-strong-pf"}
{{$ctrl.config.trendLabel}}
%span{:class => "trend-label-flat-pf"}
{{$ctrl.getLatestValue()}} of {{$ctrl.chartData.total + ' ' + $ctrl.config.units}}

0 comments on commit ffac729

Please sign in to comment.