1<!--
2  Copyright (c) 2021 Huawei Device Co., Ltd.
3  Licensed under the Apache License, Version 2.0 (the "License");
4  you may not use this file except in compliance with the License.
5  You may obtain a copy of the License at
6
7      http://www.apache.org/licenses/LICENSE-2.0
8
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14-->
15<!DOCTYPE html>
16<html lang="en">
17<head>
18    <meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=edge chrome=1">
19    <title>OHOSReport</title>
20    <!-- import CSS -->
21    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
22</head>
23<body>
24
25<div id="report_title" v-bind:class="{ title_s : true}">
26    <template>
27        <div>
28            <h4>{{ title }}</h4>
29        </div>
30    </template>
31</div>
32
33<div id="report_detail" v-bind:class="{ subsystem_table_style : true}" >
34    <template>
35        <el-table :data="tableData1" border size="mini"
36                  empty-text="---"
37                  :default-sort = "{prop: 'rate', order: 'ascending'}"
38                  row-key="id"
39                  :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
40                  style="width: 100%">
41            <el-table-column
42                prop="Subsystem"
43                fixed
44                sortable
45                label="Subsystem"
46                show-overflow-tooltip
47            >
48            </el-table-column>
49            <el-table-column
50                prop="Testsuit"
51                fixed
52                sortable
53                label="TestSuit"
54                show-overflow-tooltip
55            >
56            </el-table-column>
57            <el-table-column
58                prop="Benchmark"
59                sortable
60                label="Benchmark"
61                show-overflow-tooltip
62            >
63            </el-table-column>
64            <el-table-column
65                prop="Mode"
66                sortable
67                label="Mode"
68                width="130"
69                show-overflow-tooltip
70            >
71            </el-table-column>
72            <el-table-column
73                prop="RunType"
74                sortable
75                label="RunType"
76                width="130"
77                show-overflow-tooltip
78            >
79            </el-table-column>
80            <el-table-column
81                prop="Score"
82                sortable
83                label="Score"
84                width="150"
85                show-overflow-tooltip
86            >
87            </el-table-column>
88            <el-table-column
89                prop="Repetitions"
90                sortable
91                label="Repetitions"
92                width="150"
93                show-overflow-tooltip
94            >
95            </el-table-column>
96            <el-table-column
97                prop="detail"
98                sortable
99                label="Detail"
100                width="100"
101                show-overflow-tooltip
102            >
103                <template slot-scope="scope">
104                    <a v-if="1>0" :href="getHrefPre(scope)+'_detail.html'" class="buttonText" v-bind:class="{ error_s : 1>0}">
105                        {{ scope.row.detail }}
106                    </a>
107                    <label v-else for="detail">{{ scope.row.detail }}</label>
108                </template>
109            </el-table-column>
110            <el-table-column
111                prop="pm"
112                label="PM"
113                sortable
114                show-overflow-tooltip
115            >
116            </el-table-column>
117        </el-table>
118    </template>
119</div>
120
121<div id="summary_title" v-bind:class="{ title_s : true}">
122    <template>
123        <div>
124            <h4>{{ title }}</h4>
125        </div>
126    </template>
127</div>
128
129</body>
130
131<!-- import Vue before Element -->
132<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
133<!-- import JavaScript -->
134<script src="https://unpkg.com/element-ui/lib/index.js"></script>
135
136<!-- report_title -->
137<script>
138    new Vue({
139        el: '#report_title',
140        data:
141            { title : 'Microbenchmark Report'}
142    })
143</script>
144
145<!-- report_detail -->
146<script>
147    new Vue({
148        el: '#report_detail',
149        data:{
150            tableData1: OHOS_SUBSYSTEM_SUMMARY,
151            enablepasslink:1
152        },
153        methods: {
154            getHrefPre: function (scope)
155            {
156                if (scope.row.module === '---')
157                {
158                    return scope.row.subsystem
159                }
160                else
161                {
162                    return scope.row.Subsystem + '/' + scope.row.Module + '/' + scope.row.Testsuit + '/' + scope.row.Benchmark + '_' + scope.row.Mode
163                }
164            }
165        }
166    })
167</script>
168
169<style>
170    .title_s {
171        max-width: 1300px;
172        margin: auto;
173        background: white;
174        height: 25px;
175        color: #003399;
176        padding: 10px 8px;
177        text-align: center;
178    }
179    .error_s {
180        color: #f00000;
181        font-size: 14px;
182    }
183    .subsystem_table_style {
184        max-width: 1300px;
185        margin: auto;
186        background: white;
187        padding: 10px;
188    }
189    .el-table .warning-row {
190        background: oldlace;
191    }
192    .el-table .failed-cell {
193        color: #003399;
194    }
195    .el-table .success-row {
196        background: #f0f9eb;
197    }
198    .el-table .header-row {
199        color: #003399;
200    }
201</style>
202
203</html>
204