File tree Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Expand file tree Collapse file tree 2 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ <h2>Comparing <span id="stat-header">{{stat}}</span> between <span id="before">{
275
275
< input type ="checkbox " v-model ="showRawData " style ="margin-left: 20px; " />
276
276
</ div >
277
277
</ div >
278
+ < button @click ="resetFilter "> Reset filters</ button >
278
279
</ fieldset >
279
280
< p v-if ="dataLoading && !data "> Loading ...</ p >
280
281
< div v-if ="data " id ="content " style ="margin-top: 15px ">
Original file line number Diff line number Diff line change @@ -6,6 +6,29 @@ function findQueryParam(name) {
6
6
}
7
7
}
8
8
9
+ function createDefaultFilter ( ) {
10
+ return {
11
+ name : null ,
12
+ showNonRelevant : false ,
13
+ profile : {
14
+ check : true ,
15
+ debug : true ,
16
+ opt : true ,
17
+ doc : true
18
+ } ,
19
+ scenario : {
20
+ full : true ,
21
+ incrFull : true ,
22
+ incrUnchanged : true ,
23
+ incrPatched : true
24
+ } ,
25
+ category : {
26
+ primary : true ,
27
+ secondary : true
28
+ }
29
+ } ;
30
+ }
31
+
9
32
const app = Vue . createApp ( {
10
33
mounted ( ) {
11
34
const app = this ;
@@ -20,26 +43,7 @@ const app = Vue.createApp({
20
43
} ,
21
44
data ( ) {
22
45
return {
23
- filter : {
24
- name : null ,
25
- showNonRelevant : false ,
26
- profile : {
27
- check : true ,
28
- debug : true ,
29
- opt : true ,
30
- doc : true
31
- } ,
32
- scenario : {
33
- full : true ,
34
- incrFull : true ,
35
- incrUnchanged : true ,
36
- incrPatched : true
37
- } ,
38
- category : {
39
- primary : true ,
40
- secondary : true
41
- }
42
- } ,
46
+ filter : createDefaultFilter ( ) ,
43
47
showRawData : false ,
44
48
data : null ,
45
49
dataLoading : false
@@ -278,6 +282,9 @@ const app = Vue.createApp({
278
282
279
283
return createUrlFromParams ( createSearchParamsForMetric ( metric , start , end ) ) ;
280
284
} ,
285
+ resetFilter ( ) {
286
+ this . filter = createDefaultFilter ( ) ;
287
+ }
281
288
} ,
282
289
} ) ;
283
290
You can’t perform that action at this time.
0 commit comments