diff --git a/frappe/core/page/dashboard/dashboard.js b/frappe/core/page/dashboard/dashboard.js
index 66d1b0ecf3..655bbe7444 100644
--- a/frappe/core/page/dashboard/dashboard.js
+++ b/frappe/core/page/dashboard/dashboard.js
@@ -9,7 +9,7 @@ frappe.pages['dashboard'].on_page_load = function(wrapper) {
$(wrapper).bind('show', function() {
frappe.dashboard.show();
});
-}
+};
class Dashboard {
constructor(wrapper) {
@@ -45,7 +45,7 @@ class Dashboard {
let dashboard_chart = new DashboardChart(chart_doc, chart_container);
dashboard_chart.show();
});
- })
+ });
}
get_dashboard_doc() {
@@ -103,11 +103,11 @@ class DashboardChart {
this.update_chart_object();
this.data = data;
this.render();
- })
+ });
});
}
d.hide();
- }
+ };
this.filter_fields.map(field => field.onchange = e => {
if(e) {
@@ -124,10 +124,10 @@ class DashboardChart {
this.update_chart_object();
this.data = data;
this.render();
- })
+ });
}
}
- ]
+ ];
this.chart_actions = $(`
frappe.set_route('dashboard', frm.doc.name))
+ frm.add_custom_button(__("Show Dashboard"), () => frappe.set_route('dashboard', frm.doc.name));
}
});
diff --git a/frappe/desk/doctype/dashboard/dashboard.py b/frappe/desk/doctype/dashboard/dashboard.py
index acaeb5dc67..fae0585161 100644
--- a/frappe/desk/doctype/dashboard/dashboard.py
+++ b/frappe/desk/doctype/dashboard/dashboard.py
@@ -3,7 +3,6 @@
# For license information, please see license.txt
from __future__ import unicode_literals
-import frappe
from frappe.model.document import Document
class Dashboard(Document):
diff --git a/frappe/desk/doctype/dashboard/test_dashboard.py b/frappe/desk/doctype/dashboard/test_dashboard.py
index ac56d00642..d5485d8f70 100644
--- a/frappe/desk/doctype/dashboard/test_dashboard.py
+++ b/frappe/desk/doctype/dashboard/test_dashboard.py
@@ -3,7 +3,6 @@
# See license.txt
from __future__ import unicode_literals
-import frappe
import unittest
class TestDashboard(unittest.TestCase):
diff --git a/frappe/desk/doctype/dashboard_chart/dashboard_chart.py b/frappe/desk/doctype/dashboard_chart/dashboard_chart.py
index 99c6f9717f..5ff00ac43b 100644
--- a/frappe/desk/doctype/dashboard_chart/dashboard_chart.py
+++ b/frappe/desk/doctype/dashboard_chart/dashboard_chart.py
@@ -3,7 +3,6 @@
# For license information, please see license.txt
from __future__ import unicode_literals
-import frappe
from frappe.model.document import Document
class DashboardChart(Document):
diff --git a/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py b/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py
index a9aa0b2263..5c22f62276 100644
--- a/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py
+++ b/frappe/desk/doctype/dashboard_chart/test_dashboard_chart.py
@@ -3,7 +3,6 @@
# See license.txt
from __future__ import unicode_literals
-import frappe
import unittest
class TestDashboardChart(unittest.TestCase):