|
1 | | -## 目录结构 |
2 | | -``` |
3 | | -app |
4 | | -├── assets |
5 | | -│ ├── iconfont // 字体文件,图标 |
6 | | -│ ├── images // views用到的图片 |
7 | | -│ └── styles // 样式 |
8 | | -│ ├── variables.scss // 定义样式变量,保证页面的统一风格 |
9 | | -│ ├── iconfont.scss // 图标样式 |
10 | | -│ ├── app.scss // 整理布局、公共样式 |
11 | | -│ └── xxx.scss // 路由(views目录下)页面的样式 |
12 | | -├── js |
13 | | -│ ├── component // 组件:不能包含业务逻辑 |
14 | | -│ │ ├── index.js // 组件库入口,插件化写法,组件命令为we-xxx |
15 | | -│ │ └── xxx // 组件xxx |
16 | | -│ │ ├── index.js // 组件xxx的入口文件 |
17 | | -│ │ ├── index.vue // 组件xxx的vue文件 |
18 | | -│ │ └── index.scss // 组件xxx的样式,需@import(variables.scss) |
19 | | -│ ├── helper // 类似工具函数,跟业务逻辑没啥关系,比工具函数大一点 |
20 | | -│ ├── module // 模块 |
21 | | -│ │ ├── index.js // 模块入口文件 |
22 | | -│ │ ├── moduleMixin.js // 模块配置文件处理、模块间通讯核心逻辑 |
23 | | -│ │ └── xxx // 模块xxx |
24 | | -│ │ ├── index.js // 模块xxx的配置 |
25 | | -│ │ ├── index.vue // 模块xxx的vue文件 |
26 | | -│ │ └── index.scss // 模块xxx的样式,需@import(variables.scss) |
27 | | -│ ├── service // 服务 |
28 | | -│ │ ├── db // 包含各种写IndexDB的逻辑 |
29 | | -│ │ ├── api.js // 访问接口的ajax封装 |
30 | | -│ │ ├── mixin.js // 全局的mixin |
31 | | -│ │ ├── router.js // 路由配置 |
32 | | -│ │ └── router.js // socket封装 |
33 | | -│ ├── utils // 工具函数 |
34 | | -│ ├── view // 页面视图 |
35 | | -│ │ ├── app.vue // 根路由视图 |
36 | | -│ │ ├── layout.vue // 登录进去的页面的路由视图 |
37 | | -│ │ ├── xxx.vue // xxx页面 |
38 | | -│ │ ├── router.js // 路由配置 |
39 | | -│ │ └── router.js // socket封装 |
40 | | -│ └── app.js // webpack入口文件 |
41 | | -├── tpls |
42 | | -│ └── index.html // 入口html模板 |
43 | | -├── mumble.json // CLI工具mn2的配置文件 |
44 | | -├── webpack.base.js // webpack的基础配置 |
45 | | -├── webpack.dev.js // 执行`mn2 dev`命令的webpack配置 |
46 | | -└── webpack.prod.js // 执行`mn2 gen`命令的webpack配置 |
47 | | -``` |
48 | | -## 模块 |
49 | | -模块应该是独立的,跟外界无耦合的。内部由业务组件和UI组件组成,组件之间共享统一状态容器。模块和模块之间通过事件机制来交互。 |
| 1 | +## Introduction |
50 | 2 |
|
51 | | -### 配置 |
52 | | -```js |
53 | | -// import index from './index.vue'; |
54 | | -export default { |
55 | | - // 模块名称 |
56 | | - name: 'Demo', |
57 | | - // 规范模块监测什么事件,或者说模块对外提供什么接口 |
58 | | - events: ['Demo:add'], |
59 | | - // 规范模块能够触发其他模块什么事件或者说调用其他模块什么接口 |
60 | | - dispatchs: ['OtherModule:add', 'OtherModule:delete'], |
61 | | - // 规范模块的动作,由外部调用或者自己执行 |
62 | | - methods: { |
63 | | - showTree(arg, cb) { |
64 | | - console.log(arg); |
65 | | - }, |
66 | | - }, |
67 | | - // 模块内部组件统一的状态容器 |
68 | | - data() { |
69 | | - return {}; |
70 | | - }, |
71 | | - // 规范模块对外提供的组件 |
72 | | - components: { |
73 | | - index: () => import('./index.vue'), |
74 | | - }, |
75 | | -}; |
76 | | -``` |
| 3 | +Scriptest is an interactive tool for data exploration and analysis, designed to make it easy for user to utilize compute engines like Spark, Hive and TiSpark. It provides graphically-enhanced interface which enable users to better conduct data analysis and exploitation. |
77 | 4 |
|
78 | | -### 规范 |
79 | | -1. 模块首字母大写 |
80 | | -2. event定义的事件名称必须是 模块名:事件名 |
81 | | -3. index.scss需@import(variables.scss),保证风格的统一 |
82 | | -4. 模块不能依赖其他模块,只能使用this.dispatch调用其他模块接口 |
| 5 | +## Features |
83 | 6 |
|
84 | | -### events 和 methods 的差别 |
85 | | -events里面定义的事件是在模块里的组件created时才加入监听者队列,而methods定义的事件是js被加载就会加入监听者队列。methods里面提供的接口,应该是跟视图无关的,大多是请求数据。 |
| 7 | +* Script editor: Support multi-language, auto-completion, syntax highlighting and SQL syntax error-correction. |
86 | 8 |
|
| 9 | +* Compute engines: Based on willink, Scriptest allows you use multiple compute engines such as Spark, Hive, TiSpark, etc. |
| 10 | +* Runtime function: Capable of displaying the life cycle of jobs and make intelligent diagnosis. |
| 11 | +* Result set: Can be more than one. Allow custom alias and one-click publishing to report system. |
| 12 | +* Database Services: Provide an integrated solution for data management. Files(CVS, Excel) can be easily import to and export from tables. |
| 13 | +* Context: UDF, custom variables along with function management and sharing. |
| 14 | +* Console: Allow users feel free to set parameters of engines. Job management, session management and resource management are also provided. |
87 | 15 |
|
88 | | -## 页面 |
89 | | -模块和ui组件组装起来就是页面,需要在router中添加路由配置 |
| 16 | +## QuickStart |
90 | 17 |
|
91 | | -### 规范 |
92 | | -1. 页面的根dom样式为xxx-page |
93 | | -2. index.scss需@import(variables.scss),保证风格的统一 |
| 18 | +Read the Quick Start. |
94 | 19 |
|
| 20 | +## Architecture |
| 21 | + |
| 22 | +Based on the core technology of willink, multiple compute engines are available on Scriptest. |
| 23 | + |
| 24 | +## Community |
| 25 | + |
| 26 | +## License |
| 27 | + |
| 28 | +[Scriptest is under the Apache 2.0 license. See the LICENCSEN file for details]((http://www.apache.org/licenses/LICENSE-2.0)) |
0 commit comments