From ca7bc25c83c24515761eb75c97774624962a127a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 16 Dec 2016 10:34:00 +0100 Subject: [PATCH] feat(panel): working on panel help text, #4079 , #6847 --- public/app/features/dashboard/model.ts | 4 +- .../dashboard}/partials/inspector.html | 3 +- .../dashboard/partials/panel_info.html | 18 +++++++ .../app/features/panel/metrics_panel_ctrl.ts | 1 - public/app/features/panel/panel_ctrl.ts | 20 +++++--- public/app/features/panel/panel_directive.ts | 51 +++++++++++++++++-- public/app/features/panel/panel_menu.js | 20 +------- public/sass/components/_alerts.scss | 4 +- public/sass/components/_drop.scss | 2 +- public/sass/components/_view_states.scss | 1 + public/sass/pages/_dashboard.scss | 28 ++++++++-- 11 files changed, 111 insertions(+), 41 deletions(-) rename public/app/{ => features/dashboard}/partials/inspector.html (95%) create mode 100644 public/app/features/dashboard/partials/panel_info.html diff --git a/public/app/features/dashboard/model.ts b/public/app/features/dashboard/model.ts index 6b8b2ed36d7..cff82d1ffb0 100644 --- a/public/app/features/dashboard/model.ts +++ b/public/app/features/dashboard/model.ts @@ -51,7 +51,7 @@ export class DashboardModel { this.style = data.style || "dark"; this.timezone = data.timezone || ''; this.editable = data.editable !== false; - this.graphTooltip = data.graphTooltip || false; + this.graphTooltip = data.graphTooltip || 0; this.hideControls = data.hideControls || false; this.time = data.time || { from: 'now-6h', to: 'now' }; this.timepicker = data.timepicker || {}; @@ -272,7 +272,7 @@ export class DashboardModel { } sharedTooltipModeEnabled() { - return this.graphTooltip !== 0; + return this.graphTooltip > 0; } sharedCrosshairModeOnly() { diff --git a/public/app/partials/inspector.html b/public/app/features/dashboard/partials/inspector.html similarity index 95% rename from public/app/partials/inspector.html rename to public/app/features/dashboard/partials/inspector.html index 228dfc7041e..37a1516c0b9 100644 --- a/public/app/partials/inspector.html +++ b/public/app/features/dashboard/partials/inspector.html @@ -1,7 +1,8 @@