mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fixed issue span set to zero. Removed zero option from row editor. Closes #645
This commit is contained in:
parent
e9a046e74d
commit
6e9723325f
@ -10,6 +10,10 @@ function (angular, _, $) {
|
|||||||
// when changing arguments to this function
|
// when changing arguments to this function
|
||||||
function PanelBaseCtrl($scope, $rootScope, $timeout) {
|
function PanelBaseCtrl($scope, $rootScope, $timeout) {
|
||||||
|
|
||||||
|
if (!$scope.panel.span) {
|
||||||
|
$scope.panel.span = 12;
|
||||||
|
}
|
||||||
|
|
||||||
var menu = [
|
var menu = [
|
||||||
{
|
{
|
||||||
text: 'Edit',
|
text: 'Edit',
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
<div style="padding-top:0px" ng-if="!row.collapse">
|
<div style="padding-top:0px" ng-if="!row.collapse">
|
||||||
|
|
||||||
<!-- Panels -->
|
<!-- Panels -->
|
||||||
<div ng-repeat="(name, panel) in row.panels|filter:isPanel" ng-hide="panel.hide" class="panel nospace" ng-style="{'width':!panel.span?'100%':(panel.span/1.2)*10+'%'}" data-drop="true" ng-model="row.panels" data-jqyoui-options jqyoui-droppable="{index:$index,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver(true)',onOut:'panelMoveOut'}" ng-class="{'dragInProgress':dashboard.panelDragging}">
|
<div ng-repeat="(name, panel) in row.panels|filter:isPanel" ng-hide="panel.hide" class="panel nospace" ng-style="{'width':(panel.span/1.2)*10+'%'}" data-drop="true" ng-model="row.panels" data-jqyoui-options jqyoui-droppable="{index:$index,mutate:false,onDrop:'panelMoveDrop',onOver:'panelMoveOver(true)',onOut:'panelMoveOut'}" ng-class="{'dragInProgress':dashboard.panelDragging}">
|
||||||
<!-- Content Panel -->
|
<!-- Content Panel -->
|
||||||
<div style="position:relative">
|
<div style="position:relative">
|
||||||
<grafana-panel type="panel.type" ng-cloak></grafana-panel>
|
<grafana-panel type="panel.type" ng-cloak></grafana-panel>
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<tr ng-repeat="panel in row.panels">
|
<tr ng-repeat="panel in row.panels">
|
||||||
<td>{{panel.title}}</td>
|
<td>{{panel.title}}</td>
|
||||||
<td>{{panel.type}}</td>
|
<td>{{panel.type}}</td>
|
||||||
<td><select ng-hide="panel.sizeable == false" class="input-mini" ng-model="panel.span" ng-options="size for size in [0,1,2,3,4,5,6,7,8,9,10,11,12]"></select></td>
|
<td><select ng-hide="panel.sizeable == false" class="input-mini" ng-model="panel.span" ng-options="size for size in [1,2,3,4,5,6,7,8,9,10,11,12]"></select></td>
|
||||||
<td><i ng-click="row.panels = _.without(row.panels,panel)" class="pointer icon-remove"></i></td>
|
<td><i ng-click="row.panels = _.without(row.panels,panel)" class="pointer icon-remove"></i></td>
|
||||||
<td><i ng-click="_.move(row.panels,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
|
<td><i ng-click="_.move(row.panels,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
|
||||||
<td><i ng-click="_.move(row.panels,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
|
<td><i ng-click="_.move(row.panels,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user