diff --git a/frontend/src/i18n/zh.js b/frontend/src/i18n/zh.js
index e33bfa83..17a0df1e 100644
--- a/frontend/src/i18n/zh.js
+++ b/frontend/src/i18n/zh.js
@@ -140,7 +140,8 @@ export default {
'Select Category': '请选择类别',
'Spider Count': '爬虫数',
'Robots Protocol': 'Robots 协议',
- 'Home Page Response Time': '首页响应时间(秒)',
+ 'Home Page Response Time (sec)': '首页响应时间(秒)',
+ 'Home Page Response Status Code': '首页响应状态码',
// 文件
'Choose Folder': '选择文件',
diff --git a/frontend/src/views/site/SiteList.vue b/frontend/src/views/site/SiteList.vue
index 4453b782..7cf3e936 100644
--- a/frontend/src/views/site/SiteList.vue
+++ b/frontend/src/views/site/SiteList.vue
@@ -53,6 +53,24 @@
+
+
+
+
+
+
+
+ {{scope.row[col.name] ? scope.row[col.name].toFixed(0) : 'N/A'}}
+
+
-
+
@@ -144,7 +171,8 @@ export default {
{ name: 'category', label: 'Category', align: 'center', width: '180' },
{ name: 'spider_count', label: 'Spider Count', align: 'center', width: '60' },
{ name: 'has_robots', label: 'Robots Protocol', align: 'center', width: '65' },
- { name: 'home_response_time', label: 'Home Page Response Time', align: 'right', width: '80' }
+ { name: 'home_response_time', label: 'Home Page Response Time (sec)', align: 'right', width: '80' },
+ { name: 'home_http_status', label: 'Home Page Response Status Code', align: 'right', width: '80' }
]
}
},
@@ -216,11 +244,30 @@ export default {
} else {
cls.push('danger')
}
+ } else if (columnIndex === this.getColumnIndex('home_http_status')) {
+ cls.push('status')
+ if (row.home_http_status === undefined) {
+ cls.push('info')
+ } else if (row.home_http_status === 200) {
+ cls.push('success')
+ } else {
+ cls.push('danger')
+ }
+ } else if (columnIndex === this.getColumnIndex('spider_count')) {
+ cls.push('status')
+ if (row.spider_count > 0) {
+ cls.push('success')
+ } else {
+ cls.push('info')
+ }
}
return cls.join(' ')
},
getColumnIndex (columnName) {
return this.columns.map(d => d.name).indexOf(columnName)
+ },
+ goToSpiders (domain) {
+ this.$router.push({ name: 'SpiderList', params: { domain } })
}
},
created () {
@@ -292,6 +339,7 @@ export default {
}
.table >>> a {
+ text-decoration: underline;
display: inline-block;
width: 100%;
height: 100%;
diff --git a/frontend/src/views/spider/SpiderList.vue b/frontend/src/views/spider/SpiderList.vue
index 874dcc0b..3e0b4121 100644
--- a/frontend/src/views/spider/SpiderList.vue
+++ b/frontend/src/views/spider/SpiderList.vue
@@ -328,6 +328,9 @@ export default {
},
created () {
this.$store.dispatch('spider/getSpiderList')
+ },
+ mounted () {
+ console.log(this.$route.params.domain)
}
}