소스 검색

Merge pull request #15527 from grafana/15485-tab-in-url

fix: Remove tab param from url when leaving edit mode
Torkel Ödegaard 6 년 전
부모
커밋
fb3463ba4f
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      public/app/features/dashboard/components/DashNav/DashNav.tsx
  2. 2 0
      public/app/features/dashboard/services/DashboardSrv.ts

+ 1 - 1
public/app/features/dashboard/components/DashNav/DashNav.tsx

@@ -65,7 +65,7 @@ export class DashNav extends PureComponent<Props> {
       });
     } else {
       this.props.updateLocation({
-        query: { panelId: null, edit: null, fullscreen: null },
+        query: { panelId: null, edit: null, fullscreen: null, tab: null },
         partial: true,
       });
     }

+ 2 - 0
public/app/features/dashboard/services/DashboardSrv.ts

@@ -43,6 +43,7 @@ export class DashboardSrv {
         delete urlParams.fullscreen;
         delete urlParams.edit;
         delete urlParams.panelId;
+        delete urlParams.tab;
         this.$location.search(urlParams);
         return;
       }
@@ -58,6 +59,7 @@ export class DashboardSrv {
       urlParams.edit = true;
     } else {
       delete urlParams.edit;
+      delete urlParams.tab;
     }
 
     if (options.panelId || options.panelId === 0) {