Commit graph

38547 commits

Author SHA1 Message Date
Ankush Menat
8b8552b0e4 feat: clear-log-table to clear large log tables 2022-06-15 12:30:38 +05:30
Ankush Menat
95eb6cd085 feat: support log clearing for more doctypes
- Route History
- Error Snapshot
- Scheduled Job Log (only completed ones)
2022-06-15 12:30:38 +05:30
Ankush Menat
ea416f9d6b feat: log settings with "interface"
We have hardcoded "Log settings" to only apply on 3 doctypes, there are
few more logging doctypes in core which are not cleared right now, on
top of that it's not easy for user to configure all logging behaviour
from one place.

This change adds a table on log settings where logging doctypes that
support the interface required by log settings can auto-register and
show up in settings.

Currently only supported configuration is "number of days" to keep.
2022-06-15 12:30:38 +05:30
Ankush Menat
ef1200d94b fix!: dont auto set old logs as "seen"
Not sure why this is ever required, also not configurable.
2022-06-15 12:30:38 +05:30
Ankush Menat
6d5aa88e66
Merge pull request #17187 from gavindsouza/get_singles_dict-cast
refactor!: Don't cast values of frappe.db.get_singles_dict by default
2022-06-15 11:18:09 +05:30
Gavin D'souza
57bd1b6031 fix(db): Import cast as cast_fieldtype to manevour ambiguity 2022-06-15 10:54:48 +05:30
gavin
cfdde0cfff
Merge branch 'develop' into pyproject-filt 2022-06-15 10:48:26 +05:30
Gavin D'souza
80b19a6031 fix: Cast singles_dict' values
This is to adapt with the changes made in frappe.db.get_singles_dict in
the previous commit
2022-06-15 10:40:26 +05:30
Gavin D'souza
bbc90e6578 refactor!: frappe.db.get_singles_dict
* Don't cast values by default - only if cast kwarg is set
* Reverts breaking behaviour added via f74dc5023d
2022-06-15 10:33:06 +05:30
Rushabh Mehta
562499609c
fix(minor): refresh tabs with sections (#17182) 2022-06-14 19:00:01 +05:30
Shariq Ansari
af74eee7b8
Merge branch 'develop' into read-only-field-fix 2022-06-14 18:58:57 +05:30
Shariq Ansari
c77f36600a chore: code cleanup 2022-06-14 18:58:28 +05:30
Shariq Ansari
4bc544bb0b fix: validation in date range while parsing 2022-06-14 18:40:36 +05:30
gavin
074891c53f
Merge branch 'develop' into pyproject-filt 2022-06-14 18:22:50 +05:30
Gavin D'souza
cb28af838e fix: Add temporary backwards compatible setup.py
setup.py is maintained so that there is no hard dependency on bench
v5.11.0 and people get enough time to update their CLI. Hope the TODO
adds a subtle reminder for the future ;)
2022-06-14 18:21:48 +05:30
Shariq Ansari
e5bc96d4d8 fix: added validation in parse method for table multiselect and multiselect pills 2022-06-14 18:19:11 +05:30
Faris Ansari
ec2aadbf5a
chore: typo 2022-06-14 18:15:48 +05:30
gavin
fb6a092292
Merge pull request #17180 from gavindsouza/sub-query-err
fix(db_query): Remove wanton whitespace split check
2022-06-14 17:43:11 +05:30
Gavin D'souza
9b4db43b84 perf(db_query): Maintain compiled pattern globally 2022-06-14 17:17:22 +05:30
Gavin D'souza
678eebe4fb perf: Limit re internal cache to avoid caching patterns twice 2022-06-14 17:16:34 +05:30
Shariq Ansari
4bed9e3930
Merge branch 'develop' into read-only-field-fix 2022-06-14 16:57:23 +05:30
Gavin D'souza
60ec324956 fix: Remove unwanted blacklist over fields
A field like 'count(`tabBOM Update Log`.name) as total_count' split by
whitespace loses it's meaning. Tried splitting it meaningfully but
didn't get the point of this tbh and stopped. I'm not sure what the code
before was trying to do and with what set of inputs.

Imagine the following fields: [count(`tabBOM Update Log`.name) as
total_count, `tabBOM Update Log`.name as update_name, `tabBOM Update
Log`.name, `tabBOM Update as Log`.name, tabBOM.name, name], I couldn't
see what the previous check was trying to protect - hence, didn't add
any equivalent functionality.
2022-06-14 16:40:41 +05:30
Shariq Ansari
0d6891afbf fix: parse value before setting display status 2022-06-14 14:46:14 +05:30
Shariq Ansari
c1df1b1f18 fix: min height for disabled field moved to common scss 2022-06-14 14:44:55 +05:30
gavin
f12a61feab
Merge pull request #17063 from gavindsouza/regex-refactor
perf!: Pages & APIs
2022-06-14 14:24:31 +05:30
Rushabh Mehta
f626464572
Merge pull request #16983 from alyf-de/select-user
fix: allow All to select a User
2022-06-14 14:21:56 +05:30
Rushabh Mehta
71a5f1153a
Merge pull request #17135 from rmehta/tab-refresh
fix(ui): tab refresh was not implemented
2022-06-14 14:17:44 +05:30
Rucha Mahabal
a5c04561d0 fix: use the correct dt name while populating data in mapping table 2022-06-14 14:12:50 +05:30
Rucha Mahabal
4c965d54df fix(Event Streaming): set remote docname and site name before inserting mapped doc
- needed to differentiate a remote doc at the time of insertion
2022-06-14 14:12:43 +05:30
Suraj Shetty
1adec8b3e4
Merge pull request #17167 from deepeshgarg007/system_manager_role_restriction 2022-06-14 13:43:45 +05:30
Gavin D'souza
9f941e9312 build: Declarative builds via pyproject.toml
There was an attempt to switch to declarative setup, which was to use
setup.cfg. However, we've made more progress in the "world of packaging"
since. Also, given we're using a pyproject file already to govern
certain aspects of our project maintenance, it's probably a good time to
bring these things together. bye-bye to clutter and confusion in
maintaining multiple files and formats.

We've used setuptools to package frappe for the longest time. Maybe
since the first editable installation. Howver setuptools doesn't support
PEP 660 yet which supports editable installs via pyproject file.

So why now? Primarily because I wanted to start tracking system
dependencies for Frappe. Doing so through pyproject file made the most
sense. This change seemed to be the obvious pre-requisite for the
upcoming changes to our packaging systems.

Sys deps tracking: https://github.com/frappe/frappe/issues/13811
Flit docs: https://flit.pypa.io/en/latest/pyproject_toml.html
Previous attempt: https://github.com/frappe/frappe/pull/10773
Which build tool: https://stackoverflow.com/a/69711730/10309266
PEP 660: https://peps.python.org/pep-0660/
2022-06-14 13:29:36 +05:30
Rushabh Mehta
602d4376ba fix(minor): js lint 2022-06-14 13:07:13 +05:30
Rushabh Mehta
80334698a7 fix(minor): Onboarding: add option to view list view in create action 2022-06-14 12:54:10 +05:30
Gavin D'souza
52359a0ad9 test: Scheduler tests cleanup 2022-06-14 12:22:12 +05:30
Rushabh Mehta
2058b0cbea fix(ui): tab refresh was not implemented 2022-06-14 12:19:37 +05:30
Sagar Sharma
d26075cdd2
Merge branch 'develop' into fix/user-type 2022-06-13 21:56:18 -07:00
Deepesh Garg
f88ec4de83
Merge branch 'develop' into system_manager_role_restriction 2022-06-14 08:41:27 +05:30
Gavin D'souza
601217a4a2 ci: Run tests bypassing roulette with labels "Run UI Tests", "Run Server Tests" 2022-06-13 19:38:30 +05:30
Gavin D'souza
f74dc5023d refactor!: frappe.db.get_singles_dict
* Cast single's values as their fieldtypes before returning
* Support previously dead debug parameter
* Consider single with no meta as non-existent; skip query

Decided to go ahead with the breaking change given the nature of the
existing usages of get_singles_dict :crie:
2022-06-13 18:39:56 +05:30
Gavin D'souza
e681233e98 perf: Fetch and cache entire settings' dicts 2022-06-13 18:39:56 +05:30
Gavin D'souza
64e5273764 perf: Patch qb only once - not on every init 2022-06-13 18:39:56 +05:30
Gavin D'souza
3871fe6cd0 perf: App Page
Reduced time taken for get_context to execute from 0.035s to 0.02s (75%
reduction)
2022-06-13 18:39:56 +05:30
Gavin D'souza
ce38587a4e perf: About Us Settings
Use cached document for building /about page
2022-06-13 18:39:56 +05:30
Gavin D'souza
7e25cc4568 perf: Login Page
Improves performance 3x - from 0.047s to 0.017s

* Use frappe.get_*_settings to query table once
* Use cached LDAP Settings' document via get_ldap_client_settings
* Use single get_all to query all Social Login providers and related
  data
* Skip provider if client_secret doesn't exist
2022-06-13 18:39:56 +05:30
Gavin D'souza
a1691784a8 chore: Drop duplicate get_frontmatter definition 2022-06-13 18:39:56 +05:30
Gavin D'souza
13cf4964a6 perf: Check query type via is_query_type 2022-06-13 18:39:56 +05:30
Gavin D'souza
963648667d refactor: filter_dynamic_link_doctypes API
* Added typing, better variable naming
* Remove unnecessary re-iterations
* Optimize queries and membership processing
2022-06-13 18:39:56 +05:30
Ankush Menat
6dfbf7b19e fix: show doctype and fieldname filters 2022-06-13 16:42:37 +05:30
Ankush Menat
cc0672537e fix: make error/patch log read only 2022-06-13 16:42:37 +05:30
Ankush Menat
9b7b32e604 fix(ux): report and status filter for prepared_report 2022-06-13 16:42:37 +05:30