diff --git a/Dockerfile.local b/Dockerfile.local
index 3957d154..ccc803d6 100644
--- a/Dockerfile.local
+++ b/Dockerfile.local
@@ -15,7 +15,7 @@ WORKDIR /app
# install frontend
RUN npm config set unsafe-perm true
-RUN npm install -g yarn && yarn install --registry=https://registry.npm.taobao.org # --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
+RUN npm install -g cnpm && cnpm install
RUN npm run build:prod
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 4ab95376..ec60d28b 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -35,32 +35,32 @@ export default {
},
methods: {},
async mounted () {
- window.setUseStats = (value) => {
- document.querySelector('.el-message__closeBtn').click()
- if (value === 1) {
- this.$st.sendPv('/allow_stats')
- this.$st.sendEv('全局', '允许/禁止统计', '允许')
- } else {
- this.$st.sendPv('/disallow_stats')
- this.$st.sendEv('全局', '允许/禁止统计', '禁止')
- }
- localStorage.setItem('useStats', value)
- }
+ // window.setUseStats = (value) => {
+ // document.querySelector('.el-message__closeBtn').click()
+ // if (value === 1) {
+ // this.$st.sendPv('/allow_stats')
+ // this.$st.sendEv('全局', '允许/禁止统计', '允许')
+ // } else {
+ // this.$st.sendPv('/disallow_stats')
+ // this.$st.sendEv('全局', '允许/禁止统计', '禁止')
+ // }
+ // localStorage.setItem('useStats', value)
+ // }
// first-time user
- if (this.useStats === undefined || this.useStats === null) {
- this.$message({
- type: 'info',
- dangerouslyUseHTMLString: true,
- showClose: true,
- duration: 0,
- message: '
' + this.$t('Do you allow us to collect some statistics to improve Crawlab?') + '
' +
- '' +
- '' +
- '' +
- '
'
- })
- }
+ // if (this.useStats === undefined || this.useStats === null) {
+ // this.$message({
+ // type: 'info',
+ // dangerouslyUseHTMLString: true,
+ // showClose: true,
+ // duration: 0,
+ // message: '' + this.$t('Do you allow us to collect some statistics to improve Crawlab?') + '
' +
+ // '' +
+ // '' +
+ // '' +
+ // '
'
+ // })
+ // }
// set uid if first visit
if (this.uid === undefined || this.uid === null) {
diff --git a/frontend/src/components/TableView/TaskTableView.vue b/frontend/src/components/TableView/TaskTableView.vue
index 56abfab8..54984e04 100644
--- a/frontend/src/components/TableView/TaskTableView.vue
+++ b/frontend/src/components/TableView/TaskTableView.vue
@@ -15,6 +15,11 @@
{{scope.row.spider_name}}
+
+
+ {{scope.row.param}}
+
+
{{scope.row.result_count}}
diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js
index 0a703620..c904a8bd 100644
--- a/frontend/src/i18n/zh.js
+++ b/frontend/src/i18n/zh.js
@@ -226,6 +226,7 @@ export default {
'Tags': '标签',
'Enter Tags': '输入标签',
'No Project': '无项目',
+ 'All Projects': '所有项目',
// 定时任务
'Schedule Name': '定时任务名称',
@@ -379,11 +380,13 @@ export default {
'DingTalk Robot Webhook': '钉钉机器人 Webhook',
'Wechat Robot Webhook': '微信机器人 Webhook',
'Password Settings': '密码设置',
- 'Notify Settings': '通知设置',
+ 'Notifications': '消息通知',
'Global Variable': '全局变量',
'Add Global Variable': '新增全局变量',
'Are you sure to delete this global variable': '确定删除该全局变量?',
'Key': '设置',
+ 'Allow Sending Statistics': '允许发送统计信息',
+ 'General': '通用',
// 其他
tagsView: {
diff --git a/frontend/src/views/doc/Disclaimer.vue b/frontend/src/views/doc/Disclaimer.vue
index 3c7f4c78..b05f8e96 100644
--- a/frontend/src/views/doc/Disclaimer.vue
+++ b/frontend/src/views/doc/Disclaimer.vue
@@ -54,7 +54,7 @@ This Disclaimer and privacy protection statement (hereinafter referred to as "di
2. 本产品是基于Golang的分布式爬虫管理平台,支持Python、NodeJS、Go、Java、PHP等多种编程语言以及多种爬虫框架。
3. 一切因使用 Crawlab 而引致之任何意外、疏忽、合约毁坏、诽谤、版权或知识产权侵犯及其所造成的损失(包括在非官方站点下载 Crawlab 而感染电脑病毒),Crawlab 开发组概不负责,亦不承担任何法律责任。
4. 用户对使用 Crawlab 自行承担风险,我们不做任何形式的保证, 因网络状况、通讯线路等任何技术原因而导致用户不能正常升级更新,我们也不承担任何法律责任。
-5. 用户使用 Crawlab 对目标网站进行抓取时需遵从《网络安全法》等与爬虫相关的法律法规,切勿擅自采集公民个人信息、用 DDoS 等方式造成目标网站瘫痪、不遵从目标网站的 robots.txt 协议等非法手段。
+5. 用户使用 Crawlab 对目标网站进行抓取时需遵从[《网络安全法》](https://baike.baidu.com/item/中华人民共和国网络安全法)等与爬虫相关的法律法规,切勿擅自采集公民个人信息、用 DDoS 等方式造成目标网站瘫痪、不遵从目标网站的 [robots.txt 协议](https://baike.baidu.com/item/robots协议)等非法手段。
6. Crawlab 尊重并保护所有用户的个人隐私权,不会窃取任何用户计算机中的信息。
7. 系统的版权:Crawlab 开发组对所有开发的或合作开发的产品拥有知识产权,著作权,版权和使用权,这些产品受到适用的知识产权、版权、商标、服务商标、专利或其他法律的保护。
8. 传播:任何公司或个人在网络上发布,传播我们软件的行为都是允许的,但因公司或个人传播软件可能造成的任何法律和刑事事件 Crawlab 开发组不负任何责任。
@@ -68,4 +68,19 @@ This Disclaimer and privacy protection statement (hereinafter referred to as "di
.disclaimer >>> ol li {
margin: 10px 0;
}
+
+ .disclaimer >>> a {
+ color: #409EFF;
+ }
+
+ .disclaimer >>> a:hover {
+ text-decoration: underline;
+ }
+
+ .disclaimer .el-card {
+ line-height: 1.5;
+ max-width: 700px;
+ margin-left: calc(50% - 450px);
+ min-height: calc(100vh - 130px);
+ }
diff --git a/frontend/src/views/schedule/ScheduleList.vue b/frontend/src/views/schedule/ScheduleList.vue
index f200f6bf..3b0d85da 100644
--- a/frontend/src/views/schedule/ScheduleList.vue
+++ b/frontend/src/views/schedule/ScheduleList.vue
@@ -84,7 +84,7 @@
-
+
@@ -94,8 +94,6 @@
ref="cron"
v-model="scheduleForm.cron"
:placeholder="`${$t('[minute] [hour] [day] [month] [day of week]')}`"
- @focus="isShowCron = true"
- @blur="isShowCron = false"
>
diff --git a/frontend/src/views/setting/Setting.vue b/frontend/src/views/setting/Setting.vue
index fb74d41c..73ff9260 100644
--- a/frontend/src/views/setting/Setting.vue
+++ b/frontend/src/views/setting/Setting.vue
@@ -32,7 +32,7 @@
-
+
@@ -41,6 +41,14 @@
+
+
+
@@ -50,7 +58,7 @@
-
+
@@ -165,7 +173,7 @@ export default {
'setting.wechat_robot_webhook': [{ trigger: 'blur', validator: validateWechatRobotWebhook }]
},
isShowDingTalkAppSecret: false,
- activeName: 'password',
+ activeName: 'general',
addDialogVisible: false,
tourSteps: [
{
@@ -204,7 +212,8 @@ export default {
}
this.$utils.tour.nextStep('setting', currentStep)
}
- }
+ },
+ isAllowSendingStatistics: localStorage.getItem('useStats') === '1'
}
},
computed: {
@@ -271,6 +280,17 @@ export default {
this.$st.sendEv('设置', '保存')
},
tabActiveHandle () {
+ },
+ onAllowSendingStatisticsChange (value) {
+ if (value) {
+ this.$st.sendPv('/allow_stats')
+ this.$st.sendEv('全局', '允许/禁止统计', '允许')
+ } else {
+ this.$st.sendPv('/disallow_stats')
+ this.$st.sendEv('全局', '允许/禁止统计', '禁止')
+ }
+ this.$message.success(this.$t('Saved successfully'))
+ localStorage.setItem('useStats', value ? '1' : '0')
}
},
async created () {