summaryrefslogtreecommitdiffstats
path: root/test-scheduler/ui/src/App.vue
diff options
context:
space:
mode:
authorLeoQi <QibinZheng2014@tongji.edu.cn>2018-09-20 09:38:01 +0800
committerLeoQi <QibinZheng2014@tongji.edu.cn>2018-09-20 13:50:35 +0800
commit399ec2f328f56c1f81c454ecedfb6b99eaf93c42 (patch)
tree6e7062c5cf9a387d7e98c4cee628d756db6f7e3f /test-scheduler/ui/src/App.vue
parent27d82af1145673330eddbe80eb39c47d93322cbe (diff)
fix testsuite name bugs and improve some ui details
JIRA: BOTTLENECK-247 fix the bug where the testsuite name contains Chinese characters. add license header automatically when a testcase created. ui improvements: workflow panel only turns up when a testcase executes. add grafana pages in the webpage 'Test Result'. add the highlight effect on the navigation item. Change-Id: If0ddf82fd4630128f2c4dd7fdde30f037e5bfba7 Signed-off-by: LeoQi <QibinZheng2014@tongji.edu.cn>
Diffstat (limited to 'test-scheduler/ui/src/App.vue')
-rw-r--r--test-scheduler/ui/src/App.vue34
1 files changed, 29 insertions, 5 deletions
diff --git a/test-scheduler/ui/src/App.vue b/test-scheduler/ui/src/App.vue
index c432a12d..0b77aa63 100644
--- a/test-scheduler/ui/src/App.vue
+++ b/test-scheduler/ui/src/App.vue
@@ -3,10 +3,10 @@
<div class="row border-bottom blue-bg my-page-header">
<p id="title">OPNFV Bottlenecks Portal</p>
<ul id="intr_table" class="nav navbar-nav">
- <li><router-link to="/">Test Suites</router-link></li>
- <li><router-link to="/result">Test Results</router-link></li>
- <li><router-link to="/report">Reports</router-link></li>
- <li><router-link to="/environment">Environments</router-link></li>
+ <li v-bind:class="{'router-link-active': cur_route == '/'}"><router-link to="/">Test Suites</router-link></li>
+ <li v-bind:class="{'router-link-active': cur_route == 'result'}"><router-link to="/result">Test Results</router-link></li>
+ <li v-bind:class="{'router-link-active': cur_route == 'report'}"><router-link to="/report">Reports</router-link></li>
+ <li v-bind:class="{'router-link-active': cur_route == 'environment'}"><router-link to="/environment">Environments</router-link></li>
</ul>
</div>
<router-view/>
@@ -14,6 +14,30 @@
</template>
<script>
export default {
- name: 'App'
+ name: 'App',
+ data: function() {
+ return {
+ cur_route: ''
+ }
+ },
+ watch: {
+ '$route': function() {
+ this.highlightLink();
+ }
+ },
+ mounted: function() {
+ this.highlightLink();
+ },
+ methods: {
+ highlightLink: function() {
+ var name = this.$route.name;
+ if(name == 'result' || name == 'report' || name == 'environment') {
+ this.cur_route = name;
+ } else {
+ this.cur_route = '/';
+ }
+ }
+ }
}
</script>
+