浏览代码

fix(css): fixed issues introduced in recent sidemenu enhancements, fixes #3893, fixes #3894

Torkel Ödegaard 10 年之前
父节点
当前提交
d617d029d2

+ 2 - 4
public/app/features/admin/partials/edit_user.html

@@ -1,10 +1,8 @@
-<topnav icon="fa fa-fw fa-user" title="Global Users" subnav="true">
+<navbar icon="fa fa-fw fa-user" title="Users" title-url="admin/users" subnav="true">
 	<ul class="nav">
-		<li><a href="admin/users">Users</a></li>
-		<li><a href="admin/users/create">Create user</a></li>
 		<li class="active"><a href="admin/users/edit/{{user_id}}">Edit user</a></li>
 	</ul>
-</topnav>
+</navbar>
 
 <div class="page-container">
 	<div class="page">

+ 1 - 1
public/app/features/dashboard/partials/settings.html

@@ -25,7 +25,7 @@
 							Title
 						</li>
 						<li>
-							<input type="text" class="input-xlarge tight-form-input" ng-model='dashboard.title'></input>
+							<input type="text" class="input-large tight-form-input" ng-model='dashboard.title'></input>
 						</li>
 						<li class="tight-form-item">
 							Tags

+ 2 - 2
public/app/partials/dashboard.html

@@ -1,7 +1,8 @@
 <div body-class class="dashboard" ng-if="dashboard">
-
 	<dashnav></dashnav>
 
+	<div class="main-view-container">
+
 	<div dash-editor-view></div>
 	<div dash-search-view></div>
 	<div class="clearfix"></div>
@@ -10,7 +11,6 @@
 
 	<div class="clearfix"></div>
 
-	<div class="main-view-container">
 		<div class="grafana-row" ng-controller="RowCtrl" ng-repeat="(row_name, row) in dashboard.rows" row-height>
 			<div class="row-control">
 				<div class="row-control-inner">

+ 61 - 23
public/dashboards/home.json

@@ -1,62 +1,100 @@
 {
+  "id": null,
   "title": "Home",
+  "originalTitle": "Home",
   "tags": [],
   "style": "dark",
   "timezone": "browser",
   "editable": true,
   "hideControls": true,
+  "sharedCrosshair": false,
   "rows": [
     {
-      "title": "New row",
-      "height": "100px",
       "collapse": false,
       "editable": true,
+      "height": "100px",
       "panels": [
         {
-          "id": 1,
-          "span": 12,
+          "content": "<div class=\"text-center dashboard-header\">\nHome Dashboard\n</div>",
           "editable": true,
-          "transparent": true,
-          "type": "text",
+          "id": 1,
           "mode": "html",
-          "content": "<div class=\"text-center\" style=\"padding: 10px 0 20px 0\">\n<img src=\"img/logo_transparent_200x.png\" width=\"170px\"> \n</div>",
+          "span": 12,
           "style": {},
-          "title": ""
+          "title": "",
+          "transparent": true,
+          "type": "text"
         }
-      ]
+      ],
+      "title": "New row"
     },
     {
+      "collapse": false,
+      "editable": true,
       "height": "510px",
       "panels": [
         {
           "id": 2,
-          "span": 6,
-          "type": "dashlist",
+          "limit": 10,
           "mode": "starred",
-          "title": "Starred dashboards"
+          "query": "",
+          "span": 6,
+          "tags": [],
+          "title": "Starred dashboards",
+          "type": "dashlist"
         },
         {
           "id": 3,
-          "span": 6,
-          "type": "dashlist",
+          "limit": 10,
           "mode": "search",
-          "title": "Dashboards"
+          "query": "",
+          "span": 6,
+          "tags": [],
+          "title": "Dashboards",
+          "type": "dashlist"
         }
-      ]
-    }
-  ],
-  "nav": [
-    {
-      "type": "timepicker",
-      "enable": false
+      ],
+      "title": "Row"
     }
   ],
   "time": {
     "from": "now-6h",
     "to": "now"
   },
+  "timepicker": {
+    "enable": false,
+    "refresh_intervals": [
+      "5s",
+      "10s",
+      "30s",
+      "1m",
+      "5m",
+      "15m",
+      "30m",
+      "1h",
+      "2h",
+      "1d"
+    ],
+    "time_options": [
+      "5m",
+      "15m",
+      "1h",
+      "6h",
+      "12h",
+      "24h",
+      "2d",
+      "7d",
+      "30d"
+    ],
+    "type": "timepicker"
+  },
   "templating": {
     "list": []
   },
-  "version": 5
+  "annotations": {
+    "list": []
+  },
+  "schemaVersion": 9,
+  "version": 5,
+  "links": []
 }

+ 1 - 0
public/less/bootstrap-tagsinput.less

@@ -13,6 +13,7 @@
     border-radius: 0;
     padding: 8px 6px;
     height: 100%;
+    width: 5rem;
     box-sizing: border-box;
   }
 

+ 0 - 1
public/less/bootswatch.dark.less

@@ -70,7 +70,6 @@ hr {
 	.nav > li > a:hover,
 	.nav > .active > a,
 	.nav > .active > a:hover {
-		border-bottom: 1px solid @blue;
 	}
 
 	.nav > .active > a,

+ 1 - 1
public/less/gfbox.less

@@ -1,5 +1,5 @@
 .gf-box {
-  margin: 15px;
+  margin: 10px 5px;
   background-color: @grafanaPanelBackground;
   position: relative;
   border: 1px solid @grafanaTargetFuncBackground;

+ 11 - 0
public/less/grafana.less

@@ -389,3 +389,14 @@
 .typeahead strong {
   color: @yellow;
 }
+
+.dashboard-header {
+  margin-top: 1rem;
+  font-family: "grafana-icons";
+  font-size: 22px;
+  padding-bottom: 1rem;
+  border: none;
+  border-bottom: 2px solid transparent;
+  border-image: linear-gradient(to right, rgba(255,213,0,1) 0%, rgba(255,68,0,1) 99%, rgba(255,68,0,1) 100%);
+  border-image-slice: 1;
+}

+ 2 - 2
public/less/navbar.less

@@ -44,7 +44,7 @@
     &:hover {
       background: @navbarButtonBackgroundHighlight;
       color: @linkColor;
-      border-bottom: 1px solid @blue;
+      // border-bottom: 1px solid @blue;
     }
   }
 }
@@ -69,7 +69,7 @@
   .icon-gf-grafana_wordmark {
     font-size: 21px;
     position: relative;
-    top: 3px;
+    top: 4px;
     padding-left: 5px;
     display: none;
   }

+ 1 - 0
public/less/sidemenu.less

@@ -39,6 +39,7 @@
   }
   .top-nav-menu-btn {
     a {
+      background-color: @sideMenuBackground;
       padding-right: 47px;
       padding-left: 24px;
     }

+ 1 - 1
public/less/submenu.less

@@ -1,5 +1,5 @@
 .submenu-controls {
-  margin: 15px 10px 8px 14px;
+  margin: 10px 5px;
   font-size: 16px;
 }