Commit a8f4b022 by Torkel Ödegaard

fix(graph): Fixed issue with legend height in table mode with few series,…

fix(graph): Fixed issue with legend height in table mode with few series, affected iframe embedding as well, fixes #4640
parent e8a209c9
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626) * **Graph Panel**: Fixed issue with axis labels overlapping Y-axis, fixes [#4626](https://github.com/grafana/grafana/issues/4626)
* **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602) * **InfluxDB**: Fixed issue with templating query containing template variable, fixes [#4602](https://github.com/grafana/grafana/issues/4602)
* **Graph Panel**: Fixed issue with hiding series and stacking, fixes [#4557](https://github.com/grafana/grafana/issues/4557) * **Graph Panel**: Fixed issue with hiding series and stacking, fixes [#4557](https://github.com/grafana/grafana/issues/4557)
* **Mixed Datasources**: Fixed issue with mixing many datasources in same graph, fixes [#4604](https://github.com/grafana/grafana/issues/4604) * **Graph Panel**: Fixed issue with legend height in table mode with few series, affected iframe embedding as well, fixes [#4640](https://github.com/grafana/grafana/issues/4640)
# 3.0.0-beta2 (2016-04-04) # 3.0.0-beta2 (2016-04-04)
......
...@@ -21,14 +21,14 @@ export class SwitchCtrl { ...@@ -21,14 +21,14 @@ export class SwitchCtrl {
id: any; id: any;
/** @ngInject */ /** @ngInject */
constructor($scope) { constructor($scope, private $timeout) {
this.show = true; this.show = true;
this.id = $scope.$id; this.id = $scope.$id;
} }
internalOnChange() { internalOnChange() {
return new Promise(resolve => { return new Promise(resolve => {
setTimeout(() => { this.$timeout(() => {
this.onChange(); this.onChange();
resolve(); resolve();
}); });
......
...@@ -38,31 +38,26 @@ ...@@ -38,31 +38,26 @@
<div ng-include src="'shareLinkOptions.html'"></div> <div ng-include src="'shareLinkOptions.html'"></div>
<div class="gf-form-group position-center"> <div class="gf-form-group section">
<div class="gf-form width-30" > <div class="gf-form width-30">
<textarea rows="5" data-share-panel-url class="gf-form-input width-30" ng-model='iframeHtml'></textarea> <textarea rows="5" data-share-panel-url class="gf-form-input width-30" ng-model='iframeHtml'></textarea>
</div> </div>
</div> </div>
<div class="gf-form-group">
<div class="gf-form position-center">
<button class="btn btn-inverse" data-clipboard-text="{{iframeHtml}}" clipboard-button><i class="fa fa-clipboard"></i> Copy</button>
</div>
</div>
</script> </script>
<script type="text/ng-template" id="shareLinkOptions.html"> <script type="text/ng-template" id="shareLinkOptions.html">
<div class="gf-form-group position-center"> <div class="gf-form-group section">
<div class="gf-form"> <gf-form-switch class="gf-form"
<span class="gf-form-label width-5">Include</span> label="Current time range" label-class="width-12" switch-class="max-width-6"
<editor-checkbox text="Current time range" model="options.forCurrent" change="buildUrl()"></editor-checkbox> checked="options.forCurrent" on-change="buildUrl()">
</div> </gf-form-switch>
<div class="gf-form"> <gf-form-switch class="gf-form"
<span class="gf-form-label width-5">Include</span> label="Template variables" label-class="width-12" switch-class="max-width-6"
<editor-checkbox text="Template variables" model="options.includeTemplateVars" change="buildUrl()"></editor-checkbox> checked="options.includeTemplateVars" on-change="buildUrl()">
</div> </gf-form-switch>
<div class="gf-form"> <div class="gf-form">
<span class="gf-form-label width-5">Theme</span> <span class="gf-form-label width-12">Theme</span>
<div class="gf-form-select-wrapper max-width-10"> <div class="gf-form-select-wrapper width-6">
<select class="gf-form-input" ng-model="options.theme" ng-options="f as f for f in ['current', 'dark', 'light']" ng-change="buildUrl()"></select> <select class="gf-form-input" ng-model="options.theme" ng-options="f as f for f in ['current', 'dark', 'light']" ng-change="buildUrl()"></select>
</div> </div>
</div> </div>
...@@ -75,18 +70,19 @@ ...@@ -75,18 +70,19 @@
</div> </div>
<div ng-include src="'shareLinkOptions.html'"></div> <div ng-include src="'shareLinkOptions.html'"></div>
<div class="gf-form-group position-center"> <div>
<div class="gf-form-inline"> <div class="gf-form-group section">
<div class="gf-form-inline">
<div class="gf-form width-30"> <div class="gf-form width-30">
<input type="text" data-share-panel-url class="gf-form-input" ng-model="shareUrl"></input> <input type="text" data-share-panel-url class="gf-form-input" ng-model="shareUrl"></input>
</div> </div>
<div class="gf-form pull-right"> <div class="gf-form pull-right">
<button class="btn btn-inverse pull-right" data-clipboard-text="{{shareUrl}}" clipboard-button><i class="fa fa-clipboard"></i> Copy</button> <button class="btn btn-inverse pull-right" data-clipboard-text="{{shareUrl}}" clipboard-button><i class="fa fa-clipboard"></i> Copy</button>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="gf-form position-center" ng-show="modeSharePanel"> <div class="gf-form section" ng-show="modeSharePanel">
<a href="{{imageUrl}}" target="_blank"><i class="fa fa-camera"></i> Direct link rendered image</a> <a href="{{imageUrl}}" target="_blank"><i class="fa fa-camera"></i> Direct link rendered image</a>
</div> </div>
</script> </script>
...@@ -117,7 +113,7 @@ ...@@ -117,7 +113,7 @@
</p> </p>
</div> </div>
<div class="gf-form-group share-modal-options position-center"> <div class="gf-form-group share-modal-options">
<div class="gf-form" ng-if="step === 1"> <div class="gf-form" ng-if="step === 1">
<span class="gf-form-label width-12">Snapshot name</span> <span class="gf-form-label width-12">Snapshot name</span>
<input type="text" ng-model="snapshot.name" class="gf-form-input max-width-15" > <input type="text" ng-model="snapshot.name" class="gf-form-input max-width-15" >
......
...@@ -194,9 +194,9 @@ function (angular, _, $) { ...@@ -194,9 +194,9 @@ function (angular, _, $) {
} }
var topPadding = 6; var topPadding = 6;
$container.css("height", maxHeight - topPadding); $container.css("max-height", maxHeight - topPadding);
} else { } else {
$container.css("height", ""); $container.css("max-height", "");
} }
} }
} }
......
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
.share-modal-options { .share-modal-options {
margin: 11px 20px 33px 20px; margin: 11px 20px 33px 20px;
display: inline-block;
} }
.share-modal-big-icon { .share-modal-big-icon {
...@@ -162,8 +163,3 @@ ...@@ -162,8 +163,3 @@
} }
} }
.modal-body {
.position-center {
display: inline-block;
}
}
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