3
3
<div class =" panel-heading" >
4
4
<i class =" bi bi-card-list" ></i > Fuzzing Pools
5
5
</div >
6
- <table class =" table table-condensed table-hover table-bordered table-db" >
7
- <thead >
8
- <tr >
9
- <th
10
- :class =" {
11
- active:
12
- sortKeys.includes('pool_id') || sortKeys.includes('-pool_id'),
13
- }"
14
- width =" 25px"
15
- @click.exact =" sortBy('pool_id')"
16
- @click.ctrl.exact =" addSort('pool_id')"
17
- >
18
- ID
19
- </th >
20
- <th
21
- :class =" {
22
- active:
23
- sortKeys.includes('pool_name_isort') ||
24
- sortKeys.includes('-pool_name_isort'),
25
- }"
26
- width =" 100px"
27
- @click.exact =" sortBy('pool_name_isort')"
28
- @click.ctrl.exact =" addSort('pool_name_isort')"
29
- >
30
- Name
31
- </th >
32
- <th
33
- :class =" {
34
- active:
35
- sortKeys.includes('running') || sortKeys.includes('-running'),
36
- }"
37
- width =" 75px"
38
- @click.exact =" sortBy('running')"
39
- @click.ctrl.exact =" addSort('running')"
40
- >
41
- # of Tasks (Running/Requested)
42
- </th >
43
- <th
44
- :class =" {
45
- active:
46
- sortKeys.includes('status') || sortKeys.includes('-status'),
47
- }"
48
- width =" 150px"
49
- @click.exact =" sortBy('status')"
50
- @click.ctrl.exact =" addSort('status')"
51
- >
52
- Status
53
- </th >
54
- </tr >
55
- </thead >
56
- <tbody >
57
- <tr v-for =" pool in orderedPools" :key =" pool.id" >
58
- <td >
59
- <a :href =" pool.view_url" >{{ pool.pool_id }}</a >
60
- </td >
61
- <td >{{ pool.pool_name }}</td >
62
- <td >{{ pool.running }}/{{ pool.size }}</td >
63
- <td >
64
- <span
65
- class =" label"
6
+ <div class =" table-responsive" >
7
+ <table class =" table table-condensed table-hover table-bordered table-db" >
8
+ <thead >
9
+ <tr >
10
+ <th
66
11
:class =" {
67
- 'label-warning': pool.status === 'partial',
68
- 'label-success': pool.status === 'healthy',
69
- 'label-danger': pool.status === 'idle',
70
- 'label-default': pool.status === 'disabled',
12
+ active:
13
+ sortKeys.includes('pool_id') || sortKeys.includes('-pool_id'),
71
14
}"
72
- >{{ pool.status }}</span
15
+ width =" 25px"
16
+ @click.exact =" sortBy('pool_id')"
17
+ @click.ctrl.exact =" addSort('pool_id')"
73
18
>
74
- </td >
75
- </tr >
76
- </tbody >
77
- </table >
19
+ ID
20
+ </th >
21
+ <th
22
+ :class =" {
23
+ active:
24
+ sortKeys.includes('pool_name_isort') ||
25
+ sortKeys.includes('-pool_name_isort'),
26
+ }"
27
+ width =" 100px"
28
+ @click.exact =" sortBy('pool_name_isort')"
29
+ @click.ctrl.exact =" addSort('pool_name_isort')"
30
+ >
31
+ Name
32
+ </th >
33
+ <th
34
+ :class =" {
35
+ active:
36
+ sortKeys.includes('running') || sortKeys.includes('-running'),
37
+ }"
38
+ width =" 75px"
39
+ @click.exact =" sortBy('running')"
40
+ @click.ctrl.exact =" addSort('running')"
41
+ >
42
+ # of Tasks (Running/Requested)
43
+ </th >
44
+ <th
45
+ :class =" {
46
+ active:
47
+ sortKeys.includes('status') || sortKeys.includes('-status'),
48
+ }"
49
+ width =" 150px"
50
+ @click.exact =" sortBy('status')"
51
+ @click.ctrl.exact =" addSort('status')"
52
+ >
53
+ Status
54
+ </th >
55
+ <th
56
+ :class =" {
57
+ active: sortKeys.includes('cpu') || sortKeys.includes('-cpu'),
58
+ }"
59
+ width =" 150px"
60
+ @click.exact =" sortBy('cpu')"
61
+ @click.ctrl.exact =" addSort('cpu')"
62
+ >
63
+ Platform
64
+ </th >
65
+ <th
66
+ :class =" {
67
+ active:
68
+ sortKeys.includes('platform') ||
69
+ sortKeys.includes('-platform'),
70
+ }"
71
+ width =" 25px"
72
+ @click.exact =" sortBy('platform')"
73
+ @click.ctrl.exact =" addSort('platform')"
74
+ >
75
+ OS
76
+ </th >
77
+ </tr >
78
+ </thead >
79
+ <tbody >
80
+ <tr v-for =" pool in orderedPools" :key =" pool.id" >
81
+ <td >
82
+ <a :href =" pool.view_url" >{{ pool.pool_id }}</a >
83
+ </td >
84
+ <td >{{ pool.pool_name }}</td >
85
+ <td >{{ pool.running }}/{{ pool.size }}</td >
86
+ <td >
87
+ <span
88
+ class =" label"
89
+ :class =" {
90
+ 'label-warning': pool.status === 'partial',
91
+ 'label-success': pool.status === 'healthy',
92
+ 'label-danger': pool.status === 'idle',
93
+ 'label-default': pool.status === 'disabled',
94
+ }"
95
+ >{{ pool.status }}</span
96
+ >
97
+ </td >
98
+ <td >{{ pool.cpu }}</td >
99
+ <td >
100
+ <img
101
+ v-if =" pool.platform === 'linux'"
102
+ width =" 16px"
103
+ height =" 16px"
104
+ alt =" Linux"
105
+ :src =" staticLogo('linux')"
106
+ />
107
+ <img
108
+ v-else-if =" pool.platform === 'macosx'"
109
+ width =" 16px"
110
+ height =" 16px"
111
+ alt =" MacOS"
112
+ :src =" staticLogo('macosx')"
113
+ />
114
+ <img
115
+ v-else-if =" pool.platform === 'windows'"
116
+ width =" 16px"
117
+ height =" 16px"
118
+ alt =" Windows"
119
+ :src =" staticLogo('windows')"
120
+ />
121
+ <img
122
+ v-else-if =" pool.platform === 'android'"
123
+ width =" 16px"
124
+ height =" 16px"
125
+ alt =" Android"
126
+ :src =" staticLogo('android')"
127
+ />
128
+ <span v-else >{{ pool.platform }}</span >
129
+ </td >
130
+ </tr >
131
+ </tbody >
132
+ </table >
133
+ </div >
78
134
</div >
79
135
</template >
80
136
@@ -90,7 +146,14 @@ export default defineComponent({
90
146
mixins: [multiSort],
91
147
setup () {
92
148
const defaultSortKeys = [" pool_name_isort" ];
93
- const validSortKeys = [" pool_id" , " pool_name_isort" , " running" , " status" ];
149
+ const validSortKeys = [
150
+ " pool_id" ,
151
+ " pool_name_isort" ,
152
+ " running" ,
153
+ " platform" ,
154
+ " cpu" ,
155
+ " status" ,
156
+ ];
94
157
const loading = ref (true );
95
158
const pools = ref (null );
96
159
const sortKeys = ref ([... defaultSortKeys]);
@@ -129,12 +192,17 @@ export default defineComponent({
129
192
130
193
fetch ();
131
194
195
+ const staticLogo = (name ) => {
196
+ return window .location .origin + " /static/img/os/" + name + " .png" ;
197
+ };
198
+
132
199
return {
133
200
loading,
134
201
pools,
135
202
sortKeys,
136
203
validSortKeys,
137
204
defaultSortKeys,
205
+ staticLogo,
138
206
};
139
207
},
140
208
computed: {
0 commit comments