Skip to content

Commit

Permalink
change padding style & copywriter (#4)
Browse files Browse the repository at this point in the history
* change padding style

* change version
  • Loading branch information
AddisonGao authored Jan 9, 2019
1 parent 1c3d450 commit 2e36d4f
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 99 deletions.
2 changes: 1 addition & 1 deletion lyrebird_tracking/report_template/components/filter-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Vue.component(
this.grouplist = this.changeGroupCache;
this.$emit("filterchange", this.grouplist);
this.$Notice.success({
title: "Change Filter Success :-D "
title: "Change Filter Success"
});
},
activatedDataChange: function(val) {
Expand Down
31 changes: 7 additions & 24 deletions lyrebird_tracking/static/component/banner.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
<template>
<div class="box box-solid">
<div class="box-body">
<div class="row">
<div class="col-lg-6">
<!-- <label class="btn btn-primary btn-file" style="backgroud-color:#1874CD;">
Import<input id="load-file" type="file" name="filer_key_file" @change="upload">
</label> -->
<button class="btn btn-warning" @click="clearResult">Clear</button>
<button class="btn btn-info" @click="saveReport">Save Report</button>
</div><!-- /.col-lg-6 -->
<!-- <div class="col-lg-2">
<div class="input-group">
<input v-model="targetContext" type="text" class="form-control input-sm" placeholder="Search..." @keyup.enter="popTargetContext(targetContext)">
<span class="input-group-btn">
<button class="btn btn-primary btn-sm" type="button" @click="popTargetContext(targetContext)">Search</button>
</span>
</div>
</div> -->
</div>
</div>
</div>
<Card :padding="5">
<button class="btn btn-warning" @click="clearResult">Clear</button>
<button class="btn btn-info" @click="saveReport">Save Report</button>
</Card>
</template>

<script>
Expand All @@ -39,17 +22,17 @@ module.exports = {
.then(response=>{
console.log('Clear statistics list!');
this.$Notice.success({
title: "Clear Success :)"
title: "Clear Success"
});
})
},
saveReport: function() {
this.$http.get('/ui/plugin/tracking/report')
.then(response=>{
this.$Notice.success({
title: "Save Success :-D",
title: "Save Success",
render: h => {
return h('span', {style:{wordBreak:'break-all'}},'Save Report at \n "~/.lyrebird/plugins/lyrebird_tracking/report"')
return h('span', {style:{wordBreak:'break-all'}},'Save to \n "~/.lyrebird/plugins/lyrebird_tracking/report"')
}
});
})
Expand Down
2 changes: 1 addition & 1 deletion lyrebird_tracking/static/component/filter-tag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module.exports = {
this.grouplist = this.changeGroupCache;
this.$emit("filterchange", this.grouplist);
this.$Notice.success({
title: "Change Filter Success :-D "
title: "Change Filter Success"
});
},
activatedDataChange: function(val) {
Expand Down
34 changes: 24 additions & 10 deletions lyrebird_tracking/static/component/main.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<template>
<div>
<banner></banner>
<div class="row">
<div class="col-md-6">
<tracking-list :trackingdata="allTrackingData" @detail="getTrackingIndex" @content="getCurrentContent"></tracking-list>
</div>
<div class="col-md-6" v-if="currentTracking">
<tracking-detail :trackingdetail="currentTracking" :trackingindex="currentIndex" :currentcontent="currentContent" :codedetail="codedetail"></tracking-detail>
</div>
</div>
<Row class="button-bar">
<banner></banner>
</Row>
<Row>
<i-col span="12">
<tracking-list :trackingdata="allTrackingData" @detail="getTrackingIndex" @content="getCurrentContent" class="tracking-left"></tracking-list>
</i-col>
<i-col span="12" v-if="currentTracking">
<tracking-detail :trackingdetail="currentTracking" :trackingindex="currentIndex" :currentcontent="currentContent" :codedetail="codedetail" class="tracking-right"></tracking-detail>
</i-col>
</Row>
</div>
</template>

Expand Down Expand Up @@ -75,5 +77,17 @@ module.exports = {
};
</script>

<style>
<style scoped>
.button-bar {
margin-bottom: 5px;
height: 48px;
}
.tracking-left {
margin-right: 5px;
}
.tracking-right {
margin-left: 5px;
}
</style>
106 changes: 49 additions & 57 deletions lyrebird_tracking/static/component/tracking-detail.vue
Original file line number Diff line number Diff line change
@@ -1,61 +1,49 @@
<template>
<div class="box box-solid">
<div class="box-header">
<div class="pull-left">
<!-- <span class="badge bg-yellow">Index: {{trackingdetail.index}}</span> -->
<!-- <a class="btn btn-warning btn-flat btn-xs"><b>Index: {{trackingindex}}</b></a> -->
<font style="font-size: 16px; font-weight: bold; color: rgb(70, 76, 91);">Detail</font>
</div>
</div>
<div class="box-body">
<el-collapse v-model="activeNames">
<el-collapse-item v-for="item in currentcontent.asserts" :key="item.field">
<template slot="title" v-if="item.flag===true">
<i class="header-icon el-icon-circle-check-outline"></i>
<font color="LimeGreen">Check field - {{item.field}} </font>
</template>
<!-- 没有预期值或未测试的埋点信息,展示问号样式 -->
<template slot="title" v-else-if="item.flag===2||typeof(item.flag) == 'undefined'">
<i class="header-icon el-icon-question"></i>
<font color="CornflowerBlue">Check field - {{item.field}} </font>
</template>
<template slot="title" v-else>
<i class="header-icon el-icon-circle-close-outline"></i>
<font color="red">Check field - {{item.field}} </font>
</template>
<div>
<!-- 没有期望值-展示文案提示 -->
<li>Field : {{item.field}}</li>
<li v-if="JSON.stringify(item.schema)=='{}'">Expect schema :
No expected value
</li>
<!-- 未测试过场景-展示NA -->
<!-- <li v-else-if="item.schema">Expect schema :
<div v-html="jsoninfo(item.schema)"></div>
</li> -->
<!-- 测试过场景-取expect参数 -->
<li v-else>Expect schema :
<div v-html="jsoninfo(item.schema)"></div>
</li>
<li>Actual value :
<div v-if="item.actual" v-html="jsoninfo(item.actual)"></div>
<!-- 未测试过场景-实际值不存在展示NA -->
<div v-else v-html="jsoninfo('N/A')"></div>
</li>
</div>
</el-collapse-item>
<el-collapse-item name="1">
<template slot="title">
<i class="el-icon-document"></i> Content
</template>
<!-- <div class="box-body">
<div v-html="infoContaint"></div>
</div> -->
<div id="container" style="height:500px;border:1px solid grey"></div>
</el-collapse-item>
</el-collapse>
</div>
</div>
<Card>
<div class="tracking-detail">
<font style="font-size: 16px; font-weight: bold; color: rgb(70, 76, 91);">Detail</font>
<br/>
<br/>
<el-collapse v-model="activeNames">
<el-collapse-item v-for="item in currentcontent.asserts" :key="item.field">
<template slot="title" v-if="item.flag===true">
<i class="header-icon el-icon-circle-check-outline"></i>
<font color="LimeGreen">Check field - {{item.field}} </font>
</template>
<!-- 没有预期值或未测试的埋点信息,展示问号样式 -->
<template slot="title" v-else-if="item.flag===2||typeof(item.flag) == 'undefined'">
<i class="header-icon el-icon-question"></i>
<font color="CornflowerBlue">Check field - {{item.field}} </font>
</template>
<template slot="title" v-else>
<i class="header-icon el-icon-circle-close-outline"></i>
<font color="red">Check field - {{item.field}} </font>
</template>
<div>
<!-- 没有期望值-展示文案提示 -->
<li>Field : {{item.field}}</li>
<li v-if="JSON.stringify(item.schema)=='{}'">Expect schema :
No expected value
</li>
<!-- 未测试过场景-展示NA -->
<!-- <li v-else-if="item.schema">Expect schema :
<div v-html="jsoninfo(item.schema)"></div>
</li> -->
<!-- 测试过场景-取expect参数 -->
<li v-else>Expect schema :
<div v-html="jsoninfo(item.schema)"></div>
</li>
<li>Actual value :
<div v-if="item.actual" v-html="jsoninfo(item.actual)"></div>
<!-- 未测试过场景-实际值不存在展示NA -->
<div v-else v-html="jsoninfo('N/A')"></div>
</li>
</div>
</el-collapse-item>
</el-collapse>
<div id="container" style="height:500px;border:1px solid grey"></div>
</div>
</Card>
</template>

<script>
Expand Down Expand Up @@ -201,4 +189,8 @@ module.exports = {
.infoContentClass {
background: lightblue;
}
.tracking-detail {
height: calc(100vh - 80px);
overflow-y: auto;
}
</style>
23 changes: 18 additions & 5 deletions lyrebird_tracking/static/component/tracking-list.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<card>
<Card>
<div class="tracking-list">
<filter-tag @filterchange="filterList"></filter-tag>
<br/>
<div style="max-height: 550px; overflow-y: auto;">
<i-table highlight-row :columns="columns" :data="displayedData" @on-row-click="handleRowSelect"></i-table>
</div>
<!-- <div style="max-height: 550px; overflow-y: auto;"> -->
<i-table highlight-row :columns="columns" :data="displayedData" @on-row-click="handleRowSelect" class="data-table"></i-table>
<!-- </div> -->
</div>
</card>
</Card>
</template>

<script>
Expand Down Expand Up @@ -137,4 +137,17 @@ module.exports = {
</script>

<style>
.data-table th div{
padding-left: 5px;
padding-right: 5px;
}
.data-table td div{
padding-left: 5px;
padding-right: 5px;
}
.tracking-list {
height: calc(100vh - 80px);
overflow-y: auto;
}
</style>
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name='lyrebird-tracking',
version='0.10.1',
version='0.10.2',
packages=['lyrebird_tracking'],
url='https://github.com/meituan/lyrebird-tracking',
author='HBQA',
Expand Down

0 comments on commit 2e36d4f

Please sign in to comment.