fix: Miscellaneous changes (#12343)

This commit is contained in:
Suraj Shetty 2021-02-08 12:05:37 +05:30 committed by GitHub
parent 1133f40dd2
commit 473cb16093
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 32 additions and 90 deletions

View file

@ -1,2 +0,0 @@
exclude_paths:
- '**.sql'

View file

@ -1,17 +0,0 @@
version = 1
test_patterns = [
"**/test_*.py"
]
exclude_patterns = [
"frappe/patches/**",
"*.min.js"
]
[[analyzers]]
name = "python"
enabled = true
[analyzers.meta]
runtime_version = "3.x.x"

View file

@ -5,5 +5,4 @@ frappe/core/doctype/doctype/boilerplate/*
frappe/core/doctype/report/boilerplate/*
frappe/public/js/frappe/class.js
frappe/templates/includes/*
frappe/tests/testcafe/*
frappe/www/website_script.js

View file

@ -1,11 +0,0 @@
#!/bin/bash
# stolen from http://cgit.drupalcode.org/octopus/commit/?id=db4f837
includedir=`mysql_config --variable=pkgincludedir`
thiscwd=`pwd`
_THIS_DB_VERSION=`mysql -V 2>&1 | tr -d "\n" | cut -d" " -f6 | awk '{ print $1}' | cut -d"-" -f1 | awk '{ print $1}' | sed "s/[\,']//g"`
if [ "$_THIS_DB_VERSION" = "5.5.40" ] && [ ! -e "$includedir-$_THIS_DB_VERSION-fixed.log" ] ; then
cd $includedir
sudo patch -p1 < $thiscwd/ci/my_config.h.patch &> /dev/null
sudo touch $includedir-$_THIS_DB_VERSION-fixed.log
fi

View file

@ -1,22 +0,0 @@
diff -burp a/my_config.h b/my_config.h
--- a/my_config.h 2014-10-09 19:32:46.000000000 -0400
+++ b/my_config.h 2014-10-09 19:35:12.000000000 -0400
@@ -641,17 +641,4 @@
#define SIZEOF_TIME_T 8
/* #undef TIME_T_UNSIGNED */
-/*
- stat structure (from <sys/stat.h>) is conditionally defined
- to have different layout and size depending on the defined macros.
- The correct macro is defined in my_config.h, which means it MUST be
- included first (or at least before <features.h> - so, practically,
- before including any system headers).
-
- __GLIBC__ is defined in <features.h>
-*/
-#ifdef __GLIBC__
-#error <my_config.h> MUST be included first!
-#endif
-
#endif

View file

@ -151,32 +151,30 @@ class UserProfile {
// eslint-disable-next-line no-unused-vars
render_percentage_chart(field, title) {
// REDESIGN-TODO: chart seems to be broken. Enable this once fixed.
frappe.xcall('frappe.desk.page.user_profile.user_profile.get_energy_points_percentage_chart_data', {
user: this.user_id,
field: field
}).then(chart => {
if (chart.labels.length) {
this.percentage_chart = new frappe.Chart('.performance-percentage-chart', {
type: 'percentage',
data: {
labels: chart.labels,
datasets: chart.datasets
},
truncateLegends: 1,
barOptions: {
height: 11,
depth: 1
},
height: 200,
maxSlices: 8,
colors: ['purple', 'blue', 'cyan', 'teal', 'pink', 'red', 'orange', 'yellow'],
});
} else {
this.wrapper.find('.percentage-chart-container').hide();
// frappe.xcall('frappe.desk.page.user_profile.user_profile.get_energy_points_percentage_chart_data', {
// user: this.user_id,
// field: field
// }).then(chart => {
// if (chart.labels.length) {
// this.percentage_chart = new frappe.Chart('.performance-percentage-chart', {
// type: 'percentage',
// data: {
// labels: chart.labels,
// datasets: chart.datasets
// },
// truncateLegends: 1,
// barOptions: {
// height: 11,
// depth: 1
// },
// height: 200,
// maxSlices: 8,
// colors: ['purple', 'blue', 'cyan', 'teal', 'pink', 'red', 'orange', 'yellow'],
// });
// } else {
// this.wrapper.find('.percentage-chart-container').hide();
// }
// });
}
});
}
create_line_chart_filters() {

View file

@ -24,6 +24,7 @@ $input-height: 28px !default;
--fg-hover-color: var(--gray-100);
--card-bg: var(--fg-color);
--disabled-text-color: var(--gray-700);
--disabled-control-bg: var(--gray-50);
--control-bg: var(--gray-100);
--control-bg-on-gray: var(--gray-200);
--awesomebar-focus-bg: var(--fg-color);

View file

@ -91,7 +91,7 @@
padding: 8px 12px;
cursor: default;
color: var(--disabled-text-color);
background-color: var(--control-bg);
background-color: var(--disabled-control-bg);
}
.form-control:disabled, .form-control[readonly] {

View file

@ -89,16 +89,12 @@
.result {
@include flex(flex, null, center, null);
padding: 8px 0;
color: var(--gray-800);
color: var(--text-light);
.result-image {
margin-right: var(--margin-sm);
}
a {
color: var(--gray-800);
}
mark {
display: inline-flex;
padding: 0;