├── demo
├── demo.en.png
└── demo.zh.png
├── src
├── deps.ts
├── plugins
│ ├── zip.png
│ └── upgrade.icon.svg
├── icons
│ ├── favicon.png
│ ├── link.icon.svg
│ ├── i18n.icon.svg
│ ├── run.svg
│ ├── favicon.italic.svg
│ ├── logos
│ │ ├── iotpro.svg
│ │ └── shark.svg
│ └── settings.icon.svg
├── overview
│ ├── offline.png
│ ├── online.png
│ └── icons
│ │ ├── stop.icon.svg
│ │ ├── start.icon.svg
│ │ ├── refresh.icon.svg
│ │ ├── overview.icon.svg
│ │ └── disk.icon.svg
├── dashboard
│ ├── components
│ │ ├── index.sass
│ │ ├── Doc.tsx
│ │ ├── SaveComfirmModal.tsx
│ │ └── EchartsComponent.tsx
│ ├── SettingsPanel
│ │ ├── index.scss
│ │ ├── SettingsPanel.tsx
│ │ └── CanvasSetting.tsx
│ ├── Charts
│ │ ├── Chart
│ │ │ └── index.scss
│ │ ├── CompositeGraph
│ │ │ ├── index.scss
│ │ │ └── constant.ts
│ │ ├── Variables
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── DashboardEditor
│ │ │ └── index.sass
│ │ ├── Gauge
│ │ │ └── index.scss
│ │ ├── Configuration
│ │ │ └── index.sass
│ │ ├── Descriptions
│ │ │ └── index.scss
│ │ ├── Table
│ │ │ └── index.scss
│ │ └── RichText
│ │ │ └── index.sass
│ ├── constant.ts
│ ├── ChartFormFields
│ │ ├── components
│ │ │ ├── Tooltip.tsx
│ │ │ ├── Title.tsx
│ │ │ ├── DataZoom.tsx
│ │ │ ├── Wrapper.tsx
│ │ │ └── SplitLine.tsx
│ │ ├── EditorFields.tsx
│ │ ├── index.scss
│ │ └── constant.ts
│ ├── Share
│ │ └── index.sass
│ ├── DataSource
│ │ ├── DataView.tsx
│ │ └── InsertVariableBtn.tsx
│ └── Overview.sass
├── components
│ ├── DraggableModal
│ │ ├── index.scss
│ │ └── index.tsx
│ ├── copy
│ │ ├── copied.icon.svg
│ │ ├── CopyIconButton.scss
│ │ ├── copy.icon.svg
│ │ └── CopyIconButton.tsx
│ ├── TableOperations
│ │ ├── index.scss
│ │ └── index.tsx
│ ├── ReadonlyEditor
│ │ ├── index.scss
│ │ └── index.tsx
│ ├── RefreshButton
│ │ └── index.tsx
│ ├── Editor
│ │ └── index.sass
│ ├── BackButton.tsx
│ ├── GlobalErrorBoundary.sass
│ ├── BottomFixedFooter
│ │ ├── index.scss
│ │ └── index.tsx
│ ├── DDBHeader
│ │ ├── CompileAndRefresh.tsx
│ │ ├── HostSelect.tsx
│ │ ├── Logo.tsx
│ │ └── LanguageSelect.tsx
│ ├── Unlogin.tsx
│ ├── icons
│ │ ├── arrow.down.icon.svg
│ │ └── export.icon.svg
│ ├── tags
│ │ ├── index.scss
│ │ └── index.tsx
│ ├── node-select
│ │ └── index.tsx
│ ├── StringColorPicker
│ │ └── index.tsx
│ ├── BoolRadioGroup
│ │ └── index.tsx
│ ├── DDBTable
│ │ ├── index.sass
│ │ └── index.tsx
│ ├── StringTimePicker.tsx
│ ├── StringDatePicker
│ │ └── index.tsx
│ ├── TableCellDetail
│ │ └── index.tsx
│ └── FormDependencies
│ │ └── index.tsx
├── data-collection
│ ├── components
│ │ ├── create-connection-modal
│ │ │ └── index.scss
│ │ ├── view-log-modal
│ │ │ ├── index.scss
│ │ │ └── index.tsx
│ │ ├── create-parser-template-modal
│ │ │ └── index.scss
│ │ ├── connection-detail
│ │ │ ├── index.scss
│ │ │ ├── parser-template-view-modal.tsx
│ │ │ └── delete-describe-modal.tsx
│ │ ├── create-subscribe-modal
│ │ │ └── index.scss
│ │ └── delete-connections-modal
│ │ │ └── index.tsx
│ ├── index.sass
│ ├── utils.ts
│ ├── ParserTemplates.sass
│ └── icons
│ │ ├── data-collection.icon.svg
│ │ ├── parser-template.icon.svg
│ │ └── connection.icon.svg
├── access
│ ├── hooks
│ │ ├── use-users.ts
│ │ ├── use-groups.ts
│ │ ├── use-access.ts
│ │ └── use-access-objs.ts
│ ├── components
│ │ └── RevokeConfirm.tsx
│ ├── types.ts
│ ├── icons
│ │ ├── access.icon.svg
│ │ ├── user.icon.svg
│ │ └── group.icon.svg
│ └── utils
│ │ ├── filter-access-options.ts
│ │ └── handle-access.ts
├── shell
│ ├── QueryGuide
│ │ ├── init.ts
│ │ ├── model.ts
│ │ ├── type.ts
│ │ ├── utils.ts
│ │ └── components
│ │ │ ├── EnumSelect.tsx
│ │ │ ├── EnumAutoComplete.tsx
│ │ │ └── ColSelectTransfer.tsx
│ ├── AccessModal.sass
│ ├── icons
│ │ ├── column.icon.svg
│ │ ├── git.icon.svg
│ │ ├── column-root.icon.svg
│ │ ├── add-column.icon.svg
│ │ ├── create-table.icon.svg
│ │ ├── vector.icon.svg
│ │ ├── access.icon.svg
│ │ ├── partitions.icon.svg
│ │ ├── partition-file.icon.svg
│ │ ├── database.icon.svg
│ │ ├── variable.icon.svg
│ │ ├── matrix.icon.svg
│ │ ├── query-guide.icon.svg
│ │ ├── table.icon.svg
│ │ └── catalog.icon.svg
│ ├── git
│ │ ├── git-provider.ts
│ │ └── Git.tsx
│ ├── CreateTableModal.scss
│ ├── DataView.tsx
│ └── ExecuteAction.tsx
├── guide
│ ├── iot-guide
│ │ ├── index.sass
│ │ ├── SimpleVersion
│ │ │ ├── index.scss
│ │ │ └── SimpleFirstStep.tsx
│ │ ├── AdvancedVersion
│ │ │ └── index.scss
│ │ ├── index.tsx
│ │ └── type.ts
│ ├── utils.ts
│ ├── finance-guide
│ │ ├── components
│ │ │ ├── index.scss
│ │ │ └── ExistedDBSelect.tsx
│ │ ├── type.ts
│ │ ├── constant.ts
│ │ └── index.scss
│ ├── components
│ │ ├── GuideFailResultPage.tsx
│ │ ├── GuideSuccessResultPage.tsx
│ │ ├── UploadConfigModal.tsx
│ │ ├── DownloadConfigModal.tsx
│ │ ├── CodeViewStep.tsx
│ │ └── UploadFileField.tsx
│ ├── constant.ts
│ └── icons
│ │ ├── iot.icon.svg
│ │ └── finance.icon.svg
├── inspection
│ ├── utils.ts
│ ├── pages
│ │ ├── AddInspectionPage.tsx
│ │ └── EditInspectionPage.tsx
│ ├── constants.ts
│ ├── components
│ │ ├── DeletePlansModal.tsx
│ │ └── DeleteReportsModal.tsx
│ ├── index.tsx
│ ├── modals
│ │ ├── LogModal.tsx
│ │ └── AddParamsModal.tsx
│ └── icons
│ │ └── inspection.icon.svg
├── streaming
│ ├── StreamingError.tsx
│ ├── index.sass
│ ├── hooks
│ │ └── use-streaming.ts
│ └── types.ts
├── window.sass
├── test
│ └── index.sass
├── utils.common.ts
├── config
│ ├── icons
│ │ ├── group.icon.svg
│ │ ├── config.icon.svg
│ │ └── controller.config.icon.svg
│ ├── type.ts
│ └── utils.ts
├── computing
│ ├── icons
│ │ ├── table.icon.svg
│ │ └── engine.icon.svg
│ ├── CEPComputing
│ │ ├── api.ts
│ │ └── components
│ │ │ └── CEPEngineList.tsx
│ ├── index.dos
│ └── index.sass
├── streaming-graph
│ ├── Configuration.tsx
│ ├── index.tsx
│ └── flow.icon.svg
├── antd-table.sass
├── hooks.ts
├── settings
│ ├── index.sass
│ └── index.tsx
├── login
│ └── index.sass
├── index.shf.sass
├── variables.sass
├── job
│ └── index.sass
└── log
│ └── index.sass
├── .gitignore
├── eslint.config.js
├── .vscode
├── extensions.json
└── settings.template.json
├── i18n
└── index.ts
├── test
└── index.ts
├── global.d.ts
└── nginx.conf
/demo/demo.en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphindb/web/HEAD/demo/demo.en.png
--------------------------------------------------------------------------------
/demo/demo.zh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphindb/web/HEAD/demo/demo.zh.png
--------------------------------------------------------------------------------
/src/deps.ts:
--------------------------------------------------------------------------------
1 | export * as AntdProComponents from '@ant-design/pro-components'
2 |
--------------------------------------------------------------------------------
/src/plugins/zip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphindb/web/HEAD/src/plugins/zip.png
--------------------------------------------------------------------------------
/src/icons/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphindb/web/HEAD/src/icons/favicon.png
--------------------------------------------------------------------------------
/src/overview/offline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphindb/web/HEAD/src/overview/offline.png
--------------------------------------------------------------------------------
/src/overview/online.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dolphindb/web/HEAD/src/overview/online.png
--------------------------------------------------------------------------------
/src/dashboard/components/index.sass:
--------------------------------------------------------------------------------
1 | .dashboard-echarts-component
2 | width: 100%
3 | height: 100%
--------------------------------------------------------------------------------
/src/components/DraggableModal/index.scss:
--------------------------------------------------------------------------------
1 | .draggable-modal-title {
2 | width: 100%;
3 | cursor: move;
4 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 |
3 | /out/
4 |
5 | /i18n/untranslateds.json
6 |
7 | /.vscode/settings.json
8 | /.vscode/launch.json
9 |
--------------------------------------------------------------------------------
/eslint.config.js:
--------------------------------------------------------------------------------
1 | import { xlint_config } from 'xshell/xlint.js'
2 |
3 | // eslint-disable-next-line no-restricted-exports
4 | export default [xlint_config]
5 |
--------------------------------------------------------------------------------
/src/data-collection/components/create-connection-modal/index.scss:
--------------------------------------------------------------------------------
1 | .create-connection-modal {
2 | .ant-input-number {
3 | width: 300px;
4 | }
5 | }
--------------------------------------------------------------------------------
/src/dashboard/SettingsPanel/index.scss:
--------------------------------------------------------------------------------
1 | .reset-config-btn {
2 | margin-top: 16px;
3 | margin-left: 16px;
4 | }
5 |
6 | .reset-tip {
7 | padding: 12px
8 | }
--------------------------------------------------------------------------------
/src/dashboard/Charts/Chart/index.scss:
--------------------------------------------------------------------------------
1 | .chart-radio-group {
2 | margin-bottom: 12px;
3 | }
4 |
5 | .chart-wrapper {
6 | padding: 8px;
7 | background-color: #282828;
8 | }
--------------------------------------------------------------------------------
/src/dashboard/Charts/CompositeGraph/index.scss:
--------------------------------------------------------------------------------
1 | .series_match_type_tip {
2 | margin-left: 8px;
3 | }
4 |
5 | .collapse-label {
6 | display: flex;
7 | justify-content: space-between;
8 | }
--------------------------------------------------------------------------------
/src/overview/icons/stop.icon.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/access/hooks/use-users.ts:
--------------------------------------------------------------------------------
1 | import useSWR from 'swr'
2 |
3 | import { access } from '../model.ts'
4 |
5 | export function use_users () {
6 | return useSWR('users', async () => access.get_user_list())
7 | }
8 |
--------------------------------------------------------------------------------
/src/shell/QueryGuide/init.ts:
--------------------------------------------------------------------------------
1 | import { model } from '../../model.js'
2 |
3 | import code from './guide.dos'
4 |
5 |
6 | export async function init_dbms_query_guide () {
7 | await model.ddb.eval(code)
8 | }
9 |
--------------------------------------------------------------------------------
/src/access/hooks/use-groups.ts:
--------------------------------------------------------------------------------
1 | import useSWR from 'swr'
2 |
3 | import { access } from '../model.ts'
4 |
5 | export function use_groups () {
6 | return useSWR('groups', async () => access.get_group_list())
7 | }
8 |
--------------------------------------------------------------------------------
/src/shell/AccessModal.sass:
--------------------------------------------------------------------------------
1 | .access-table
2 | .ant-table-wrapper .ant-table-cell, .ant-table-wrapper .ant-table-thead>tr>th
3 | padding: 0
4 | .ant-collapse>.ant-collapse-item >.ant-collapse-header
5 | padding: 5px
--------------------------------------------------------------------------------
/src/components/copy/copied.icon.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/components/TableOperations/index.scss:
--------------------------------------------------------------------------------
1 | .ddb-table-operations {
2 | display: flex;
3 | column-gap: 12px;
4 |
5 | .more-operations {
6 | color: var(--ant-color-primary);
7 | cursor: pointer;
8 | }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/src/data-collection/components/view-log-modal/index.scss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | .ant-list-item {
3 | border: none !important;
4 |
5 | &:nth-child(even) {
6 | background-color: rgba(0, 0, 0, 0.02);
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/guide/iot-guide/index.sass:
--------------------------------------------------------------------------------
1 | .view-card.iot-guide
2 | padding-top: 10px !important
3 |
4 | .warning-result
5 | height: 100%
6 | display: flex
7 | align-items: center
8 | justify-content: center
9 | flex-direction: column
10 |
--------------------------------------------------------------------------------
/src/inspection/utils.ts:
--------------------------------------------------------------------------------
1 | import dayjs from 'dayjs'
2 |
3 | export function parse_minute (minute_str: string) {
4 | const [hour, minute] = minute_str.slice(0, -1).split(':')
5 | return dayjs().set('hour', Number(hour)).set('minute', Number(minute))
6 | }
7 |
--------------------------------------------------------------------------------
/src/inspection/pages/AddInspectionPage.tsx:
--------------------------------------------------------------------------------
1 | import { InspectionForm } from '@/inspection/components/InspectionForm.tsx'
2 |
3 | export function AddInspectionPage () {
4 | return
5 |
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/copy/CopyIconButton.scss:
--------------------------------------------------------------------------------
1 | .copy-icon-button {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | padding: 12px;
6 | box-sizing: border-box;
7 |
8 | &:hover {
9 | border: 1px solid #E2E2E2;
10 | }
11 | }
--------------------------------------------------------------------------------
/src/data-collection/index.sass:
--------------------------------------------------------------------------------
1 | .data-connection
2 | width: 100%
3 | height: 100%
4 |
5 | .data-connection, .parser-template
6 | .ant-result.init
7 | padding-top: 150px !important
8 |
9 | .data-collection-spin
10 | width: 100%
11 | margin-top: 50vh
12 |
13 |
--------------------------------------------------------------------------------
/src/dashboard/Charts/Variables/index.scss:
--------------------------------------------------------------------------------
1 | .variable-title {
2 | font-weight: 500;
3 | margin-bottom: 16px;
4 | }
5 |
6 | .variable-chart-wrapper {
7 | margin-bottom: 0px;
8 | }
9 |
10 | .variable-config-form {
11 | .ant-form-item {
12 | margin-bottom: 8px;
13 | }
14 | }
--------------------------------------------------------------------------------
/src/dashboard/constant.ts:
--------------------------------------------------------------------------------
1 | import { DdbForm } from 'dolphindb/browser.js'
2 |
3 | import { t } from '@i18n'
4 |
5 | export const DATA_SOURCE_TYPE_MAP = {
6 | [DdbForm.table]: t('表格'),
7 | [DdbForm.matrix]: t('矩阵')
8 | }
9 |
10 |
11 | export const DASHBOARD_SHARED_SEARCH_KEY = 'ids'
12 |
--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "MS-CEINTL.vscode-language-pack-zh-hans",
4 | "mhutchie.git-graph",
5 | "eamodio.gitlens",
6 | "syler.sass-indented",
7 | "dbaeumer.vscode-eslint"
8 | ],
9 | "unwantedRecommendations": []
10 | }
--------------------------------------------------------------------------------
/src/dashboard/components/Doc.tsx:
--------------------------------------------------------------------------------
1 | import { t } from '@i18n'
2 |
3 | export function Doc () {
4 | return
9 | {t('文档')}
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/ReadonlyEditor/index.scss:
--------------------------------------------------------------------------------
1 | .readonly-editor {
2 | position: relative;
3 |
4 | border: 1px solid #D9D9D9;
5 |
6 | .copy-btn {
7 | position: absolute;
8 | border-radius: 4px;
9 | top: 12px;
10 | right: 32px;
11 | z-index: 1000;
12 | }
13 | }
--------------------------------------------------------------------------------
/src/streaming/StreamingError.tsx:
--------------------------------------------------------------------------------
1 | import { type ErrorType } from './types.js'
2 | import './index.sass'
3 |
4 | export function StreamingError ({ error }: { error: ErrorType }) {
5 | if (error.appear)
6 | return {error.msg}
7 |
8 | return null
9 | }
10 |
--------------------------------------------------------------------------------
/src/shell/icons/column.icon.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/src/components/RefreshButton/index.tsx:
--------------------------------------------------------------------------------
1 | import { Button, type ButtonProps } from 'antd'
2 | import { ReloadOutlined } from '@ant-design/icons'
3 |
4 | import { t } from '@i18n'
5 |
6 | export function RefreshButton (props: ButtonProps) {
7 | return }>
8 | {t('刷新')}
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/window.sass:
--------------------------------------------------------------------------------
1 | html, body
2 | margin: 0
3 | padding: 0
4 | height: 100%
5 | overscroll-behavior-y: contain
6 | color: #000000
7 |
8 | *
9 | box-sizing: inherit
10 |
11 | .root
12 | height: 100%
13 | box-sizing: border-box
14 |
15 | font-size: 20px
16 |
17 | .app
18 | height: 100%
19 |
--------------------------------------------------------------------------------
/src/data-collection/utils.ts:
--------------------------------------------------------------------------------
1 | import { model } from '@model'
2 |
3 | export async function request (func: string, params?: any) {
4 | const res = await model.ddb.invoke(func, params ? [JSON.stringify(params)] : undefined)
5 | if (typeof res === 'string')
6 | return JSON.parse(res) as T
7 | else
8 | return res as T
9 | }
10 |
--------------------------------------------------------------------------------
/src/icons/link.icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/components/Editor/index.sass:
--------------------------------------------------------------------------------
1 | .monaco-editor-container
2 | min-height: 0px
3 |
4 | .light
5 | .monaco-editor
6 | --vscode-editorLineNumber-foreground: #888888 !important
7 | --vscode-editorLineNumber-activeForeground: #444444 !important
8 | --vscode-editor-background: #ffffff !important
9 | --vscode-editorGutter-background: #ffffff !important
10 |
--------------------------------------------------------------------------------
/src/components/BackButton.tsx:
--------------------------------------------------------------------------------
1 | import { Button } from 'antd'
2 | import { ArrowLeftOutlined } from '@ant-design/icons'
3 |
4 | import { model } from '@model'
5 |
6 | export function BackButton ({ to }: { to: string }) {
7 | return }
9 | type='text'
10 | onClick={() => { model.goto(to) }}
11 | />
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/index.sass:
--------------------------------------------------------------------------------
1 | .view-card.test
2 | .title
3 | padding: 10px 0px
4 | font-size: 1.5em
5 | font-weight: bold
6 |
7 | .obj-result
8 | margin-top: 10px
9 | overflow-y: unset
10 |
11 | .actions
12 | .form
13 | max-width: 800px
14 |
15 | .ant-btn
16 | margin-bottom: 8px
17 |
18 |
--------------------------------------------------------------------------------
/src/dashboard/Charts/DashboardEditor/index.sass:
--------------------------------------------------------------------------------
1 | .editor-container
2 | height: 100%
3 | display: flex
4 | flex-direction: column
5 | h2
6 | margin: 0
7 | .editor
8 | height: 80%
9 | // min-height: 100px
10 | padding: 10px 0
11 | .monaco-editor-container
12 | height: auto
13 | .ant-btn
14 | width: 100px
15 |
16 |
--------------------------------------------------------------------------------
/src/shell/git/git-provider.ts:
--------------------------------------------------------------------------------
1 | import { storage_keys } from '@model'
2 |
3 | import { GitHubAdapter, GitLabAdapter } from './git-adapter.ts'
4 |
5 |
6 | export const git_provider = localStorage.getItem(storage_keys.git_provider) === 'github' ? new GitHubAdapter() : new GitLabAdapter()
7 |
8 |
9 | export function get_token () {
10 | return localStorage.getItem(storage_keys.git_access_token)
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/GlobalErrorBoundary.sass:
--------------------------------------------------------------------------------
1 | .global-error-result
2 | .ant-result-subtitle
3 | color: unset
4 | text-align: left
5 | padding: 0px 10%
6 | white-space: break-spaces
7 |
8 | .modal-error
9 | top: 60px
10 |
11 | .ant-modal-confirm-content
12 | white-space: break-spaces
13 | max-height: calc(100vh - 300px)
14 | overflow-y: auto
15 |
--------------------------------------------------------------------------------
/src/components/BottomFixedFooter/index.scss:
--------------------------------------------------------------------------------
1 | .bottom-fixed-footer {
2 | position: fixed;
3 |
4 | display: flex;
5 | justify-content: center;
6 | height: 48px;
7 | bottom: 0;
8 |
9 | background-color: var(--ant-color-bg-container);
10 | align-items: center;
11 | box-shadow: 0 -1px 3px #f0eafa
12 | }
13 |
14 | .bottom-fixed-placeholder {
15 | height: 48px;
16 | margin-top: 12px;
17 | }
--------------------------------------------------------------------------------
/src/dashboard/ChartFormFields/components/Tooltip.tsx:
--------------------------------------------------------------------------------
1 | import { Form } from 'antd'
2 |
3 | import { t } from '@i18n'
4 | import { BoolRadioGroup } from '../../../components/BoolRadioGroup/index.js'
5 |
6 | export function TooltipFields () {
7 | return <>
8 |
9 |
10 |
11 |
12 | >
13 | }
14 |
--------------------------------------------------------------------------------
/src/shell/icons/git.icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/data-collection/ParserTemplates.sass:
--------------------------------------------------------------------------------
1 | .parser-template
2 | width: 100%
3 | height: 100%
4 | padding-top: 0px !important
5 | padding-bottom: 0px !important
6 |
7 | h2
8 | margin-top: 0px
9 |
10 |
11 | .parser-template-content
12 | padding-bottom: 10px
13 |
14 | .parser-template-comment
15 | margin-bottom: 0px !important
16 |
17 | .parser-template-btn-group
18 | margin-bottom: 16px
19 |
--------------------------------------------------------------------------------
/src/overview/icons/start.icon.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/src/dashboard/Share/index.sass:
--------------------------------------------------------------------------------
1 | $canvas_back_color: rgb(40, 40, 40)
2 | $font_color: rgb(215, 215, 215)
3 | $blue: rgb(22, 104, 220)
4 | $border_color: #333333
5 |
6 | // .dark
7 | // .ant-modal-content
8 | // background-color: $canvas_back_color
9 |
10 | // .ant-modal-title
11 | // background-color: $canvas_back_color
12 |
13 | // .share
14 | // height: 600px
15 |
16 | // .main
17 | // width: 480px
--------------------------------------------------------------------------------
/src/icons/i18n.icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/utils.common.ts:
--------------------------------------------------------------------------------
1 | // 在 index.html 和 window.html 中共用的方法
2 |
3 | import favicon_italic from './icons/favicon.italic.svg'
4 | import favicon from './icons/favicon.png'
5 |
6 | export function apply_favicon (shf: boolean) {
7 | let link = document.createElement('link')
8 | link.rel = 'icon'
9 | link.type = shf ? 'image/png' : 'image/svg+xml'
10 | link.href = shf ? favicon : favicon_italic
11 |
12 | document.head.appendChild(link)
13 |
14 | return link
15 | }
--------------------------------------------------------------------------------
/src/config/icons/group.icon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/dashboard/ChartFormFields/components/Title.tsx:
--------------------------------------------------------------------------------
1 | import { Form, Input, InputNumber } from 'antd'
2 |
3 | import { t } from '@i18n'
4 |
5 | export function TitleFields () {
6 | return <>
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | >
15 | }
16 |
--------------------------------------------------------------------------------
/src/icons/run.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/i18n/index.ts:
--------------------------------------------------------------------------------
1 | import { I18N } from 'xshell/i18n/index.js'
2 | import { i18n as i18n_xsh } from 'xshell/i18n/instance.js'
3 | import { i18n as i18n_api } from 'dolphindb/i18n/index.js'
4 |
5 | import _dict from './dict.json'
6 |
7 | const i18n = new I18N(_dict)
8 |
9 | // 未知语言默认为英文
10 | if (!I18N.LANGUAGE_REGEXP.test(Intl.DateTimeFormat().resolvedOptions().locale.slice(0, 2)))
11 | i18n.language = i18n_api.language = i18n_xsh.language = 'en'
12 |
13 | const { t, Trans, language } = i18n
14 |
15 | export { i18n, t, Trans, language }
16 |
--------------------------------------------------------------------------------
/src/access/hooks/use-access.ts:
--------------------------------------------------------------------------------
1 | import useSWR from 'swr'
2 |
3 | import { access } from '@/access/model.js'
4 | import type { AccessRole } from '@/access/types.js'
5 |
6 |
7 | export function use_access (role: AccessRole, name: string, final: boolean = false) {
8 | return useSWR(
9 | ['accesses', role, name, final],
10 | async () => {
11 | if (role === 'user')
12 | return (await access.get_user_access([name], final))[0]
13 |
14 | return (await access.get_group_access([name]))[0]
15 | }
16 | )
17 | }
18 |
--------------------------------------------------------------------------------
/src/components/DDBHeader/CompileAndRefresh.tsx:
--------------------------------------------------------------------------------
1 | import { Button } from 'antd'
2 |
3 | import { ReloadOutlined } from '@ant-design/icons'
4 |
5 |
6 | import { t } from '@i18n'
7 |
8 | import { model } from '@model'
9 |
10 |
11 | export function CompileAndRefresh () {
12 | return }
16 | onClick={async () => { await model.recompile_and_refresh() } }
17 | >
18 | {t('编译并刷新 (r)')}
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/Unlogin.tsx:
--------------------------------------------------------------------------------
1 | import { Button, Result } from 'antd'
2 |
3 | import { t } from '@i18n'
4 |
5 | import { model } from '@model'
6 |
7 |
8 | export function Unlogin ({ info }: { info: string }) {
9 | return { await model.goto_login() }}>
15 | {t('去登录')}
16 |
17 | }
18 | />
19 | }
20 |
--------------------------------------------------------------------------------
/src/dashboard/DataSource/DataView.tsx:
--------------------------------------------------------------------------------
1 | import { Obj } from '@/obj.tsx'
2 |
3 | import { model } from '@model'
4 | import { dashboard } from '@/dashboard/model.ts'
5 |
6 |
7 | export function DataView () {
8 | const { result } = dashboard.use(['result'])
9 | const { options, product_name } = model.use(['options', 'product_name'])
10 |
11 | return {
12 | result ? : null
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/shell/icons/column-root.icon.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/src/config/type.ts:
--------------------------------------------------------------------------------
1 | export type NodeType = 'data' | 'agent' | 'controller' | 'computing'
2 |
3 | export type ControllerConfig = {
4 | id: string
5 | name: string
6 | value: string
7 | }
8 |
9 | export type ClusterNode = {
10 | id: string
11 | host: string
12 | port: string
13 | alias: string
14 | mode: NodeType
15 | computeGroup?: string
16 | zone?: string
17 | }
18 |
19 | export type NodesConfig = {
20 | key: string
21 | category?: string
22 | qualifier: string
23 | name: string
24 | value: string
25 | }
26 |
--------------------------------------------------------------------------------
/src/dashboard/ChartFormFields/components/DataZoom.tsx:
--------------------------------------------------------------------------------
1 | import { Form } from 'antd'
2 |
3 | import { t } from '@i18n'
4 | import { BoolRadioGroup } from '../../../components/BoolRadioGroup/index.js'
5 |
6 | export function DataZoomFields () {
7 | return <>
8 |
9 |
10 |
11 |
12 |
13 |
14 | >
15 | }
16 |
--------------------------------------------------------------------------------
/src/access/components/RevokeConfirm.tsx:
--------------------------------------------------------------------------------
1 | import { Typography, Popconfirm } from 'antd'
2 |
3 | import { t } from '@i18n'
4 |
5 | export function RevokeConfirm ({ on_confirm }: { on_confirm: () => Promise }) {
6 | return
12 |
13 | {t('撤销')}
14 |
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/guide/utils.ts:
--------------------------------------------------------------------------------
1 | import { safe_json_parse } from '../dashboard/utils.ts'
2 | import { model } from '../model.js'
3 |
4 | export async function request (func: string, params: any) {
5 | const res = await model.ddb.call(func, [JSON.stringify(params)])
6 | return safe_json_parse(res?.value) as T
7 | }
8 |
9 |
10 | export function check_tb_valid (name: string) {
11 | // 仅支持中英文开头
12 | if (!/^[a-zA-Z\u4e00-\u9fa5]/.test(name))
13 | return false
14 | // 仅支持中英文、数字以及下划线
15 | if (!/[\u4e00-\u9fa5A-Za-z0-9_]+$/g.test(name))
16 | return false
17 | return true
18 | }
19 |
--------------------------------------------------------------------------------
/src/components/icons/arrow.down.icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/components/tags/index.scss:
--------------------------------------------------------------------------------
1 | .ddb-tag {
2 | font-weight: bold;
3 | background-color: #E6F7FF;
4 | color: #003A8C;
5 | }
6 |
7 | .ddb-success-tag {
8 | color: #216E4E;
9 | background-color: #DCFFF1;
10 | font-weight: bold;
11 | }
12 |
13 | .ddb-error-tag {
14 | color: #AE2E24;
15 | background-color: #FFECEB;
16 | font-weight: bold;
17 | }
18 |
19 | .ddb-partial-success-tag {
20 | color: #873800;
21 | background-color: #FFE7BA;
22 | font-weight: bold;
23 | }
24 |
25 | .ddb-processing-tag {
26 | background-color: #E6F7FF;
27 | color: #003A8C;
28 | font-weight: bold;
29 | }
--------------------------------------------------------------------------------
/src/guide/finance-guide/components/index.scss:
--------------------------------------------------------------------------------
1 | .common-filter-cols-wrapper {
2 | width: 100%;
3 | padding: 16px;
4 | border-radius: 8px;
5 | background-color: var(--ant-color-bg-layout);
6 | margin-bottom: 24px;
7 | h4 {
8 | margin: 0px 0px 16px 0px;
9 | }
10 |
11 | .common-filter-col {
12 | display: flex;
13 | margin-bottom: 12px;
14 | width: 100%;
15 | justify-content: space-between;
16 | align-items: center;
17 |
18 | .ant-form-item {
19 | width: 45%;
20 | margin-bottom: 0px;
21 | }
22 | }
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/dashboard/Charts/CompositeGraph/constant.ts:
--------------------------------------------------------------------------------
1 | import { DdbType } from 'dolphindb/browser.js'
2 |
3 | export const TIME_TYPES = [
4 | DdbType.date,
5 | DdbType.month,
6 | DdbType.time,
7 | DdbType.minute,
8 | DdbType.second,
9 | DdbType.datetime,
10 | DdbType.timestamp,
11 | DdbType.nanotime,
12 | DdbType.nanotimestamp,
13 | DdbType.datehour
14 | ]
15 |
16 |
17 |
18 | export const VALUE_TYPES = [
19 | DdbType.short,
20 | DdbType.int,
21 | DdbType.long,
22 | DdbType.float,
23 | DdbType.double,
24 | DdbType.decimal32,
25 | DdbType.decimal64,
26 | DdbType.decimal128
27 | ]
28 |
29 |
--------------------------------------------------------------------------------
/src/shell/QueryGuide/model.ts:
--------------------------------------------------------------------------------
1 | import { Model } from 'react-object-model'
2 |
3 | import { model } from '../../model.js'
4 |
5 | import { type IQueryInfos } from './type.js'
6 | import query_guide_code from './guide.dos'
7 |
8 | export class GuideQueryModel extends Model {
9 | code: string
10 | query_values: IQueryInfos
11 |
12 | query_guide_defined = false
13 |
14 | async define_query_guide () {
15 | if (this.query_guide_defined)
16 | return
17 | await model.ddb.eval(query_guide_code)
18 | this.set({ query_guide_defined: true })
19 | }
20 | }
21 |
22 |
23 | export let guide_query_model = new GuideQueryModel()
24 |
--------------------------------------------------------------------------------
/src/components/DDBHeader/HostSelect.tsx:
--------------------------------------------------------------------------------
1 | import { Select } from 'antd'
2 | import type { SizeType } from 'antd/es/config-provider/SizeContext.js'
3 |
4 | import { envs, model } from '@model'
5 |
6 |
7 | export function HostSelect ({ size = 'small' }: { size?: SizeType }) {
8 | return