The implementation of syncing unique and non-unique index depended on
index names which used to be different before because of that there's
tendency to incorrectly identify index.
This PR adds a separate util for checking if a column has index without
relying on naming convention. It just goes and checks if there's any
index with that column in it, hence far more reliable.
(cherry picked from commit cbe4b59100)
Currently we are doing aggregation of remaining slices manually BUT this
breaks basic principle of DRY:
- dashboard chart decides how many groups to consider
- frappe charts has different maxSlices config
This results in mess like frappe computing "Other" and Frappe charts
computing "rest" separately.
Fix: Just pass all data to charts and let it figure out the "Rest".
(cherry picked from commit d597acb5e2)
Co-authored-by: Ankush Menat <ankush@frappe.io>
- set center and zoom for leaflet.
Co-authored-by: Abhinav Raut <abhinav.raut@zerodha.com>
(cherry picked from commit fd81a290b2)
Co-authored-by: Abhinav Raut <abhinavrautcs@gmail.com>
* feat: added Subscription Banner and Manage Subscription button
* feat[patch]: added a patch for adding `Manage Subscription` button in
navbar_settings
* chore: removed console ;)
* refactor: make the `Manage Subscription` navbar item optional
* keep it hidden by default, only show when the site configs are present
* style: prettier, isort and stuff
* chore: handling null responses, translation and refactored patch
* fix: correct index reset
* perf: reduce network/db calls
If not sys manager then why make a request?
* fix: removed network call and added subscription_expiry to boot process
* chore: added enable_manage_susbcriptions as daily background job and refactored patch
* chore: added hook to hooks.py
* this looks clean enough, also don't have insert for child tables ;)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: Chart filter not working if not operator is used
(cherry picked from commit 3162d192b8)
* fix: added missing operators
(cherry picked from commit fc1e01555b)
Co-authored-by: Shariq Ansari <sharique.rik@gmail.com>
- Identify original report name correctly.
- If sending to background, don't log it.
(cherry picked from commit 7c423416b4)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* fix: add translate function to some strings (#18188)
* fix: typo on dashboard_view
* fix: add string to translate function
* fix: add string to translate function
* fix: add string to translate function
* fix: upddate translatet text to single quote
* fix: update translated strings to single quote
* fix: add country to translate function
* fix: add country to translate function
* fix: add string to translate function
* fix: add string to translate function
* fix: add string to translate function
* fix: Revert translate for country
* fix: revert single quote to Search for icons text
* fix: refactor the translate labels directly to html variable
(cherry picked from commit d399951fab)
* style: prettier
Co-authored-by: Ernesto Ruiz <ernesto_ruiz89@hotmail.com>
Co-authored-by: Ankush Menat <ankush@frappe.io>
creation doesn't have index and does full table scan. On large site with
~3M activity logs it takes ~1.5 seconds just to begin scheduler.
[skip ci]
(cherry picked from commit 0642708f01)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* Fix chart translation issue
also used .html() instead of .text() in line 58, because otherwise it resulted in html escape errors. In french ' is used in many words and when using the text() method it results in this string being inserted '
* refactor: use data attribute
for semantic consistency
Co-authored-by: Ankush Menat <ankush@frappe.io>
(cherry picked from commit 13e6aca115)
Co-authored-by: aliX40 <55487948+aliX40@users.noreply.github.com>
Computing all translations is far slower than just sending everything.
This is how boot works too.
(cherry picked from commit 56920e409a)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* feat: capture custom values in frappe monitor
lets monitor add extra info for:
- Save/Submit by doctype
- Report generation time by standard report name
(cherry picked from commit 967cc26fab)
* fix: use compact JSON representation for monitor
(cherry picked from commit 939bf872ae)
Co-authored-by: Ankush Menat <ankush@frappe.io>
* perf: initialise field map when initialising meta
(cherry picked from commit df8399f5d3)
* perf: simpler, faster meta cache
(cherry picked from commit 6c6a969d3a)
* fix: ensure error is thrown
(cherry picked from commit b529c27cb5)
* refactor: drop _allow_dict support
This is not required anymore since we store full doc anyway. Also since
they share same cache key calling get_cached_value and get_cached_doc
can end up doing duplicate / double work.
(cherry picked from commit abd018773b)
* fix: pickle doc objects directly
This seems to be missed out and causes performance regression in IRL
usage when get_doc is called on cached doc already.
(cherry picked from commit bcb5fe91aa)
* test: basic perf test for rps on get_list
(cherry picked from commit c28ddcc3e6)
* build: pin testing-library/dom temporarily
refer https://github.com/testing-library/dom-testing-library/issues/1169
(cherry picked from commit 40f6a34840)
* chore: semantic changes to document caching code
* fix: drop Meta cache during update
Revert "fix: drop Meta cache during update" (#18186)
* Revert "fix: drop Meta cache during update (#18182)"
This reverts commit 656f6df257.
* fix: replace meta cache keys
Old keys stored different types of data `dict` changing key to indicate
change in type.
* perf: cache `FormMeta` directly (#18165)
* perf: cache `FormMeta` directly
* perf: check if `dt` is table, use `db.get_value` instead of `get_all`
Co-authored-by: Sagar Vora <sagar@resilient.tech>
Co-authored-by: Ankush Menat <ankush@frappe.io>