From 22f143898bbd690cf17324b4f4eae9abbce9c214 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 10 Sep 2021 11:27:36 +0530 Subject: [PATCH] fix(minor): frappe.toast alist from frappe.show_alert, and added toasts to website.js, plus show full processlist --- frappe/desk/doctype/system_console/system_console.py | 2 +- frappe/public/js/frappe/ui/messages.js | 4 ++-- frappe/public/scss/website/index.scss | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frappe/desk/doctype/system_console/system_console.py b/frappe/desk/doctype/system_console/system_console.py index 843891bc78..8382dc8638 100644 --- a/frappe/desk/doctype/system_console/system_console.py +++ b/frappe/desk/doctype/system_console/system_console.py @@ -38,4 +38,4 @@ def execute_code(doc): @frappe.whitelist() def show_processlist(): frappe.only_for('System Manager') - return frappe.db.sql('show processlist', as_dict=1) + return frappe.db.sql('show full processlist', as_dict=1) diff --git a/frappe/public/js/frappe/ui/messages.js b/frappe/public/js/frappe/ui/messages.js index 067fed233c..185d275ac3 100644 --- a/frappe/public/js/frappe/ui/messages.js +++ b/frappe/public/js/frappe/ui/messages.js @@ -140,7 +140,7 @@ frappe.msgprint = function(msg, title, is_minimizable) { return; } - if(data.alert) { + if(data.alert || data.toast) { frappe.show_alert(data); return; } @@ -361,7 +361,7 @@ frappe.hide_progress = function() { } // Floating Message -frappe.show_alert = function(message, seconds=7, actions={}) { +frappe.show_alert = frappe.toast = function(message, seconds=7, actions={}) { let indicator_icon_map = { 'orange': "solid-warning", 'yellow': "solid-warning", diff --git a/frappe/public/scss/website/index.scss b/frappe/public/scss/website/index.scss index 823ec9b08a..eb6e83e7fe 100644 --- a/frappe/public/scss/website/index.scss +++ b/frappe/public/scss/website/index.scss @@ -8,6 +8,7 @@ @import "../common/flex"; @import "../common/buttons"; @import "../common/modal"; +@import "../desk/toast"; @import "../common/indicator"; @import "../common/controls"; @import "../common/awesomeplete";