Procházet zdrojové kódy

Modals to edit pane work almost done, need to work on light theme

Torkel Ödegaard před 11 roky
rodič
revize
3775991ac8

+ 0 - 1
src/app/controllers/annotationsEditorCtrl.js

@@ -32,7 +32,6 @@ function (angular, app, _, $) {
       }
 
       $scope.$watch('editor.index', function(newVal) {
-        console.log("value", newVal);
         if (newVal !== 2) {
           $scope.reset();
         }

+ 1 - 3
src/app/panels/timepicker/module.js

@@ -25,7 +25,7 @@ function (angular, app, _, moment, kbn) {
   var module = angular.module('grafana.panels.timepicker', []);
   app.useModule(module);
 
-  module.controller('timepicker', function($scope, $modal, $q) {
+  module.controller('timepicker', function($scope) {
     $scope.panelMeta = {
       status  : "Stable",
       description : "A panel for controlling the time range filters. If you have time based data, "+
@@ -39,8 +39,6 @@ function (angular, app, _, moment, kbn) {
       refresh_intervals : ['5s','10s','30s','1m','5m','15m','30m','1h','2h','1d'],
     };
 
-    var customTimeModal = null;
-
     _.defaults($scope.panel,_d);
 
     // ng-pattern regexs

+ 4 - 32
src/app/partials/templating_editor.html

@@ -1,11 +1,11 @@
 <div class="dashboard-editor-header">
 	<div class="dashboard-editor-title">
-		<i class="icon icon-cogs"></i>
-		Dashboard settings
+		<i class="icon icon-code"></i>
+		Templating
 	</div>
 
 	<div ng-model="editor.index" bs-tabs style="text-transform:capitalize;">
-		<div ng-repeat="tab in ['General', 'Rows', 'Controls', 'Import']" data-title="{{tab}}">
+		<div ng-repeat="tab in ['Overview', 'Add', 'Edit']" data-title="{{tab}}">
 		</div>
 	</div>
 
@@ -14,38 +14,10 @@
 <div class="dashboard-editor-body">
 
 		<div ng-if="editor.index == 0">
-			<div class="editor-row">
-				<div class="section">
-					<div class="editor-option">
-						<label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.title'></input>
-					</div>
-					<div class="editor-option">
-						<label class="small">Theme</label><select class="input-small" ng-model="dashboard.style" ng-options="f for f in ['dark','light']" ng-change="styleUpdated()"></select>
-					</div>
-					<div class="editor-option">
-						<label class="small">Time correction</label>
-						<select ng-model="dashboard.timezone" class='input-small' ng-options="f for f in ['browser','utc']"></select>
-					</div>
-					<div class="editor-option">
-						<label class="small">Hide controls (CTRL+H)</label>
-						<input type="checkbox" ng-model="dashboard.hideControls" ng-checked="dashboard.hideControls">
-					</div>
-				</div>
-			</div>
-			<div class="editor-row">
-				<div class="section">
-					<div class="editor-option">
-						<label class="small">Tags</label>
-						<bootstrap-tagsinput ng-model="dashboard.tags" tagclass="label label-tag" placeholder="add tags">
-						</bootstrap-tagsinput>
-						<tip>Press enter to a add tag</tip>
-					</div>
-				</div>
-			</div>
 		</div>
 
 </div>
 
 <div class="dashboard-editor-footer">
-		<button type="button" class="btn btn-info" ng-click="editor.index=0;dismiss();">Close</button>
+		<button type="button" class="btn btn-success pull-right" ng-click="editor.index=0;dismiss();">Close</button>
 </div>

+ 2 - 2
src/css/less/bootswatch.dark.less

@@ -549,12 +549,12 @@ a:hover {
 }
 
 .modal-header {
-	border-bottom: 1px solid @grayDark;
+	border-bottom: 1px solid @grafanaPanelBackground;
 }
 
 .modal-footer {
 	background-color: @grafanaPanelBackground;
-	border-top: 1px solid @grayDark;
+	border-top: 1px solid @grafanaPanelBackground;
 	.border-radius(0 0 0px 0px);
 	.box-shadow(none);
 }

+ 1 - 1
src/css/less/submenu.less

@@ -1,6 +1,6 @@
 .submenu-controls-visible:not(.hide-controls) {
   .panel-fullscreen {
-    top: 90px;
+    top: 91px;
   }
 }