Просмотр исходного кода

Merge branch 'v3.1.x' of github.com:grafana/grafana into v3.1.x

Torkel Ödegaard 9 лет назад
Родитель
Сommit
78d0badffe

+ 3 - 10
docs/sources/installation/debian.md

@@ -10,20 +10,13 @@ page_keywords: grafana, installation, debian, ubuntu, guide
 
 
 Description | Download
 Description | Download
 ------------ | -------------
 ------------ | -------------
-Stable .deb for Debian-based Linux | [3.0.4](https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.4-1464167696_amd64.deb)
-Beta .deb for Debian-based Linux | [3.1.0-beta1](https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.0-1466666977beta1_amd64.deb)
+Stable .deb for Debian-based Linux | [3.1.0](https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.0-1468321182_amd64.deb)
 
 
 ## Install Stable
 ## Install Stable
 
 
-    $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.0.4-1464167696_amd64.deb
+    $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.0-1468321182_amd64.deb
     $ sudo apt-get install -y adduser libfontconfig
     $ sudo apt-get install -y adduser libfontconfig
-    $ sudo dpkg -i grafana_3.0.4-1464167696_amd64.deb
-
-## Install 3.1 beta
-
-    $ wget https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.0-1466666977beta1_amd64.deb
-    $ sudo apt-get install -y adduser libfontconfig
-    $ sudo dpkg -i grafana_3.1.0-1466666977beta1_amd64.deb
+    $ sudo dpkg -i grafana_3.1.0-1468321182_amd64.deb
 
 
 ## APT Repository
 ## APT Repository
 
 

+ 4 - 22
docs/sources/installation/rpm.md

@@ -10,42 +10,24 @@ page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide
 
 
 Description | Download
 Description | Download
 ------------ | -------------
 ------------ | -------------
-Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [3.0.4 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.4-1464167696.x86_64.rpm)
-Beta .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [3.1.0-beta1 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm)
+Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [3.1.0 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1468321182.x86_64.rpm)
 
 
 ## Install Latest Stable
 ## Install Latest Stable
 
 
 You can install Grafana using Yum directly.
 You can install Grafana using Yum directly.
 
 
-    $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.0.4-1464167696.x86_64.rpm
+    $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1468321182.x86_64.rpm
 
 
 Or install manually using `rpm`.
 Or install manually using `rpm`.
 
 
 #### On CentOS / Fedora / Redhat:
 #### On CentOS / Fedora / Redhat:
 
 
     $ sudo yum install initscripts fontconfig
     $ sudo yum install initscripts fontconfig
-    $ sudo rpm -Uvh grafana-3.0.4-1464167696.x86_64.rpm
+    $ sudo rpm -Uvh grafana-3.1.0-1468321182.x86_64.rpm
 
 
 #### On OpenSuse:
 #### On OpenSuse:
 
 
-    $ sudo rpm -i --nodeps grafana-3.0.4-1464167696.x86_64.rpm
-
-## Install 3.1 Beta
-
-You can install Grafana using Yum directly.
-
-    $ sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm
-
-Or install manually using `rpm`.
-
-#### On CentOS / Fedora / Redhat:
-
-    $ sudo yum install initscripts fontconfig
-    $ sudo rpm -Uvh https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm
-
-#### On OpenSuse:
-
-    $ sudo rpm -i --nodeps https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1466666977beta1.x86_64.rpm
+    $ sudo rpm -i --nodeps grafana-3.1.0-1468321182.x86_64.rpm
 
 
 ## Install via YUM Repository
 ## Install via YUM Repository
 
 

+ 1 - 1
docs/sources/installation/windows.md

@@ -10,7 +10,7 @@ page_keywords: grafana, installation, windows guide
 
 
 Description | Download
 Description | Download
 ------------ | -------------
 ------------ | -------------
-Stable Zip package for Windows | [grafana.3.0.4.windows-x64.zip](https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-3.0.4.windows-x64.zip)
+Stable Zip package for Windows | [grafana.3.1.0.windows-x64.zip](https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-3.1.0.windows-x64.zip)
 
 
 ## Configure
 ## Configure
 
 

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
     "company": "Coding Instinct AB"
     "company": "Coding Instinct AB"
   },
   },
   "name": "grafana",
   "name": "grafana",
-  "version": "3.1.0-beta1",
+  "version": "3.1.0",
   "repository": {
   "repository": {
     "type": "git",
     "type": "git",
     "url": "http://github.com/grafana/grafana.git"
     "url": "http://github.com/grafana/grafana.git"

+ 2 - 2
pkg/api/dashboard.go

@@ -139,10 +139,10 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
 			return Json(412, util.DynMap{"status": "version-mismatch", "message": err.Error()})
 			return Json(412, util.DynMap{"status": "version-mismatch", "message": err.Error()})
 		}
 		}
 		if pluginErr, ok := err.(m.UpdatePluginDashboardError); ok {
 		if pluginErr, ok := err.(m.UpdatePluginDashboardError); ok {
-			message := "Dashboard is belongs to plugin " + pluginErr.PluginId + "."
+			message := "The dashboard belongs to plugin " + pluginErr.PluginId + "."
 			// look up plugin name
 			// look up plugin name
 			if pluginDef, exist := plugins.Plugins[pluginErr.PluginId]; exist {
 			if pluginDef, exist := plugins.Plugins[pluginErr.PluginId]; exist {
-				message = "Dashboard is belongs to plugin " + pluginDef.Name + "."
+				message = "The dashboard belongs to plugin " + pluginDef.Name + "."
 			}
 			}
 			return Json(412, util.DynMap{"status": "plugin-dashboard", "message": message})
 			return Json(412, util.DynMap{"status": "plugin-dashboard", "message": message})
 		}
 		}

+ 2 - 0
public/app/core/services/alert_srv.ts

@@ -73,6 +73,8 @@ export class AlertSrv {
     scope.text = payload.text;
     scope.text = payload.text;
     scope.text2 = payload.text2;
     scope.text2 = payload.text2;
     scope.onConfirm = payload.onConfirm;
     scope.onConfirm = payload.onConfirm;
+    scope.onAltAction = payload.onAltAction;
+    scope.altActionText = payload.altActionText;
     scope.icon = payload.icon || "fa-check";
     scope.icon = payload.icon || "fa-check";
     scope.yesText = payload.yesText || "Yes";
     scope.yesText = payload.yesText || "Yes";
     scope.noText = payload.noText || "Cancel";
     scope.noText = payload.noText || "Cancel";

+ 6 - 2
public/app/features/dashboard/dashnav/dashnav.ts

@@ -141,9 +141,13 @@ export class DashNavCtrl {
         $scope.appEvent('confirm-modal', {
         $scope.appEvent('confirm-modal', {
           title: 'Plugin Dashboard',
           title: 'Plugin Dashboard',
           text: err.data.message,
           text: err.data.message,
-          text2: 'Your changes will be overwritten next time you update the plugin. Use Save As to create custom version.',
-          yesText: "Save & Overwrite",
+          text2: 'Your changes will be lost when you update the plugin. Use Save As to create custom version.',
+          yesText: "Overwrite",
           icon: "fa-warning",
           icon: "fa-warning",
+          altActionText: "Save As",
+          onAltAction: function() {
+            $scope.saveDashboardAs();
+          },
           onConfirm: function() {
           onConfirm: function() {
             $scope.saveDashboard({overwrite: true});
             $scope.saveDashboard({overwrite: true});
           }
           }

+ 2 - 1
public/app/partials/confirm_modal.html

@@ -1,4 +1,4 @@
-<div class="modal-body">
+<div class="modal-body" ng-cloak>
 	<div class="modal-header">
 	<div class="modal-header">
 		<h2 class="modal-header-title">
 		<h2 class="modal-header-title">
 			<i class="fa {{icon}}"></i>
 			<i class="fa {{icon}}"></i>
@@ -24,6 +24,7 @@
 		<div class="confirm-modal-buttons">
 		<div class="confirm-modal-buttons">
 			<button type="button" class="btn btn-inverse" ng-click="dismiss()">{{noText}}</button>
 			<button type="button" class="btn btn-inverse" ng-click="dismiss()">{{noText}}</button>
 			<button type="button" class="btn btn-danger" ng-click="onConfirm();dismiss();">{{yesText}}</button>
 			<button type="button" class="btn btn-danger" ng-click="onConfirm();dismiss();">{{yesText}}</button>
+			<button ng-show="onAltAction" type="button" class="btn btn-success" ng-click="dismiss();onAltAction();">{{altActionText}}</button>
 		</div>
 		</div>
 	</div>
 	</div>