om-module-data-source
v1.1.6
Published
`om-module-data-source` 模块提供了一系列与数据源操作相关的页面组件,方便在项目中进行数据源的列表展示、详情查看、新增和编辑等操作。
Readme
om-module-data-source 模块
om-module-data-source 模块提供了一系列与数据源操作相关的页面组件,方便在项目中进行数据源的列表展示、详情查看、新增和编辑等操作。
页面组件介绍
1. DataSourceList 列表页
用于展示数据源列表,可在对应路由下使用。 path: 路由公共路径,可以不传 默认为/ingestion/datasource。
import { DataSourceList } from 'om-module-data-source';
export default <DataSourceList path={path} />;2. DataSourceDetail 详情页
在对应路由下使用
import { DataSourceDetail } from 'om-module-data-source';
export default <DataSourceDetail path={path} />;3. DataSourceCreate 新增页
在对应路由下使用
import { DataSourceCreate } from 'om-module-data-source';
export default <DataSourceCreate path={path} />;4. DataSourceEdit 编辑页
在对应路由下使用
import { DataSourceEdit } from 'om-module-data-source';
export default <DataSourceEdit />;路由配置
在项目的路由配置中,需要添加与数据源相关的路由配置。例如:
[
{
name: '添加新数据源',
path: '/ingestion/datasource/create',
component: AddDataSource,
hide: true,
exact: true
},
{
name: '编辑连接',
path: '/ingestion/datasource/edit/:serviceName',
component: EditDataSource,
hide: true,
exact: true
},
{
name: '数据源详情',
path: '/ingestion/datasource/:serviceName',
component: DataSourceDetail,
hide: true
},
{
name: '数据源',
path: '/ingestion/datasource',
component: DataSourceList
}
]