From 396ef337b29493b8ddf72c5cb91f48561982d80d Mon Sep 17 00:00:00 2001 From: Aaron France Date: Wed, 28 Jan 2015 00:14:32 +0100 Subject: [PATCH] Add binding to show config --- lib/riemann/dash/public/dash.js | 17 +++++++++++++++++ lib/riemann/dash/public/views/help.js | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/riemann/dash/public/dash.js b/lib/riemann/dash/public/dash.js index 8b84117..adadd4c 100644 --- a/lib/riemann/dash/public/dash.js +++ b/lib/riemann/dash/public/dash.js @@ -187,12 +187,28 @@ dash = (function() { ); } + var showconfig = function() { + stash(); + var configTemplate = _.template("
{{- config }}
"); + var rendered = configTemplate({config: JSON.stringify({ + server: toolbar.server(), + server_type: toolbar.server_type(), + workspaces: workspaces + })}); + var dialog = $(rendered); + dialog.modal({onClose: function() { + keys.enable(); + $.modal.close(); + }}); + }; + var help = function() { var dialog = $( '

Help