mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-25 17:42:25 +01:00
updated configurable spider
This commit is contained in:
@@ -196,7 +196,7 @@ export default {
|
||||
}, 100)
|
||||
})
|
||||
},
|
||||
onRun () {
|
||||
onCrawl () {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
@@ -426,13 +426,19 @@ export default {
|
||||
})
|
||||
},
|
||||
isShowRun (row) {
|
||||
if (!row.deploy_ts) {
|
||||
return false
|
||||
if (this.isCustomized(row)) {
|
||||
// customized spider
|
||||
if (!row.deploy_ts) {
|
||||
return false
|
||||
}
|
||||
return !!row.cmd
|
||||
} else {
|
||||
// configurable spider
|
||||
return !!row.fields
|
||||
}
|
||||
if (!row.cmd) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
},
|
||||
isCustomized (row) {
|
||||
return row.type === 'customized'
|
||||
},
|
||||
fetchSiteSuggestions (keyword, callback) {
|
||||
this.$request.get('/sites', {
|
||||
|
||||
@@ -6,11 +6,13 @@
|
||||
<task-overview/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('Log')" name="log">
|
||||
<div class="log-view">
|
||||
<pre>
|
||||
{{taskLog}}
|
||||
</pre>
|
||||
</div>
|
||||
<el-card>
|
||||
<div class="log-view">
|
||||
<pre>
|
||||
{{taskLog}}
|
||||
</pre>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="$t('Results')" name="results">
|
||||
<general-table-view :data="taskResultsData"
|
||||
@@ -101,4 +103,15 @@ export default {
|
||||
.selector .el-select {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.log-view {
|
||||
margin: 20px;
|
||||
height: 640px;
|
||||
}
|
||||
|
||||
.log-view pre {
|
||||
height: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user