mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
Fixed influxdb 0.9 data source, renamed clone dashboard to Save As...
This commit is contained in:
parent
3e6ec19fd4
commit
ab47c2c734
@ -1,7 +1,7 @@
|
||||
define([
|
||||
'./dashboardCtrl',
|
||||
'./dashboardNavCtrl',
|
||||
'./cloneDashboardCtrl',
|
||||
'./saveDashboardAsCtrl',
|
||||
'./playlistCtrl',
|
||||
'./rowCtrl',
|
||||
'./sharePanelCtrl',
|
||||
|
@ -120,12 +120,12 @@ function (angular, _, moment) {
|
||||
});
|
||||
};
|
||||
|
||||
$scope.cloneDashboard = function() {
|
||||
$scope.saveDashboardAs = function() {
|
||||
var newScope = $rootScope.$new();
|
||||
newScope.clone = angular.copy($scope.dashboard);
|
||||
|
||||
$scope.appEvent('show-modal', {
|
||||
src: './app/features/dashboard/partials/cloneDashboard.html',
|
||||
src: './app/features/dashboard/partials/saveDashboardAs.html',
|
||||
scope: newScope,
|
||||
});
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
<div class="modal-body gf-box gf-box-no-margin" ng-controller="CloneDashboardCtrl" ng-init="init();">
|
||||
<div class="modal-body gf-box gf-box-no-margin" ng-controller="SaveDashboardAsCtrl" ng-init="init();">
|
||||
<div class="gf-box-header">
|
||||
<div class="gf-box-title">
|
||||
<i class="fa fa-copy"></i>
|
||||
Clone Dashboard
|
||||
Save As...
|
||||
</div>
|
||||
|
||||
<button class="gf-box-header-close-btn" ng-click="dismiss();">
|
||||
@ -18,8 +18,8 @@
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<button class="btn btn-success" ng-click="saveClone();">Clone</button>
|
||||
<button class="btn btn-inverse" ng-click="dismiss();">Cancel</button>
|
||||
<button class="btn btn-success" ng-click="saveClone();">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -6,7 +6,7 @@ function (angular) {
|
||||
|
||||
var module = angular.module('grafana.controllers');
|
||||
|
||||
module.controller('CloneDashboardCtrl', function($scope, backendSrv, $location) {
|
||||
module.controller('SaveDashboardAsCtrl', function($scope, backendSrv, $location) {
|
||||
|
||||
$scope.init = function() {
|
||||
$scope.clone.id = null;
|
@ -49,7 +49,7 @@
|
||||
Url
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-xlarge" ng-model='current.url' placeholder="http://my.graphite.com:8080" required></input>
|
||||
<input type="text" class="tight-form-input input-xlarge" ng-model='current.url' placeholder="http://my.server.com:8080" required></input>
|
||||
</li>
|
||||
<li class="tight-form-item">
|
||||
Access <tip>Direct = url is used directly from browser, Proxy = Grafana backend will proxy the request</label>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<li><a class="pointer" ng-click="openEditView('templating');">Templating</a></li>
|
||||
<li><a class="pointer" ng-click="exportDashboard();">Export</a></li>
|
||||
<li><a class="pointer" ng-click="editJson();">View JSON</a></li>
|
||||
<li><a class="pointer" ng-click="cloneDashboard();">Clone dashboard</a></li>
|
||||
<li><a class="pointer" ng-click="saveDashboardAs();">Save As...</a></li>
|
||||
<li><a class="pointer" ng-click="deleteDashboard();">Delete dashboard</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<h2>Elastic search details</h2>
|
||||
<h5>Elastic search details</h5>
|
||||
|
||||
<div class="tight-form last">
|
||||
<ul class="tight-form-list">
|
||||
@ -6,7 +6,7 @@
|
||||
Index name
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-xxlarge last" ng-model='current.database' placeholder="" required></input>
|
||||
<input type="text" class="tight-form-input input-xlarge" ng-model='current.database' placeholder="" required></input>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
32
src/app/plugins/datasource/influxdb/partials/config.html
Normal file
32
src/app/plugins/datasource/influxdb/partials/config.html
Normal file
@ -0,0 +1,32 @@
|
||||
<h5>InfluxDB Details</h5>
|
||||
|
||||
<div class="tight-form">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 80px">
|
||||
Database
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-large" ng-model='current.database' placeholder="" required></input>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
<div class="tight-form last">
|
||||
<ul class="tight-form-list">
|
||||
<li class="tight-form-item" style="width: 80px">
|
||||
User
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-large" ng-model='current.user' placeholder="" required></input>
|
||||
</li>
|
||||
<li class="tight-form-item">
|
||||
Password
|
||||
</li>
|
||||
<li>
|
||||
<input type="password" class="tight-form-input input-large" ng-model='current.password' placeholder="" required></input>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
Password
|
||||
</li>
|
||||
<li>
|
||||
<input type="text" class="tight-form-input input-large" ng-model='current.password' placeholder="" required></input>
|
||||
<input type="password" class="tight-form-input input-large" ng-model='current.password' placeholder="" required></input>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="clearfix"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user