Commit 21f702f7 by Tobias Skarhed Committed by Torkel Ödegaard

TablePanel: Remove scroll option on TablePanel (#18318)

parent 12f5d16c
<div class="editor-row"> <div class="editor-row">
<div class="section gf-form-group"> <div class="section gf-form-group">
<h5 class="section-heading">Data</h5> <h5 class="section-heading">Data</h5>
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label width-10">Table Transform</label> <label class="gf-form-label width-10">Table Transform</label>
<div class="gf-form-select-wrapper max-width-15"> <div class="gf-form-select-wrapper max-width-15">
<select class="gf-form-input" ng-model="editor.panel.transform" ng-options="k as v.description for (k, v) in editor.transformers" ng-change="editor.transformChanged()"></select> <select
class="gf-form-input"
ng-model="editor.panel.transform"
ng-options="k as v.description for (k, v) in editor.transformers"
ng-change="editor.transformChanged()"
></select>
</div> </div>
</div> </div>
<div class="gf-form-inline"> <div class="gf-form-inline">
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label width-10">Columns</label> <label class="gf-form-label width-10">Columns</label>
</div> </div>
<div class="gf-form" ng-repeat="column in editor.panel.columns"> <div class="gf-form" ng-repeat="column in editor.panel.columns">
<label class="gf-form-label"> <label class="gf-form-label">
<i class="pointer fa fa-remove" ng-click="editor.removeColumn(column)"></i> <i class="pointer fa fa-remove" ng-click="editor.removeColumn(column)"></i>
<span>{{column.text}}</span> <span>{{ column.text }}</span>
</label> </label>
</div> </div>
<div class="gf-form" ng-show="editor.canSetColumns"> <div class="gf-form" ng-show="editor.canSetColumns">
<metric-segment segment="editor.addColumnSegment" get-options="editor.getColumnOptions()" on-change="editor.addColumn()"></metric-segment> <metric-segment
</div> segment="editor.addColumnSegment"
<div class="gf-form" ng-hide="editor.canSetColumns"> get-options="editor.getColumnOptions()"
<label class="gf-form-label"> on-change="editor.addColumn()"
Auto ></metric-segment>
<info-popover mode="right-normal" ng-if="editor.columnsHelpMessage"> </div>
{{editor.columnsHelpMessage}} <div class="gf-form" ng-hide="editor.canSetColumns">
</info-popover> <label class="gf-form-label">
</label> Auto
</div> <info-popover mode="right-normal" ng-if="editor.columnsHelpMessage">
</div> {{ editor.columnsHelpMessage }}
</div> </info-popover>
</label>
</div>
</div>
</div>
<div class="section gf-form-group"> <div class="section gf-form-group">
<h5 class="section-heading">Paging</h5> <h5 class="section-heading">Paging</h5>
<div class="gf-form"> <div class="gf-form">
<label class="gf-form-label width-8">Rows per page</label> <label class="gf-form-label width-8">Rows per page</label>
<input type="number" class="gf-form-input width-7" <input
placeholder="100" data-placement="right" type="number"
ng-model="editor.panel.pageSize" class="gf-form-input width-7"
ng-change="editor.render()" placeholder="100"
ng-model-onblur> data-placement="right"
ng-model="editor.panel.pageSize"
ng-change="editor.render()"
ng-model-onblur
/>
</div> </div>
<gf-form-switch class="gf-form" label-class="width-8" switch-class="max-width-7" label="Scroll" checked="editor.panel.scroll" on-change="editor.render()"></gf-form-switch>
<div class="gf-form max-width-17"> <div class="gf-form max-width-17">
<label class="gf-form-label width-8">Font size</label> <label class="gf-form-label width-8">Font size</label>
<div class="gf-form-select-wrapper width-7"> <div class="gf-form-select-wrapper width-7">
<select class="gf-form-input" <select
ng-model="editor.panel.fontSize" class="gf-form-input"
ng-options="f for f in editor.fontSizes" ng-model="editor.panel.fontSize"
ng-change="editor.render()"></select> ng-options="f for f in editor.fontSizes"
ng-change="editor.render()"
></select>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -41,7 +41,7 @@ class TablePanelCtrl extends MetricsPanelCtrl { ...@@ -41,7 +41,7 @@ class TablePanelCtrl extends MetricsPanelCtrl {
}, },
], ],
columns: [], columns: [],
scroll: true,
fontSize: '100%', fontSize: '100%',
sort: { col: 0, desc: true }, sort: { col: 0, desc: true },
}; };
...@@ -243,7 +243,7 @@ class TablePanelCtrl extends MetricsPanelCtrl { ...@@ -243,7 +243,7 @@ class TablePanelCtrl extends MetricsPanelCtrl {
appendTableRows(tbodyElem); appendTableRows(tbodyElem);
appendPaginationControls(footerElem); appendPaginationControls(footerElem);
rootElem.css({ 'max-height': panel.scroll ? getTableHeight() : '' }); rootElem.css({ 'max-height': getTableHeight() });
} }
// hook up link tooltips // hook up link tooltips
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment