Skip to content

Commit

Permalink
Merge pull request #6001 from stormpython/issue/5728
Browse files Browse the repository at this point in the history
Remove split chart option for tile map visualization
  • Loading branch information
Rashid Khan committed Mar 29, 2016
2 parents cc0fbf7 + b9e685f commit 0597513
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/plugins/kbn_vislib_vis_types/public/tile_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import VisSchemasProvider from 'ui/vis/schemas';
import AggResponseGeoJsonGeoJsonProvider from 'ui/agg_response/geo_json/geo_json';
import FilterBarPushFilterProvider from 'ui/filter_bar/push_filter';
import tileMapTemplate from 'plugins/kbn_vislib_vis_types/editors/tile_map.html';

export default function TileMapVisType(Private, getAppState, courier, config) {
const VislibVisType = Private(VislibVisTypeVislibVisTypeProvider);
const Schemas = Private(VisSchemasProvider);
Expand Down Expand Up @@ -120,6 +121,8 @@ export default function TileMapVisType(Private, getAppState, courier, config) {
group: 'buckets',
name: 'split',
title: 'Split Chart',
deprecate: true,
deprecateMessage: 'The Split Chart feature for Tile Maps has been deprecated.',
min: 0,
max: 1
}
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/kibana/public/visualize/editor/agg_add.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<label>Select {{ groupName }} type</label>
<ul class="form-group list-group list-group-menu">
<li
ng-hide="schema.deprecate"
ng-repeat="schema in availableSchema"
ng-click="add.submit(schema)"
class="list-group-item list-group-menu-item">
Expand All @@ -18,10 +19,10 @@
class="vis-editor-agg-wide-btn">

<div ng-if="!add.form">
<div class="btn btn-sm btn-primary" ng-if="groupName !== 'buckets' || !stats.count">
<div class="btn btn-sm btn-primary" ng-if="groupName !== 'buckets' || !stats.count && !stats.deprecate">
Add {{ groupName }}
</div>
<div class="btn btn-sm btn-primary" ng-if="groupName === 'buckets' && stats.count > 0">
<div class="btn btn-sm btn-primary" ng-if="groupName === 'buckets' && stats.count > 0 && !stats.deprecate">
Add sub-{{ groupName }}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/plugins/kibana/public/visualize/editor/agg_group.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ uiModules
$scope.schemas.forEach(function (schema) {
stats.min += schema.min;
stats.max += schema.max;
stats.deprecate = schema.deprecate;
});

$scope.availableSchema = $scope.schemas.filter(function (schema) {
Expand Down
11 changes: 10 additions & 1 deletion src/plugins/kibana/public/visualize/editor/agg_params.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@
style="display: none;">
</div>

<!-- schema editors get added down here: aggSelect.html, agg_types/controls/*.html -->
<div ng-if="agg.schema.deprecate" class="form-group">
<p ng-show="agg.schema.deprecateMessage" class="vis-editor-agg-error">
{{ agg.schema.deprecateMessage }}
</p>
<p ng-show="!agg.schema.deprecateMessage" class="vis-editor-agg-error">
"{{ agg.schema.title }}" has been deprecated.
</p>
</div>

<!-- schema editors get added down here: aggSelect.html, agg_types/controls/*.html -->
3 changes: 2 additions & 1 deletion src/ui/public/vis/schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default function VisTypeSchemasFactory(Private) {
title: schema.name,
aggFilter: '*',
editor: false,
params: []
params: [],
deprecate: false
});

// convert the params into a params registry
Expand Down

0 comments on commit 0597513

Please sign in to comment.