⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.82
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
/
Edit File: diff-view.ts
import angular from 'angular'; import { GrafanaRootScope } from 'app/angular/GrafanaCtrl'; import coreModule from './core_module'; export class DeltaCtrl { observer: any; constructor() { const waitForCompile = () => {}; this.observer = new MutationObserver(waitForCompile); const observerConfig = { attributes: true, attributeFilter: ['class'], characterData: false, childList: true, subtree: false, }; this.observer.observe(angular.element('.delta-html')[0], observerConfig); } $onDestroy() { this.observer.disconnect(); } } export function delta() { return { controller: DeltaCtrl, replace: false, restrict: 'A', }; } coreModule.directive('diffDelta', delta); // Link to JSON line number export class LinkJSONCtrl { static $inject = ['$scope', '$rootScope', '$anchorScroll']; constructor( private $scope: any, private $rootScope: GrafanaRootScope, private $anchorScroll: any ) {} goToLine(line: number) { let unbind: () => void; const scroll = () => { this.$anchorScroll(`l${line}`); unbind(); }; this.$scope.switchView().then(() => { unbind = this.$rootScope.$on('json-diff-ready', scroll.bind(this)); }); } } export function linkJson() { return { controller: LinkJSONCtrl, controllerAs: 'ctrl', replace: true, restrict: 'E', scope: { line: '@lineDisplay', link: '@lineLink', switchView: '&', }, template: `<a class="diff-linenum btn btn-inverse btn-small" ng-click="ctrl.goToLine(link)">Line {{ line }}</a>`, }; } coreModule.directive('diffLinkJson', linkJson);
Simpan