浏览代码

Updated snapshot share icon size

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

+ 2 - 2
src/app/features/dashboard/dashboardCtrl.js

@@ -59,7 +59,7 @@ function (angular, $, config) {
       });
     };
 
-    $scope.initDashboardMeta = function(meta, dashboard) {
+    $scope.initDashboardMeta = function(meta) {
       meta.canShare = true;
       meta.canSave = true;
       meta.canEdit = true;
@@ -76,7 +76,7 @@ function (angular, $, config) {
         meta.canEdit = false;
       }
 
-      if (dashboard.snapshot) {
+      if (meta.isSnapshot) {
         $scope.topNavPartial = 'app/features/dashboard/partials/snapshotTopNav.html';
       }
 

+ 1 - 1
src/app/features/dashboard/partials/shareDashboard.html

@@ -49,7 +49,7 @@
 
 		<div style="margin: 10px 0">
 			<i ng-if="loading" class="fa fa-spinner fa-spin"></i>
-			<i ng-if="!loading" class="gf-icon gf-icon-snapshot"></i>
+			<i ng-if="!loading" class="gf-icon gf-icon-snap-multi"></i>
 		</div>
 
 		<div class="share-snapshot-header" ng-if="step === 1">

+ 1 - 1
src/app/features/dashboard/partials/snapshotTopNav.html

@@ -10,7 +10,7 @@
 
 				<div class="top-nav-snapshot-title">
 					<a class="pointer" bs-tooltip="titleTooltip" data-placement="bottom">
-						<i class="gf-icon gf-icon-snapshot"></i>
+						<i class="gf-icon gf-icon-snap-multi"></i>
 						<span class="dashboard-title">
 							{{dashboard.title}}
 							<em class="small">&nbsp;&nbsp;(snapshot)</em>

+ 1 - 2
src/app/routes/dashLoadControllers.js

@@ -37,8 +37,7 @@ function (angular, _, kbn, moment, $) {
     backendSrv.get('/api/snapshots/' + $routeParams.key).then(function(result) {
       $scope.initDashboard(result, $scope);
     },function() {
-      $scope.initDashboard({}, $scope);
-      $scope.appEvent('alert-error', ['Dashboard Snapshot', '']);
+      $scope.initDashboard({meta: {isSnapshot: true}, model: {title: 'Snapshot not found'}}, $scope);
     });
   });
 

文件差异内容过多而无法显示
+ 0 - 0
src/css/less/fonts.less


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

@@ -299,7 +299,7 @@
 .share-snapshot {
   text-align: center;
 
-  .gf-icon-snapshot {
+  .gf-icon-snap-multi {
     font-size: 70px;
   }
 

+ 2 - 1
src/css/less/navbar.less

@@ -126,10 +126,11 @@
   .gf-icon {
     position: relative;
     top: 3px;
+    font-size: 27px;
   }
   a {
     display: inline-block;
-    padding: 3px 15px 5px 10px;
+    padding: 0px 15px 5px 10px;
   }
   display: block;
   float: left;

+ 24 - 0
src/fonts/custom/multi_snap.svg

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 113.6 125.8" enable-background="new 0 0 113.6 125.8" xml:space="preserve">
+<g>
+	<polygon fill="#FFFFFF" points="15.1,115.1 16.4,123.3 53.6,117.5 43.1,114.8 	"/>
+	<path fill="#FFFFFF" d="M96.6,84.9l-0.1-0.5l17-61.7l-17.7-4.9V7.4H84.7l-0.4-2.9L65.6,7.4h-7.3L31.4,0l-2,7.4H10.7v8.5L0,17.5
+		l9.6,61.8L3,103.2l7.7,2.1v9.1h73.7l-39.2,0.4l35,9.7l5,1.4l3.1-11.4h7.6V111l4.7-0.7L96.6,84.9z M106.2,26.8L95.9,64.2V24
+		L106.2,26.8z M35.6,7.4L35.6,7.4L35.6,7.4L35.6,7.4z M16.7,13.4h73.2v75.3H16.7V13.4z M10.7,22v25.4L6.8,22.6L10.7,22z"/>
+	<polygon fill="#FFFFFF" points="35.6,7.4 35.6,7.4 35.7,7.4 	"/>
+	<path fill="#FFFFFF" d="M23.3,44.9c0,3.2,2.6,5.7,5.7,5.7h17.3c3.2,0,5.7-2.6,5.7-5.7V27.7c0-3.2-2.6-5.7-5.7-5.7H29
+		c-3.2,0-5.7,2.6-5.7,5.7V44.9z M29,24.2h17.3c1.9,0,3.4,1.5,3.4,3.4v17.3c0,1.9-1.5,3.4-3.4,3.4H29c-1.9,0-3.4-1.5-3.4-3.4V27.7
+		C25.5,25.8,27.1,24.2,29,24.2z"/>
+	<path fill="#FFFFFF" d="M54.6,27.7v17.3c0,3.2,2.6,5.7,5.7,5.7h17.3c3.2,0,5.7-2.6,5.7-5.7V27.7c0-3.2-2.6-5.7-5.7-5.7H60.3
+		C57.1,21.9,54.6,24.5,54.6,27.7z M81,27.7v17.3c0,1.9-1.5,3.4-3.4,3.4H60.3c-1.9,0-3.4-1.5-3.4-3.4V27.7c0-1.9,1.5-3.4,3.4-3.4
+		h17.3C79.5,24.2,81,25.8,81,27.7z"/>
+	<path fill="#FFFFFF" d="M52,58.3c0-3.2-2.6-5.7-5.7-5.7H29c-3.2,0-5.7,2.6-5.7,5.7v17.3c0,3.2,2.6,5.7,5.7,5.7h17.3
+		c3.2,0,5.7-2.6,5.7-5.7V58.3z M25.5,75.5V58.3c0-1.9,1.5-3.4,3.4-3.4h17.3c1.9,0,3.4,1.5,3.4,3.4v17.3c0,1.9-1.5,3.4-3.4,3.4H29
+		C27.1,79,25.5,77.4,25.5,75.5z"/>
+	<path fill="#FFFFFF" d="M60.3,81.2h17.3c3.2,0,5.7-2.6,5.7-5.7V58.3c0-3.2-2.6-5.7-5.7-5.7H60.3c-3.2,0-5.7,2.6-5.7,5.7v17.3
+		C54.6,78.7,57.1,81.2,60.3,81.2z M81,58.3v17.3c0,1.9-1.5,3.4-3.4,3.4H60.3c-1.9,0-3.4-1.5-3.4-3.4V58.3c0-1.9,1.5-3.4,3.4-3.4
+		h17.3C79.5,54.8,81,56.4,81,58.3z"/>
+</g>
+</svg>

+ 21 - 0
src/fonts/custom/single_snap_tilt.svg

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 262.2 310" enable-background="new 0 0 262.2 310" xml:space="preserve">
+<path fill="#FFFFFF" d="M47.4,125.9c1.3,8.2,8.8,13.7,17,12.5l44.4-6.9c8.2-1.3,13.7-8.8,12.5-17l-6.9-44.4
+	c-1.3-8.2-8.8-13.7-17-12.5L53,64.5c-8.2,1.3-13.7,8.8-12.5,17L47.4,125.9L47.4,125.9z M53.9,70.4l44.4-6.9
+	c4.9-0.8,9.5,2.6,10.2,7.5l6.9,44.4c0.8,4.9-2.6,9.5-7.5,10.2l-44.4,6.9c-4.9,0.8-9.5-2.6-10.2-7.5l-6.9-44.4
+	C45.6,75.7,49.1,71.1,53.9,70.4z"/>
+<path fill="#FFFFFF" d="M121.1,69.1l6.9,44.4c1.3,8.2,8.8,13.7,17,12.5l44.2-6.8c8.2-1.3,13.7-8.8,12.5-17l-6.9-44.4
+	c-1.3-8.2-8.8-13.7-17-12.5L133.5,52C125.3,53.3,119.8,61,121.1,69.1z M188.9,58.6l6.9,44.4c0.8,4.9-2.6,9.5-7.5,10.2L144,120
+	c-4.9,0.8-9.5-2.6-10.2-7.5L127,68.1c-0.8-4.9,2.6-9.5,7.5-10.2l44.2-6.8C183.6,50.3,188.1,53.6,188.9,58.6z"/>
+<path fill="#FFFFFF" d="M126.5,148.7c-1.3-8.2-8.8-13.7-17-12.5l-44.4,6.9c-8.2,1.3-13.7,8.8-12.5,17l6.9,44.4
+	c1.3,8.2,8.8,13.7,17,12.5l44.4-6.9c8.2-1.3,13.7-8.8,12.5-17L126.5,148.7z M65.4,203.6l-6.9-44.4c-0.8-4.9,2.6-9.5,7.5-10.2
+	l44.4-6.9c4.9-0.8,9.5,2.6,10.2,7.5l6.9,44.4c0.8,4.9-2.6,9.5-7.5,10.2l-44.4,6.9C70.9,211.8,66.2,208.3,65.4,203.6z"/>
+<path fill="#FFFFFF" d="M157.1,204.5l44.2-6.8c8.2-1.3,13.7-8.8,12.5-17l-6.9-44.4c-1.3-8.2-8.8-13.7-17-12.5l-44.2,6.8
+	c-8.2,1.3-13.7,8.8-12.5,17l6.9,44.4C141.4,200,148.9,205.7,157.1,204.5z M201,137.2l6.9,44.4c0.8,4.9-2.6,9.5-7.5,10.2l-44.2,6.8
+	c-4.9,0.8-9.5-2.6-10.2-7.5l-6.9-44.4c-0.8-4.9,2.6-9.5,7.5-10.2l44.2-6.8C195.7,128.9,200.3,132.2,201,137.2z"/>
+<path fill="#FFFFFF" d="M0.2,34.5l32.3,208.7l6.4,41.5l3.8,24.6l219.4-34l-3.8-24.6l-6.4-41.5L219.6,0.5L0.2,34.5z M48.3,240.7
+	L18.4,47.8l187.8-29.1l29.9,192.9L48.3,240.7z"/>
+</svg>

+ 19 - 0
src/fonts/custom/single_snapshot_straight.svg

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 223 279" enable-background="new 0 0 223 279" xml:space="preserve">
+<path fill="#FFFFFF" d="M33.6,98.4c0,8.3,6.6,14.9,14.9,14.9h44.9c8.3,0,14.9-6.6,14.9-14.9V53.5c0-8.3-6.6-14.9-14.9-14.9H48.5
+	c-8.3,0-14.9,6.6-14.9,14.9L33.6,98.4L33.6,98.4z M48.5,44.6h44.9c5,0,8.9,4,8.9,8.9v44.9c0,5-4,8.9-8.9,8.9H48.5
+	c-5,0-8.9-4-8.9-8.9V53.5C39.6,48.6,43.7,44.6,48.5,44.6z"/>
+<path fill="#FFFFFF" d="M115.1,53.5v44.9c0,8.3,6.6,14.9,14.9,14.9h44.7c8.3,0,14.9-6.6,14.9-14.9V53.5c0-8.3-6.6-14.9-14.9-14.9
+	H130C121.7,38.6,115.1,45.4,115.1,53.5z M183.7,53.5v44.9c0,5-4,8.9-8.9,8.9H130c-5,0-8.9-4-8.9-8.9V53.5c0-5,4-8.9,8.9-8.9h44.7
+	C179.7,44.6,183.7,48.6,183.7,53.5z"/>
+<path fill="#FFFFFF" d="M108.3,133.1c0-8.3-6.6-14.9-14.9-14.9H48.5c-8.3,0-14.9,6.6-14.9,14.9V178c0,8.3,6.6,14.9,14.9,14.9h44.9
+	c8.3,0,14.9-6.6,14.9-14.9V133.1z M39.6,178v-44.9c0-5,4-8.9,8.9-8.9h44.9c5,0,8.9,4,8.9,8.9V178c0,5-4,8.9-8.9,8.9H48.5
+	C43.7,186.9,39.6,182.8,39.6,178z"/>
+<path fill="#FFFFFF" d="M130,192.9h44.7c8.3,0,14.9-6.6,14.9-14.9v-44.9c0-8.3-6.6-14.9-14.9-14.9H130c-8.3,0-14.9,6.6-14.9,14.9
+	V178C115.1,186.1,121.7,192.9,130,192.9z M183.7,133.1V178c0,5-4,8.9-8.9,8.9H130c-5,0-8.9-4-8.9-8.9v-44.9c0-5,4-8.9,8.9-8.9h44.7
+	C179.7,124.1,183.7,128.1,183.7,133.1z"/>
+<path fill="#FFFFFF" d="M0.9,0.8V212v42v24.9H223V254v-42V0.8H0.9z M16.9,212V16.8H207V212H16.9z"/>
+</svg>

部分文件因为文件数量过多而无法显示