Skip to content

Commit 6afb479

Browse files
committed
dcache-view: adapt PoolManager selection page to use ac_psux_match modification
Motivation: With #13687, the parameters for the RESTful API /poolmanager/pool-selection changed. This broke the selection unit admin page. Modfication: Modify to use the correct parameters and defaults. Add input fields for pnfsId and path. Result: Page now accepts all input parameters and sends correctly constructed command. Master only, unless #13687 is back-ported to 8.2. Target: master Patch: https://rb.dcache.org/r/13689 Requires-notes: yes Requires-book: no Depends-on: #13687 Acked-by: Tigran
1 parent c51cb74 commit 6afb479

File tree

1 file changed

+70
-33
lines changed

1 file changed

+70
-33
lines changed

src/elements/dv-elements/admin/views/selection-unit-view.html

Lines changed: 70 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,15 @@
141141
grid-template-columns: 1fr 2fr 25%;
142142
}
143143

144-
#selection-panel {
144+
#selection-panel-1 {
145145
display: grid;
146-
grid-template-columns: repeat(6, 1fr);
146+
grid-template-columns: repeat(2, 1fr);
147+
grid-column-gap: 5px;
148+
}
149+
150+
#selection-panel-2 {
151+
display: grid;
152+
grid-template-columns: repeat(7, 1fr);
147153
grid-column-gap: 5px;
148154
}
149155

@@ -320,9 +326,13 @@
320326
<iron-label slot="top" id="subtitle"><strong>Simulated I/O
321327
Selection</strong></iron-label>
322328
</paper-toolbar>
323-
<div id="selection-panel">
324-
<paper-input class="item" label="Link Group"
325-
value="{{linkgroup}}"></paper-input>
329+
<div id="selection-panel-1">
330+
<paper-input class="item" label="PnfsId"
331+
value="{{pnfsId}}"></paper-input>
332+
<paper-input class="item" label="Path"
333+
value="{{path}}"></paper-input>
334+
</div>
335+
<div id="selection-panel-2">
326336
<paper-dropdown-menu class="item" label="IO Direction" noink
327337
no-animations>
328338
<iron-selector slot="dropdown-content"
@@ -332,17 +342,20 @@
332342
<paper-item>WRITE</paper-item>
333343
<paper-item>CACHE</paper-item>
334344
<paper-item>P2P</paper-item>
335-
<paper-item>ANY</paper-item>
336345
</iron-selector>
337346
</paper-dropdown-menu>
338-
<paper-input class="item" label="Storage Unit"
339-
value="{{store}}"></paper-input>
347+
<paper-input class="item" label="Storage Class"
348+
value="{{storageClass}}"></paper-input>
349+
<paper-input class="item" label="Hsm"
350+
value="{{hsm}}"></paper-input>
340351
<paper-input class="item" label="Cache Class"
341-
value="{{dcache}}"></paper-input>
342-
<paper-input class="item" label="Net Unit"
352+
value="{{cacheClass}}"></paper-input>
353+
<paper-input class="item" label="Client Host/IP"
343354
value="{{net}}"></paper-input>
344355
<paper-input class="item" label="Protocol"
345356
value="{{protocol}}"></paper-input>
357+
<paper-input class="item" label="Link Group"
358+
value="{{linkgroup}}"></paper-input>
346359
</div>
347360
<br/>
348361
<div id="bottom-panel">
@@ -385,38 +398,51 @@
385398

386399
static get properties() {
387400
return {
388-
linkgroup: {
401+
iomode: {
402+
type: Number,
403+
value: 0,
404+
notify: true
405+
},
406+
407+
pnfsId: {
389408
type: String,
390409
notify: true
391410
},
392411

393-
iomode: {
394-
type: Number,
395-
value: 0,
412+
path: {
413+
type: String,
396414
notify: true
397415
},
398416

399-
store: {
417+
storageClass: {
400418
type: String,
401-
value: '*',
402419
notify: true
403420
},
404421

405-
dcache: {
422+
hsm: {
423+
type: String,
424+
notify: true
425+
},
426+
427+
cacheClass: {
428+
type: String,
429+
notify: true
430+
},
431+
432+
linkgroup: {
406433
type: String,
407-
value: '*',
408434
notify: true
409435
},
410436

411437
net: {
412438
type: String,
413-
value: '::0',
439+
value: '*',
414440
notify: true
415441
},
416442

417443
protocol: {
418444
type: String,
419-
value: '*/*',
445+
value: '*',
420446
notify: true
421447
},
422448

@@ -624,11 +650,9 @@
624650
case 1:
625651
return "WRITE";
626652
case 2:
627-
return "P2P";
628-
case 3:
629653
return "CACHE";
630-
case 4:
631-
return "ANY";
654+
case 3:
655+
return "P2P";
632656
default:
633657
return "READ";
634658
}
@@ -647,21 +671,34 @@
647671
_handleMatchQuery() {
648672
const params = [];
649673

650-
if (this.linkgroup) {
651-
params.push(`linkGroup=${this.linkgroup}`);
674+
const ioDirection = this._getIOMode();
675+
676+
if (ioDirection) {
677+
params.push(`ioDirection=${ioDirection}`);
678+
}
679+
680+
if (this.pnfsId) {
681+
params.push(`pnfsId=${this.pnfsId}`);
652682
}
653683

654-
const type = this._getIOMode();
655-
if (type) {
656-
params.push(`type=${type}`);
684+
if (this.path) {
685+
params.push(`path=${this.path}`);
657686
}
658687

659-
if (this.store) {
660-
params.push(`store=${this.store}`);
688+
if (this.storageClass) {
689+
params.push(`storageClass=${this.storageClass}`);
661690
}
662691

663-
if (this.dcache) {
664-
params.push(`dcache=${this.dcache}`);
692+
if (this.hsm) {
693+
params.push(`hsm=${this.hsm}`);
694+
}
695+
696+
if (this.cacheClass) {
697+
params.push(`cacheClass=${this.dcache}`);
698+
}
699+
700+
if (this.linkgroup) {
701+
params.push(`linkGroup=${this.linkgroup}`);
665702
}
666703

667704
if (this.net) {

0 commit comments

Comments
 (0)