From 65cbcc06ebf35c57da20b088e5a400a7cd37847c Mon Sep 17 00:00:00 2001 From: Daniel Lee Date: Wed, 12 Sep 2018 09:47:16 +0200 Subject: [PATCH] upload: make the button text configurable --- public/app/features/dashboard/upload.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/upload.ts b/public/app/features/dashboard/upload.ts index 19274811a33..42871327eb6 100644 --- a/public/app/features/dashboard/upload.ts +++ b/public/app/features/dashboard/upload.ts @@ -1,11 +1,12 @@ import coreModule from 'app/core/core_module'; import appEvents from 'app/core/app_events'; +import angular from 'angular'; const template = ` `; @@ -16,8 +17,11 @@ function uploadDashboardDirective(timer, alertSrv, $location) { template: template, scope: { onUpload: '&', + btnText: '@?', }, link: (scope, elem) => { + scope.btnText = angular.isDefined(scope.btnText) ? scope.btnText : 'Upload .json File'; + function file_selected(evt) { const files = evt.target.files; // FileList object const readerOnload = () => {