Commit ab47c2c7 by Torkel Ödegaard

Fixed influxdb 0.9 data source, renamed clone dashboard to Save As...

parent 3e6ec19f
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,
});
};
......
<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>
......
<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>
......
<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>
......
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