diff --git a/CHANGELOG-zh.md b/CHANGELOG-zh.md index e0b5693f..14f2653c 100644 --- a/CHANGELOG-zh.md +++ b/CHANGELOG-zh.md @@ -1,3 +1,14 @@ +# 0.4.6 (未知) +### 功能 / 优化 +- **Node.js SDK **. 用户可以将 SDK 应用到他们的 Node.js 爬虫中. +- **日志管理优化**. 日志搜索,错误高亮,自动滚动. +- **任务执行流程优化**. 允许用户在触发任务后跳转到该任务详情页. +- **任务展示优化**. 在爬虫详情页的最近任务表格中加入了“参数”列. [#295](https://github.com/crawlab-team/crawlab/issues/295) + +### Bug 修复 +- **定时任务配置失去焦点**. [#519](https://github.com/crawlab-team/crawlab/issues/519) +- **无法用 CLI 工具上传爬虫**. [#524](https://github.com/crawlab-team/crawlab/issues/524) + # 0.4.5 (2020-02-03) ### 功能 / 优化 - **交互式教程**. 引导用户了解 Crawlab 的主要功能. diff --git a/CHANGELOG.md b/CHANGELOG.md index a4bf4fa4..5ec1e280 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# 0.4.6 (unkown) +### Features / Enhancement +- **SDK for Node.js**. Users can apply SDK in their Node.js spiders. +- **Log Management Optimization**. Log search, error highlight, auto-scrolling. +- **Task Execution Process Optimization**. Allow users to be redirected to task detail page after triggering a task. +- **Task Display Optimization**. Added "Param" in the Latest Tasks table in the spider detail page. [#295](https://github.com/crawlab-team/crawlab/issues/295) + +### Bug Fixes +- **Lost Focus in Schedule Configuration**. [#519](https://github.com/crawlab-team/crawlab/issues/519) +- **Unable to Upload Spider using CLI**. [#524](https://github.com/crawlab-team/crawlab/issues/524) + # 0.4.5 (2020-02-03) ### Features / Enhancement - **Interactive Tutorial**. Guide users through the main functionalities of Crawlab. diff --git a/frontend/src/components/ScrollView/LogItem.vue b/frontend/src/components/ScrollView/LogItem.vue index 4e679eef..1c82a7cb 100644 --- a/frontend/src/components/ScrollView/LogItem.vue +++ b/frontend/src/components/ScrollView/LogItem.vue @@ -1,9 +1,13 @@ @@ -29,10 +33,31 @@ export default { default: '' } }, + data () { + const token = ' :,.' + return { + errorRegex: new RegExp(`(?:[${token}]|^)((?:error|exception|traceback)s?)(?:[${token}]|$)`, 'gi') + // errorRegex: new RegExp('(error|exception|traceback)', 'gi') + } + }, computed: { dataHtml () { - if (!this.searchString) return this.data - return this.data.replace(new RegExp(`(${this.searchString})`, 'gi'), '$1') + let html = this.data.replace(this.errorRegex, ' $1 ') + if (!this.searchString) return html + html = html.replace(new RegExp(`(${this.searchString})`, 'gi'), '$1') + return html + }, + style () { + let color = '' + if (this.data.match(this.errorRegex)) { + color = '#F56C6C' + } + return { + color + } + }, + isLogEnd () { + return this.data === '###LOG_END###' } } } @@ -64,4 +89,18 @@ export default { word-break: break-word; flex-basis: calc(100% - 50px); } + + .loading-text { + animation: blink; + } + + @keyframes blink { + 0% { + opacity: 0; + } + + 100% { + opacity: 100%; + } + } diff --git a/frontend/src/components/ScrollView/LogView.vue b/frontend/src/components/ScrollView/LogView.vue index 4998917d..bfb4edec 100644 --- a/frontend/src/components/ScrollView/LogView.vue +++ b/frontend/src/components/ScrollView/LogView.vue @@ -1,30 +1,50 @@ diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js index 4ff4cd13..2dcb46d2 100644 --- a/frontend/src/i18n/zh.js +++ b/frontend/src/i18n/zh.js @@ -209,6 +209,8 @@ export default { 'Random': '随机', 'Selected Nodes': '指定节点', 'Search Log': '搜索日志', + 'Auto-Scroll': '自动滚动', + 'Updating log...': '正在更新日志...', // 任务列表 'Node': '节点',