Browse Source

fix: fixed links on new 404 page, fixes #9493

Torkel Ödegaard 8 years ago
parent
commit
e7b718ed7a

+ 4 - 2
public/app/core/controllers/error_ctrl.js

@@ -1,19 +1,21 @@
 define([
   'angular',
+  'app/core/config',
   '../core_module',
 ],
-function (angular, coreModule) {
+function (angular, config, coreModule) {
   'use strict';
 
   coreModule.default.controller('ErrorCtrl', function($scope, contextSrv, navModelSrv) {
 
     $scope.navModel = navModelSrv.getNotFoundNav();
+    $scope.appSubUrl = config.appSubUrl;
 
     var showSideMenu = contextSrv.sidemenu;
     contextSrv.sidemenu = false;
 
     $scope.$on('$destroy', function() {
-      $scope.contextSrv.sidemenu = showSideMenu;
+      contextSrv.sidemenu = showSideMenu;
     });
 
   });

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

@@ -42,8 +42,8 @@
 						</div>
 						<div>
 							<h3>Sorry for the inconvenience</h3>
-							<p>Please go back to your <a href="#" class="error-link">home dashboard</a> and try again.</p>
-							<p>If the error persists, seek help on the <a href="#" class="error-link">community site</a>.</p>
+							<p>Please go back to your <a href="{{appSubUrl}}/" class="error-link">home dashboard</a> and try again.</p>
+							<p>If the error persists, seek help on the <a href="https://community.grafana.com" target="_blank" class="error-link">community site</a>.</p>
 						</div>
 					</div>
 				</div>

+ 2 - 2
public/sass/pages/_errorpage.scss

@@ -43,7 +43,7 @@
     line-height: 1rem;
 }
 
-.error-link {color: $yellow;}
+.error-link {color: $orange;}
 
 .error-minus {
     color: #7eb26d;
@@ -57,4 +57,4 @@
     line-height: 1rem;
 }
 
-.graph-text {margin: 0;}
+.graph-text {margin: 0;}

+ 1 - 1
tslint.json

@@ -2,8 +2,8 @@
   "rules": {
     "no-string-throw": true,
     "no-unused-expression": true,
-    "no-duplicate-variable": true,
 		"no-unused-variable": true,
+    "no-duplicate-variable": true,
     "curly": true,
     "class-name": true,
     "semicolon": [true, "always", "ignore-bound-class-methods"],