diff --git a/src/examples.ts b/src/examples.ts index 7d3663d..b8689d6 100644 --- a/src/examples.ts +++ b/src/examples.ts @@ -97,12 +97,11 @@ export const examples = [ text: 'grafana settings api w/ template', config: { mode: RenderMode.template, + // tslint:disable-next-line template: - '

Instance: {{ response.DEFAULT.instance_name }}

\n\n' + - '
\n\n ' + - '
{{key}}
\n\n ' + - '
{{ value | json }}
\n\n ' + - '
', + // tslint:disable-next-line: max-line-length + '

Instance: {{ response.DEFAULT.instance_name }}

\n\n
\n\n
{{key}}
\n\n
{{ value | json }}
\n\n
', + url: '/api/admin/settings', params_js: '{}', }, diff --git a/src/module.ts b/src/module.ts index 2742836..72bb309 100644 --- a/src/module.ts +++ b/src/module.ts @@ -554,6 +554,15 @@ class AjaxCtrl extends MetricsPanelCtrl { openFullscreen() { // Update the image this.overlay.find('img').attr('src', this.objectURL); + + if (this.panel.fitImageToScreen) { + this.overlay.find('img').css('max-width', '98vw'); + this.overlay.find('img').css('max-height', '98vh'); + } else { + this.overlay.find('img').css('max-width', ''); + this.overlay.find('img').css('max-height', ''); + } + $('.grafana-app').append(this.overlay); this.overlay.on('click', () => { this.overlay.remove(); diff --git a/src/partials/editor.display.html b/src/partials/editor.display.html index 968b786..b3b3b84 100644 --- a/src/partials/editor.display.html +++ b/src/partials/editor.display.html @@ -11,7 +11,13 @@
Display
-
+
+ +
+ +