mirror of
https://github.com/grafana/grafana.git
synced 2025-02-12 00:25:46 -06:00
fixes after upstream merge
This commit is contained in:
parent
4aceb6086b
commit
6f6cd5116e
@ -14,6 +14,12 @@ function (angular) {
|
|||||||
// create a new modal. Can't reuse one modal unforunately as the directive will not
|
// create a new modal. Can't reuse one modal unforunately as the directive will not
|
||||||
// re-render on show.
|
// re-render on show.
|
||||||
elem.bind('click',function(){
|
elem.bind('click',function(){
|
||||||
|
if (scope.openConfigureModal) {
|
||||||
|
scope.openConfigureModal();
|
||||||
|
scope.$apply();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var panelModal = $modal({
|
var panelModal = $modal({
|
||||||
template: './app/partials/paneleditor.html',
|
template: './app/partials/paneleditor.html',
|
||||||
persist: true,
|
persist: true,
|
||||||
|
@ -34,7 +34,7 @@ function (angular) {
|
|||||||
'<span class="row-text">{{panel.type}}</span>'+
|
'<span class="row-text">{{panel.type}}</span>'+
|
||||||
'</span>' +
|
'</span>' +
|
||||||
|
|
||||||
'<span class="row-button extra" ng-show="panel.editable != false">' +
|
'<span class="row-button extra" ng-show="panel.editable != false">' +
|
||||||
'<span config-modal class="pointer">'+
|
'<span config-modal class="pointer">'+
|
||||||
'<i class="icon-cog pointer" bs-tooltip="\'Configure\'"></i></span>'+
|
'<i class="icon-cog pointer" bs-tooltip="\'Configure\'"></i></span>'+
|
||||||
'</span>' +
|
'</span>' +
|
||||||
@ -50,7 +50,7 @@ function (angular) {
|
|||||||
'</span>'+
|
'</span>'+
|
||||||
'</span>' +
|
'</span>' +
|
||||||
|
|
||||||
'<span class="row-button row-text panel-title pointer" ng-show="panel.title" ng-click="openConfigureModal($event)">' +
|
'<span class="row-button row-text panel-title pointer" ng-show="panel.title" ng-click="openConfigureModal()">' +
|
||||||
'{{panel.title}}' +
|
'{{panel.title}}' +
|
||||||
'</span>'+
|
'</span>'+
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv, RQ) {
|
|||||||
|
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.openConfigureModal({preventDefault: function() {}, stopPropagation: function() {} });
|
$scope.openConfigureModal();
|
||||||
|
|
||||||
// Hide view options by default
|
// Hide view options by default
|
||||||
$scope.options = false;
|
$scope.options = false;
|
||||||
@ -398,9 +398,12 @@ function (angular, app, $, _, kbn, moment, timeSeries, graphiteSrv, RQ) {
|
|||||||
$scope.panel.targets.push({target: ''});
|
$scope.panel.targets.push({target: ''});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.openConfigureModal = function($event) {
|
$scope.openConfigureModal = function() {
|
||||||
$event.preventDefault();
|
if ($scope.inEditMode) {
|
||||||
$event.stopPropagation();
|
$rootScope.$emit('fullEditMode', false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var oldHeight = $scope.row.height;
|
var oldHeight = $scope.row.height;
|
||||||
$scope.row.height = 200;
|
$scope.row.height = 200;
|
||||||
|
|
||||||
|
@ -9,115 +9,117 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if="editor.index == 0">
|
<div ng-if="editor.index == 0">
|
||||||
<div class="row-fluid">
|
<div class="editor-row">
|
||||||
<div class="span4">
|
<div class="section">
|
||||||
<label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.current.title'></input>
|
<div class="editor-option">
|
||||||
</div>
|
<label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.current.title'></input>
|
||||||
<div class="span1">
|
</div>
|
||||||
<label class="small"> Editable </label><input type="checkbox" ng-model="dashboard.current.editable" ng-checked="dashboard.current.editable" />
|
<div class="editor-option">
|
||||||
</div>
|
<label class="small">Style</label><select class="input-small" ng-model="dashboard.current.style" ng-options="f for f in ['dark','light']"></select>
|
||||||
<div class="span1">
|
</div>
|
||||||
<label class="small"> Hints <tip>Show 'Add panel' hints in empty spaces</tip></label><input type="checkbox" ng-model="dashboard.current.panel_hints" ng-checked="dashboard.current.panel_hints" />
|
<div class="editor-option">
|
||||||
</div>
|
<label class="small"> Editable </label><input type="checkbox" ng-model="dashboard.current.editable" ng-checked="dashboard.current.editable" />
|
||||||
<div class="span2">
|
</div>
|
||||||
<label class="small">Hide controls</label>
|
<div class="editor-option">
|
||||||
<input type="checkbox" ng-model="dashboard.current.hideControls" ng-checked="dashboard.current.hideControls">
|
<label class="small"> Hints <tip>Show 'Add panel' hints in empty spaces</tip></label><input type="checkbox" ng-model="dashboard.current.panel_hints" ng-checked="dashboard.current.panel_hints" />
|
||||||
</div>
|
</div>
|
||||||
<div class="span3">
|
<div class="editor-option">
|
||||||
<label class="small">Style</label><select class="input-small" ng-model="dashboard.current.style" ng-options="f for f in ['dark','light']"></select>
|
<label class="small">Hide controls</label>
|
||||||
|
<input type="checkbox" ng-model="dashboard.current.hideControls" ng-checked="dashboard.current.hideControls">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="editor.index == 1">
|
<div ng-if="editor.index == 1">
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<div class="span12">
|
<div class="span8">
|
||||||
<table class="table table-condensed table-striped">
|
<h4>Rows</h4>
|
||||||
|
<table class="table table-condensed table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<th>Title</th>
|
<th width="1%"></th>
|
||||||
<th>Delete</th>
|
<th width="1%"></th>
|
||||||
<th>Move</th>
|
<th width="1%"></th>
|
||||||
|
<th width="97%">Title</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tr ng-repeat="row in dashboard.current.rows">
|
<tr ng-repeat="row in dashboard.current.rows">
|
||||||
<td>{{row.title}}</td>
|
|
||||||
<td><i ng-click="dashboard.current.rows = _.without(dashboard.current.rows,row)" class="pointer icon-remove"></i></td>
|
|
||||||
<td><i ng-click="_.move(dashboard.current.rows,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
|
<td><i ng-click="_.move(dashboard.current.rows,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
|
||||||
<td><i ng-click="_.move(dashboard.current.rows,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
|
<td><i ng-click="_.move(dashboard.current.rows,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
|
||||||
|
<td><i ng-click="dashboard.current.rows = _.without(dashboard.current.rows,row)" class="pointer icon-remove"></i></td>
|
||||||
|
<td>{{row.title}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="span4">
|
||||||
|
<h4>Add Row</h4>
|
||||||
|
<label class="small">Title</label>
|
||||||
|
<input type="text" class="input-medium" ng-model='row.title' placeholder="New row"></input>
|
||||||
|
<label class="small">Height</label>
|
||||||
|
<input type="text" class="input-mini" ng-model='row.height'></input>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<form>
|
|
||||||
<div class="span5">
|
|
||||||
<label class="small">Title</label>
|
|
||||||
<input type="text" class="input-large" ng-model='row.title' placeholder="New row"></input>
|
|
||||||
</div>
|
|
||||||
<div class="span2">
|
|
||||||
<label class="small">Height</label>
|
|
||||||
<input type="text" class="input-mini" ng-model='row.height'></input>
|
|
||||||
</div>
|
|
||||||
<div class="span1">
|
|
||||||
<label class="small"> Editable </label>
|
|
||||||
<input type="checkbox" ng-model="row.editable" ng-checked="row.editable" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="editor.index == 2">
|
<div ng-if="editor.index == 2" ng-controller="dashLoader">
|
||||||
<h5>Pulldowns</h5>
|
<div class="editor-row">
|
||||||
<div class="row-fluid">
|
<div class="section">
|
||||||
<div class="span2" ng-repeat="pulldown in dashboard.current.pulldowns">
|
<h5>Save to</h5>
|
||||||
<label class="small" style="text-transform:capitalize;">{{pulldown.type}}</label><input type="checkbox" ng-model="pulldown.enable" ng-checked="pulldown.enable">
|
<div class="editor-option">
|
||||||
|
<label class="small">Export</label><input type="checkbox" ng-model="dashboard.current.loader.save_local" ng-checked="dashboard.current.loader.save_local">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option">
|
||||||
|
<label class="small">Browser</label><input type="checkbox" ng-model="dashboard.current.loader.save_default" ng-checked="dashboard.current.loader.save_default">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option">
|
||||||
|
<label class="small">Gist <tip>Requires your domain to be OAUTH registered with Github<tip></label><input type="checkbox" ng-model="dashboard.current.loader.save_gist" ng-checked="dashboard.current.loader.save_gist">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option">
|
||||||
|
<label class="small">Elasticsearch</label><input type="checkbox" ng-model="dashboard.current.loader.save_elasticsearch" ng-checked="dashboard.current.loader.save_elasticsearch">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="span2" ng-repeat="pulldown in dashboard.current.nav">
|
<div class="section">
|
||||||
<label class="small" style="text-transform:capitalize;">{{pulldown.type}}</label><input type="checkbox" ng-model="pulldown.enable" ng-checked="pulldown.enable">
|
<h5>Load from</h5>
|
||||||
|
<div class="editor-option">
|
||||||
|
<label class="small">Local file</label><input type="checkbox" ng-model="dashboard.current.loader.load_local" ng-checked="dashboard.current.loader.load_local">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option">
|
||||||
|
<label class="small">Gist</label><input type="checkbox" ng-model="dashboard.current.loader.load_gist" ng-checked="dashboard.current.loader.load_gist">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option">
|
||||||
|
<label class="small">Elasticsearch</label><input type="checkbox" ng-model="dashboard.current.loader.load_elasticsearch" ng-checked="dashboard.current.loader.load_elasticsearch">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option" ng-show="dashboard.current.loader.load.elasticsearch">
|
||||||
|
<label class="small">ES list size</label><input class="input-mini" type="number" ng-model="dashboard.current.loader.load_elasticsearch_size">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="section">
|
||||||
|
<h5>Sharing</h5>
|
||||||
|
<div class="editor-option" >
|
||||||
|
<label class="small">Allow Sharing <tip>Allow generating adhoc links to dashboards</tip></label><input type="checkbox" ng-model="dashboard.current.loader.save_temp" ng-checked="dashboard.current.loader.save_temp">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option" ng-show="dashboard.current.loader.save_temp">
|
||||||
|
<label class="small">TTL <tip>Expire temp urls</tip></label><input type="checkbox" ng-model="dashboard.current.loader.save_temp_ttl_enable">
|
||||||
|
</div>
|
||||||
|
<div class="editor-option" ng-show="dashboard.current.loader.save_temp && dashboard.current.loader.save_temp_ttl_enable">
|
||||||
|
<label class="small">TTL Duration <tip>Elasticsearch date math, eg: 1m,1d,1w,30d </tip></label><input class="input-small" type="text" ng-model="dashboard.current.loader.save_temp_ttl">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="editor.index == 2" ng-controller="dashLoader">
|
<div ng-if="editor.index == 2">
|
||||||
<h5>Save to</h5>
|
<div class="editor-row">
|
||||||
<div class="row-fluid">
|
<div class="section">
|
||||||
<div class="span2">
|
<h5>Pulldowns</h5>
|
||||||
<label class="small">Export</label><input type="checkbox" ng-model="dashboard.current.loader.save_local" ng-checked="dashboard.current.loader.save_local">
|
<div class="editor-option" ng-repeat="pulldown in dashboard.current.pulldowns">
|
||||||
</div>
|
<label class="small" style="text-transform:capitalize;">{{pulldown.type}}</label><input type="checkbox" ng-model="pulldown.enable" ng-checked="pulldown.enable">
|
||||||
<div class="span2">
|
</div>
|
||||||
<label class="small">Browser</label><input type="checkbox" ng-model="dashboard.current.loader.save_default" ng-checked="dashboard.current.loader.save_default">
|
<div class="editor-option" ng-repeat="pulldown in dashboard.current.nav">
|
||||||
</div>
|
<label class="small" style="text-transform:capitalize;">{{pulldown.type}}</label><input type="checkbox" ng-model="pulldown.enable" ng-checked="pulldown.enable">
|
||||||
<div class="span2">
|
</div>
|
||||||
<label class="small">Gist <tip>Requires your domain to be OAUTH registered with Github<tip></label><input type="checkbox" ng-model="dashboard.current.loader.save_gist" ng-checked="dashboard.current.loader.save_gist">
|
|
||||||
</div>
|
|
||||||
<div class="span2">
|
|
||||||
<label class="small">Elasticsearch</label><input type="checkbox" ng-model="dashboard.current.loader.save_elasticsearch" ng-checked="dashboard.current.loader.save_elasticsearch">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h5>Load from</h5>
|
|
||||||
<div class="row-fluid">
|
|
||||||
<div class="span2">
|
|
||||||
<label class="small">Local file</label><input type="checkbox" ng-model="dashboard.current.loader.load_local" ng-checked="dashboard.current.loader.load_local">
|
|
||||||
</div>
|
|
||||||
<div class="span2">
|
|
||||||
<label class="small">Gist</label><input type="checkbox" ng-model="dashboard.current.loader.load_gist" ng-checked="dashboard.current.loader.load_gist">
|
|
||||||
</div>
|
|
||||||
<div class="span2">
|
|
||||||
<label class="small">Elasticsearch</label><input type="checkbox" ng-model="dashboard.current.loader.load_elasticsearch" ng-checked="dashboard.current.loader.load_elasticsearch">
|
|
||||||
</div>
|
|
||||||
<div class="span3" ng-show="dashboard.current.loader.load.elasticsearch">
|
|
||||||
<label class="small">ES list size</label><input class="input-mini" type="number" ng-model="dashboard.current.loader.load_elasticsearch_size">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<h5>Sharing</h5>
|
|
||||||
<div class="row-fluid">
|
|
||||||
<div class="span2" >
|
|
||||||
<label class="small">Allow Sharing <tip>Allow generating adhoc links to dashboards</tip></label><input type="checkbox" ng-model="dashboard.current.loader.save_temp" ng-checked="dashboard.current.loader.save_temp">
|
|
||||||
</div>
|
|
||||||
<div class="span2" ng-show="dashboard.current.loader.save_temp">
|
|
||||||
<label class="small">TTL <tip>Expire temp urls</tip></label><input type="checkbox" ng-model="dashboard.current.loader.save_temp_ttl_enable">
|
|
||||||
</div>
|
|
||||||
<div class="span5" ng-show="dashboard.current.loader.save_temp && dashboard.current.loader.save_temp_ttl_enable">
|
|
||||||
<label class="small">TTL Duration <tip>Elasticsearch date math, eg: 1m,1d,1w,30d </tip></label><input class="input-small" type="text" ng-model="dashboard.current.loader.save_temp_ttl">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
2
src/css/bootstrap.dark.min.css
vendored
2
src/css/bootstrap.dark.min.css
vendored
File diff suppressed because one or more lines are too long
5
src/vendor/bootstrap/less/grafana.less
vendored
5
src/vendor/bootstrap/less/grafana.less
vendored
@ -19,9 +19,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
width: 770px;
|
margin: 5%;
|
||||||
margin-left: -385px;
|
width: 90%;
|
||||||
top: 100px !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.grafana-search-metric-actions {
|
.grafana-search-metric-actions {
|
||||||
|
Loading…
Reference in New Issue
Block a user