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
package cn.bugstack.springframework.tx.transaction.interceptor; import java.io.Serializable; import java.util.List; /** * @author zhangdd on 2022/2/26 */ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute implements Serializable { private List<RollbackRuleAttribute> rollbackRules; ...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/interceptor/RuleBasedTransactionAttribute.java
Java
apache-2.0
519
package cn.bugstack.springframework.tx.transaction.interceptor; import cn.bugstack.springframework.beans.BeansException; import cn.bugstack.springframework.beans.factory.BeanFactory; import cn.bugstack.springframework.beans.factory.BeanFactoryAware; import cn.bugstack.springframework.beans.factory.InitializingBean; im...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/interceptor/TransactionAspectSupport.java
Java
apache-2.0
7,484
package cn.bugstack.springframework.tx.transaction.interceptor; import cn.bugstack.springframework.tx.transaction.TransactionDefinition; /** * @author zhangdd on 2022/2/26 */ public interface TransactionAttribute extends TransactionDefinition { boolean rollbackOn(Throwable ex); }
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/interceptor/TransactionAttribute.java
Java
apache-2.0
291
package cn.bugstack.springframework.tx.transaction.interceptor; import java.lang.reflect.Method; /** * @author zhangdd on 2022/2/26 */ public interface TransactionAttributeSource { TransactionAttribute getTransactionAttribute(Method method, Class<?> targetClass); }
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/interceptor/TransactionAttributeSource.java
Java
apache-2.0
276
package cn.bugstack.springframework.tx.transaction.interceptor; import cn.bugstack.springframework.aop.support.StaticMethodMatcherPointcut; import cn.bugstack.springframework.tx.transaction.PlatformTransactionManager; import java.io.Serializable; import java.lang.reflect.Method; /** * @author zhangdd on 2022/2/27 ...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/interceptor/TransactionAttributeSourcePointcut.java
Java
apache-2.0
1,305
package cn.bugstack.springframework.tx.transaction.interceptor; import cn.bugstack.springframework.tx.transaction.PlatformTransactionManager; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import java.io.Serializable; /** * @author zhangdd on 2022/2/23 */ pub...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/interceptor/TransactionInterceptor.java
Java
apache-2.0
902
package cn.bugstack.springframework.tx.transaction.support; import cn.bugstack.springframework.tx.transaction.PlatformTransactionManager; import cn.bugstack.springframework.tx.transaction.TransactionDefinition; import cn.bugstack.springframework.tx.transaction.TransactionException; import cn.bugstack.springframework....
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/AbstractPlatformTransactionManager.java
Java
apache-2.0
4,085
package cn.bugstack.springframework.tx.transaction.support; import cn.bugstack.springframework.tx.transaction.NestedTransactionNotSupportedException; import cn.bugstack.springframework.tx.transaction.SavepointManager; import cn.bugstack.springframework.tx.transaction.TransactionException; import cn.bugstack.springfr...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/AbstractTransactionStatus.java
Java
apache-2.0
2,322
package cn.bugstack.springframework.tx.transaction.support; import cn.bugstack.springframework.tx.transaction.TransactionDefinition; import java.io.Serializable; /** * @author zhangdd on 2022/2/24 */ public class DefaultTransactionDefinition implements TransactionDefinition, Serializable { private int propag...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/DefaultTransactionDefinition.java
Java
apache-2.0
2,161
package cn.bugstack.springframework.tx.transaction.support; /** * @author zhangdd on 2022/2/22 */ public class DefaultTransactionStatus extends AbstractTransactionStatus { private final Object transaction; private final boolean newTransaction; public DefaultTransactionStatus(Object transaction, boole...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/DefaultTransactionStatus.java
Java
apache-2.0
713
package cn.bugstack.springframework.tx.transaction.support; import cn.bugstack.springframework.tx.transaction.TransactionDefinition; import java.io.Serializable; /** * @author zhangdd on 2022/2/27 */ public abstract class DelegatingTransactionDefinition implements TransactionDefinition, Serializable { privat...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/DelegatingTransactionDefinition.java
Java
apache-2.0
1,376
package cn.bugstack.springframework.tx.transaction.support; import cn.hutool.core.lang.Assert; import cn.hutool.core.thread.threadlocal.NamedThreadLocal; import java.util.HashMap; import java.util.Map; /** * @author zhangdd on 2022/3/6 */ public abstract class TransactionSynchronizationManager { /** * 当前...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/TransactionSynchronizationManager.java
Java
apache-2.0
1,915
package cn.bugstack.springframework.tx.transaction.support; import cn.hutool.core.lang.Assert; /** * @author zhangdd on 2022/3/6 */ public class TransactionSynchronizationUtils { static Object unwrapResourceIfNecessary(Object resource) { Assert.notNull(resource, "Resource must not be null"); Ob...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/tx/transaction/support/TransactionSynchronizationUtils.java
Java
apache-2.0
387
package cn.bugstack.springframework.util; import cn.hutool.core.lang.Assert; import java.io.Closeable; import java.io.Externalizable; import java.io.Serializable; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.*; public class ClassUtils { ...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/util/ClassUtils.java
Java
apache-2.0
5,619
package cn.bugstack.springframework.util; import cn.hutool.core.lang.Assert; import org.jetbrains.annotations.Nullable; import java.math.BigDecimal; import java.math.BigInteger; import java.text.DecimalFormat; import java.text.NumberFormat; import java.text.ParseException; import java.util.Collections; import java.ut...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/util/NumberUtils.java
Java
apache-2.0
13,148
package cn.bugstack.springframework.util; import cn.hutool.core.lang.Assert; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.lang.reflect.UndeclaredThrowableException; import java.util.ArrayList; import java.util.Arrays; import java.u...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/util/ReflectionUtils.java
Java
apache-2.0
7,578
package cn.bugstack.springframework.util; /** * Simple strategy interface for resolving a String value. * Used by {@link cn.bugstack.springframework.beans.factory.config.ConfigurableBeanFactory}. * <p> * 博客:https://bugstack.cn - 沉淀、分享、成长,让自己和他人都能有所收获! * 公众号:bugstack虫洞栈 * Create by 小傅哥(fustack) * * 来自于对开源项目的学习;...
2302_77879529/spring
small-spring-step-19/src/main/java/cn/bugstack/springframework/util/StringValueResolver.java
Java
apache-2.0
569
package cn.bugstack.springframework.test; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.sql.Connection; /** * @author zhangdd on 2022/2/15 */ public class TransactionProxy implements InvocationHandler { private final...
2302_77879529/spring
small-spring-step-19/src/test/java/cn/bugstack/springframework/test/TransactionProxy.java
Java
apache-2.0
1,102
package cn.bugstack.springframework.test.service; import cn.bugstack.springframework.jdbc.support.JdbcTemplate; import java.sql.SQLException; /** * @author zhangdd on 2022/2/15 */ public interface JdbcService { void saveDataWithTranslation() throws SQLException; void saveData(JdbcTemplate jdbcTemplate) ...
2302_77879529/spring
small-spring-step-19/src/test/java/cn/bugstack/springframework/test/service/JdbcService.java
Java
apache-2.0
324
package cn.bugstack.springframework.test.service.impl; import cn.bugstack.springframework.jdbc.support.JdbcTemplate; import cn.bugstack.springframework.test.service.JdbcService; import cn.bugstack.springframework.tx.transaction.annotation.Transactional; import java.sql.SQLException; import java.sql.Statement; /** ...
2302_77879529/spring
small-spring-step-19/src/test/java/cn/bugstack/springframework/test/service/impl/JdbcServiceImpl.java
Java
apache-2.0
1,134
package cj_code import std.collection.* import std.core.* // ======================= // 一、基础数据结构:状态 和 NFA // ======================= // 状态 class State { public var name: String // 状态名称 public var isAccept: Bool // 是否为接受态 public var transitions: HashMap<String, ArrayList<...
2302_79418196/cangjie
src/package cj_code.groovy
Groovy
unknown
25,405
package cj_code import std.collection.* import std.core.* // ======================= // 一、基础数据结构:状态 和 NFA // ======================= // 状态 class State { public var name: String // 状态名称 public var isAccept: Bool // 是否为接受态 public var transitions: HashMap<String, ArrayList<...
2302_79418196/cangjie
src/package cj_code_see.groovy
Groovy
unknown
27,679
__version__ = '1.0.0'
2302_79757062/commit
commit/__init__.py
Python
agpl-3.0
24
import frappe import json import os from commit.commit.code_analysis.apis import find_all_occurrences_of_whitelist @frappe.whitelist(allow_guest=True) def get_apis_for_project(project_branch: str): ''' Gets the Project Branch document with the organization and app name ''' branch_doc = frappe.get_...
2302_79757062/commit
commit/api/api_explorer.py
Python
agpl-3.0
2,859
import frappe @frappe.whitelist(allow_guest=True) def generate_bruno_file(data, return_type='download'): request_data = frappe.parse_json(data) """ Generates .bru file content for a single request based on the provided request data. :param request_data: A dictionary containing request information....
2302_79757062/commit
commit/api/bruno.py
Python
agpl-3.0
3,136
import frappe from commit.api.github import get_file_in_repo, get_all_files_in_repo, search_for_file_in_repo from commit.utils.conversions import convert_module_name from commit.utils.api_analysis import get_api_details_from_file_contents access_token = "*" @frappe.whitelist(allow_guest=True) def get_name_of_app(organ...
2302_79757062/commit
commit/api/code_analysis.py
Python
agpl-3.0
5,108
import frappe @frappe.whitelist(allow_guest=True) def get_project_list_with_branches(): """ Get list of projects with branches for each organization """ organizations = frappe.get_all("Commit Organization", fields=[ "name", 'organization_name', 'github_org', 'image'...
2302_79757062/commit
commit/api/commit_project/commit_project.py
Python
agpl-3.0
1,061
import frappe from commit.commit.code_analysis.schema_builder import get_schema_from_doctypes_json import json @frappe.whitelist(allow_guest=True) def get_doctype_json(project_branch: str, doctype: str): ''' Get doctype json from a project branch ''' project_branch = frappe.get_cached_doc( "Co...
2302_79757062/commit
commit/api/erd_viewer.py
Python
agpl-3.0
2,373
import json import re from commit.commit.doctype.open_ai_settings.open_ai_settings import open_ai_call import frappe def generate_docs_for_apis(api_definitions): max_tokens_per_request = 1800 # This is a safe limit to avoid hitting the max token limit chunks = chunk_data(api_definitions, max_tokens_per_requ...
2302_79757062/commit
commit/api/generate_documentation.py
Python
agpl-3.0
4,081
import frappe import requests def prepare_headers(access_token=None, type="bearer", accept="application/vnd.github+json"): return { # "Authorization": type + " " + access_token, "Accept": accept, "X-GitHub-Api-Version": "2022-11-28" } def get_user(access_token=None): ''' Get us...
2302_79757062/commit
commit/api/github.py
Python
agpl-3.0
3,003
import frappe from commit.commit.code_analysis.apis import find_all_occurrences_of_whitelist @frappe.whitelist() def get_installed_apps(): ''' Get all installed apps 1. Get the installed applications from the Installed Applications doctype 2. Get the app hooks for each app 3. Get th...
2302_79757062/commit
commit/api/meta_data.py
Python
agpl-3.0
2,379
import frappe from frappe.desk.search import search_widget, build_for_autosuggest # this is called by the Link Field @frappe.whitelist() def search_link( doctype, txt, query=None, filters=None, page_length=20, start=0, searchfield=None, reference_doctype=None, ignore_user_permissions=False, ): results = s...
2302_79757062/commit
commit/api/search.py
Python
agpl-3.0
590
import os import ast other_decorators = [ '@cache_source', '@frappe.validate_and_sanitize_search_inputs', '@rate_limit' ] def find_all_occurrences_of_whitelist(path: str, app_name: str): ''' Find all occurences of @frappe.whitelist in the app repository These should only be in .py files '...
2302_79757062/commit
commit/commit/code_analysis/apis.py
Python
agpl-3.0
10,199
import os from commit.commit.code_analysis.utils import get_module_path, parse_module_name import json def get_doctypes_in_module(path: str, app_name: str, module: str): ''' Get list of doctypes in a module ''' doctype_names = [] module_path = get_module_path(path, app_name, module) doctype_fol...
2302_79757062/commit
commit/commit/code_analysis/doctypes.py
Python
agpl-3.0
2,220
import os import json DISALLOWED_FIELD_TYPES = ['Section Break', 'Tab Break', 'Fold', 'Column Break', 'Heading', 'HTML', 'Image', 'Icon', 'Button'] LINK_FIELD_TYPES = ['Link', 'Table', 'Table MultiSelect'] def get_schema_from_doctypes_json(doctypes_json: dict): ''' Parse doctype file ''' tables = [] ...
2302_79757062/commit
commit/commit/code_analysis/schema_builder.py
Python
agpl-3.0
2,292
import os def get_module_path(path: str, app_name: str, module_name: str): ''' Get path to modules directory ''' parsed_module_name = parse_module_name(module_name) modules_path = os.path.join(path, app_name, parsed_module_name) return modules_path def parse_module_name(module_name: str): '...
2302_79757062/commit
commit/commit/code_analysis/utils.py
Python
agpl-3.0
419
// Copyright (c) 2023, The Commit Company and contributors // For license information, please see license.txt // frappe.ui.form.on("Commit Organization", { // refresh(frm) { // }, // });
2302_79757062/commit
commit/commit/doctype/commit_organization/commit_organization.js
JavaScript
agpl-3.0
191
# Copyright (c) 2023, The Commit Company and contributors # For license information, please see license.txt import frappe from frappe.model.document import Document class CommitOrganization(Document): def on_trash(self): # find all project which are linked with this organisation # delete all projects project...
2302_79757062/commit
commit/commit/doctype/commit_organization/commit_organization.py
Python
agpl-3.0
476
// Copyright (c) 2023, The Commit Company and contributors // For license information, please see license.txt // frappe.ui.form.on("Commit Project", { // refresh(frm) { // }, // });
2302_79757062/commit
commit/commit/doctype/commit_project/commit_project.js
JavaScript
agpl-3.0
186
# Copyright (c) 2023, The Commit Company and contributors # For license information, please see license.txt import frappe import os import io from pathlib import Path from frappe.model.document import Document from commit.api.code_analysis import get_name_of_app class CommitProject(Document): def before_insert(self...
2302_79757062/commit
commit/commit/doctype/commit_project/commit_project.py
Python
agpl-3.0
1,461
// Copyright (c) 2023, The Commit Company and contributors // For license information, please see license.txt // frappe.ui.form.on("Commit Project Branch", { // refresh(frm) { // }, // });
2302_79757062/commit
commit/commit/doctype/commit_project_branch/commit_project_branch.js
JavaScript
agpl-3.0
193
# Copyright (c) 2023, The Commit Company and contributors # For license information, please see license.txt import frappe import git import os import shutil import json from frappe.model.document import Document from commit.commit.code_analysis.apis import find_all_occurrences_of_whitelist from commit.commit.code_anal...
2302_79757062/commit
commit/commit/doctype/commit_project_branch/commit_project_branch.py
Python
agpl-3.0
10,391
// Copyright (c) 2024, The Commit Company and contributors // For license information, please see license.txt // frappe.ui.form.on("Commit Settings", { // refresh(frm) { // }, // });
2302_79757062/commit
commit/commit/doctype/commit_settings/commit_settings.js
JavaScript
agpl-3.0
187
# Copyright (c) 2024, The Commit Company and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class CommitSettings(Document): pass
2302_79757062/commit
commit/commit/doctype/commit_settings/commit_settings.py
Python
agpl-3.0
208
// Copyright (c) 2023, The Commit Company and contributors // For license information, please see license.txt frappe.ui.form.on('Github Settings', { // refresh: function(frm) { // } });
2302_79757062/commit
commit/commit/doctype/github_settings/github_settings.js
JavaScript
agpl-3.0
190
# Copyright (c) 2023, The Commit Company and contributors # For license information, please see license.txt import frappe from frappe.model.document import Document import requests import json class GithubSettings(Document): pass session = requests.Session() session.headers.update({'Accept': 'application/json'...
2302_79757062/commit
commit/commit/doctype/github_settings/github_settings.py
Python
agpl-3.0
2,981
// Copyright (c) 2023, The Commit Company and contributors // For license information, please see license.txt frappe.ui.form.on('Github Token', { // refresh: function(frm) { // } });
2302_79757062/commit
commit/commit/doctype/github_token/github_token.js
JavaScript
agpl-3.0
187
# Copyright (c) 2023, The Commit Company and contributors # For license information, please see license.txt # import frappe from frappe.model.document import Document class GithubToken(Document): pass
2302_79757062/commit
commit/commit/doctype/github_token/github_token.py
Python
agpl-3.0
204
// Copyright (c) 2024, The Commit Company and contributors // For license information, please see license.txt // frappe.ui.form.on("Open AI Settings", { // refresh(frm) { // }, // });
2302_79757062/commit
commit/commit/doctype/open_ai_settings/open_ai_settings.js
JavaScript
agpl-3.0
188
# Copyright (c) 2024, The Commit Company and contributors # For license information, please see license.txt import frappe from frappe.model.document import Document from openai import OpenAI class OpenAISettings(Document): pass def open_ai_call(message): # 1. Get the organization ID and API key from Open API ...
2302_79757062/commit
commit/commit/doctype/open_ai_settings/open_ai_settings.py
Python
agpl-3.0
1,070
from . import __version__ as app_version app_name = "commit" app_title = "commit" app_publisher = "The Commit Company" app_description = "The Commit Company" app_email = "support@thecommit.company" app_license = "MIT" # Includes in <head> # ------------------ # include js, css files in header of desk.html # app_incl...
2302_79757062/commit
commit/hooks.py
Python
agpl-3.0
4,749
import re def get_api_details_from_file_contents(file_contents: str, file_path: str): ''' Get list of all whitelisted API in a file string with: 1. Type 2. Path 3. Method name 4. Arguments 5. Python code snippet ''' whitelist_indexes = find_all_mentions_of_whitelist_in_file(file_co...
2302_79757062/commit
commit/utils/api_analysis.py
Python
agpl-3.0
5,183
def convert_module_name(module: str): ''' Convert module name to frappe module path name Replace spaces with underscores and convert to lowercase ''' return module.replace(" ", "_").lower()
2302_79757062/commit
commit/utils/conversions.py
Python
agpl-3.0
209
import frappe import json import frappe.sessions import re no_cache = 1 SCRIPT_TAG_PATTERN = re.compile(r"\<script[^<]*\</script\>") CLOSING_SCRIPT_TAG_PATTERN = re.compile(r"</script\>") def get_context(context): csrf_token = frappe.sessions.get_csrf_token() frappe.db.commit() context = frappe._dict() ...
2302_79757062/commit
commit/www/commit.py
Python
agpl-3.0
1,239
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"> <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> <link rel="icon" type...
2302_79757062/commit
dashboard/index.html
HTML
agpl-3.0
955
export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, }
2302_79757062/commit
dashboard/postcss.config.js
JavaScript
agpl-3.0
80
let webserver_port = "8001"; try { const common_site_config = require('../../../sites/common_site_config.json'); webserver_port = common_site_config.webserver_port; } catch { } export default { '^/(app|api|assets|files|private)': { target: `http://127.0.0.1:${webserver_port}`, ws: true, changeOrigin: ...
2302_79757062/commit
dashboard/proxyOptions.js
JavaScript
agpl-3.0
499
import { FrappeProvider } from 'frappe-react-sdk' import { BrowserRouter, Route, Routes } from 'react-router-dom' import { APIViewerContainer } from './pages/features/api_viewer/APIViewer' import { Overview } from './pages/overview/Overview' import { ERDViewer } from './pages/features/erd/ERDViewer' import { AppAPIView...
2302_79757062/commit
dashboard/src/App.tsx
TSX
agpl-3.0
1,884
import { FrappeError, useFrappePostCall } from 'frappe-react-sdk' import { PropsWithChildren, useEffect, useRef } from 'react' import { Filter, useFrappeGetCall } from "frappe-react-sdk"; import { useCallback, useMemo, useState } from "react"; import { RegisterOptions, useController, useFormContext } from "react-hook-f...
2302_79757062/commit
dashboard/src/components/common/AsyncDropdown/AsyncDropdown.tsx
TSX
agpl-3.0
19,309
import { atom } from 'jotai' // We will create an "atom" for all the link titles export const linkTitlesAtom = atom<Record<string, string>>({}) export const getLinkTitleAtom = atom((get) => (doctype: string, docname: string) => { const linkTitles = get(linkTitlesAtom) return linkTitles[`${doctype}::${docname}...
2302_79757062/commit
dashboard/src/components/common/AsyncDropdown/LinkTitles.ts
TypeScript
agpl-3.0
565
import { Button, ButtonProps } from "@/components/ui/button" import { useToast } from "@/components/ui/use-toast" import { CheckIcon, CopyIcon } from "@radix-ui/react-icons" import { useEffect, useState } from "react" interface CopyButtonProps extends ButtonProps { value: string } export function CopyButton({ ...
2302_79757062/commit
dashboard/src/components/common/CopyToClipboard/CopyToClipboard.tsx
TSX
agpl-3.0
1,562
import { FrappeError } from 'frappe-react-sdk' import { useMemo } from 'react' import { MarkdownRenderer } from '../MarkdownRenderer/MarkdownRenderer' interface ErrorBannerProps extends React.HTMLAttributes<HTMLDivElement> { error?: FrappeError | null, overrideHeading?: string, } interface ParsedErrorMessage...
2302_79757062/commit
dashboard/src/components/common/ErrorBanner/ErrorBanner.tsx
TSX
agpl-3.0
4,768
import { FormControl } from '@/components/ui/form' import { SlotProps } from '@radix-ui/react-slot' import { useMemo } from 'react' import { useFormContext } from 'react-hook-form' export interface ControlProps extends SlotProps { allowOnSubmit?: boolean } /** * Control is a wrapper around FormControl that adds ...
2302_79757062/commit
dashboard/src/components/common/Forms/FormControl/Control.tsx
TSX
agpl-3.0
1,001
import { useFormState } from 'react-hook-form'; import { Control, ControlProps } from './Control'; import { FormDescription, FormMessage } from '@/components/ui/form'; import { Label } from '../../Label'; interface FormElementProps extends ControlProps { name: string; label?: string; tooltip?: string } /*...
2302_79757062/commit
dashboard/src/components/common/Forms/FormControl/FormElement.tsx
TSX
agpl-3.0
2,170
export * from './Control' export * from './FormElement'
2302_79757062/commit
dashboard/src/components/common/Forms/FormControl/index.ts
TypeScript
agpl-3.0
55
import React from 'react'; export const FullPageLoader = ({ className = '', ...props }: React.DetailedHTMLProps< React.HTMLAttributes<HTMLDivElement>, HTMLDivElement >) => { return ( <div className={`flex items-center justify-center h-full ${className}`} {...props} > <div cl...
2302_79757062/commit
dashboard/src/components/common/FullPageLoader/FullPageLoader.tsx
TSX
agpl-3.0
730
import React from 'react'; interface AsyncSpinnerLoaderProps { size?: number; color?: string; position?: 'absolute' | 'fixed'; top?: string; right?: string; bottom?: string; left?: string; } export const AsyncSpinnerLoader: React.FC<AsyncSpinnerLoaderProps> = ({ size = 4, color = '...
2302_79757062/commit
dashboard/src/components/common/FullPageLoader/SpinnerLoader.tsx
TSX
agpl-3.0
1,539
import { Link } from 'react-router-dom' import CommitLogo from '../../assets/commit-logo.png' import { Button } from "@/components/ui/button" import { GitHubLogoIcon } from '@radix-ui/react-icons' export const Header = ({ text }: { text?: string }) => { return ( <header className='flex justify-between ite...
2302_79757062/commit
dashboard/src/components/common/Header.tsx
TSX
agpl-3.0
1,283
import { IconType } from 'react-icons' import { GrCurrency, GrFormAttachment, GrTextAlignFull } from 'react-icons/gr' import { AiFillCode, AiFillFileImage, AiFillHtml5, AiOutlineHtml5, AiOutlineLink, AiOutlinePhone, AiOutlineStar, AiOutlineTable } from 'react-icons/ai' import { BiBarcode, BiCheckboxChecked, BiColorFill...
2302_79757062/commit
dashboard/src/components/common/Icons.ts
TypeScript
agpl-3.0
3,305
import { Accept } from "react-dropzone" import { useState } from "react" import { FrappeError, useFrappeFileUpload, useFrappePostCall } from "frappe-react-sdk" import { File } from "@/types/Core/File" import { Dialog, DialogContent, DialogFooter, DialogHeader } from "@/components/ui/dialog" import { CustomFile } from "...
2302_79757062/commit
dashboard/src/components/common/ImageUploader2/DocumentUploadModal.tsx
TSX
agpl-3.0
5,692
import { Accept, useDropzone } from "react-dropzone" import { MdOutlineDevices } from "react-icons/md" import { useEffect, useState } from "react" import { CustomFile } from "./ImageUploader" import { useToast } from "@/components/ui/use-toast" import { Button } from "@/components/ui/button" import { TbTrash } from "re...
2302_79757062/commit
dashboard/src/components/common/ImageUploader2/FileDrop.tsx
TSX
agpl-3.0
7,060
import { useFrappeUpdateDoc } from "frappe-react-sdk" import { Accept } from "react-dropzone" import { MdOutlineFileUpload } from 'react-icons/md' import { useState } from "react" import { useToast } from "@/components/ui/use-toast" import { File } from "@/types/Core/File" import { Dialog, DialogContent, DialogFooter, ...
2302_79757062/commit
dashboard/src/components/common/ImageUploader2/ImageUploader.tsx
TSX
agpl-3.0
7,480
import { FormLabel } from "@/components/ui/form" import { LabelProps } from "@radix-ui/react-label" interface FormLabelProps extends LabelProps { label: string } export const Label = ({ label, ...props }: FormLabelProps) => { return ( <FormLabel {...props}> {label} </FormLabel> ...
2302_79757062/commit
dashboard/src/components/common/Label/Label.tsx
TSX
agpl-3.0
326
export { Label } from './Label'
2302_79757062/commit
dashboard/src/components/common/Label/index.ts
TypeScript
agpl-3.0
31
import React from 'react' import rehypeRaw from 'rehype-raw' import ReactMarkdown from 'react-markdown' import remarkGfm from 'remark-gfm' import './markdown.css' interface MarkdownRendererProps { content: string } export const MarkdownRenderer: React.FC<MarkdownRendererProps> = ({ content }) => { return <Rea...
2302_79757062/commit
dashboard/src/components/common/MarkdownRenderer/MarkdownRenderer.tsx
TSX
agpl-3.0
533
.markdown { font-size: var(--chakra-fontSizes-sm) }
2302_79757062/commit
dashboard/src/components/common/MarkdownRenderer/markdown.css
CSS
agpl-3.0
55
import { useState } from "react" export interface TabProps { tabs: { name: string, content: JSX.Element }[], variant?: 'button' | 'underlined' } export const Tabs = ({ tabs, variant = 'underlined' }: TabProps) => { const [activeTabIndex, setActiveTabIndex] = useState(0) function classNames(...classe...
2302_79757062/commit
dashboard/src/components/common/Tabs.tsx
TSX
agpl-3.0
2,798
export const APIJSON = [ { "name": "retry_failing_transaction", "arguments": [ { "argument": "log_date", "type": "", "default": "None" } ], "def": "def retry_failing_transaction(log_date=None)", "def_inde...
2302_79757062/commit
dashboard/src/components/features/api_viewer/API.ts
TypeScript
agpl-3.0
486,211
import CopyButton from "@/components/common/CopyToClipboard/CopyToClipboard" import { ErrorBanner } from "@/components/common/ErrorBanner/ErrorBanner" import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" import...
2302_79757062/commit
dashboard/src/components/features/api_viewer/APIDetails.tsx
TSX
agpl-3.0
17,607
import { Input } from "@/components/ui/input" import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" import { APIData } from "@/types/APIData" import { useEffect, useMemo, useState } from "react" import { AiOutlineBranches } from "react-icons/ai" import { GoP...
2302_79757062/commit
dashboard/src/components/features/api_viewer/APIList.tsx
TSX
agpl-3.0
6,335
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { useFrappeGetCall } from "frappe-react-sdk" import { useNavigate } from "react-router-dom" import { AppsData } from "./YourApps" import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTr...
2302_79757062/commit
dashboard/src/components/features/meta_apps/YourAppAPIExplorer.tsx
TSX
agpl-3.0
5,700
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { Avatar, AvatarFallback } from "@/components/ui/avatar" import { AvatarImage } from "@radix-ui/react-avatar" import { useFrappeGetCall } from "frappe-react-sdk" import { useMemo } from "react" import { YourAppAPIExplorer } from "...
2302_79757062/commit
dashboard/src/components/features/meta_apps/YourApps.tsx
TSX
agpl-3.0
3,237
import { Disclosure } from '@headlessui/react' import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline' import { Button } from '@/components/ui/button' import { GitHubLogoIcon } from '@radix-ui/react-icons' function classNames(...classes: any[]) { return classes.filter(Boolean).join(' ') } export const...
2302_79757062/commit
dashboard/src/components/features/overview/Navbar.tsx
TSX
agpl-3.0
6,075
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader" import { Button } from "@/components/ui/button" import { useFrappeGetCall } from "frappe-react-sdk" import { ProjectData, ProjectWithBranch } from "./Projects" import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader...
2302_79757062/commit
dashboard/src/components/features/projects/APIExplorer.tsx
TSX
agpl-3.0
6,311
import { Button } from "@/components/ui/button" import { Dialog } from "@/components/ui/dialog" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" import { useState } from "react" import { IoIosGitBranch } from "react-icons/io" impor...
2302_79757062/commit
dashboard/src/components/features/projects/AddMenuButton.tsx
TSX
agpl-3.0
2,696
import { DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog" import { FormProvider, useForm, SubmitHandler } from "react-hook-form" import { Input } from "@/components/ui/input" import { Button } from '@/components/ui/button' import { ProjectData } from "../Projects" import { useToast...
2302_79757062/commit
dashboard/src/components/features/projects/Branch/CreateBranchModal.tsx
TSX
agpl-3.0
5,761
import { Button } from '@/components/ui/button'; import { toast } from '@/components/ui/use-toast'; import { convertFrappeTimestampToTimeAgo } from '@/components/utils/dateconversion'; import { CommitProjectBranch } from '@/types/commit/CommitProjectBranch'; import { useFrappeDeleteDoc, useFrappePostCall, useFrappeUpda...
2302_79757062/commit
dashboard/src/components/features/projects/Branch/ManageBranchItem.tsx
TSX
agpl-3.0
9,279
import { DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog" import { ProjectData } from "../Projects" import { Button } from "@/components/ui/button" import { KeyedMutator } from "swr" import { CommitProjectBranch } from "@/types/commit/CommitProjectBranch" import ManageBranchItem fr...
2302_79757062/commit
dashboard/src/components/features/projects/Branch/ManageBranchModal.tsx
TSX
agpl-3.0
1,503
import { Button } from '@/components/ui/button' import { DialogHeader, DialogTitle, DialogContent, DialogFooter } from '@/components/ui/dialog' import { FormProvider, SubmitHandler, useForm } from 'react-hook-form' import { Input } from "@/components/ui/input" import { useFrappeCreateDoc } from 'frappe-react-sdk' impor...
2302_79757062/commit
dashboard/src/components/features/projects/Org/CreateOrgModal.tsx
TSX
agpl-3.0
3,981
import { AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle } from '@/components/ui/alert-dialog' import { Button } from '@/components/ui/button' import { ProjectData } from '../Projects' import { useFrappeDeleteDoc } from 'frappe-react-sdk' import { to...
2302_79757062/commit
dashboard/src/components/features/projects/Org/DeleteOrgModal.tsx
TSX
agpl-3.0
1,706
import { Button } from "@/components/ui/button"; import { isSystemManager } from "@/utils/roles"; import { AiOutlineDelete } from "react-icons/ai"; import { KeyedMutator } from "swr"; import { ProjectData } from "../Projects"; import DeleteOrgModal from "./DeleteOrgModal"; import { AlertDialog, AlertDialogTrigger } fro...
2302_79757062/commit
dashboard/src/components/features/projects/Org/OrgComponent.tsx
TSX
agpl-3.0
1,604
import { CalendarIcon } from "@radix-ui/react-icons" import { Avatar, AvatarFallback, AvatarImage, } from "@/components/ui/avatar" import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@/components/ui/hover-card" export interface OrganizationHoverCardProps { organization_id: str...
2302_79757062/commit
dashboard/src/components/features/projects/OrganizationHoverCard.tsx
TSX
agpl-3.0
1,998
import { DialogContent, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog" import { useFrappeCreateDoc } from "frappe-react-sdk" import { FormProvider, SubmitHandler, useForm } from "react-hook-form" import { Input } from "@/components/ui/input" import { Button } from '@/components/ui/button' impor...
2302_79757062/commit
dashboard/src/components/features/projects/Projects/CreateProjectModal.tsx
TSX
agpl-3.0
4,204
import { KeyedMutator } from "swr"; import { ProjectData, ProjectWithBranch } from "../Projects" import { useFrappeDeleteDoc } from "frappe-react-sdk"; import { toast } from "@/components/ui/use-toast"; import { Button } from "@/components/ui/button"; import { AlertDialogCancel, AlertDialogContent, AlertDialogDescripti...
2302_79757062/commit
dashboard/src/components/features/projects/Projects/DeleteProjectModal.tsx
TSX
agpl-3.0
1,814
import { Button } from "@/components/ui/button"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { AiOutlineDelete } from "react-icons/ai"; import { AlertDialog } from "@/components/ui/alert-dialog"; import { KeyedMutator } from "swr"; import { useMemo, useState } from "react"; impo...
2302_79757062/commit
dashboard/src/components/features/projects/Projects/ProjectCard.tsx
TSX
agpl-3.0
3,769
import { FullPageLoader } from "@/components/common/FullPageLoader/FullPageLoader"; import { CommitProject } from "@/types/commit/CommitProject"; import { useFrappeGetCall } from "frappe-react-sdk"; import { isSystemManager } from "@/utils/roles"; import { CommitProjectBranch } from "@/types/commit/CommitProjectBranch"...
2302_79757062/commit
dashboard/src/components/features/projects/Projects.tsx
TSX
agpl-3.0
3,026
import { Button } from "@/components/ui/button" import { DialogHeader, DialogFooter, DialogContent, DialogDescription, DialogTitle } from "@/components/ui/dialog" import { useState } from "react" import { useNavigate } from "react-router-dom" import { ProjectData, ProjectWithBranch } from "./Projects" import { Checkbox...
2302_79757062/commit
dashboard/src/components/features/projects/ViewERDAppDialog.tsx
TSX
agpl-3.0
4,021
import { Card, CardHeader, CardTitle, CardContent, CardFooter } from "@/components/ui/card"; import { Dialog, DialogTrigger } from "@/components/ui/dialog"; import { Button } from "@/components/ui/button"; import { ViewERDDialogContent } from "./ViewERDAppDialog"; import { ProjectData } from "./Projects"; import { MdKe...
2302_79757062/commit
dashboard/src/components/features/projects/ViewERDButton.tsx
TSX
agpl-3.0
3,886
import * as React from "react" import * as AccordionPrimitive from "@radix-ui/react-accordion" import { ChevronDownIcon } from "@radix-ui/react-icons" import { cn } from "@/lib/utils" const Accordion = AccordionPrimitive.Root const AccordionItem = React.forwardRef< React.ElementRef<typeof AccordionPrimitive.Item>,...
2302_79757062/commit
dashboard/src/components/ui/accordion.tsx
TSX
agpl-3.0
2,026
import * as React from "react" import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" const AlertDialog = AlertDialogPrimitive.Root const AlertDialogTrigger = AlertDialogPrimitive.Trigger const AlertDialogPortal =...
2302_79757062/commit
dashboard/src/components/ui/alert-dialog.tsx
TSX
agpl-3.0
4,607