Skip to content

Commit c51cb74

Browse files
committed
dcache-view: modify restores page to filter and sort on path and owner
Motivation: the RESTful API. We now would like to make this available to the user of the restores admin page. Modification: Move the clients and restores info into the popup; put the path and owner:group into the main entry, along with filter and sorting widgets. Result: Path and owner can now also be used in the admin page to filter/sort. Target: master Request: 2.0 Patch: https://rb.dcache.org/r/13693/ Depends-on: #13692 Requires-notes: yes Requires-book: no Acked-by: Tigran
1 parent f7ace4b commit c51cb74

2 files changed

Lines changed: 62 additions & 43 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@ etc
2222
.settings/
2323

2424
## Ignore
25-
#/src/scripts/config.js
25+
#/src/scripts/config.js
26+
27+
## Ignore RB
28+
.reviewboardrc

src/elements/dv-elements/admin/views/restores-view.html

Lines changed: 58 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -88,40 +88,36 @@
8888
<div class="details">
8989
<table>
9090
<tr>
91-
<td>Path:</td>
92-
<td>[[item.path]]</td>
91+
<td>(Clients [[item.clients]]) (Retries [[item.retries]])</td>
92+
<td></td>
9393
</tr>
9494
<tr>
95-
<td>Error:</td>
96-
<td>[[item.error]]</td>
97-
</tr>
98-
<tr>
99-
<td>Error Message:</td>
100-
<td>[[item.errorMessage]]</td>
95+
<td>(Error [[item.error]]: [[item.errorMessage]]) </td>
96+
<td></td>
10197
</tr>
10298
</table>
10399
</div>
104100
</template>
105101

106102
<vaadin-grid-column-group>
107103
<template class="header">#</template>
108-
<vaadin-grid-column width="75px">
104+
<vaadin-grid-column width="30px">
109105
<template class="header">Filter on:</template>
110106
<template>[[index]]</template>
111107
</vaadin-grid-column>
112108
</vaadin-grid-column-group>
113109
<vaadin-grid-column-group>
114-
<template class="header">Path</template>
115-
<vaadin-grid-column width="50px">
110+
<template class="header">Info</template>
111+
<vaadin-grid-column width="30px">
116112
<template class="header"></template>
117113
<template>
118-
<paper-checkbox aria-label="Path"
114+
<paper-checkbox aria-label="Info"
119115
checked="{{detailsOpened}}">
120116
</paper-checkbox>
121117
</template>
122118
</vaadin-grid-column>
123119
</vaadin-grid-column-group>
124-
<vaadin-grid-column-group resizable>
120+
<vaadin-grid-column-group>
125121
<template class="header">
126122
<vaadin-grid-sorter path="pnfsid">Pnfsid
127123
</vaadin-grid-sorter>
@@ -145,6 +141,46 @@
145141
</template>
146142
</vaadin-grid-column>
147143
</vaadin-grid-column-group>
144+
<vaadin-grid-column-group resizable>
145+
<template class="header">
146+
<vaadin-grid-sorter path="path">Path
147+
</vaadin-grid-sorter>
148+
</template>
149+
<vaadin-grid-column width="400px">
150+
<template class="header">
151+
<vaadin-grid-filter id="pathFilter"
152+
aria-label="Path"
153+
path="path"
154+
value="[[_filterPath]]">
155+
<input slot="filter"
156+
id="pathFilterInput"
157+
placeholder="Path"
158+
value="{{_filterPath::input}}"
159+
focus-target/>
160+
</vaadin-grid-filter>
161+
</template>
162+
<template><div style="overflow-x:auto">[[item.path]]</div></template>
163+
</vaadin-grid-column>
164+
</vaadin-grid-column-group>
165+
<vaadin-grid-column-group>
166+
<template class="header">
167+
<vaadin-grid-sorter path="owner">Owner
168+
</vaadin-grid-sorter>
169+
</template>
170+
<vaadin-grid-column width="80px">
171+
<template class="header">
172+
<vaadin-grid-filter aria-label="Owner"
173+
path="owner"
174+
value="[[_filterOwner]]">
175+
<input slot="filter"
176+
placeholder="owner"
177+
value="{{_filterOwner::input}}"
178+
focus-target/>
179+
</vaadin-grid-filter>
180+
</template>
181+
<template>[[item.owner]]:[[item.ownerGroup]]</template>
182+
</vaadin-grid-column>
183+
</vaadin-grid-column-group>
148184
<vaadin-grid-column-group>
149185
<template class="header">
150186
<vaadin-grid-sorter path="subnet">Subnet
@@ -169,7 +205,7 @@
169205
<vaadin-grid-sorter path="pool">Pool
170206
</vaadin-grid-sorter>
171207
</template>
172-
<vaadin-grid-column width="300px">
208+
<vaadin-grid-column width="100px">
173209
<template class="header">
174210
<vaadin-grid-filter aria-label="Pool Candidate"
175211
path="pool"
@@ -180,48 +216,28 @@
180216
focus-target/>
181217
</vaadin-grid-filter>
182218
</template>
183-
<template>
184-
<span on-tap="_openPoolInfo"
185-
class="actionable">[[item.poolCandidate]]</span>
219+
<template><div style="overflow-x:auto">
220+
<span on-tap="_openPoolInfo" class="actionable">[[item.poolCandidate]]</span>
221+
</div>
186222
</template>
187223
</vaadin-grid-column>
188224
</vaadin-grid-column-group>
189-
<vaadin-grid-column-group resizable>
225+
<vaadin-grid-column-group>
190226
<template class="header">
191227
<vaadin-grid-sorter path="started">Started
192228
</vaadin-grid-sorter>
193229
</template>
194-
<vaadin-grid-column width="150px">
230+
<vaadin-grid-column width="140px">
195231
<template class="header"></template>
196232
<template>[[item.started.formatted]]</template>
197233
</vaadin-grid-column>
198234
</vaadin-grid-column-group>
199-
<vaadin-grid-column-group>
200-
<template class="header">
201-
<vaadin-grid-sorter path="clients">Clients
202-
</vaadin-grid-sorter>
203-
</template>
204-
<vaadin-grid-column width="75px">
205-
<template class="header"></template>
206-
<template>[[item.clients]]</template>
207-
</vaadin-grid-column>
208-
</vaadin-grid-column-group>
209-
<vaadin-grid-column-group>
210-
<template class="header">
211-
<vaadin-grid-sorter path="retries">Retries
212-
</vaadin-grid-sorter>
213-
</template>
214-
<vaadin-grid-column width="75px">
215-
<template class="header"></template>
216-
<template>[[item.retries]]</template>
217-
</vaadin-grid-column>
218-
</vaadin-grid-column-group>
219235
<vaadin-grid-column-group resizable>
220236
<template class="header">
221237
<vaadin-grid-sorter path="status">Status
222238
</vaadin-grid-sorter>
223239
</template>
224-
<vaadin-grid-column width="200px">
240+
<vaadin-grid-column width="225px">
225241
<template class="header">
226242
<vaadin-grid-filter aria-label="Status"
227243
path="status"
@@ -232,7 +248,7 @@
232248
focus-target/>
233249
</vaadin-grid-filter>
234250
</template>
235-
<template>[[item.status]]</template>
251+
<template><div style="overflow-x:auto">[[item.status]]</div></template>
236252
</vaadin-grid-column>
237253
</vaadin-grid-column-group>
238254
</vaadin-grid>
@@ -283,7 +299,7 @@
283299
(index) => 'restores',
284300
(index) => '',
285301
'restores',
286-
4);
302+
6);
287303

288304
/*
289305
* This must be assigned only after the decorator has been

0 commit comments

Comments
 (0)