Giter Site home page Giter Site logo

frappe / insights Goto Github PK

View Code? Open in Web Editor NEW
367.0 24.0 173.0 25.46 MB

Open source analytics / business intelligence tool (BI)

Home Page: https://frappe.io/insights

License: GNU Affero General Public License v3.0

HTML 0.13% JavaScript 15.36% Vue 49.83% CSS 0.71% Python 31.34% Shell 0.09% TypeScript 2.54%
data-analytics data-visualization erpnext frappe-framework analytics business-intelligence frappe

insights's Issues

Alerts

Consider a query - "Revenue FY21-22"
A user should be able to create an alert such that once the result of this query changes, an alert (e.g., email) should be sent to the configured user.

The way this can be implemented is,

  • Select a query to set an alert on
  • Select interval at which the alert should trigger, eg. 5 mins (will check if total sales have changed every 5 mins)
  • The selected query will be ran every 5 mins to check if the value in the result has changed, if changed then send a email notification

Unable to add query to dashboard from query view.

https://screenrec.com/share/vLXGc8BSt0

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 58, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1584, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 310, in run_doc_method
    response = doc.run_method(method, **args)
  File "apps/frappe/frappe/model/document.py", line 925, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1269, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1251, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 922, in fn
    return method_object(*args, **kwargs)
  File "apps/insights/insights/insights/doctype/insights_query_chart/insights_query_chart.py", line 25, in add_to_dashboard
    dashboard_doc.add_chart(self.name, layout)  # saves the dashboard
AttributeError: 'InsightsDashboard' object has no attribute 'add_chart'

Dynamic filters on queries

To do exploratory analysis like report views or dashboards we need dynamic filters.

E.g. "Customer", "site", "timespan"

These can be global to dashboard or local to a single query... lots of decisions to be taken. Leaving up to you ๐Ÿ˜ฌ

Temporary table error

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 58, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1597, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/handler.py", line 304, in run_doc_method
    response = doc.run_method(method)
  File "apps/frappe/frappe/model/document.py", line 925, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1269, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1251, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 922, in fn
    return method_object(*args, **kwargs)
  File "apps/insights/insights/insights/doctype/insights_table/insights_table.py", line 26, in get_preview
    return data_source.get_table_preview(self.table)
  File "apps/insights/insights/insights/doctype/insights_data_source/insights_data_source.py", line 108, in get_table_preview
    return self.db.get_table_preview(table, limit)
  File "apps/insights/insights/insights/doctype/insights_data_source/sources/query_store.py", line 131, in get_table_preview
    self.create_temporary_table(table)
  File "apps/insights/insights/insights/doctype/insights_data_source/sources/query_store.py", line 112, in create_temporary_table
    self._execute(insert_records, values=result)
  File "apps/insights/insights/insights/doctype/insights_data_source/sources/query_store.py", line 127, in _execute
    frappe.log_error(f"Error fetching data from QueryStore: {e}")
  File "apps/frappe/frappe/__init__.py", line 2237, in log_error
    return error_log.insert(ignore_permissions=True)
  File "apps/frappe/frappe/model/document.py", line 256, in insert
    self._validate()
  File "apps/frappe/frappe/model/document.py", line 525, in _validate
    self._validate_length()
  File "apps/frappe/frappe/model/base_document.py", line 907, in _validate_length
    self.throw_length_exceeded_error(df, max_length, value)
  File "apps/frappe/frappe/model/base_document.py", line 941, in throw_length_exceeded_error
    frappe.throw(
  File "apps/frappe/frappe/__init__.py", line 522, in throw
    msgprint(
  File "apps/frappe/frappe/__init__.py", line 490, in msgprint
    _raise_exception()
  File "apps/frappe/frappe/__init__.py", line 442, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.CharacterLengthExceededError: Error Log 355: 'Title' (Error fetching data from QueryStore: (1292, "Incorrect datetime value: 'Oct 22' for column `_02cd5c47d5cfc415`.`QRY-0154`.`creation` at row 1")) will get truncated, as max characters allowed is 140

Unable to add charts to Dashboard

I have created Dashboard. I have created 3 queries. I am able to add 1st query to the Dashboard. For other 2 queries I will not get Dashboard name.
Even if I add directly I get loading screen.
Screenshot (653)
Screenshot (652)

Issue in connecting Database

I am getting issue in connecting an erpnext site database.

ERPNext v14 beta5
Frappe V14 beta 4
while adding database, I am getting below error

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 67, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 39, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 77, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1502, in call
    return fn(*args, **newargs)
  File "apps/insights/insights/api/onboarding.py", line 41, in add_database
    data_source.save()
  File "apps/frappe/frappe/model/document.py", line 288, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 310, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 268, in insert
    self.run_post_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1071, in run_post_save_methods
    self.run_method("on_update")
  File "apps/frappe/frappe/model/document.py", line 912, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1251, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1233, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 909, in fn
    return method_object(*args, **kwargs)
  File "apps/insights/insights/insights/doctype/data_source/data_source.py", line 26, in on_update
    self.import_tables()
  File "apps/insights/insights/insights/doctype/data_source/data_source.py", line 133, in import_tables
    table_links = self.get_foreign_key_constraints()
  File "apps/insights/insights/insights/doctype/data_source/data_source.py", line 213, in get_foreign_key_constraints
    return self.build_frappe_constraints()
  File "apps/insights/insights/insights/doctype/data_source/data_source.py", line 232, in build_frappe_constraints
    standard_links = self.execute_query(query, as_dict=1)
  File "apps/insights/insights/insights/doctype/data_source/data_source.py", line 88, in execute_query
    result = db.sql(query, **kwargs)
  File "apps/frappe/frappe/database/database.py", line 175, in sql
    self._cursor.execute(query)
  File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 148, in execute
    result = self._query(query)
  File "env/lib/python3.8/site-packages/pymysql/cursors.py", line 310, in _query
    conn.query(q)
  File "env/lib/python3.8/site-packages/pymysql/connections.py", line 548, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.8/site-packages/pymysql/connections.py", line 775, in _read_query_result
    result.read()
  File "env/lib/python3.8/site-packages/pymysql/connections.py", line 1156, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.8/site-packages/pymysql/connections.py", line 725, in _read_packet
    packet.raise_for_error()
  File "env/lib/python3.8/site-packages/pymysql/protocol.py", line 221, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "env/lib/python3.8/site-packages/pymysql/err.py", line 143, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table 'frappe.tabDocField' doesn't exist")

[Release] Checklist for 0.5.0-beta release

Checklist

Major ones

  • Website
  • SaaS Sign-ups
  • Demo Video
  • Update Readme
  • Documentation - https://frappeinsights.frappe.cloud/docs
  • Adding Users / Sign-up flow
    • Forward to framework login page for signups
  • Onboarding
  • Home Page
    • Added a Get Started page
  • Adding a Data Source (?)
  • Improve Dashboard Layout Editor

Minor ones

  • Add Format field in Dimension Picker for Date columns
  • Add empty states for all lists
  • Color Picker for Charts (?)
  • Remove unimplemented visualization types
  • Increase default size of newly added visualization
  • Expression function help only appears when autocompleted
  • Refreshing dashboard doesn't refresh table
  • Loading states for dashboard cards

Need to delete dashboard twice

If I wnt to delete a dashboard, it doesn't delete the first time. The first time, all the graphs disappear, but the dashboard stays. so I need to re-delete it.

VersionNotFound Error

Im using frappe version-13

on bench get-app or bench remove-app the below error occurs

  File "lib/python3.9/site-packages/bench/bench.py", line 262, in sync
    self.update_apps_states(
  File "lib/python3.9/site-packages/bench/bench.py", line 207, in update_apps_states
    "version": get_current_version(app, self.bench.name),
  File "lib/python3.9/site-packages/bench/utils/app.py", line 283, in get_current_version
    current_version = get_version_from_string(f.read())
  File "lib/python3.9/site-packages/bench/utils/app.py", line 120, in get_version_from_string
    raise VersionNotFound(f"{contents} is not a valid version")
bench.exceptions.VersionNotFound:  is not a valid version

Cards drill down

If double clicking the cards can open all relevant transactions then the information from such cards is actionable. For example, if there were a card "# issues that filed SLA", double clicking that should open all relevant issues. This information is actionable.

Else these are numbers that are good to look from a health check pov. only However it does not provide the user with drill down to take an action on items that need attention.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.