mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
prettier: change to single quoting
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import coreModule from "app/core/core_module";
|
||||
import coreModule from 'app/core/core_module';
|
||||
|
||||
var template = `
|
||||
<input type="file" id="dashupload" name="dashupload" class="hide"/>
|
||||
@@ -13,10 +13,10 @@ var template = `
|
||||
/** @ngInject */
|
||||
function uploadDashboardDirective(timer, alertSrv, $location) {
|
||||
return {
|
||||
restrict: "E",
|
||||
restrict: 'E',
|
||||
template: template,
|
||||
scope: {
|
||||
onUpload: "&"
|
||||
onUpload: '&',
|
||||
},
|
||||
link: function(scope) {
|
||||
function file_selected(evt) {
|
||||
@@ -28,9 +28,9 @@ function uploadDashboardDirective(timer, alertSrv, $location) {
|
||||
dash = JSON.parse(e.target.result);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
scope.appEvent("alert-error", [
|
||||
"Import failed",
|
||||
"JSON -> JS Serialization failed: " + err.message
|
||||
scope.appEvent('alert-error', [
|
||||
'Import failed',
|
||||
'JSON -> JS Serialization failed: ' + err.message,
|
||||
]);
|
||||
return;
|
||||
}
|
||||
@@ -53,17 +53,17 @@ function uploadDashboardDirective(timer, alertSrv, $location) {
|
||||
if (wnd.File && wnd.FileReader && wnd.FileList && wnd.Blob) {
|
||||
// Something
|
||||
document
|
||||
.getElementById("dashupload")
|
||||
.addEventListener("change", file_selected, false);
|
||||
.getElementById('dashupload')
|
||||
.addEventListener('change', file_selected, false);
|
||||
} else {
|
||||
alertSrv.set(
|
||||
"Oops",
|
||||
"Sorry, the HTML5 File APIs are not fully supported in this browser.",
|
||||
"error"
|
||||
'Oops',
|
||||
'Sorry, the HTML5 File APIs are not fully supported in this browser.',
|
||||
'error'
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
coreModule.directive("dashUpload", uploadDashboardDirective);
|
||||
coreModule.directive('dashUpload', uploadDashboardDirective);
|
||||
|
||||
Reference in New Issue
Block a user