⚝
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
/
View File Name :
AngularLoader.ts
import angular from 'angular'; import { assign } from 'lodash'; import { AngularComponent, AngularLoader as AngularLoaderInterface } from '@grafana/runtime'; import { GrafanaRootScope } from 'app/angular/GrafanaCtrl'; import coreModule from 'app/angular/core_module'; export class AngularLoader implements AngularLoaderInterface { static $inject = ['$compile', '$rootScope']; constructor( private $compile: angular.ICompileService, private $rootScope: GrafanaRootScope ) {} load(elem: HTMLElement, scopeProps: any, template: string): AngularComponent { const scope = this.$rootScope.$new(); assign(scope, scopeProps); const compiledElem = this.$compile(template)(scope); const rootNode = angular.element(elem); rootNode.append(compiledElem); return { destroy: () => { scope.$destroy(); compiledElem.remove(); }, digest: () => { if (!scope.$$phase) { scope.$digest(); } }, getScope: () => { return scope; }, }; } } coreModule.service('angularLoader', AngularLoader);