TimeTrex/interface/html5/dist/developer_tools-debugPanelController.bundle.js

1 line
139 KiB
JavaScript
Raw Permalink Normal View History

2022-12-13 07:10:06 +01:00
(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["developer_tools-debugPanelController"],{8038:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var $ = __webpack_require__(9755);\n$( document ).on( 'click', '.tt_debug_close_btn', function( e ) {\n\te.preventDefault();\n\tDebug.closePanel();\n} );\n\n$( document ).on( 'change', '#tt_debug_enable_checkbox', function( e ) {\n\te.preventDefault();\n\tDebug.setEnable( $( this ).is( ':checked' ) );\n} );\n\n$( document ).on( 'click', '#trigger_js_exception_button', function( e ) {\n\te.preventDefault();\n\tvar exception_type = $( '#tt_debug_exception_type_select' ).val();\n\n\tswitch ( exception_type ) {\n\t\tcase 'js_error':\n\t\t\tnon_existant_variable.non_existant_function();\n\t\t\tbreak;\n\t\tcase 'js_load_script_parser_error':\n\t\t\tvar script_path = Global.getViewPathByViewId( 'DeveloperTools' ) + 'triggerParserError.js';\n\t\t\t//remove from cache to ensure that we're sending a totally new request\n\t\t\tdelete LocalCacheData.loadedScriptNames[script_path];\n\t\t\t//change the js version number to trigger forced reload\n\t\t\tAPIGlobal.pre_login_data.application_build += '_FORCE';\n\t\t\treturn Global.loadScript( script_path, function( result ) {\n\t\t\t\tDebug.Arr( result, 'no error happened.' );\n\t\t\t} );\n\t\tcase 'js_load_script_404_error':\n\t\t\tGlobal.loadScript( 'nonexistantscript.js', function( result ) {\n\t\t\t\tDebug.Arr( result, 'no error happened.' );\n\t\t\t} );\n\t\t\tbreak;\n\t}\n} );\n\n$( document ).on( 'click', '#trigger_js_timeout_button', function( e ) {\n\te.preventDefault();\n\tGlobal.idle_time = 100;\n\tGlobal.doPingIfNecessary();\n} );\n\n$( document ).on( 'change', '#tt_debug_exception_verbosity', function( e ) {\n\te.preventDefault();\n\tDebug.setVerbosity( $( this ).val() );\n} );\n\n$( document ).on( 'change', '#tt_overlay_disable_checkbox', function( e ) {\n\te.preventDefault();\n\tGlobal.UNIT_TEST_MODE = $( this ).is( ':checked' );\n\tGlobal.event_bus.emit( 'tt_left_container', 'rebuild_menu' );\n} );\n\n$( document ).on( 'click', '#qunit_test_button', function( e ) {\n\te.preventDefault();\n\t$( '#tt_debug_console' ).css( 'width', '80%' );\n\t$( '#tt_debug_console' ).css( 'margin', '0 auto' );\n\trunUnitTests();\n} );\n\n/**\n * Put all unit tests in this function\n */\n\n$( document ).on( 'change', '#tt_output_variable_select', function( e ) {\n\te.preventDefault();\n\toutput_system_data( $( this ).val() );\n} );\n\n$( document ).on( 'click', '#trigger_output_variable_select', function( e ) {\n\te.preventDefault();\n\toutput_system_data( $( '#tt_output_variable_select' ).val() );\n} );\n\n$( document ).on( 'click', '#trigger_arbitrary_script', function( e ) {\n\te.preventDefault();\n\tvar script = $( '#arbitrary_script' ).val();\n\tscript = script.replace( /(\\r\\n|\\n|\\r)/gm, '' ); //strip all line-ends\n\tconsole.log( eval( script ) );\n} );\n\n// #VUETEST\n$( document ).on( 'click', '#load_vue_test_button', function( e ) {\n\te.preventDefault();\n\twindow.VueRouter.push('test');\n} );\n\n\n\n$( document ).on( 'click', '#awesomebox_test', function( e ) {\n\te.preventDefault();\n\tDebug.showAwesomeBoxTest();\n} );\n\n$( document ).on( 'click', '#grid_test', function( e ) {\n\te.preventDefault();\n\tDebug.showGridTest();\n} );\n\n$( document ).on( 'click', '#WidgetTest_test', function( e ) {\n\te.preventDefault();\n\tDebug.showWidgetTest();\n} );\n\nfunction breakOn( obj, propertyName, mode, func ) {\n\t// this is directly from https://github.com/paulmillr/es6-shim\n\tfunction getPropertyDescriptor( obj, name ) {\n\t\tvar property = Object.getOwnPropertyDescriptor( obj, name );\n\t\tvar proto = Object.getPrototypeOf( obj );\n\t\twhile ( property === undefined && proto !== null ) {\n\t\t\tproperty = Object.getOwnPropertyDescriptor( proto, name );\n\t\t\tproto = Object.getPrototypeOf( proto );\n\t\t}\n\t\treturn property;\n\t}\n\n\tfunction verifyNotWritable() {\n\t\tif ( mode !== 'read' )\n\t\t\tthrow \"This property is not writable, so only possible mode is 'r