code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsQueryColumn(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_query_column/insights_query_column.py | Python | agpl-3.0 | 227 |
// Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Insights Query Execution Log", {
// refresh(frm) {
// },
// });
| 2302_79757062/insights | insights/insights/doctype/insights_query_execution_log/insights_query_execution_log.js | JavaScript | agpl-3.0 | 211 |
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Insights Query Result", {
// refresh(frm) {
// },
// });
| 2302_79757062/insights | insights/insights/doctype/insights_query_result/insights_query_result.js | JavaScript | agpl-3.0 | 204 |
# Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsQueryResult(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_query_result/insights_query_result.py | Python | agpl-3.0 | 227 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsQueryTable(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_query_table/insights_query_table.py | Python | agpl-3.0 | 226 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Insights Query Transform", {
// refresh: function(frm) {
// }
});
| 2302_79757062/insights | insights/insights/doctype/insights_query_transform/insights_query_transform.js | JavaScript | agpl-3.0 | 209 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsQueryTransform(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_query_transform/insights_query_transform.py | Python | agpl-3.0 | 230 |
# Copyright (c) 2023, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsQueryVariable(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_query_variable/insights_query_variable.py | Python | agpl-3.0 | 229 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Insights Settings', {
// refresh: function(frm) {
// }
})
| 2302_79757062/insights | insights/insights/doctype/insights_settings/insights_settings.js | JavaScript | agpl-3.0 | 201 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Insights Table', {
// refresh: function(frm) {
// }
})
| 2302_79757062/insights | insights/insights/doctype/insights_table/insights_table.js | JavaScript | agpl-3.0 | 198 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from frappe.model.document import Document
class InsightsTable(Document):
def on_update(self):
if not self.columns:
self.update_columns()
@frappe.whitelist... | 2302_79757062/insights | insights/insights/doctype/insights_table/insights_table.py | Python | agpl-3.0 | 2,002 |
import frappe
def execute():
delete_duplicate_records()
def delete_duplicate_records():
"""
Delete records in Insights Table with duplicate
table, data_source, and is_query_based.
"""
data_sources = frappe.get_all("Insights Data Source", pluck="name")
for data_source in data_sources:
... | 2302_79757062/insights | insights/insights/doctype/insights_table/patches/delete_duplicate_records.py | Python | agpl-3.0 | 1,070 |
import frappe
def execute():
"""delete_unused_query_based_tables"""
# get all insights tables
insights_tables = frappe.get_all(
"Insights Table", filters={"is_query_based": 1}, fields=["name", "table"]
)
# get all generate sqls
generated_sqls = frappe.get_all("Insights Query", pluck=... | 2302_79757062/insights | insights/insights/doctype/insights_table/patches/delete_unused_query_based_tables.py | Python | agpl-3.0 | 598 |
import click
import frappe
from insights.insights.doctype.insights_data_source.sources.frappe_db import FrappeDB
def execute():
data_sources = frappe.get_all(
"Insights Data Source",
{
"database_type": "MariaDB",
"status": "Active",
},
pluck="name",
)
... | 2302_79757062/insights | insights/insights/doctype/insights_table/patches/sync_table_links.py | Python | agpl-3.0 | 2,584 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Insights Table Column', {
// refresh: function(frm) {
// }
})
| 2302_79757062/insights | insights/insights/doctype/insights_table_column/insights_table_column.js | JavaScript | agpl-3.0 | 205 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Insights Table Import", {
// refresh: function(frm) {
// }
});
| 2302_79757062/insights | insights/insights/doctype/insights_table_import/insights_table_import.js | JavaScript | agpl-3.0 | 206 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import csv
import os
from functools import cached_property
import frappe
from frappe import task
from frappe.model.document import Document
from insights.utils import detect_encoding
class Insight... | 2302_79757062/insights | insights/insights/doctype/insights_table_import/insights_table_import.py | Python | agpl-3.0 | 3,343 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on('Insights Table Link', {
// refresh: function(frm) {
// }
})
| 2302_79757062/insights | insights/insights/doctype/insights_table_link/insights_table_link.js | JavaScript | agpl-3.0 | 203 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsTableLink(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_table_link/insights_table_link.py | Python | agpl-3.0 | 225 |
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Insights Table Link v3", {
// refresh(frm) {
// },
// });
| 2302_79757062/insights | insights/insights/doctype/insights_table_link_v3/insights_table_link_v3.js | JavaScript | agpl-3.0 | 205 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Insights Table v3", {
// refresh: function(frm) {
// }
});
| 2302_79757062/insights | insights/insights/doctype/insights_table_v3/insights_table_v3.js | JavaScript | agpl-3.0 | 202 |
import frappe
from insights.insights.doctype.insights_data_source_v3.insights_data_source_v3 import (
after_request,
before_request,
)
def execute():
"""
`name` of Insights Table v3 is changed from `autoincrement` to `varchar(140)`
This patch will delete all the tables and recreate them with the... | 2302_79757062/insights | insights/insights/doctype/insights_table_v3/patches/force_sync_tables.py | Python | agpl-3.0 | 1,081 |
// Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.ui.form.on("Insights Team", {
// refresh: function(frm) {
// }
});
| 2302_79757062/insights | insights/insights/doctype/insights_team/insights_team.js | JavaScript | agpl-3.0 | 198 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from frappe.utils.user import get_users_with_role
from insights import notify
from insights.decorators import check_permission, check_role
class InsightsTeamClient:
@frappe.whitel... | 2302_79757062/insights | insights/insights/doctype/insights_team/insights_team_client.py | Python | agpl-3.0 | 10,570 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class InsightsTeamMember(Document):
pass
| 2302_79757062/insights | insights/insights/doctype/insights_team_member/insights_team_member.py | Python | agpl-3.0 | 226 |
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Insights User Invitation", {
// refresh(frm) {
// },
// });
| 2302_79757062/insights | insights/insights/doctype/insights_user_invitation/insights_user_invitation.js | JavaScript | agpl-3.0 | 207 |
// Copyright (c) 2024, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
// frappe.ui.form.on("Insights Workbook", {
// refresh(frm) {
// },
// });
| 2302_79757062/insights | insights/insights/doctype/insights_workbook/insights_workbook.js | JavaScript | agpl-3.0 | 200 |
frappe.pages['insights'].on_page_load = function (wrapper) {
window.location.href = '/insights'
}
| 2302_79757062/insights | insights/insights/page/insights/insights.js | JavaScript | agpl-3.0 | 99 |
from contextlib import suppress
from frappe import _dict, parse_json
from sqlalchemy import column as sa_column
from sqlalchemy import select, table
from sqlalchemy.sql import and_, or_, text
from .sql_functions import Aggregations, BinaryOperations, ColumnFormatter, Functions
class LegacyQueryBuilder:
def __in... | 2302_79757062/insights | insights/insights/query_builders/legacy_query_builder.py | Python | agpl-3.0 | 7,241 |
from sqlalchemy import Column
from sqlalchemy.sql import func
from ..sql_builder import ColumnFormatter, Functions, SQLQueryBuilder
class PostgresColumnFormatter(ColumnFormatter):
@classmethod
def format_date(cls, format, column: Column):
match format:
case "Minute":
retur... | 2302_79757062/insights | insights/insights/query_builders/postgresql/builder.py | Python | agpl-3.0 | 2,070 |
from typing import List
import frappe
from frappe import _dict
from sqlalchemy import Column, TextClause
from sqlalchemy import column as sa_column
from sqlalchemy import select, table
from sqlalchemy.sql import and_, func, text
from insights.insights.doctype.insights_query.utils import Column as AssistedQueryColumn
... | 2302_79757062/insights | insights/insights/query_builders/sql_builder.py | Python | agpl-3.0 | 8,236 |
import operator
from contextlib import suppress
from datetime import date, datetime
import frappe
from frappe.utils.data import (
add_to_date,
get_date_str,
get_first_day,
get_first_day_of_week,
get_last_day,
get_last_day_of_week,
get_quarter_ending,
get_quarter_start,
get_year_endi... | 2302_79757062/insights | insights/insights/query_builders/sql_functions.py | Python | agpl-3.0 | 17,186 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from sqlalchemy import Column
from sqlalchemy.sql import func
from ..sql_builder import ColumnFormatter, Functions, SQLQueryBuilder
class SQLiteColumnFormatter(ColumnFormatter):
@classmethod
... | 2302_79757062/insights | insights/insights/query_builders/sqlite/sqlite_query_builder.py | Python | agpl-3.0 | 4,494 |
import ast
import re
class AndOrReplacer(ast.NodeTransformer):
"""
AST Node Transformer to replace 'and' and 'or' with 'and_(...)' and 'or_(...)' respectively.
"""
def visit_BoolOp(self, node):
# First, visit all children nodes
self.generic_visit(node)
# Check if the node is ... | 2302_79757062/insights | insights/insights/query_builders/utils.py | Python | agpl-3.0 | 3,339 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
# import frappe
def after_migrate():
pass
| 2302_79757062/insights | insights/migrate.py | Python | agpl-3.0 | 137 |
from json import dumps
import click
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
queries = frappe.get_all("Insights Query", pluck="name")
for query in queries:
try:
doc = frappe.get_doc("Insights Query", query)
results = fra... | 2302_79757062/insights | insights/patches/add_column_row_to_result.py | Python | agpl-3.0 | 947 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
Query = frappe.qb.DocType("Insights Query")
frappe.qb.update(Query).set(Query.last_execution, Query.modified).run()
| 2302_79757062/insights | insights/patches/add_last_execution_field.py | Python | agpl-3.0 | 224 |
import json
import frappe
from frappe.utils import cstr
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
queries = frappe.get_all("Insights Query", fields=["name", "filters"])
for query in queries:
_filters = json.loads(query.get("filters"))
set_default_pos... | 2302_79757062/insights | insights/patches/add_position_key_to_filter.py | Python | agpl-3.0 | 754 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from insights.setup import create_roles
def execute():
create_roles()
| 2302_79757062/insights | insights/patches/add_roles.py | Python | agpl-3.0 | 196 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
Query = frappe.qb.DocType("Insights Query")
frappe.qb.update(Query).set(Query.execution_time, 0).run()
| 2302_79757062/insights | insights/patches/convert_duration_to_float.py | Python | agpl-3.0 | 211 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
if not frappe.db.exists("Insights Data Source", "Query Store"):
frappe.get_doc(
{
"status": "Active",
"name": "Query Store",
"title": "Query Store",... | 2302_79757062/insights | insights/patches/create_query_tables.py | Python | agpl-3.0 | 732 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
def execute():
# when the doctype Query was renamed, the options like "Permission Query" in Server Script was renamed to "Permission Insights Query"
# this patch fixes the optio... | 2302_79757062/insights | insights/patches/fix_select_options_after_rename.py | Python | agpl-3.0 | 845 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Dashboard Item"):
return
dashboard_items = frappe.get_all(
"Insights Dashboard Item",
filters={"item_type": "Chart"},
fields=["chart", "parent", "chart_filters"],
)
filters_by_filter_name = {}
fo... | 2302_79757062/insights | insights/patches/make_filter_links.py | Python | agpl-3.0 | 2,110 |
import click
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
for query in frappe.get_all("Insights Query", pluck="name"):
try:
frappe.get_doc("Insights Query", query).update_insights_table()
except Exception as e:
click.sech... | 2302_79757062/insights | insights/patches/make_query_tables.py | Python | agpl-3.0 | 379 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Dashboard Item"):
return
frappe.db.sql(
"""
UPDATE
`tabInsights Dashboard Item`
SET
`item_type` = 'Chart',
`chart` = `query_chart`
WHERE
`item_type` IS ... | 2302_79757062/insights | insights/patches/migrate_dashboard_charts.py | Python | agpl-3.0 | 375 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import math
from json import dumps
import frappe
def execute():
DASHBOARD_ITEM = "Insights Dashboard Item"
layouts = frappe.get_all(DASHBOARD_ITEM, fields=["name", "layout"])
for row i... | 2302_79757062/insights | insights/patches/modify_dashboard_layout.py | Python | agpl-3.0 | 1,036 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query Table"):
return
QueryTable = frappe.qb.DocType("Insights Query Table")
query = (
frappe.qb.fr... | 2302_79757062/insights | insights/patches/modify_join_condition.py | Python | agpl-3.0 | 1,274 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import click
import frappe
def execute():
dashboards = frappe.get_all(
"Insights Dashboard Item", filters={"item_type": "Filter"}, pluck="parent"
)
for dashboard in dashboards:
... | 2302_79757062/insights | insights/patches/refactor_dashboard_filter.py | Python | agpl-3.0 | 1,168 |
import random
import click
import frappe
def execute():
if not frappe.db.exists("DocType", "Insights Query Chart"):
return
"""
Each Dashboard Item had a link to Chart record, which stores the query and chart config.
This patch moves the query and chart config to the Dashboard Item record.
... | 2302_79757062/insights | insights/patches/refactor_dashboard_item.py | Python | agpl-3.0 | 7,496 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import click
import frappe
def execute():
# demo data is now merged with site db
Tables = frappe.qb.DocType("Insights Table")
(
frappe.qb.update(Tables)
.set(Tables.data_... | 2302_79757062/insights | insights/patches/refresh_tables.py | Python | agpl-3.0 | 1,001 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query Column"):
return
QueryColumn = frappe.qb.DocType("Insights Query Column")
replace_map = {
"Varchar": "String",
"Int": "Integer",
"Float": "Decimal",
"Timestamp": "Datetime",
"Longtex... | 2302_79757062/insights | insights/patches/rename_column_type.py | Python | agpl-3.0 | 544 |
import frappe
from pypika import Criterion
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
frappe.db.sql(
"""
UPDATE
`tabInsights Query Column`
SET
`column` = '*'
WHERE
`column` = '__count' OR `column` = 'count... | 2302_79757062/insights | insights/patches/rename_count_column_name.py | Python | agpl-3.0 | 340 |
import frappe
def execute():
Chart = frappe.qb.DocType("Insights Query Chart")
frappe.qb.update(Chart).set(Chart.config, Chart.data).run()
| 2302_79757062/insights | insights/patches/rename_data_to_config.py | Python | agpl-3.0 | 149 |
import click
import frappe
def execute():
rename_map = {
"Query": "Insights Query",
"Table": "Insights Table",
"Table Link": "Insights Table Link",
"Query Visualization": "Insights Query Chart",
"Data Source": "Insights Data Source",
"Query Table": "Insights Query T... | 2302_79757062/insights | insights/patches/rename_doctypes.py | Python | agpl-3.0 | 857 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
queries = frappe.get_all("Insights Query", fields=["name", "filters"])
for query in queries:
new_filter = query.filters.replace("like", "contains")
frappe.db.set_value(
"Query", query... | 2302_79757062/insights | insights/patches/rename_like_to_contains.py | Python | agpl-3.0 | 382 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import click
import frappe
def execute():
for chart in frappe.get_all(
"Insights Query Chart",
filters={"config": ("like", "%targetColumn%")},
fields=["name", "config"],
... | 2302_79757062/insights | insights/patches/rename_target_column_field.py | Python | agpl-3.0 | 844 |
import frappe
from frappe.model.utils.rename_field import rename_field
def execute():
try:
rename_field("Insights Dashboard Item", "visualization", "query_chart")
InsightsDashboardItem = frappe.qb.DocType("Insights Dashboard Item")
(
frappe.qb.update(InsightsDashboardItem)
... | 2302_79757062/insights | insights/patches/rename_visualization.py | Python | agpl-3.0 | 556 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from insights.setup.demo import DemoDataFactory
def execute():
factory = DemoDataFactory().run(force=True)
if not factory.demo_data_exists():
frappe.throw("Demo data ... | 2302_79757062/insights | insights/patches/replace_demo_data_source.py | Python | agpl-3.0 | 1,396 |
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query Transform"):
return
transforms = frappe.get_all(
"Insights Query Transform",
filters={"type": "Pivot", "options": ["is", "set"]},
fields=["name", "options", "parent"],
)
for transform in transf... | 2302_79757062/insights | insights/patches/replace_pivot_column_with_label.py | Python | agpl-3.0 | 1,147 |
import json
import frappe
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
Query = frappe.qb.DocType("Insights Query")
default_filters = json.dumps(
{
"type": "LogicalExpression",
"operator": "&&",
"level": 1,
"positio... | 2302_79757062/insights | insights/patches/reset_query_filters.py | Python | agpl-3.0 | 462 |
import frappe
from insights.api.subscription import get_subscription_key
def execute():
if get_subscription_key():
notify_users()
def notify_users():
# notify users about the support portal access
note = frappe.new_doc("Note")
note.title = "Insights Support Portal"
note.public = 1
n... | 2302_79757062/insights | insights/patches/show_support_login_message.py | Python | agpl-3.0 | 923 |
import frappe
from insights.insights.doctype.insights_data_source.sources.query_store import (
sync_query_store,
)
def execute():
if not frappe.db.a_row_exists("Insights Query"):
return
Query = frappe.qb.DocType("Insights Query")
queries_on_query_store = frappe.get_all(
"Insights Que... | 2302_79757062/insights | insights/patches/store_queries.py | Python | agpl-3.0 | 965 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import frappe
from insights.insights.doctype.insights_team.insights_team import (
get_allowed_resources_for_user,
get_teams,
is_admin,
)
def has_doc_permission(doc, ptype, user):
if... | 2302_79757062/insights | insights/permissions.py | Python | agpl-3.0 | 1,944 |
// redirect to desk page 'insights' after setup wizard is complete
// 'insights' desk page redirects to '/insights'
frappe.setup.welcome_page = "/app/insights";
| 2302_79757062/insights | insights/public/js/setup_wizard.js | JavaScript | agpl-3.0 | 161 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import os
import shutil
import frappe
from insights.api.data_sources import get_data_source_tables
from insights.insights.doctype.insights_data_source_v3.insights_data_source_v3 import (
after_r... | 2302_79757062/insights | insights/setup/demo.py | Python | agpl-3.0 | 5,590 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import os
import frappe
from frappe import _
from insights.setup.demo import DemoDataFactory
def get_setup_stages(args=None):
return [
{
"status": _("Setting up de... | 2302_79757062/insights | insights/setup/setup_wizard.py | Python | agpl-3.0 | 1,603 |
<div>
<style>
.alert-container {
max-width: 38rem;
margin: 0 auto;
padding: 0.5rem 2rem;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 600;
}
.alert-container table {
border-collapse: collapse;
border: 1px solid #e2e2e2;
width: 100%;
ta... | 2302_79757062/insights | insights/templates/alert.html | HTML | agpl-3.0 | 865 |
<h2>You have been invited to use Insights</h2>
<p>
<a class="btn btn-primary" href="{{ invite_link }}">Accept Invitation</a>
</p>
| 2302_79757062/insights | insights/templates/emails/insights_invitation.html | HTML | agpl-3.0 | 132 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from insights.insights.doctype.insights_query.insights_query import InsightsQuery
def before_tests():
delete_all_records()
create_site_db()
create_sqlite_db()
complete_setup_wizard()
frappe.db.co... | 2302_79757062/insights | insights/tests/utils.py | Python | agpl-3.0 | 2,770 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
import pathlib
import chardet
import frappe
import pandas as pd
from frappe.model.base_document import BaseDocument
from frappe.website.page_renderers.template_page import TemplatePage
class Result... | 2302_79757062/insights | insights/utils.py | Python | agpl-3.0 | 6,115 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# GNU GPLv3 License. See license.txt
import frappe
from frappe.defaults import get_user_default
from insights.api.telemetry import track_active_site
no_cache = 1
def get_context(context):
is_v2_user = frappe.db.count("Insights Query", cache=... | 2302_79757062/insights | insights/www/insights.py | Python | agpl-3.0 | 1,706 |
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
# GNU GPLv3 License. See license.txt
import frappe
from insights.api.telemetry import track_active_site
no_cache = 1
def get_context(context):
is_v2_user = frappe.db.count("Insights Query", cache=True) > 0
if not is_v2_user:
frap... | 2302_79757062/insights | insights/www/insights_v2.py | Python | agpl-3.0 | 573 |
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>太空生日庆祝</title>
<style>
/* 顶部导航栏 */
/* 顶部导航栏 */
.top-navbar {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 60px... | 2302_77155773/my-website | index.html | HTML | unknown | 39,674 |
import { hapTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
| 2302_80329073/Electron_gitcodeV1.0.0 | electron/hvigorfile.ts | TypeScript | unknown | 234 |
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello HarmonyOS!</title>
</head>
<body>
<h1>欢迎使用 Electron on HarmonyOS!</h1>
<p>这是运行在鸿蒙系统上的 Electron 应用</p>
</body>
</html>
| 2302_80329073/Electron_gitcodeV1.0.0 | electron/src/main/resources/resfile/app/index.html | HTML | unknown | 226 |
const { app, BrowserWindow } = require('electron');
const path = require('path');
function createWindow() {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
win.loadFile('... | 2302_80329073/Electron_gitcodeV1.0.0 | electron/src/main/resources/resfile/app/main.js | JavaScript | unknown | 481 |
import { appTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
| 2302_80329073/Electron_gitcodeV1.0.0 | hvigorfile.ts | TypeScript | unknown | 234 |
import { harTasks } from '@ohos/hvigor-ohos-plugin';
export default {
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
}
| 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/hvigorfile.ts | TypeScript | unknown | 234 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import LogUtil from '../utils/LogUtil';
const TAG: string = 'LogMethodCall';
/**
* Method log decorator
*/
const LogMethod = (
target: Object,... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/common/LogDecorator.ts | TypeScript | unknown | 1,784 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const MODULE_TYPE = {
Context: Symbol.for('Context'),
};
export { MODULE_TYPE }; | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/common/ModuleType.ts | TypeScript | unknown | 255 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import type image from '@ohos.multimedia.image';
import type inputMethod from '@ohos.inputMethod';
import type GestureEvent from '@ohos.multimodalIn... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/interface/CommonInterface.ts | TypeScript | unknown | 9,182 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export default class CheckEmptyUtils {
/**
* Check obj is empty.
*
* @param {any} obj
* @return {boolean} true(empty)
*/
static i... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/utils/CheckEmptyUtils.ts | TypeScript | unknown | 904 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export class GlobalContext {
private static instance: GlobalContext;
private _objects = new Map<string, Object>();
public static getInstance(... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/utils/GlobalContext.ts | TypeScript | unknown | 788 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import hilog from '@ohos.hilog';
/**
* log package tool class
*/
export default class LogUtil {
private static DOMAIN: number = 0x0000;
priv... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/utils/LogUtil.ts | TypeScript | unknown | 1,492 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export default class ObjUtil {
public static isInvalid(obj): boolean {
return obj === undefined || obj === null;
}
} | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/utils/ObjUtil.ts | TypeScript | unknown | 296 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
export class StringStack {
private stack: string[] = [];
public push(element: string): void {
this.stack.push(element);
}
public remov... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/utils/StringStackUtil.ts | TypeScript | unknown | 611 |
// Copyright (c) 2024 Huawei Device Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import fileUri from '@ohos.file.fileuri';
export default class StringUtil {
private static TAG: string = 'StringUtil';
static uriConvert(docs:... | 2302_80329073/Electron_gitcodeV1.0.0 | web_engine/src/main/ets/utils/StringUtil.ts | TypeScript | unknown | 617 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟雨江南</title>
</head>
<body>
<!-- 头部 -->
<div class="nav">
<div class="logo">
烟 雨 江 南
</div>
<div class="navright">
<ul>... | 2202_75337835/Jiangnan | Aboutwebsite.html | HTML | unknown | 7,293 |
body{
margin: 0;
padding: 0;
}
#top-image {
background: linear-gradient(
rgba(0, 0, 0, 0.2),
rgba(0, 0, 0, 0.2)
), url('../images/gz.jpeg') no-repeat fixed;
position:fixed ;
top:0;
width:100%;
z-index:0;
height:100%;
}
| 2202_75337835/Jiangnan | css/style.css | CSS | unknown | 251 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟雨江南</title>
</head>
<body>
<!-- 头部 -->
<div class="nav">
<div class="logo">
烟 雨 江 南
</div>
<div class="navright">
<ul>
<li >... | 2202_75337835/Jiangnan | delicacies.html | HTML | unknown | 12,003 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟雨江南</title>
</head>
<body>
<!-- 头部 -->
<div class="nav">
<div class="logo">
烟 雨 江 南
</div>
<div class="navright">
<ul>... | 2202_75337835/Jiangnan | enroll.html | HTML | unknown | 6,987 |
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟雨江南</title>
<link rel="stylesheet" type="text/css" href="https://www.jq22.com/jquery/bootstrap-3.3.4.css">
... | 2202_75337835/Jiangnan | index.html | HTML | unknown | 5,275 |
(function($){
$.iosParallax = function(el, options){
// To avoid scope issues, use 'base' instead of 'this'
// to reference this class from internal events and functions.
var base = this;
// Access to jQuery and DOM versions of element
base.$el = $(el);
base.el = el;
// Add a reverse ref... | 2202_75337835/Jiangnan | js/ios-parallax.js | JavaScript | unknown | 3,240 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟雨江南</title>
</head>
<body>
<!-- 头部 -->
<div class="nav">
<div class="logo">
烟 雨 江 南
</div>
<div class="navright">
<ul>... | 2202_75337835/Jiangnan | login.html | HTML | unknown | 6,858 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>烟雨江南</title>
</head>
<body>
<!-- 头部 -->
<div class="nav">
<div class="logo">
烟 雨 江 南
</div>
<div class="navright">
<ul>... | 2202_75337835/Jiangnan | tourism.html | HTML | unknown | 33,758 |
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>匿名空间</title>
<link rel="shortcut icon" href="./img/ico.jpg" type="image/x-icon">
<link rel="stylesheet" href="./css/css.css">
<style>
<... | 2302_81108167/niming | index.html | HTML | apache-2.0 | 2,331 |
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
pnpm lint-staged
| 2302_81331056/big-event | .husky/pre-commit | Shell | unknown | 70 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</bod... | 2302_81331056/big-event | index.html | HTML | unknown | 331 |
<script setup>
import zh from 'element-plus/es/locale/lang/zh-cn.mjs'
</script>
<template>
<div>
<el-config-provider :locale="zh">
<router-view></router-view>
</el-config-provider>
</div>
</template>
<style scoped></style>
| 2302_81331056/big-event | src/App.vue | Vue | unknown | 243 |
import request from '@/utils/request'
// 获取文章分类
export const artGetChannelsService = () => request.get('/my/cate/list')
// 添加分类
export const artAddChannelService = (data) => request.post('/my/cate/add', data)
// 编辑分类
export const artEditChannelService = (data) =>
request.put('/my/cate/info', data)
// 删除文章分类
expor... | 2302_81331056/big-event | src/api/article.js | JavaScript | unknown | 900 |