added setup.py

This commit is contained in:
Marvin Zhang
2019-03-03 10:48:04 +08:00
parent d26f43e09e
commit 8361c04de9
151 changed files with 21609 additions and 10 deletions

View File

@@ -0,0 +1,73 @@
<template>
<div class="deploy-table-view">
<el-row class="title-wrapper">
<h5 class="title">{{title}}</h5>
<el-button type="success" plain class="small-btn" size="mini" icon="fa fa-refresh" @click="onRefresh"></el-button>
</el-row>
<el-table border height="240px" :data="deployList">
<el-table-column property="version" label="Ver" width="40" align="center"></el-table-column>
<el-table-column property="node" label="Node" width="220" align="center">
<template slot-scope="scope">
<a class="a-tag" @click="onClickNode(scope.row)">{{scope.row.node_id}}</a>
</template>
</el-table-column>
<el-table-column property="spider_name" label="Spider" width="80" align="center">
<template slot-scope="scope">
<a class="a-tag" @click="onClickSpider(scope.row)">{{scope.row.spider_name}}</a>
</template>
</el-table-column>
<el-table-column property="finish_ts" label="Finish Time" width="auto" align="center"></el-table-column>
</el-table>
</div>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
name: 'DeployTableView',
props: {
title: String
},
computed: {
...mapState('spider', [
'spiderForm'
]),
...mapState('deploy', [
'deployList'
])
},
methods: {
onClickSpider (row) {
this.$router.push(`/spiders/${row.spider_id.$oid}`)
},
onClickNode (row) {
this.$router.push(`/nodes/${row.node_id}`)
},
onRefresh () {
this.$store.dispatch('deploy/getDeployList', this.spiderForm._id.$oid)
}
}
}
</script>
<style scoped>
.el-table .a-tag {
text-decoration: underline;
}
.title {
float: left;
margin: 10px 0 3px 0;
}
.small-btn {
float: right;
width: 24px;
margin: 0;
padding: 5px;
}
</style>

View File

@@ -0,0 +1,94 @@
<template>
<div class="task-table-view">
<el-row class="title-wrapper">
<h5 class="title">{{title}}</h5>
<el-button type="success" plain class="small-btn" size="mini" icon="fa fa-refresh" @click="onRefresh"></el-button>
</el-row>
<el-table border height="240px" :data="taskList">
<el-table-column property="node" label="Node" width="220" align="center">
<template slot-scope="scope">
<a class="a-tag" @click="onClickNode(scope.row)">{{scope.row.node_id}}</a>
</template>
</el-table-column>
<el-table-column property="spider_name" label="Spider" width="80" align="center">
<template slot-scope="scope">
<a class="a-tag" @click="onClickSpider(scope.row)">{{scope.row.spider_name}}</a>
</template>
</el-table-column>
<el-table-column label="Status"
align="center"
width="100">
<template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status === 'SUCCESS'">SUCCESS</el-tag>
<el-tag type="warning" v-else-if="scope.row.status === 'PENDING'">PENDING</el-tag>
<el-tag type="danger" v-else-if="scope.row.status === 'FAILURE'">FAILURE</el-tag>
<el-tag type="info" v-else>{{scope.row['status']}}</el-tag>
</template>
</el-table-column>
<!--<el-table-column property="create_ts" label="Create Time" width="auto" align="center"></el-table-column>-->
<el-table-column property="create_ts" label="Create Time" width="auto" align="center">
<template slot-scope="scope">
<a href="javascript:" class="a-tag" @click="onClickTask(scope.row)">{{scope.row.create_ts}}</a>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
mapState
} from 'vuex'
export default {
name: 'TaskTableView',
props: {
title: String
},
computed: {
...mapState('spider', [
'spiderForm'
]),
...mapState('task', [
'taskList'
])
},
methods: {
onClickSpider (row) {
this.$router.push(`/spiders/${row.spider_id.$oid}`)
},
onClickNode (row) {
this.$router.push(`/nodes/${row.node_id}`)
},
onClickTask (row) {
this.$router.push(`/tasks/${row._id}`)
},
onRefresh () {
this.$store.dispatch('spider/getTaskList', this.spiderForm._id.$oid)
}
}
}
</script>
<style scoped>
.task-table-view {
margin-bottom: 10px;
}
.el-table .a-tag {
text-decoration: underline;
}
.title {
margin: 10px 0 3px 0;
float: left;
}
.small-btn {
float: right;
width: 24px;
margin: 0;
padding: 5px;
}
</style>