From 7092ea3f9703f58066d14969ead8311c1018c2f8 Mon Sep 17 00:00:00 2001 From: yqwoe Date: Thu, 26 Oct 2023 09:29:42 +0800 Subject: [PATCH] fix: shortcut key problem; editor theme switching problem; editor full screen; database field length; (#2436) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: use-service hooks * fix: 快捷键问题;编辑器主题切换问题;编辑 器全屏;数据库字段长度; * fix:提交 .mvn * fix:提交 .idea * fix:提交 .gitignore * fix:提交 maven-wrapper.jar * fix:提交 .gitignore --- .gitignore | 2 +- dinky-admin/src/main/resources/db/db-h2.sql | 2 +- dinky-web/package.json | 1 + dinky-web/src/app.tsx | 54 +++--- .../components/CallBackButton/CircleBtn.tsx | 2 +- .../CustomEditor/CodeEdit/index.tsx | 2 +- .../CustomEditor/CodeShow/index.tsx | 2 +- dinky-web/src/global.less | 6 + dinky-web/src/hooks/useEditor.tsx | 42 +++++ .../DataStudio/FooterContainer/index.tsx | 2 +- .../DataStudio/HeaderContainer/index.tsx | 6 +- .../MiddleContainer/Editor/index.tsx | 159 ++++++++++++------ .../MiddleContainer/KeyBoard/constant.tsx | 22 +-- .../DataStudio/MiddleContainer/index.tsx | 6 +- dinky-web/src/pages/DataStudio/index.tsx | 94 ++++++----- dinky-web/src/pages/DataStudio/route.tsx | 2 + dinky-web/src/utils/function.tsx | 69 ++++---- script/sql/dinky-mysql.sql | 2 +- script/sql/dinky-pg.sql | 4 +- 19 files changed, 306 insertions(+), 173 deletions(-) create mode 100644 dinky-web/src/hooks/useEditor.tsx diff --git a/.gitignore b/.gitignore index 6a0f999ccd..097d72e48c 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,7 @@ logs.zip # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* .idea/* -!.idea/icon.png +!.idea/icon.svg !.idea/vcs.xml build target/* diff --git a/dinky-admin/src/main/resources/db/db-h2.sql b/dinky-admin/src/main/resources/db/db-h2.sql index df44c1f58e..abb7d7dc94 100644 --- a/dinky-admin/src/main/resources/db/db-h2.sql +++ b/dinky-admin/src/main/resources/db/db-h2.sql @@ -1642,7 +1642,7 @@ CREATE TABLE `dinky_metrics` ( `position` int(11) DEFAULT null, `show_type` varchar(255) DEFAULT null, `show_size` varchar(255) DEFAULT null, - `title` varchar(255) DEFAULT null, + `title` CLOB DEFAULT null, `layout_name` varchar(255) DEFAULT null, `create_time` datetime DEFAULT null, `update_time` datetime DEFAULT null diff --git a/dinky-web/package.json b/dinky-web/package.json index 4115635c05..e43df772c6 100644 --- a/dinky-web/package.json +++ b/dinky-web/package.json @@ -70,6 +70,7 @@ "redux-persist": "^6.0.0", "remark-gfm": "^4.0.0", "screenfull": "^6.0.2", + "sql-formatter": "^13.0.1", "styled-components": "^6.0.8", "use-sse": "^2.0.1" }, diff --git a/dinky-web/src/app.tsx b/dinky-web/src/app.tsx index f0b998e7ef..2d541078f7 100644 --- a/dinky-web/src/app.tsx +++ b/dinky-web/src/app.tsx @@ -31,6 +31,7 @@ import { persistReducer, persistStore } from 'redux-persist'; import storage from 'redux-persist/lib/storage'; import { Navigate } from 'umi'; import { default as defaultSettings, default as Settings } from '../config/defaultSettings'; +import { FullScreenProvider } from './hooks/useEditor'; import { errorConfig } from './requestErrorConfig'; import { getDataByParamsReturnResult } from './services/BusinessCrud'; import { API } from './services/data'; @@ -114,6 +115,39 @@ export async function getInitialState(): Promise<{ // ProLayout 支持的api https://procomponents.ant.design/components/layout export const layout: RunTimeLayoutConfig = ({ initialState }) => { + console.log(initialState); + const fullscreen = initialState?.fullscreen; + + const defaultSettings = { + onPageChange: () => { + const { location } = history; + // 如果没有登录,重定向到 login + if (!initialState?.currentUser && location.pathname !== loginPath) { + history.push(loginPath); + } + }, + // 自定义 403 页面 + unAccessible: , + // 增加一个 loading 的状态 + childrenRender: (children) => { + return initialState?.loading ? ( + + ) : ( + + {children} + + ); + } + }; + + if (fullscreen) { + return { + ...initialState?.settings, + siderWidth: 0, + ...defaultSettings, + layout: 'side' + }; + } return { headerTitleRender: () => { // 重新对 title 的设置进行设置 @@ -135,25 +169,7 @@ export const layout: RunTimeLayoutConfig = ({ initialState }) => { theme === THEME.light || undefined ? 'rgba(0, 0, 0, 0.15)' : 'rgba(255, 255, 255, 0.15)' },*/ isChildrenLayout: true, - onPageChange: () => { - const { location } = history; - // 如果没有登录,重定向到 login - if (!initialState?.currentUser && location.pathname !== loginPath) { - history.push(loginPath); - } - }, - // 自定义 403 页面 - unAccessible: , - // 增加一个 loading 的状态 - childrenRender: (children) => { - return initialState?.loading ? ( - - ) : ( - - {children} - - ); - }, + ...defaultSettings, ...initialState?.settings }; }; diff --git a/dinky-web/src/components/CallBackButton/CircleBtn.tsx b/dinky-web/src/components/CallBackButton/CircleBtn.tsx index ab383b6a55..caa5c29308 100644 --- a/dinky-web/src/components/CallBackButton/CircleBtn.tsx +++ b/dinky-web/src/components/CallBackButton/CircleBtn.tsx @@ -16,7 +16,7 @@ * */ -import { TabsItemType } from '@/pages/DataStudio/model'; +import { TabsItemType } from '@/pages/DataStudio/types'; import { Button } from 'antd'; import React from 'react'; diff --git a/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx b/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx index bbb276a6b5..f181efac46 100644 --- a/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx +++ b/dinky-web/src/components/CustomEditor/CodeEdit/index.tsx @@ -141,7 +141,7 @@ const CodeEdit = (props: CodeEditFormProps) => { className={'editor-develop'} onMount={editorDidMount} onChange={onChange} - theme={theme ? theme : convertCodeEditTheme()} + theme={convertCodeEditTheme()} /> {showFloatButton && } diff --git a/dinky-web/src/components/CustomEditor/CodeShow/index.tsx b/dinky-web/src/components/CustomEditor/CodeShow/index.tsx index 2a5703dc13..1deda9f39d 100644 --- a/dinky-web/src/components/CustomEditor/CodeShow/index.tsx +++ b/dinky-web/src/components/CustomEditor/CodeShow/index.tsx @@ -242,7 +242,7 @@ const CodeShow = (props: CodeShowFormProps) => { } }} onMount={editorDidMount} - theme={theme ? theme : convertCodeEditTheme()} + theme={convertCodeEditTheme()} /> {/* float button */} diff --git a/dinky-web/src/global.less b/dinky-web/src/global.less index e216d1849d..894f5cc25e 100644 --- a/dinky-web/src/global.less +++ b/dinky-web/src/global.less @@ -399,6 +399,12 @@ h5 { scrollbar-width: thin; } +.editor-full-screen{ + .ant-tabs-tabpane{ + height: 100vh; + } +} + .data-studio-tabs { .ant-tabs-nav { .ant-tabs-nav-wrap { diff --git a/dinky-web/src/hooks/useEditor.tsx b/dinky-web/src/hooks/useEditor.tsx new file mode 100644 index 0000000000..2f3dc8654b --- /dev/null +++ b/dinky-web/src/hooks/useEditor.tsx @@ -0,0 +1,42 @@ +import { + createContext, + Dispatch, + FC, + memo, + SetStateAction, + useContext, + useEffect, + useState +} from 'react'; +import { flushSync } from 'react-dom'; +import { useModel } from 'umi'; +export interface FullScreenContextProps { + fullscreen: boolean; + setFullscreen: Dispatch>; +} + +export const FullScreenContext = createContext( + {} as FullScreenContextProps +); + +export const FullScreenProvider: FC = memo(({ children }) => { + const [fullscreen, setFullscreen] = useState(false); + + const { initialState, setInitialState } = useModel('@@initialState'); + + useEffect(() => { + flushSync(() => { + setInitialState((s) => ({ + ...s, + fullscreen + })); + }); + }, [fullscreen]); + return ( + + {children} + + ); +}); + +export const useEditor = () => useContext(FullScreenContext); diff --git a/dinky-web/src/pages/DataStudio/FooterContainer/index.tsx b/dinky-web/src/pages/DataStudio/FooterContainer/index.tsx index e783b0086a..8a204e6b48 100644 --- a/dinky-web/src/pages/DataStudio/FooterContainer/index.tsx +++ b/dinky-web/src/pages/DataStudio/FooterContainer/index.tsx @@ -20,7 +20,7 @@ import useThemeValue from '@/hooks/useThemeValue'; import JobRunningModal from '@/pages/DataStudio/FooterContainer/JobRunningModal'; import { getCurrentTab } from '@/pages/DataStudio/function'; -import { StateType, TabsPageType, VIEW } from '@/pages/DataStudio/model'; +import { StateType,TabsPageType,VIEW} from '@/pages/DataStudio/model'; import { getSseData } from '@/services/api'; import { l } from '@/utils/intl'; import { connect } from '@@/exports'; diff --git a/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx b/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx index 19098c325d..33887af2b1 100644 --- a/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx +++ b/dinky-web/src/pages/DataStudio/HeaderContainer/index.tsx @@ -196,8 +196,8 @@ const HeaderContainer = (props: any) => { const routes: ButtonRoute[] = [ // 保存按钮 icon { - hotKey: (e: KeyboardEvent) => e.ctrlKey && e.key === 's', - hotKeyDesc: 'Ctrl+S', + hotKey: (e: KeyboardEvent) => e.ctrlKey && e.key === 's' || e.metaKey && e.key === 's', + hotKeyDesc: 'Ctrl/Command +S', isShow: projectCommonShow(currentTab?.type), icon: , title: l('button.save'), @@ -216,6 +216,8 @@ const HeaderContainer = (props: any) => { { // 检查 sql按钮 icon: , + hotKey: (e: KeyboardEvent) => e.altKey && e.code === 'Digit2' || e.altKey && e.key === '@', + hotKeyDesc: 'Alt+2/@', title: l('pages.datastudio.editor.check'), click: () => showExplain(), isShow: projectCommonShow(currentTab?.type) diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/Editor/index.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/Editor/index.tsx index ca55e9407e..12664ae814 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/Editor/index.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/Editor/index.tsx @@ -28,12 +28,16 @@ import { } from '@/pages/DataStudio/model'; import { JOB_LIFE_CYCLE } from '@/pages/DevOps/constants'; import { API_CONSTANTS } from '@/services/endpoints'; +import { convertCodeEditTheme } from '@/utils/function'; import { l } from '@/utils/intl'; import { connect, useRequest } from '@@/exports'; +import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons'; import { Editor } from '@monaco-editor/react'; -import { Spin } from 'antd'; -import { editor } from 'monaco-editor'; +import { Button, Spin } from 'antd'; +import { editor, KeyCode, KeyMod } from 'monaco-editor'; import React, { useState } from 'react'; +import { format } from 'sql-formatter'; +import { useEditor } from '@/hooks/useEditor'; export type EditorProps = { taskId: number; @@ -48,6 +52,8 @@ const CodeEditor: React.FC = (props) => { const [isModalOpen, setIsModalOpen] = useState(false); const [diff, setDiff] = useState([]); + const { fullscreen, setFullscreen } = useEditor(); + const [editorIns, setEditorIns] = useState(null); const currentTab = getCurrentTab(panes, activeKey) as DataStudioTabsItemType; const currentData = currentTab.params.taskData; @@ -89,62 +95,105 @@ const CodeEditor: React.FC = (props) => { }; return ( - <> - - - { - editor.layout(); - editor.focus(); + +
+ + { + editor.layout(); + editor.focus(); - editor.onDidChangeCursorPosition((e) => { - props.footContainer.codePosition = [e.position.lineNumber, e.position.column]; - dispatch({ - type: STUDIO_MODEL.saveFooterValue, - payload: { ...props.footContainer } + editor.onDidChangeCursorPosition((e) => { + props.footContainer.codePosition = [e.position.lineNumber, e.position.column]; + dispatch({ + type: STUDIO_MODEL.saveFooterValue, + payload: { ...props.footContainer } + }); }); - }); - }} - onChange={(v) => { - if (!currentData || !currentTab) { - return; - } - if (typeof v === 'string') { - currentData.statement = v; - } - currentTab.isModified = true; - dispatch({ - type: STUDIO_MODEL.saveTabs, - payload: { ...props.tabs } - }); - }} - theme={'vs-dark'} - /> - + editor.addCommand(KeyMod.Alt | KeyCode.Digit3, () => { + editor?.trigger('anyString', 'editor.action.formatDocument'); + editor.setValue(format(editor.getValue())); + }); + setEditorIns(editor); + }} + onChange={(v) => { + if (!currentData || !currentTab) { + return; + } + if (typeof v === 'string') { + currentData.statement = v; + } + currentTab.isModified = true; + dispatch({ + type: STUDIO_MODEL.saveTabs, + payload: { ...props.tabs } + }); + }} + theme={convertCodeEditTheme()} + > +
+ {fullscreen ? ( +
+
+
); }; diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/KeyBoard/constant.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/KeyBoard/constant.tsx index 87e273f47c..aad7756ae9 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/KeyBoard/constant.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/KeyBoard/constant.tsx @@ -22,7 +22,7 @@ import { l } from '@/utils/intl'; export const KEY_BOARD_MIDDLE = [ { key: 'ctrls', - label: 'Ctrl + S', + label: 'Ctrl / Command + S', description: l('shortcut.key.save') }, { @@ -35,16 +35,16 @@ export const KEY_BOARD_MIDDLE = [ label: 'Alt + 3', description: l('shortcut.key.beautify') }, - { - key: 'f2', - label: 'F2', - description: l('shortcut.key.fullscreen') - }, - { - key: 'esc', - label: 'Esc', - description: l('shortcut.key.fullscreenClose') - } + // { + // key: 'f2', + // label: 'F2', + // description: l('shortcut.key.fullscreen') + // }, + // { + // key: 'esc', + // label: 'Esc', + // description: l('shortcut.key.fullscreenClose') + // } ]; export const KEY_BOARD_RIGHT_SLIDER = [ diff --git a/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx b/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx index 4eb1f8f599..438cbb15fc 100644 --- a/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx +++ b/dinky-web/src/pages/DataStudio/MiddleContainer/index.tsx @@ -16,6 +16,7 @@ */ import ContentScroll from '@/components/Scroll/ContentScroll'; +import { useEditor } from '@/hooks/useEditor'; import useThemeValue from '@/hooks/useThemeValue'; import { STUDIO_TAG_RIGHT_CONTEXT_MENU } from '@/pages/DataStudio/constants'; import { @@ -50,6 +51,9 @@ const MiddleContainer = (props: any) => { } = props; const themeValue = useThemeValue(); + + const {fullscreen} = useEditor(); + const [contextMenuPosition, setContextMenuPosition] = useState({}); const [contextMenuVisible, setContextMenuVisible] = useState(false); const [includeTab, setIncludeTab] = useState({}); @@ -248,7 +252,7 @@ const MiddleContainer = (props: any) => { ), children: ( - + {renderContent()} ) diff --git a/dinky-web/src/pages/DataStudio/index.tsx b/dinky-web/src/pages/DataStudio/index.tsx index 4e7925afda..7612d64a29 100644 --- a/dinky-web/src/pages/DataStudio/index.tsx +++ b/dinky-web/src/pages/DataStudio/index.tsx @@ -16,6 +16,7 @@ */ import { AuthorizedObject, useAccess } from '@/hooks/useAccess'; +import { FullScreenProvider, useEditor } from '@/hooks/useEditor'; import useThemeValue from '@/hooks/useThemeValue'; import BottomContainer from '@/pages/DataStudio/BottomContainer'; import FooterContainer from '@/pages/DataStudio/FooterContainer'; @@ -68,6 +69,8 @@ const DataStudio = (props: any) => { const persist = app._store.persist; const bottomHeight = bottomContainer.selectKey === '' ? 0 : bottomContainer.height; + const { fullscreen } = useEditor(); + const getClientSize = () => ({ width: document.documentElement.clientWidth, height: document.documentElement.clientHeight, @@ -197,49 +200,56 @@ const DataStudio = (props: any) => { ); return ( - - -
- - - -
- {LeftTopMenu} - {LeftBottomMenu} -
-
- - -
- - - + fullscreen ? ( + + ) : ( + + +
+ + + +
+ {LeftTopMenu} + {LeftBottomMenu} +
+
+ + +
+ + + + + +
+ {}
- -
- {} -
- - - {RightTopMenu} - - - {} -
- - + + + {RightTopMenu} + +
+ {} +
+
+
+ ) ); }; diff --git a/dinky-web/src/pages/DataStudio/route.tsx b/dinky-web/src/pages/DataStudio/route.tsx index 60e392a533..0c94b31ff6 100644 --- a/dinky-web/src/pages/DataStudio/route.tsx +++ b/dinky-web/src/pages/DataStudio/route.tsx @@ -32,6 +32,7 @@ import HistoryVersion from '@/pages/DataStudio/RightContainer/HistoryVersion'; import JobConfig from '@/pages/DataStudio/RightContainer/JobConfig'; import JobInfo from '@/pages/DataStudio/RightContainer/JobInfo'; import SavePoints from '@/pages/DataStudio/RightContainer/SavePoints'; +import { convertCodeEditTheme } from '@/utils/function'; import { l } from '@/utils/intl'; import { ApartmentOutlined, @@ -210,6 +211,7 @@ export const LeftBottomMoreTabs: { [c: string]: TabProp[] } = { } }} language={'text'} + theme={convertCodeEditTheme()} /> ) }, diff --git a/dinky-web/src/utils/function.tsx b/dinky-web/src/utils/function.tsx index a6e39aef77..180b33c47a 100644 --- a/dinky-web/src/utils/function.tsx +++ b/dinky-web/src/utils/function.tsx @@ -124,40 +124,41 @@ export function getLocalTheme(): string { * @constructor */ export function convertCodeEditTheme() { - /** - * user can define a new theme by calling the defineTheme method on the editor. - */ - editor.defineTheme(CODE_EDIT_THEME.VS_CUSTOME, { - base: 'vs', // 指定基础主题 , 可选值: 'vs', 'vs-dark', 'hc-black' , base theme - inherit: true, // 是否继承基础主题配置 , 默认为 true, is to inherit the base theme - // rules is an array of rules. The array must not be sparse (i.e. do not use holes). - rules: [ - { token: 'comment', foreground: '#008800', fontStyle: 'italic' }, - { token: 'keyword', foreground: '#064cff', fontStyle: 'bold' }, - { token: 'string', foreground: '#507dee' }, - { token: 'delimiter', foreground: '#041d81' }, - { - token: 'readonly', - foreground: '#e73a6e', - background: '#141414', - fontStyle: 'italic' - }, - { token: 'number', foreground: '#ffffff' } - ], - // colors is an object of color identifiers and their color values. - colors: { - 'editor.background': '#5d5b5b', // editor background color - 'editor.lineHighlightBackground': '#959cb6', // editor line highlight background color - 'editorLineNumber.foreground': '#ffffff', // editor line number color - 'editorCursor.foreground': '#ffffff', // editor cursor color - 'editorIndentGuide.background': '#ffffff', // editor indent guide color - 'editor.foreground': '#ffffff', // editor selection highlight border color - 'editor.selectionBackground': '#4ba1ef', // editor selection highlight color - 'editor.selectionHighlightBorder': '#4ba1ef', // editor selection highlight border color - 'editor.findMatchBackground': '#4ba1ef', // editor find match highlight color - 'editor.wordHighlightBackground': '#8bb2d2' // editor word highlight color - } - }); + + /** + * user can define a new theme by calling the defineTheme method on the editor. + */ + editor.defineTheme(CODE_EDIT_THEME.VS_CUSTOME, { + base: 'vs', // 指定基础主题 , 可选值: 'vs', 'vs-dark', 'hc-black' , base theme + inherit: true, // 是否继承基础主题配置 , 默认为 true, is to inherit the base theme + // rules is an array of rules. The array must not be sparse (i.e. do not use holes). + rules: [ + { token: 'comment', foreground: '#008800', fontStyle: 'italic' }, + { token: 'keyword', foreground: '#064cff', fontStyle: 'bold' }, + { token: 'string', foreground: '#507dee' }, + { token: 'delimiter', foreground: '#041d81' }, + { + token: 'readonly', + foreground: '#e73a6e', + background: '#141414', + fontStyle: 'italic' + }, + { token: 'number', foreground: '#ffffff' } + ], + // colors is an object of color identifiers and their color values. + colors: { + 'editor.background': '#2f2e2e', // editor background color + 'editor.lineHighlightBackground': '#959cb6', // editor line highlight background color + 'editorLineNumber.foreground': '#ffffff', // editor line number color + 'editorCursor.foreground': '#ffffff', // editor cursor color + 'editorIndentGuide.background': '#ffffff', // editor indent guide color + 'editor.foreground': '#ffffff', // editor selection highlight border color + 'editor.selectionBackground': '#4ba1ef', // editor selection highlight color + 'editor.selectionHighlightBorder': '#4ba1ef', // editor selection highlight border color + 'editor.findMatchBackground': '#4ba1ef', // editor find match highlight color + 'editor.wordHighlightBackground': '#8bb2d2' // editor word highlight color + } + }); const theme = getLocalTheme(); switch (theme) { diff --git a/script/sql/dinky-mysql.sql b/script/sql/dinky-mysql.sql index 8fb00a0ae1..3c477fb7ec 100644 --- a/script/sql/dinky-mysql.sql +++ b/script/sql/dinky-mysql.sql @@ -1047,7 +1047,7 @@ CREATE TABLE `dinky_metrics` ( `position` int(11) DEFAULT NULL COMMENT 'position', `show_type` varchar(255) DEFAULT NULL COMMENT 'show type', `show_size` varchar(255) DEFAULT NULL COMMENT 'show size', - `title` varchar(255) DEFAULT NULL COMMENT 'title', + `title` longtext DEFAULT NULL COMMENT 'title', `layout_name` varchar(255) DEFAULT NULL COMMENT 'layout name', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'create time', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'update time', diff --git a/script/sql/dinky-pg.sql b/script/sql/dinky-pg.sql index f21c383f51..2f4a3ecc80 100644 --- a/script/sql/dinky-pg.sql +++ b/script/sql/dinky-pg.sql @@ -1975,7 +1975,7 @@ CREATE TABLE "public"."dinky_metrics" ( "position" int4, "show_type" varchar(255) COLLATE "pg_catalog"."default", "show_size" varchar(255) COLLATE "pg_catalog"."default", - "title" varchar(255) COLLATE "pg_catalog"."default", + "title" text COLLATE "pg_catalog"."default", "layout_name" varchar(255) COLLATE "pg_catalog"."default", "create_time" timestamp(6) NOT null, "update_time" timestamp(6) NOT null, @@ -2441,4 +2441,4 @@ INSERT INTO public.dinky_alert_template VALUES (1, 'Default', ' [Go toTask Web](http://${taskUrl}) ', 1, null, null); -COMMIT; \ No newline at end of file +COMMIT;