(improvement)(headless)(chat) Add views and adapt chat and headless (#700)

* (improvement)(headless)(chat) Add views and adapt chat and headless

---------

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-01-30 20:43:53 +08:00
committed by GitHub
parent 31f8c1df35
commit 24b442baef
237 changed files with 3205 additions and 4479 deletions

View File

@@ -14,7 +14,7 @@ MERGE INTO s2_available_date_info(`id`,`item_id` ,`type` ,`date_format` ,`sta
values (3 , 3, 'dimension', 'yyyy-MM-dd', DATEADD('DAY', -28, CURRENT_DATE()), DATEADD('DAY', -1, CURRENT_DATE()), '[]', '2023-06-01', 'admin', '2023-06-01', 'admin');
MERGE INTO s2_view_info(`id`, `domain_id`, `type`, `config` ,`created_at` ,`created_by` ,`updated_at` ,`updated_by` )
MERGE INTO s2_canvas(`id`, `domain_id`, `type`, `config` ,`created_at` ,`created_by` ,`updated_at` ,`updated_by` )
values (1, 1, 'modelEdgeRelation', '[{"source":"datasource-1","target":"datasource-3","type":"polyline","id":"edge-0.305251275235679741702883718912","style":{"active":{"stroke":"rgb(95, 149, 255)","lineWidth":1},"selected":{"stroke":"rgb(95, 149, 255)","lineWidth":2,"shadowColor":"rgb(95, 149, 255)","shadowBlur":10,"text-shape":{"fontWeight":500}},"highlight":{"stroke":"rgb(95, 149, 255)","lineWidth":2,"text-shape":{"fontWeight":500}},"inactive":{"stroke":"rgb(234, 234, 234)","lineWidth":1},"disable":{"stroke":"rgb(245, 245, 245)","lineWidth":1},"stroke":"#296df3","endArrow":true},"startPoint":{"x":-94,"y":-137.5,"anchorIndex":0,"id":"-94|||-137.5"},"endPoint":{"x":-234,"y":-45,"anchorIndex":1,"id":"-234|||-45"},"sourceAnchor":2,"targetAnchor":1,"label":"模型关系编辑"},{"source":"datasource-1","target":"datasource-2","type":"polyline","id":"edge-0.466237264629309141702883756359","style":{"active":{"stroke":"rgb(95, 149, 255)","lineWidth":1},"selected":{"stroke":"rgb(95, 149, 255)","lineWidth":2,"shadowColor":"rgb(95, 149, 255)","shadowBlur":10,"text-shape":{"fontWeight":500}},"highlight":{"stroke":"rgb(95, 149, 255)","lineWidth":2,"text-shape":{"fontWeight":500}},"inactive":{"stroke":"rgb(234, 234, 234)","lineWidth":1},"disable":{"stroke":"rgb(245, 245, 245)","lineWidth":1},"stroke":"#296df3","endArrow":true},"startPoint":{"x":-12,"y":-137.5,"anchorIndex":1,"id":"-12|||-137.5"},"endPoint":{"x":85,"y":31.5,"anchorIndex":0,"id":"85|||31.5"},"sourceAnchor":1,"targetAnchor":2,"label":"模型关系编辑"}]', '2023-06-01', 'admin', '2023-06-01', 'admin');
-- sample data

View File

@@ -230,7 +230,7 @@ CREATE TABLE IF NOT EXISTS s2_model_rela
PRIMARY KEY (`id`)
);
create table IF NOT EXISTS s2_view_info
create table IF NOT EXISTS s2_canvas
(
id INT auto_increment,
domain_id INT null,
@@ -242,13 +242,14 @@ create table IF NOT EXISTS s2_view_info
updated_by varchar(100) not null,
PRIMARY KEY (`id`)
);
COMMENT ON TABLE s2_view_info IS 'view information table';
COMMENT ON TABLE s2_canvas IS 'view information table';
CREATE TABLE IF NOT EXISTS `s2_query_stat_info` (
`id` INT NOT NULL AUTO_INCREMENT,
`trace_id` varchar(200) DEFAULT NULL, -- query unique identifier
`model_id` INT DEFAULT NULL,
`view_id` INT DEFAULT NULL,
`user` varchar(200) DEFAULT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
`query_type` varchar(200) DEFAULT NULL, -- the corresponding scene
@@ -326,7 +327,7 @@ CREATE TABLE IF NOT EXISTS `s2_plugin`
(
`id` INT AUTO_INCREMENT,
`type` varchar(50) NULL,
`model` varchar(100) NULL,
`view` varchar(100) NULL,
`pattern` varchar(500) NULL,
`parse_mode` varchar(100) NULL,
`parse_mode_config` LONGVARCHAR NULL,
@@ -498,4 +499,23 @@ CREATE TABLE IF NOT EXISTS `s2_app` (
created_by VARCHAR(255),
updated_at TIMESTAMP,
updated_by VARCHAR(255)
);
CREATE TABLE IF NOT EXISTS `s2_view` (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
domain_id BIGINT,
`name` VARCHAR(255),
biz_name VARCHAR(255),
description VARCHAR(255),
status INT,
alias VARCHAR(255),
view_detail TEXT,
created_at TIMESTAMP,
created_by VARCHAR(255),
updated_at TIMESTAMP,
updated_by VARCHAR(255),
filter_sql VARCHAR(1000),
query_config VARCHAR(3000),
`admin` varchar(3000) DEFAULT NULL,
`admin_org` varchar(3000) DEFAULT NULL
);