Ver código fonte

fix: change view json to use the grafana built json viewer, fixes #9002

Torkel Ödegaard 8 anos atrás
pai
commit
64b5153e7d
1 arquivos alterados com 4 adições e 3 exclusões
  1. 4 3
      public/app/features/dashboard/dashnav/dashnav.ts

+ 4 - 3
public/app/features/dashboard/dashnav/dashnav.ts

@@ -135,9 +135,10 @@ export class DashNavCtrl {
 
     viewJson() {
       var clone = this.dashboard.getSaveModelClone();
-      var html = angular.toJson(clone, true);
-      var uri = "data:application/json;charset=utf-8," + encodeURIComponent(html);
-      var newWindow = window.open(uri);
+
+      this.$rootScope.appEvent('show-json-editor', {
+        object: clone,
+      });
     }
 
     showSearch() {