-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
clusters.tsx
871 lines (775 loc) · 22.5 KB
/
clusters.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
import {
showErrorMessage,
Toolbar,
ToolbarButton,
CommandToolbarButton
} from '@jupyterlab/apputils';
import { IChangedArgs, URLExt } from '@jupyterlab/coreutils';
import * as nbformat from '@jupyterlab/nbformat';
import { ServerConnection } from '@jupyterlab/services';
import { refreshIcon } from '@jupyterlab/ui-components';
import { ArrayExt } from '@lumino/algorithm';
import { JSONObject, JSONExt, MimeData } from '@lumino/coreutils';
import { ElementExt } from '@lumino/domutils';
import { Drag } from '@lumino/dragdrop';
import { Message } from '@lumino/messaging';
import { Poll } from '@lumino/polling';
import { ISignal, Signal } from '@lumino/signaling';
import { Widget, PanelLayout } from '@lumino/widgets';
import { showScalingDialog } from './scaling';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { CommandRegistry } from '@lumino/commands';
/**
* A refresh interval (in ms) for polling the backend cluster manager.
*/
const REFRESH_INTERVAL = 5000;
/**
* The threshold in pixels to start a drag event.
*/
const DRAG_THRESHOLD = 5;
/**
* The mimetype used for Jupyter cell data.
*/
const JUPYTER_CELL_MIME = 'application/vnd.jupyter.cells';
/**
* A widget for hosting Dask cluster management.
*/
export class DaskClusterManager extends Widget {
/**
* Create a new Dask cluster manager.
*/
constructor(options: DaskClusterManager.IOptions) {
super();
this.addClass('dask-DaskClusterManager');
this._serverSettings = ServerConnection.makeSettings();
this._injectClientCodeForCluster = options.injectClientCodeForCluster;
this._getClientCodeForCluster = options.getClientCodeForCluster;
this._registry = options.registry;
this._launchClusterId = options.launchClusterId;
// A function to set the active cluster.
this._setActiveById = (id: string) => {
const cluster = this._clusters.find(c => c.id === id);
if (!cluster) {
return;
}
const proxyUrl = URLExt.join(this._serverSettings.baseUrl, 'proxy');
const proxyPrefix = new URL(proxyUrl).pathname;
if (cluster.dashboard_link.indexOf(proxyPrefix) !== -1) {
// If the dashboard link is already proxied using
// jupyter_server_proxy, don't proxy again. This
// can happen if the user has overridden the dashboard
// URL to the jupyter_server_proxy URL manually.
options.setDashboardUrl(cluster.dashboard_link);
} else {
// Otherwise, use the internal proxy URL.
options.setDashboardUrl(`dask/dashboard/${cluster.id}`);
}
const old = this._activeCluster;
if (old && old.id === cluster.id) {
return;
}
this._activeCluster = cluster;
this._activeClusterChanged.emit({
name: 'cluster',
oldValue: old,
newValue: cluster
});
this.update();
};
const layout = (this.layout = new PanelLayout());
this._clusterListing = new Widget();
this._clusterListing.addClass('dask-ClusterListing');
// Create the toolbar.
const toolbar = new Toolbar<Widget>();
// Make a label widget for the toolbar.
const toolbarLabel = new Widget();
toolbarLabel.node.textContent = 'CLUSTERS';
toolbarLabel.addClass('dask-DaskClusterManager-label');
toolbar.addItem('label', toolbarLabel);
// Make a refresh button for the toolbar.
toolbar.addItem(
'refresh',
new ToolbarButton({
icon: refreshIcon,
onClick: () => {
this._updateClusterList();
},
tooltip: 'Refresh Cluster List'
})
);
// Make a new cluster button for the toolbar.
toolbar.addItem(
this._launchClusterId,
new CommandToolbarButton({
commands: this._registry,
id: this._launchClusterId
})
);
layout.addWidget(toolbar);
layout.addWidget(this._clusterListing);
// Do an initial refresh of the cluster list.
this._updateClusterList();
// Also refresh periodically.
this._poll = new Poll({
factory: async () => {
await this._updateClusterList();
},
frequency: { interval: REFRESH_INTERVAL, backoff: true, max: 60 * 1000 },
standby: 'when-hidden'
});
}
/**
* The currently selected cluster, or undefined if there is none.
*/
get activeCluster(): IClusterModel | undefined {
return this._activeCluster;
}
/**
* Set an active cluster by id.
*/
setActiveCluster(id: string): void {
this._setActiveById(id);
}
/**
* A signal that is emitted when an active cluster changes.
*/
get activeClusterChanged(): ISignal<
this,
IChangedArgs<IClusterModel | undefined>
> {
return this._activeClusterChanged;
}
/**
* Whether the cluster manager is ready to launch a cluster
*/
get isReady(): boolean {
return this._isReady;
}
/**
* Get the current clusters known to the manager.
*/
get clusters(): IClusterModel[] {
return this._clusters;
}
/**
* Refresh the current list of clusters.
*/
async refresh(): Promise<void> {
await this._updateClusterList();
}
/**
* Start a new cluster.
*/
async start(): Promise<IClusterModel> {
const cluster = await this._launchCluster();
return cluster;
}
/**
* Stop a cluster by ID.
*/
async stop(id: string): Promise<void> {
const cluster = this._clusters.find(c => c.id === id);
if (!cluster) {
throw Error(`Cannot find cluster ${id}`);
}
await this._stopById(id);
}
/**
* Scale a cluster by ID.
*/
async scale(id: string): Promise<IClusterModel> {
const cluster = this._clusters.find(c => c.id === id);
if (!cluster) {
throw Error(`Cannot find cluster ${id}`);
}
const newCluster = await this._scaleById(id);
return newCluster;
}
/**
* Dispose of the cluster manager.
*/
dispose(): void {
if (this._isDisposed) {
return;
}
this._isDisposed = true;
this._poll.dispose();
super.dispose();
}
/**
* Whether the dashboard has been disposed.
*/
get isDisposed(): boolean {
return this._isDisposed;
}
/**
* Handle an update request.
*/
protected onUpdateRequest(msg: Message): void {
// Don't bother if the sidebar is not visible
if (!this.isVisible) {
return;
}
ReactDOM.render(
<ClusterListing
clusters={this._clusters}
activeClusterId={(this._activeCluster && this._activeCluster.id) || ''}
scaleById={(id: string) => {
return this._scaleById(id);
}}
stopById={(id: string) => {
return this._stopById(id);
}}
setActiveById={this._setActiveById}
injectClientCodeForCluster={this._injectClientCodeForCluster}
/>,
this._clusterListing.node
);
}
/**
* Rerender after showing.
*/
protected onAfterShow(msg: Message): void {
this.update();
}
/**
* Handle `after-attach` messages for the widget.
*/
protected onAfterAttach(msg: Message): void {
super.onAfterAttach(msg);
let node = this._clusterListing.node;
node.addEventListener('p-dragenter', this);
node.addEventListener('p-dragleave', this);
node.addEventListener('p-dragover', this);
node.addEventListener('mousedown', this);
}
/**
* Handle `before-detach` messages for the widget.
*/
protected onBeforeDetach(msg: Message): void {
let node = this._clusterListing.node;
node.removeEventListener('p-dragenter', this);
node.removeEventListener('p-dragleave', this);
node.removeEventListener('p-dragover', this);
node.removeEventListener('mousedown', this);
document.removeEventListener('mouseup', this, true);
document.removeEventListener('mousemove', this, true);
}
/**
* Handle the DOM events for the directory listing.
*
* @param event - The DOM event sent to the widget.
*
* #### Notes
* This method implements the DOM `EventListener` interface and is
* called in response to events on the panel's DOM node. It should
* not be called directly by user code.
*/
handleEvent(event: Event): void {
switch (event.type) {
case 'mousedown':
this._evtMouseDown(event as MouseEvent);
break;
case 'mouseup':
this._evtMouseUp(event as MouseEvent);
break;
case 'mousemove':
this._evtMouseMove(event as MouseEvent);
break;
default:
break;
}
}
/**
* Handle `mousedown` events for the widget.
*/
private _evtMouseDown(event: MouseEvent): void {
const { button, shiftKey } = event;
// We only handle main or secondary button actions.
if (!(button === 0 || button === 2)) {
return;
}
// Shift right-click gives the browser default behavior.
if (shiftKey && button === 2) {
return;
}
// Find the target cluster.
const clusterIndex = this._findCluster(event);
if (clusterIndex === -1) {
return;
}
// Prepare for a drag start
this._dragData = {
pressX: event.clientX,
pressY: event.clientY,
index: clusterIndex
};
// Enter possible drag mode
document.addEventListener('mouseup', this, true);
document.addEventListener('mousemove', this, true);
event.preventDefault();
}
/**
* Handle the `'mouseup'` event on the document.
*/
private _evtMouseUp(event: MouseEvent): void {
// Remove the event listeners we put on the document
if (event.button !== 0 || !this._drag) {
document.removeEventListener('mousemove', this, true);
document.removeEventListener('mouseup', this, true);
}
event.preventDefault();
event.stopPropagation();
}
/**
* Handle the `'mousemove'` event for the widget.
*/
private _evtMouseMove(event: MouseEvent): void {
let data = this._dragData;
if (!data) {
return;
}
// Check for a drag initialization.
let dx = Math.abs(event.clientX - data.pressX);
let dy = Math.abs(event.clientY - data.pressY);
if (dx >= DRAG_THRESHOLD || dy >= DRAG_THRESHOLD) {
event.preventDefault();
event.stopPropagation();
this._startDrag(data.index, event.clientX, event.clientY);
}
}
/**
* Start a drag event.
*/
private _startDrag(index: number, clientX: number, clientY: number): void {
// Create the drag image.
const model = this._clusters[index];
const listingItem = this._clusterListing.node.querySelector(
`li.dask-ClusterListingItem[data-cluster-id="${model.id}"]`
) as HTMLElement;
const dragImage = Private.createDragImage(listingItem);
// Set up the drag event.
this._drag = new Drag({
mimeData: new MimeData(),
dragImage,
supportedActions: 'copy',
proposedAction: 'copy',
source: this
});
// Add mimeData for plain text so that normal editors can
// receive the data.
const textData = this._getClientCodeForCluster(model);
this._drag.mimeData.setData('text/plain', textData);
// Add cell data for notebook drops.
const cellData: nbformat.ICodeCell[] = [
{
cell_type: 'code',
source: textData,
outputs: [],
execution_count: null,
metadata: {}
}
];
this._drag.mimeData.setData(JUPYTER_CELL_MIME, cellData);
// Remove mousemove and mouseup listeners and start the drag.
document.removeEventListener('mousemove', this, true);
document.removeEventListener('mouseup', this, true);
this._drag.start(clientX, clientY).then(action => {
if (this.isDisposed) {
return;
}
this._drag = null;
this._dragData = null;
});
}
/**
* Launch a new cluster on the server.
*/
private async _launchCluster(): Promise<IClusterModel> {
this._isReady = false;
this._registry.notifyCommandChanged(this._launchClusterId);
const response = await ServerConnection.makeRequest(
`${this._serverSettings.baseUrl}dask/clusters`,
{ method: 'PUT' },
this._serverSettings
);
if (response.status !== 200) {
const err = await response.json();
void showErrorMessage('Cluster Start Error', err);
this._isReady = true;
this._registry.notifyCommandChanged(this._launchClusterId);
throw err;
}
const model = (await response.json()) as IClusterModel;
await this._updateClusterList();
this._isReady = true;
this._registry.notifyCommandChanged(this._launchClusterId);
return model;
}
/**
* Refresh the list of clusters on the server.
*/
private async _updateClusterList(): Promise<void> {
const response = await ServerConnection.makeRequest(
`${this._serverSettings.baseUrl}dask/clusters`,
{},
this._serverSettings
);
if (response.status !== 200) {
const msg =
'Failed to list clusters: might the server extension not be installed/enabled?';
const err = new Error(msg);
if (!this._serverErrorShown) {
showErrorMessage('Dask Server Error', err);
this._serverErrorShown = true;
}
throw err;
}
const data = (await response.json()) as IClusterModel[];
this._clusters = data;
// Check to see if the active cluster still exits.
// If it doesn't, or if there is no active cluster,
// select the first one.
const active = this._clusters.find(
c => c.id === (this._activeCluster && this._activeCluster.id)
);
if (!active) {
const id = (this._clusters[0] && this._clusters[0].id) || '';
this._setActiveById(id);
}
this.update();
}
/**
* Stop a cluster by its id.
*/
private async _stopById(id: string): Promise<void> {
const response = await ServerConnection.makeRequest(
`${this._serverSettings.baseUrl}dask/clusters/${id}`,
{ method: 'DELETE' },
this._serverSettings
);
if (response.status !== 204) {
const err = await response.json();
void showErrorMessage('Failed to close cluster', err);
throw err;
}
await this._updateClusterList();
}
/**
* Scale a cluster by its id.
*/
private async _scaleById(id: string): Promise<IClusterModel> {
const cluster = this._clusters.find(c => c.id === id);
if (!cluster) {
throw Error(`Failed to find cluster ${id} to scale`);
}
const update = await showScalingDialog(cluster);
if (JSONExt.deepEqual(update, cluster)) {
// If the user canceled, or the model is identical don't try to update.
return Promise.resolve(cluster);
}
const response = await ServerConnection.makeRequest(
`${this._serverSettings.baseUrl}dask/clusters/${id}`,
{
method: 'PATCH',
body: JSON.stringify(update)
},
this._serverSettings
);
if (response.status !== 200) {
const err = await response.json();
void showErrorMessage('Failed to scale cluster', err);
throw err;
}
const model = (await response.json()) as IClusterModel;
await this._updateClusterList();
return model;
}
private _findCluster(event: MouseEvent): number {
const nodes = Array.from(
this.node.querySelectorAll('li.dask-ClusterListingItem')
);
return ArrayExt.findFirstIndex(nodes, node => {
return ElementExt.hitTest(node, event.clientX, event.clientY);
});
}
private _drag: Drag | null;
private _dragData: {
pressX: number;
pressY: number;
index: number;
} | null = null;
private _clusterListing: Widget;
private _clusters: IClusterModel[] = [];
private _activeCluster: IClusterModel | undefined;
private _setActiveById: (id: string) => void;
private _injectClientCodeForCluster: (model: IClusterModel) => void;
private _getClientCodeForCluster: (model: IClusterModel) => string;
private _poll: Poll;
private _serverSettings: ServerConnection.ISettings;
private _activeClusterChanged = new Signal<
this,
IChangedArgs<IClusterModel | undefined>
>(this);
private _isDisposed = false;
private _serverErrorShown = false;
private _isReady = true;
private _registry: CommandRegistry;
private _launchClusterId: string;
}
/**
* A namespace for DasClusterManager statics.
*/
export namespace DaskClusterManager {
/**
* Options for the constructor.
*/
export interface IOptions {
/**
* Registry of all commands
*/
registry: CommandRegistry;
/**
* The launchCluster command ID.
*/
launchClusterId: string;
/**
* A callback to set the dashboard url.
*/
setDashboardUrl: (url: string) => void;
/**
* A callback to inject client connection cdoe.
*/
injectClientCodeForCluster: (model: IClusterModel) => void;
/**
* A callback to get client code for a cluster.
*/
getClientCodeForCluster: (model: IClusterModel) => string;
}
}
/**
* A React component for a launcher button listing.
*/
function ClusterListing(props: IClusterListingProps) {
let listing = props.clusters.map(cluster => {
return (
<ClusterListingItem
isActive={cluster.id === props.activeClusterId}
key={cluster.id}
cluster={cluster}
scale={() => props.scaleById(cluster.id)}
stop={() => props.stopById(cluster.id)}
setActive={() => props.setActiveById(cluster.id)}
injectClientCode={() => props.injectClientCodeForCluster(cluster)}
/>
);
});
// Return the JSX component.
return (
<div>
<ul className="dask-ClusterListing-list">{listing}</ul>
</div>
);
}
/**
* Props for the cluster listing component.
*/
export interface IClusterListingProps {
/**
* A list of dashboard items to render.
*/
clusters: IClusterModel[];
/**
* The id of the active cluster.
*/
activeClusterId: string;
/**
* A function for stopping a cluster by ID.
*/
stopById: (id: string) => Promise<void>;
/**
* Scale a cluster by id.
*/
scaleById: (id: string) => Promise<IClusterModel>;
/**
* A callback to set the active cluster by id.
*/
setActiveById: (id: string) => void;
/**
* A callback to inject client code for a cluster.
*/
injectClientCodeForCluster: (model: IClusterModel) => void;
}
/**
* A TSX functional component for rendering a single running cluster.
*/
function ClusterListingItem(props: IClusterListingItemProps) {
const { cluster, isActive, setActive, scale, stop, injectClientCode } = props;
let itemClass = 'dask-ClusterListingItem';
itemClass = isActive ? `${itemClass} jp-mod-active` : itemClass;
let minimum: JSX.Element | null = null;
let maximum: JSX.Element | null = null;
if (cluster.adapt) {
minimum = (
<div className="dask-ClusterListingItem-stats">
Minimum Workers: {cluster.adapt.minimum}
</div>
);
maximum = (
<div className="dask-ClusterListingItem-stats">
Maximum Workers: {cluster.adapt.maximum}
</div>
);
}
return (
<li
className={itemClass}
data-cluster-id={cluster.id}
onClick={evt => {
setActive();
evt.stopPropagation();
}}
>
<div className="dask-ClusterListingItem-title">{cluster.name}</div>
<div
className="dask-ClusterListingItem-link"
title={cluster.scheduler_address}
>
Scheduler Address: {cluster.scheduler_address}
</div>
<div className="dask-ClusterListingItem-link">
Dashboard URL:{' '}
<a
target="_blank"
href={cluster.dashboard_link}
title={cluster.dashboard_link}
>
{cluster.dashboard_link}
</a>
</div>
<div className="dask-ClusterListingItem-stats">
Number of Cores: {cluster.cores}
</div>
<div className="dask-ClusterListingItem-stats">
Memory: {cluster.memory}
</div>
<div className="dask-ClusterListingItem-stats">
Number of Workers: {cluster.workers}
</div>
{minimum}
{maximum}
<div className="dask-ClusterListingItem-button-panel">
<button
className="dask-ClusterListingItem-button dask-ClusterListingItem-code dask-CodeIcon jp-mod-styled"
onClick={evt => {
injectClientCode();
evt.stopPropagation();
}}
title={`Inject client code for ${cluster.name}`}
/>
<button
className="dask-ClusterListingItem-button dask-ClusterListingItem-scale jp-mod-styled"
onClick={evt => {
scale();
evt.stopPropagation();
}}
title={`Rescale ${cluster.name}`}
>
SCALE
</button>
<button
className="dask-ClusterListingItem-button dask-ClusterListingItem-stop jp-mod-styled"
onClick={evt => {
stop();
evt.stopPropagation();
}}
title={`Shutdown ${cluster.name}`}
>
SHUTDOWN
</button>
</div>
</li>
);
}
/**
* Props for the cluster listing component.
*/
export interface IClusterListingItemProps {
/**
* A cluster model to render.
*/
cluster: IClusterModel;
/**
* Whether the cluster is currently active (i.e., if
* it is being displayed in the dashboard).
*/
isActive: boolean;
/**
* A function for scaling the cluster.
*/
scale: () => Promise<IClusterModel>;
/**
* A function for stopping the cluster.
*/
stop: () => Promise<void>;
/**
* A callback function to set the active cluster.
*/
setActive: () => void;
/**
* A callback to inject client code into an editor.
*/
injectClientCode: () => void;
}
/**
* An interface for a JSON-serializable representation of a cluster.
*/
export interface IClusterModel extends JSONObject {
/**
* A unique string ID for the cluster.
*/
id: string;
/**
* A display name for the cluster.
*/
name: string;
/**
* A URI for the dask scheduler.
*/
scheduler_address: string;
/**
* A URL for the Dask dashboard.
*/
dashboard_link: string;
/**
* Total number of cores used by the cluster.
*/
cores: number;
/**
* Total memory used by the cluster, as a human-readable string.
*/
memory: string;
/**
* The number of workers for the cluster.
*/
workers: number;
/**
* If adaptive is enabled for the cluster, this contains an object
* with the minimum and maximum number of workers. Otherwise it is `null`.
*/
adapt: null | { minimum: number; maximum: number };
}
/**
* A namespace for module-private functionality.
*/
namespace Private {
/**
* Create a drag image for an HTML node.
*/
export function createDragImage(node: HTMLElement): HTMLElement {
const image = node.cloneNode(true) as HTMLElement;
image.classList.add('dask-ClusterListingItem-drag');
return image;
}
}