├── .github └── FUNDING.yml ├── README.md ├── system └── user │ └── addons │ ├── eedt │ ├── Actions │ │ ├── AbstractAction.php │ │ ├── Act.php │ │ ├── GetPanelData.php │ │ └── PanelAjax.php │ ├── ControlPanel │ │ └── Routes │ │ │ └── Settings.php │ ├── Exceptions │ │ ├── Exception.php │ │ └── InvalidActionCallException.php │ ├── Extensions │ │ ├── AbstractHook.php │ │ ├── CoreBoot.php │ │ ├── ResponseSendOutput.php │ │ ├── TemplateFetchTemplate.php │ │ └── TemplatePostParse.php │ ├── Forms │ │ └── Settings.php │ ├── Panels │ │ ├── AbstractPanel.php │ │ ├── Config.php │ │ ├── Copyright.php │ │ ├── Database.php │ │ ├── Files.php │ │ ├── Memory.php │ │ ├── Model.php │ │ ├── Time.php │ │ └── Variables.php │ ├── Services │ │ ├── GarbageCollectionService.php │ │ ├── OutputService.php │ │ ├── SettingsService.php │ │ ├── ToolbarService.php │ │ ├── TrackerService.php │ │ └── XmlService.php │ ├── addon.setup.php │ ├── database │ │ └── migrations │ │ │ ├── 2023_12_27_000112_createactionactforaddonee_debug_toolbar.php │ │ │ ├── 2023_12_27_001733_createexthookresponsesendoutputforaddoneedebugtoolbar.php │ │ │ ├── 2023_12_27_001913_createeedebugsettingstable.php │ │ │ ├── 2024_01_12_215007_createexthooktemplatefetchtemplateforaddoneedebugtoolbar.php │ │ │ ├── 2024_01_20_224821_createactionpanelajaxforaddonee_debug_toolbar.php │ │ │ ├── 2024_01_20_224837_createactiongetpaneldataforaddonee_debug_toolbar.php │ │ │ ├── 2024_01_23_004122_createexthooktemplatepostparseforaddoneedebugtoolbar.php │ │ │ ├── 2024_02_14_014154_createexthookcorebootforaddoneedt.php │ │ │ └── index.html │ ├── ext.eedt.php │ ├── language │ │ └── english │ │ │ └── lang.eedt.php │ ├── mcp.eedt.php │ ├── mod.eedt.php │ ├── upd.eedt.php │ └── views │ │ ├── partials │ │ ├── config.php │ │ ├── copyright.php │ │ ├── database.php │ │ ├── files.php │ │ ├── memory.php │ │ ├── time.php │ │ └── variables.php │ │ ├── settings.php │ │ └── toolbar.php │ ├── eedt_email │ ├── Extensions │ │ ├── AbstractHook.php │ │ ├── EeDebugToolbarInitSettings.php │ │ ├── EeDebugToolbarSettingsForm.php │ │ ├── EedtInitSettings.php │ │ ├── EedtSettingsForm.php │ │ └── EmailSend.php │ ├── Services │ │ └── EmailService.php │ ├── addon.setup.php │ ├── database │ │ └── migrations │ │ │ ├── 2024_02_15_012256_createexthookemailsendforaddoneedtemail.php │ │ │ ├── 2024_02_15_012314_createexthookeedtsettingsformforaddoneedtemail.php │ │ │ ├── 2024_02_15_012333_createexthookeedtinitsettingsforaddoneedtemail.php │ │ │ └── index.html │ ├── ext.eedt_email.php │ ├── icon.svg │ ├── index.html │ ├── language │ │ ├── english │ │ │ ├── eedt_email_lang.php │ │ │ └── index.html │ │ └── index.html │ ├── mod.eedt_email.php │ └── upd.eedt_email.php │ ├── eedt_errors │ ├── Actions │ │ ├── ClearErrorLog.php │ │ └── GetPanelErrors.php │ ├── Exceptions │ │ └── ErrorException.php │ ├── Extensions │ │ ├── AbstractHook.php │ │ ├── EeDebugToolbarAddPanel.php │ │ ├── EeDebugToolbarInitSettings.php │ │ ├── EeDebugToolbarSettingsForm.php │ │ └── SessionsEnd.php │ ├── Logging │ │ └── Logger.php │ ├── Services │ │ ├── ErrorHandlerService.php │ │ └── LoggerService.php │ ├── addon.setup.php │ ├── database │ │ └── migrations │ │ │ ├── 2024_01_14_022645_createexthookeedebugtoolbaraddpanelforaddoneedterrors.php │ │ │ ├── 2024_01_14_022705_createexthookeedebugtoolbarinitsettingsforaddoneedterrors.php │ │ │ ├── 2024_01_14_022724_createexthookeedebugtoolbarsettingsformforaddoneedterrors.php │ │ │ ├── 2024_01_14_022745_createexthooksessionsendforaddoneedterrors.php │ │ │ ├── 2024_01_14_022824_createactiongetpanelerrorsforaddoneedt_errors.php │ │ │ ├── 2024_01_14_072847_createactionclearerrorlogforaddoneedt_errors.php │ │ │ └── index.html │ ├── ext.eedt_errors.php │ ├── icon.svg │ ├── index.html │ ├── language │ │ ├── english │ │ │ ├── eedt_errors_lang.php │ │ │ └── index.html │ │ └── index.html │ ├── mod.eedt_errors.php │ ├── upd.eedt_errors.php │ └── views │ │ └── eedt_errors.php │ ├── eedt_logs │ ├── Actions │ │ └── GetPanelLogs.php │ ├── Extensions │ │ ├── AbstractHook.php │ │ └── EeDebugToolbarAddPanel.php │ ├── addon.setup.php │ ├── database │ │ └── migrations │ │ │ ├── 2024_01_15_183025_createexthookeedebugtoolbaraddpanelforaddoneedtlogs.php │ │ │ ├── 2024_01_15_183042_createactiongetpanellogsforaddoneedt_logs.php │ │ │ └── index.html │ ├── ext.eedt_logs.php │ ├── icon.svg │ ├── index.html │ ├── language │ │ ├── english │ │ │ ├── eedt_logs_lang.php │ │ │ └── index.html │ │ └── index.html │ ├── mod.eedt_logs.php │ ├── upd.eedt_logs.php │ └── views │ │ └── log_viewer.php │ └── eedt_memory_history │ ├── Actions │ └── FetchMemoryAndSqlUsage.php │ ├── Extensions │ ├── AbstractHook.php │ ├── EeDebugToolbarAddPanel.php │ ├── EeDebugToolbarInitSettings.php │ └── EeDebugToolbarSettingsForm.php │ ├── addon.setup.php │ ├── database │ └── migrations │ │ ├── 2024_01_15_190455_createexthookeedebugtoolbaraddpanelforaddoneedtmemoryhistory.php │ │ ├── 2024_01_15_190506_createexthookeedebugtoolbarsettingsformforaddoneedtmemoryhistory.php │ │ ├── 2024_01_15_190521_createexthookeedebugtoolbarinitsettingsforaddoneedtmemoryhistory.php │ │ ├── 2024_01_15_190540_createactionfetchmemoryandsqlusageforaddoneedt_memory_history.php │ │ ├── 2024_01_15_191256_create_memory_history_table.php │ │ └── index.html │ ├── ext.eedt_memory_history.php │ ├── icon.svg │ ├── index.html │ ├── language │ ├── english │ │ ├── eedt_memory_history_lang.php │ │ └── index.html │ └── index.html │ ├── mod.eedt_memory_history.php │ ├── upd.eedt_memory_history.php │ └── views │ └── memory_history.php └── themes └── user ├── eedt └── themes │ ├── bootstrap │ └── css │ │ └── eedt.css │ ├── default │ ├── css │ │ ├── ee_debug_panel_copyright.css │ │ ├── ee_debug_panel_database.css │ │ ├── ee_debug_panel_memory.css │ │ ├── ee_debug_panel_time.css │ │ └── eedt.css │ ├── images │ │ ├── config.png │ │ ├── copyright.png │ │ ├── database.png │ │ ├── files.png │ │ ├── memory.png │ │ ├── time.png │ │ └── variables.png │ └── js │ │ ├── ee_debug_panel_database.js │ │ ├── ee_debug_panel_files.js │ │ ├── ee_debug_panel_memory.js │ │ ├── ee_debug_panel_variables.js │ │ └── eedt.js │ └── hot_dog_stand │ ├── config.php │ ├── css │ └── ee_debug_toolbar.css │ └── images │ ├── config.png │ ├── copyright.png │ ├── database.png │ ├── files.png │ ├── memory.png │ ├── time.png │ └── variables.png ├── eedt_errors ├── images │ ├── error.png │ └── good.png └── js │ └── eedt_errors.js ├── eedt_logs └── images │ └── logs.png └── eedt_memory_history ├── css └── memory_history.css ├── images └── memory_history.png └── js └── memory_history.js /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: mithra62 # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Debug Toolbar 2 | 3 | The complete debugging platform for ExpressionEngine. Adds an unobtrusive interface for debugging output on an [ExpressionEngine](http://expressionengine.com "ExpressionEngine") 7.0 site. Replaces default Profiler and Template Debugger provided with ExpressionEngine. 4 | 5 | ### Features 6 | 7 | In addition to what the ExpressionEngine Profiler offers, the Debug Toolbar also offers: 8 | 9 | #### Extensible interface for project debug tools 10 | 11 | Create custom extensions to expand on debugging capabilities. 12 | 13 | #### Disable and/or Log Email 14 | 15 | The Toolbar can be configured to override email delivery, so long as the native ExpressionEngine email service is used, and log the contents to files for easy debugging and quality control. 16 | 17 | #### Custom Error Handler 18 | 19 | Control exactly which PHP errors you want to display and log each and every PHP error within every ExpressionEngine request. 20 | 21 | #### View Logs 22 | 23 | The Log Panel (included) allows for reading complete log files from within your ExpressionEngine workflow. 24 | 25 | #### Performance Alerts 26 | 27 | The Toolbar can be configured for the thresholds to determine when and which SQL query and/or template parse becomes problematic. 28 | 29 | #### Debug Mode for Guests 30 | 31 | The Toolbar can be configured to display Debug details to any Member Role(s) you want to. Super Admin no longer required. 32 | 33 | #### Performance Graph 34 | 35 | Get a visual heads up on where exactly performance is an issue on all Front End requests. 36 | 37 | ![image](https://github.com/mithra62/ee_debug_toolbar/assets/1008036/415b6748-b1ca-43af-95b5-6543574c7f65) 38 | 39 | ## Requirements 40 | 41 | 1. ExpressionEngine >= 7.4 42 | 2. PHP >= 7.4 43 | 3. Extensions Enabled 44 | 45 | ## Installation for ExpressionEngine <= 7.3.15 46 | 47 | You'll have to manually add the below hook call to ExpressionEngine: 48 | 49 | `system/ee/legacy/core/Output.php:276` within the `_display()` method. 50 | 51 | ```php 52 | if (ee()->extensions->active_hook('before_response_send_output') === true) { 53 | $output = ee()->extensions->call('before_response_send_output', $output); 54 | if (ee()->extensions->end_script === true) { 55 | return; 56 | } 57 | } 58 | ``` 59 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Actions/AbstractAction.php: -------------------------------------------------------------------------------- 1 | lang->loadfile('eedt'); 37 | ee()->load->add_package_path(PATH_THIRD . 'eedt/'); 38 | $this->toolbar = ee('eedt:ToolbarService'); 39 | 40 | //run the garbage collection against the cache 41 | ee('eedt:GarbageCollectionService')->run(); 42 | $this->cache_dir = $this->toolbar->getCachePath(); 43 | } 44 | 45 | /** 46 | * @return void 47 | */ 48 | public function process() 49 | { 50 | throw new InvalidActionCallException("Invalid Debug Action Request! This can only be called through the Debug Toolbar!"); 51 | } 52 | 53 | /** 54 | * @return mixed 55 | */ 56 | abstract function processDebug(); 57 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Actions/Act.php: -------------------------------------------------------------------------------- 1 | canViewToolbar()) { 17 | return; 18 | } 19 | 20 | $class = ee()->input->get_post('class'); 21 | $method = ee()->input->get_post('method'); 22 | 23 | //clean up the file so we know what package we're to include 24 | $package = strtolower(str_replace(['_ext'], '', $class)); 25 | 26 | $errors = true; //let's just assume the worst to keep us honest 27 | if ($this->toolbar->isAddonInstalled($package)) { 28 | $provider = ee('Addon')->get($package); 29 | if ($provider instanceof Addon) { 30 | ee()->load->add_package_path(PATH_THIRD . $package); 31 | $namespace = $provider->getNamespace(); 32 | $class = $namespace . '\\Actions\\' . $method; 33 | if (class_exists($class)) { 34 | $obj = new $class; 35 | if ($obj instanceof AbstractAction) { 36 | $obj->processDebug(); 37 | $errors = false; 38 | } 39 | } 40 | } 41 | } 42 | 43 | if ($errors) { 44 | throw new InvalidActionCallException("Invalid Debug Action Request!"); 45 | } 46 | } 47 | 48 | /** 49 | * @return mixed 50 | * @throws InvalidActionCallException 51 | */ 52 | public function processDebug() 53 | { 54 | throw new InvalidActionCallException("Invalid Debug Action Request!"); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Actions/GetPanelData.php: -------------------------------------------------------------------------------- 1 | input->get('panel', false); 10 | if (!$panel) { 11 | return; 12 | } 13 | 14 | //the cache file is just an XML so we check for existence, node, and display. easy 15 | $file = $this->cache_dir . $this->toolbar->makeCacheFilename() . '.gz'; 16 | 17 | if (file_exists($file) && is_readable($file)) { 18 | $gz = gzfile($file); 19 | $gz = implode("", $gz); 20 | $xml = simplexml_load_string($gz); 21 | $panel_node = $panel . '_panel'; 22 | if (isset($xml->panels->$panel_node->output) && $xml->panels->$panel_node->output != '') { 23 | echo base64_decode($xml->panels->$panel_node->output); 24 | } 25 | exit; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Actions/PanelAjax.php: -------------------------------------------------------------------------------- 1 | input->get("panel", false); 14 | $method = ee()->input->get("method", false); 15 | 16 | if (!$panel || $method) { 17 | return; 18 | } 19 | 20 | if (in_array($panel, $this->panel_order)) { 21 | //Native Panel 22 | ee()->load->file(PATH_THIRD . 'eedt/panels/Eedt_' . $panel . '_panel.php'); 23 | $class = 'Eedt_' . $panel . '_panel'; 24 | 25 | if (class_exists($class)) { 26 | 27 | $instance = new $class(); 28 | 29 | if (method_exists($instance, $method)) { 30 | $data = $instance->$method(); 31 | } 32 | } 33 | 34 | 35 | } else { 36 | //Third Party panel 37 | 38 | /** 39 | * TODO 40 | * I realise now that we need to somehow specify the path to the class since 41 | * the panel name will not necessarily match up with the extension name, so we cant 42 | * make that assumption. 43 | */ 44 | } 45 | 46 | if ($data) { 47 | ee()->output->send_ajax_response($data); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /system/user/addons/eedt/ControlPanel/Routes/Settings.php: -------------------------------------------------------------------------------- 1 | settings = ee('eedt:ToolbarService')->getSettings(); 24 | $vars['cp_page_title'] = lang('eedt.settings'); 25 | $vars['base_url'] = $this->url('settings'); 26 | $vars['save_btn_text'] = lang('eedt.save'); 27 | $vars['save_btn_text_working'] = lang('eedt.saving'); 28 | 29 | $form = new SettingsForm(); 30 | $form->setData($this->settings); 31 | if (ee()->input->server('REQUEST_METHOD') === 'POST') { 32 | 33 | $form->setData($_POST); 34 | $result = $form->validate(); 35 | if ($result->isValid()) { 36 | ee('eedt:SettingsService')->updateSettings($_POST); 37 | ee('CP/Alert')->makeInline('shared-form') 38 | ->asSuccess() 39 | ->withTitle(lang('eedt.settings_saved')) 40 | ->defer(); 41 | 42 | ee()->functions->redirect($this->url('settings')); 43 | exit; 44 | } else { 45 | $vars['errors'] = $result; 46 | ee('CP/Alert')->makeInline('shared-form') 47 | ->asIssue() 48 | ->withTitle(lang('eedt.error.settings_save')) 49 | ->now(); 50 | } 51 | } 52 | 53 | if(ee()->config->item('show_profiler') != 'y') { 54 | ee('CP/Alert')->makeInline('shared-form') 55 | ->asWarning() 56 | ->withTitle(lang('eedt.profiler_not_enabled')) 57 | ->cannotClose() 58 | ->now(); 59 | } 60 | 61 | $vars += $form->generate(); 62 | 63 | $this->addBreadcrumb($this->url('edit'), 'eedt.settings'); 64 | $this->setBody('settings', $vars); 65 | $this->setHeading('eedt.header.settings_save'); 66 | return $this; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Exceptions/Exception.php: -------------------------------------------------------------------------------- 1 | 'default' 17 | ]; 18 | 19 | /** 20 | * Persistent storage to hold settings across the 21 | * multiple class initialisations by EE and then CI 22 | * 23 | * @var array 24 | */ 25 | static $persistent_settings = []; 26 | 27 | /** 28 | * The extension name 29 | * 30 | * @var string 31 | */ 32 | public $name = ''; 33 | 34 | /** 35 | * The extension version 36 | * 37 | * @var float 38 | */ 39 | public $version = ''; 40 | 41 | /** 42 | * Used nowhere and not really needed (ya hear me ElisLab?!?!) 43 | * 44 | * @var string 45 | */ 46 | public $description = ''; 47 | 48 | /** 49 | * We're doing our own settings now so set this to off. 50 | * 51 | * @var string 52 | */ 53 | public $settings_exist = 'y'; 54 | 55 | /** 56 | * Where to get help 57 | * 58 | * @var string 59 | */ 60 | public $docs_url = 'https://github.com/mithra62/ee_debug_toolbar/wiki'; 61 | 62 | /** 63 | * The full path to store the cached debug output 64 | * @var string 65 | */ 66 | protected string $cache_dir = ''; 67 | 68 | /** 69 | * The order the default panels appear in. 70 | * Also used to differentiate the native panels from third party panels 71 | * @var array 72 | */ 73 | protected array $panel_order = [ 74 | 'Copyright', 75 | 'Variables', 76 | 'Files', 77 | 'Memory', 78 | 'Time', 79 | 'Config', 80 | 'Database' 81 | ]; 82 | 83 | protected ToolbarService $toolbar; 84 | 85 | public function __construct($settings = '') 86 | { 87 | ee()->lang->loadfile('eedt'); 88 | $path = dirname(realpath(__FILE__)); 89 | $this->name = lang('eedt_module_name'); 90 | $this->description = lang('eedt_module_description'); 91 | ee()->load->add_package_path(PATH_THIRD . 'eedt/'); 92 | $this->toolbar = ee('eedt:ToolbarService'); 93 | $this->cache_dir = $this->toolbar->getCachePath(); 94 | if (!is_dir($this->cache_dir)) { 95 | mkdir($this->cache_dir, 0777, true); 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Extensions/CoreBoot.php: -------------------------------------------------------------------------------- 1 | shouldDisplayError()) { 14 | ee('CP/Alert')->makeBanner('shared-form') 15 | ->asIssue() 16 | ->withTitle(lang('eedt.profiler_enabled_non_sa')) 17 | ->canClose() 18 | ->now(); 19 | } 20 | } 21 | } 22 | 23 | /** 24 | * @return bool 25 | */ 26 | protected function shouldDisplayError(): bool 27 | { 28 | $settings = $this->toolbar->getSettings(); 29 | $roles = $settings['allowed_roles']; 30 | foreach($roles AS $key => $value) { 31 | if($value == '') { 32 | unset($roles[$key]); 33 | } 34 | } 35 | 36 | return count($roles) >= 2 || (count($roles) >= 1) && !in_array(1, $roles); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Extensions/TemplateFetchTemplate.php: -------------------------------------------------------------------------------- 1 | trackTemplate($row); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Extensions/TemplatePostParse.php: -------------------------------------------------------------------------------- 1 | TMPL->tag_data); 14 | // print_r(ee()->TMPL->templates_loaded); 15 | //print_r(ee()->TMPL); 16 | //exit; 17 | //echo "\n"; 18 | return $final_template; 19 | //print_r(ee()->TMPL->tagproper); 20 | //print_r(ee()->TMPL->search_fields); 21 | //print_r(ee()->TMPL->templates_loaded); 22 | exit; 23 | echo 'fdsa'; 24 | exit; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Forms/Settings.php: -------------------------------------------------------------------------------- 1 | getGroup('eedt.form.header.settings'); 14 | $field_set = $field_group->getFieldSet('eedt.form.theme'); 15 | $field_set->setDesc('eedt.form.desc.theme'); 16 | $field = $field_set->getField('theme', 'select'); 17 | $field->setValue($this->get('theme', 'default')) 18 | ->setChoices(ee('eedt:ToolbarService')->getThemes()); 19 | 20 | $field_set = $field_group->getFieldSet('eedt.form.toolbar_position'); 21 | $field_set->setDesc('eedt.form.desc.toolbar_position'); 22 | $field = $field_set->getField('toolbar_position', 'select'); 23 | $field->setValue($this->get('toolbar_position', 'bottom-left')) 24 | ->setChoices(ee('eedt:ToolbarService')->toolbar_positions); 25 | 26 | $field_set = $field_group->getFieldSet('eedt_errors.form.allowed_roles'); 27 | $field_set->set('caution', true)->setDesc('eedt_errors.form.desc.allowed_roles'); 28 | $field = $field_set->getField('allowed_roles', 'checkbox'); 29 | $field->setValue($this->get('allowed_roles')) 30 | ->setChoices($this->roleOptions()); 31 | 32 | $field_group = $form->getGroup('eedt_perf_alerts.form.header.settings'); 33 | $field_set = $field_group->getFieldSet('eedt_perf_alerts.form.max_exec_time'); 34 | $field_set->setDesc('eedt_perf_alerts.form.desc.form.max_exec_time'); 35 | $field = $field_set->getField('max_exec_time', 'number'); 36 | $field->setValue($this->get('max_exec_time')); 37 | 38 | $field_set = $field_group->getFieldSet('eedt_perf_alerts.form.max_memory'); 39 | $field_set->setDesc('eedt_perf_alerts.form.desc.form.max_memory'); 40 | $field = $field_set->getField('max_memory', 'number'); 41 | $field->setValue($this->get('max_memory')); 42 | 43 | $field_set = $field_group->getFieldSet('eedt_perf_alerts.form.max_queries'); 44 | $field_set->setDesc('eedt_perf_alerts.form.desc.form.max_queries'); 45 | $field = $field_set->getField('max_queries', 'number'); 46 | $field->setValue($this->get('max_queries')); 47 | 48 | $field_set = $field_group->getFieldSet('eedt_perf_alerts.form.max_sql_time'); 49 | $field_set->setDesc('eedt_perf_alerts.form.desc.form.max_sql_time'); 50 | $field = $field_set->getField('max_sql_time', 'number'); 51 | $field->setValue($this->get('max_sql_time')); 52 | 53 | $field_set = $field_group->getFieldSet('eedt_perf_alerts.form.max_query_time'); 54 | $field_set->setDesc('eedt_perf_alerts.form.desc.form.max_query_time'); 55 | $field = $field_set->getField('max_query_time', 'number'); 56 | $field->setValue($this->get('max_query_time')); 57 | 58 | $field_set = $field_group->getFieldSet('eedt_perf_alerts.form.max_query_memory'); 59 | $field_set->setDesc('eedt_perf_alerts.form.desc.form.max_query_memory'); 60 | $field = $field_set->getField('max_query_memory', 'number'); 61 | $field->setValue($this->get('max_query_memory')); 62 | 63 | if (ee()->extensions->active_hook('eedt_settings_form') === TRUE) { 64 | $form = ee()->extensions->call('eedt_settings_form', $form); 65 | } 66 | 67 | $form->asTab(); 68 | 69 | return $form->toArray(); 70 | } 71 | 72 | /** 73 | * @return array 74 | */ 75 | protected function roleOptions(): array 76 | { 77 | $groups = []; 78 | $query = ee('Model') 79 | ->get('Role') 80 | ->order('name', 'asc') 81 | ->all(); 82 | 83 | foreach ($query as $row) { 84 | $groups[$row->role_id] = $row->name; 85 | } 86 | 87 | return $groups; 88 | } 89 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/AbstractPanel.php: -------------------------------------------------------------------------------- 1 | load->helper("url"); 47 | $this->toolbar = ee('eedt:ToolbarService'); 48 | $this->settings = $this->toolbar->getSettings(); 49 | 50 | if (!$this->button_label) { 51 | $this->button_label = ucfirst(str_replace(array("_", "-"), " ", $this->name)); 52 | } 53 | 54 | if (!$this->button_icon_uri) { 55 | $this->button_icon_uri = $this->toolbar->createThemeUrl($this->settings['theme'], 'images') . $this->name . $this->button_icon_extension; 56 | } 57 | } 58 | 59 | /** 60 | * @param Model $view 61 | * @return Model 62 | */ 63 | public function addPanel(Model $view): Model 64 | { 65 | $view->setName($this->name); 66 | $view->setButtonLabel($this->button_label); 67 | $view->setButtonIcon($this->button_icon_uri); 68 | $view->setPanelContents($this->view()); 69 | 70 | return $view; 71 | } 72 | 73 | /** 74 | * Returns rendered view fragment as a string 75 | * 76 | * @param string $view_path 77 | * @param array $data 78 | * @return string 79 | */ 80 | protected function view(string $view_path = '', array $data = []): string 81 | { 82 | if (!$view_path) { 83 | $view_path = 'partials/' . $this->name; 84 | } 85 | 86 | return ee()->load->view($view_path, $data, TRUE); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Config.php: -------------------------------------------------------------------------------- 1 | button_label = lang($this->name) . ' (' . count(ee()->config->config) . ')'; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Copyright.php: -------------------------------------------------------------------------------- 1 | button_label = 'v' . APP_VER . ' / ' . phpversion(); 17 | } 18 | 19 | /** 20 | * @param \DebugToolbar\Panels\Model $view 21 | * @return \DebugToolbar\Panels\Model 22 | */ 23 | public function addPanel(Model $view): Model 24 | { 25 | $data['project_contributors'] = $this->getContributors(); 26 | $view->setPanelContents(ee()->load->view('partials/copyright', $data, true)); 27 | $view = parent::addPanel($view); 28 | $toolbar = ee('eedt:ToolbarService'); 29 | $view->addCss($toolbar->createThemeUrl('default', 'css') . '/ee_debug_panel_copyright.css'); 30 | 31 | 32 | return $view; 33 | } 34 | 35 | /** 36 | * @return array 37 | */ 38 | protected function getContributors(): array 39 | { 40 | $data = []; 41 | $providers = ee('App')->getProviders(); 42 | foreach($providers AS $provider) 43 | { 44 | if($provider->get('author') && $provider->get('author_url')) { 45 | $data[$provider->get('author')] = $provider->get('author_url'); 46 | } 47 | } 48 | return $data; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Database.php: -------------------------------------------------------------------------------- 1 | getLog(); 15 | $this->button_label = $log->getQueryCount() . ' ' . lang('eedt_in') . ' ' . number_format(ee('Database')->currentExecutionTime(), 4) . 's'; 16 | } 17 | 18 | /** 19 | * @param $view 20 | * @return mixed 21 | */ 22 | public function addPanel(Model $view): Model 23 | { 24 | $view = parent::addPanel($view); 25 | $settings = $this->toolbar->getSettings(); 26 | $data['settings'] = $settings; 27 | $view->addCss($this->toolbar->createThemeUrl('default', 'css') . '/ee_debug_panel_database.css'); 28 | $view->addJs($this->toolbar->createThemeUrl('default', 'js') . '/ee_debug_panel_database.js'); 29 | $view->setPanelContents(ee()->load->view('partials/database', $data, true)); 30 | 31 | $log = ee('Database')->getLog(); 32 | if ($log->getQueryCount() > $settings['max_queries']) { 33 | $view->setPanelCssClass('flash'); 34 | } 35 | 36 | if (ee('Database')->currentExecutionTime() > $settings['max_sql_time']) { 37 | $view->setPanelCssClass('flash'); 38 | } 39 | 40 | return $view; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Files.php: -------------------------------------------------------------------------------- 1 | button_label = count(get_included_files()).' '.lang('files'); 12 | } 13 | 14 | public function addPanel(Model $view): Model 15 | { 16 | $view = parent::addPanel($view); 17 | $view->addJs($this->toolbar->createThemeUrl('default', 'js') . '/ee_debug_panel_files.js'); 18 | return $view; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Memory.php: -------------------------------------------------------------------------------- 1 | button_label = $this->toolbar->filesizeFormat(memory_get_peak_usage()) . ' ' . ini_get('memory_limit'); 12 | } 13 | 14 | public function addPanel(Model $view): Model 15 | { 16 | $view->setName($this->name); 17 | $view->setButtonLabel($this->button_label); 18 | $view->setButtonIcon($this->button_icon_uri); 19 | $view->setPanelContents(ee()->load->view('partials/memory', array(), TRUE)); 20 | $view->addCss($this->toolbar->createThemeUrl('default', 'css') . '/ee_debug_panel_memory.css'); 21 | $view->addJs($this->toolbar->createThemeUrl('default', 'js') . '/ee_debug_panel_memory.js'); 22 | 23 | $parts = explode(' ', $this->toolbar->filesizeFormat(memory_get_peak_usage())); 24 | $settings = $this->toolbar->getSettings(); 25 | if (!empty($parts['0']) && $parts['0'] > $settings['max_memory']) { 26 | $view->setPanelCssClass('flash'); 27 | } 28 | return $view; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Model.php: -------------------------------------------------------------------------------- 1 | name = $name; 98 | } 99 | 100 | /** 101 | * @return string 102 | */ 103 | public function getName(): string 104 | { 105 | return $this->name; 106 | } 107 | 108 | /** 109 | * @return string 110 | */ 111 | public function getTarget(): string 112 | { 113 | return $this->target_prefix . $this->getName() . $this->target_suffix; 114 | } 115 | 116 | /** 117 | * @param string $label 118 | */ 119 | function setButtonLabel(string $label) 120 | { 121 | $this->button_label = $label; 122 | } 123 | 124 | /** 125 | * @return string 126 | */ 127 | public function getButtonLabel(): string 128 | { 129 | return $this->button_label; 130 | } 131 | 132 | /** 133 | * @param string $filename 134 | */ 135 | public function setButtonIcon(string $filename) 136 | { 137 | $this->button_icon = $filename; 138 | } 139 | 140 | /** 141 | * @return string 142 | */ 143 | public function getButtonIcon() 144 | { 145 | return $this->button_icon; 146 | } 147 | 148 | /** 149 | * @param string $text 150 | */ 151 | public function setButtonIconAltText($text = "") 152 | { 153 | $this->button_icon_alt_title = $text; 154 | } 155 | 156 | /** 157 | * @return string 158 | */ 159 | public function getButtonIconAltText() 160 | { 161 | if ($this->button_icon_alt_title) { 162 | return $this->button_icon_alt_title; 163 | } 164 | 165 | return $this->getButtonLabel(); 166 | } 167 | 168 | /** 169 | * @param string $html 170 | */ 171 | public function setPanelContents(string $html = ''): void 172 | { 173 | $this->output = $html; 174 | } 175 | 176 | /** 177 | * @return string 178 | */ 179 | public function getPanelContents(): string 180 | { 181 | return $this->output; 182 | } 183 | 184 | /** 185 | * @param string $css 186 | */ 187 | public function setPanelCssClass(string $css) 188 | { 189 | $this->panel_css_class = $css; 190 | } 191 | 192 | /** 193 | * @return string 194 | */ 195 | public function getPanelCssClass(): string 196 | { 197 | return $this->panel_css_class; 198 | } 199 | 200 | /** 201 | * @param string $filename 202 | * @param boolean $page_load 203 | */ 204 | function addJs(string $filename, bool $page_load = false) 205 | { 206 | if ($page_load) { 207 | $this->page_load_js[] = $filename; 208 | return; 209 | } 210 | $this->js[] = $filename; 211 | } 212 | 213 | /** 214 | * @return array 215 | */ 216 | public function getJs(): array 217 | { 218 | return $this->js; 219 | } 220 | 221 | /** 222 | * @return array 223 | */ 224 | public function getPageLoadJs(): array 225 | { 226 | return $this->page_load_js; 227 | } 228 | 229 | /** 230 | * @param string $filename 231 | * @param boolean $page_load 232 | */ 233 | public function addCss(string $filename, bool $page_load = false) 234 | { 235 | if ($page_load) { 236 | $this->page_load_css[] = $filename; 237 | return; 238 | } 239 | $this->css[] = $filename; 240 | } 241 | 242 | /** 243 | * @return array 244 | */ 245 | public function getCss() 246 | { 247 | return $this->css; 248 | } 249 | 250 | /** 251 | * @return array 252 | */ 253 | public function getPageLoadCss() 254 | { 255 | return $this->page_load_css; 256 | } 257 | 258 | /** 259 | * @param int $injection_point 260 | * @return void 261 | */ 262 | function setInjectionPoint(int $injection_point = Model::PANEL_IN_TOOLBAR) 263 | { 264 | $this->injection_point = $injection_point; 265 | } 266 | 267 | /** 268 | * @return int 269 | */ 270 | public function getInjectionPoint(): int 271 | { 272 | return $this->injection_point; 273 | } 274 | 275 | /** 276 | * @param bool $enabled 277 | */ 278 | public function setShowButton(bool $enabled = true) 279 | { 280 | $this->show_button = $enabled; 281 | } 282 | 283 | /** 284 | * @return bool 285 | */ 286 | public function showButton(): bool 287 | { 288 | return $this->show_button; 289 | } 290 | 291 | /** 292 | * @return string 293 | */ 294 | public function getPanelFetchUrl(): string 295 | { 296 | return $this->panel_fetch_url; 297 | } 298 | 299 | /** 300 | * @param string $panel_fetch_url 301 | */ 302 | public function setPanelFetchUrl($panel_fetch_url) 303 | { 304 | $this->panel_fetch_url = str_replace("&", "&", $panel_fetch_url); 305 | } 306 | } 307 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Time.php: -------------------------------------------------------------------------------- 1 | button_label = ee()->benchmark->elapsed_time('total_execution_time_start', 'total_execution_time_end') . 's'; 15 | } 16 | 17 | /** 18 | * @param Model $view 19 | * @return Model 20 | */ 21 | public function addPanel(Model $view): Model 22 | { 23 | $view = parent::addPanel($view); 24 | $view->addCss($this->toolbar->createThemeUrl('default', 'css') . '/ee_debug_panel_time.css'); 25 | return $view; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Panels/Variables.php: -------------------------------------------------------------------------------- 1 | addJs($this->toolbar->createThemeUrl('default', 'js') . '/ee_debug_panel_variables.js'); 15 | return $view; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /system/user/addons/eedt/Services/GarbageCollectionService.php: -------------------------------------------------------------------------------- 1 | cache_dir = ee('eedt:ToolbarService')->getCachePath(); 24 | } 25 | 26 | /** 27 | * Checks if a given $file has a modified date outside the $expires range 28 | * @param string $file 29 | */ 30 | private function expired($file) 31 | { 32 | $cache_created = filemtime($file); 33 | $max_time = time() - $this->expires; 34 | if ($max_time >= $cache_created) { 35 | return true; 36 | } 37 | } 38 | 39 | /** 40 | * Wrapper to remove a cached file 41 | * @param string $file 42 | * @return boolean 43 | */ 44 | private function delete($file) 45 | { 46 | return unlink($file); 47 | } 48 | 49 | /** 50 | * Do It!! 51 | */ 52 | public function run() 53 | { 54 | $system = new Filesystem(); 55 | if ($system->isWritable($this->cache_dir)) { 56 | $d = dir($this->cache_dir); 57 | while (false !== ($entry = $d->read())) { 58 | if ($entry == '.' || $entry == '..') { 59 | continue; 60 | } 61 | 62 | $file = $this->cache_dir . $entry; 63 | if (!$system->isWritable($file)) { 64 | continue; //can't write; don't care 65 | } 66 | 67 | if ($this->expired($file)) { 68 | $this->delete($file); 69 | } 70 | } 71 | $d->close(); 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Services/OutputService.php: -------------------------------------------------------------------------------- 1 | '], $str); 12 | 13 | // Replace any existing PHP tags to temporary markers so they don't accidentally 14 | // break the string out of PHP, and thus, thwart the highlighting. 15 | 16 | $str = str_replace( 17 | ['', '<%', '%>', '\\', ''], 18 | ['phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'], 19 | $str 20 | ); 21 | 22 | // The highlight_string function requires that the text be surrounded 23 | // by PHP tags, which we will remove later 24 | $str = ''; // <\?php( | )/i', '', $str); 31 | $str = preg_replace('/(.*?)\?><\/span>\n<\/span>\n<\/code>/is', "$1\n\n", $str); 32 | $str = preg_replace('/<\/span>/i', '', $str); 33 | 34 | // Replace our markers back to PHP tags. 35 | $str = str_replace( 36 | ['phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'], 37 | ['<?', '?>', '<%', '%>', '\\', '</script>'], 38 | $str 39 | ); 40 | 41 | return $str; 42 | } 43 | 44 | /** 45 | * Sets up the third party add-ons path 46 | * @return string 47 | */ 48 | public function thirdPartyPath(): string 49 | { 50 | $path = ''; 51 | if (defined('PATH_THIRD')) { 52 | $path = PATH_THIRD; 53 | } else { 54 | $path = APPPATH . 'third_party/'; 55 | } 56 | 57 | return $path; 58 | } 59 | 60 | /** 61 | * Sets up the third party themes path 62 | * @return string 63 | */ 64 | public function themePath(): string 65 | { 66 | $path = ''; 67 | if (defined('PATH_THIRD_THEMES')) { 68 | $path = PATH_THIRD_THEMES; 69 | } else { 70 | $path = rtrim(ee()->config->config['theme_folder_path'], '/') . '/third_party/'; 71 | } 72 | 73 | return $path; 74 | } 75 | 76 | /** 77 | * Sets up the third party theme URL 78 | * @return string 79 | */ 80 | public function themeUrl(): string 81 | { 82 | if (defined('URL_THIRD_THEMES')) { 83 | $url = URL_THIRD_THEMES; 84 | } else { 85 | $url = rtrim(ee()->config->config['theme_folder_url'], '/') . '/third_party/'; 86 | } 87 | 88 | return $url; 89 | } 90 | 91 | /** 92 | * Formats $arr for use in Panels with Array data 93 | * @param array $arr 94 | * @param string $default 95 | * @param string $pair_delim 96 | * @param string $tail_delim 97 | * @return string 98 | */ 99 | public function outputArray(array $arr, string $default = 'nothing_found', string $pair_delim = ' => ', string $tail_delim = '
'): string 100 | { 101 | if (!is_array($arr) || count($arr) == '0') { 102 | return lang($default); 103 | } 104 | 105 | $return = ''; 106 | foreach ($arr as $key => $value) { 107 | if (is_array($value)) { 108 | $return .= $key . $pair_delim . '
' . print_r($value, true) . '
'; 109 | } else { 110 | $return .= $key . $pair_delim . $value . $tail_delim; 111 | } 112 | } 113 | 114 | return $return; 115 | } 116 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Services/SettingsService.php: -------------------------------------------------------------------------------- 1 | 'default', 12 | 'toolbar_position' => 'bottom-left', 13 | 'allowed_roles' => [ 14 | 1, 15 | ], 16 | 'profile_exts' => [ 17 | 'js', 18 | 'css', 19 | 'jpg', 20 | 'jpeg', 21 | 'gif', 22 | 'png', 23 | 'bmp', 24 | 'pdf', 25 | 'svg', 26 | 'htm', 27 | 'html', 28 | 'xhtml', 29 | 'csv', 30 | 'rss', 31 | 'atom', 32 | 'xml', 33 | ], 34 | 'max_exec_time' => 0.5, 35 | 'max_memory' => 30, 36 | 'max_queries' => 100, 37 | 'max_sql_time' => 0.1, 38 | 'max_query_time' => 0.01, 39 | 'max_query_memory' => 100000, 40 | ]; 41 | 42 | /** 43 | * @var string 44 | */ 45 | protected string $settings_table = 'eedt_settings'; 46 | 47 | /** 48 | * Returns the value straight from the database 49 | * @param string $setting 50 | */ 51 | public function getSetting(string $key) 52 | { 53 | return ee()->db->get_where($this->settings_table, ['setting_key' => $key])->result_array(); 54 | } 55 | 56 | /** 57 | * @param string $setting 58 | * @return mixed 59 | */ 60 | public function addSetting(string $setting) 61 | { 62 | $data = [ 63 | 'setting_key' => $setting, 64 | 'setting_value' => '', 65 | ]; 66 | 67 | return ee()->db->insert($this->settings_table, $data); 68 | } 69 | 70 | /** 71 | * @param $key 72 | * @return bool 73 | */ 74 | protected function isSetting($key) 75 | { 76 | if (array_key_exists($key, $this->_defaults)) { 77 | if (!$this->getSetting($key)) { 78 | return false; 79 | } 80 | 81 | return true; 82 | } 83 | 84 | return false; 85 | } 86 | 87 | /** 88 | * @param string $key 89 | * @param string $value 90 | * @return false|void 91 | */ 92 | public function updateSetting(string $key, $value) 93 | { 94 | if (!$this->isSetting($key)) { 95 | $this->addSetting($key); 96 | } 97 | 98 | $data = []; 99 | if (is_array($value)) { 100 | $value = serialize($value); 101 | $data['serialized '] = '1'; 102 | } 103 | 104 | $data['setting_value'] = $value; 105 | ee()->db->where('setting_key', $key); 106 | ee()->db->update($this->settings_table, $data); 107 | } 108 | 109 | /** 110 | * @param array $data 111 | * @return void 112 | */ 113 | public function updateSettings(array $data): void 114 | { 115 | foreach ($data as $key => $value) { 116 | $this->updateSetting($key, $value); 117 | } 118 | } 119 | 120 | /** 121 | * @return array 122 | */ 123 | public function getDefaults(): array 124 | { 125 | return $this->_defaults; 126 | } 127 | 128 | /** 129 | * @param array $new_defaults 130 | * @return $this 131 | */ 132 | public function setDefaults(array $new_defaults = []): SettingsService 133 | { 134 | foreach ($new_defaults as $key => $value) { 135 | $this->_defaults[$key] = $value; 136 | } 137 | 138 | return $this; 139 | } 140 | 141 | /** 142 | * @return array 143 | */ 144 | public function getSettings(): array 145 | { 146 | ee()->db->flush_cache(); 147 | ee()->db->select('setting_key, setting_value, `serialized`'); 148 | $query = ee()->db->get($this->settings_table); 149 | $_settings = $query->result_array(); 150 | $settings = []; 151 | foreach ($_settings as $setting) { 152 | $settings[$setting['setting_key']] = ($setting['serialized'] == '1' ? unserialize($setting['setting_value']) : $setting['setting_value']); 153 | } 154 | 155 | //now check to make sure they're all there and set default values if not 156 | foreach ($this->_defaults as $key => $value) { 157 | //setup the override check 158 | if (isset($this->config->config['eedt'][$key])) { 159 | $settings[$key] = $this->config->config['eedt'][$key]; 160 | } 161 | 162 | //normal default check 163 | if (!isset($settings[$key])) { 164 | $settings[$key] = $value; 165 | } 166 | } 167 | 168 | return $settings; 169 | } 170 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Services/TrackerService.php: -------------------------------------------------------------------------------- 1 | templates[] = $template_info; 19 | return $this; 20 | } 21 | 22 | /** 23 | * @return array 24 | */ 25 | public function getAllTemplates(): array 26 | { 27 | return $this->templates; 28 | } 29 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/Services/XmlService.php: -------------------------------------------------------------------------------- 1 | rootName = $rootName; 44 | return $this; 45 | } 46 | 47 | /** 48 | * @param string $version 49 | * @return $this 50 | */ 51 | public function setXmlVersion(string $version): XmlService 52 | { 53 | $this->xmlVersion = $version; 54 | return $this; 55 | } 56 | 57 | /** 58 | * @param string $charSet 59 | * @return $this 60 | */ 61 | public function setCharSet(string $charSet): XmlService 62 | { 63 | $this->charSet = $charSet; 64 | return $this; 65 | } 66 | 67 | /** 68 | * @param $indentString 69 | * @return $this 70 | */ 71 | public function setIndentStr($indentString): XmlService 72 | { 73 | $this->indentString = $indentString; 74 | return $this; 75 | } 76 | 77 | /** 78 | * @param string $xsltFilePath 79 | * @return $this 80 | */ 81 | public function setXsltFilePath(string $xsltFilePath): XmlService 82 | { 83 | $this->xsltFilePath = $xsltFilePath; 84 | return $this; 85 | } 86 | 87 | /** 88 | * @return $this 89 | */ 90 | public function initiate(): XmlService 91 | { 92 | // Create new xmlwriter using memory for string output. 93 | $this->openMemory(); 94 | 95 | // Set indenting, if any. 96 | if ($this->indentString) { 97 | $this->setIndent(true); 98 | $this->setIndentString($this->indentString); 99 | } 100 | 101 | // Set DTD. 102 | $this->startDocument($this->xmlVersion, $this->charSet); 103 | 104 | // Set XSLT stylesheet path, if any. 105 | if ($this->xsltFilePath) { 106 | $this->writePi('xml-stylesheet', 'type="text/xsl" href="' . $this->xsltFilePath . '"'); 107 | } 108 | 109 | // Set the root tag. 110 | $this->startElement($this->rootName); 111 | return $this; 112 | } 113 | 114 | /** 115 | * @param string $name 116 | * @param array $attributes 117 | * @return $this 118 | */ 119 | public function startBranch(string $name, array $attributes = []): XmlService 120 | { 121 | $this->startElement($name); 122 | $this->addAttributes($attributes); 123 | return $this; 124 | } 125 | 126 | /** 127 | * End an open branch. A branch needs to be closed explicitely if the branch 128 | * is followed directly by another branch. 129 | */ 130 | public function endBranch() 131 | { 132 | $this->endElement(); 133 | } 134 | 135 | /** 136 | * @param string $name 137 | * @param string $value 138 | * @param array $attributes 139 | * @param bool $cdata 140 | * @return $this 141 | */ 142 | public function addNode(string $name, string $value, array $attributes = [], bool $cdata = false): XmlService 143 | { 144 | $this->startElement($name); 145 | $this->addAttributes($attributes); 146 | 147 | if ($cdata) { 148 | $this->writeCdata($value); 149 | } else { 150 | $this->text($value); 151 | } 152 | 153 | $this->endElement(); 154 | return $this; 155 | } 156 | 157 | /** 158 | * @param bool $echo 159 | * @return string 160 | */ 161 | public function getXml(bool $echo = false): string 162 | { 163 | if ($echo === true) { 164 | header('Content-type: text/xml'); 165 | } 166 | 167 | $this->endElement(); 168 | $this->endDocument(); 169 | 170 | $output = $this->outputMemory(); 171 | if ($echo === true) { 172 | echo $output; 173 | } 174 | 175 | return $output; 176 | } 177 | 178 | /** 179 | * @param array $attributes 180 | * @return $this 181 | */ 182 | protected function addAttributes(array $attributes): XmlService 183 | { 184 | if (count($attributes) > 0) { 185 | // We have attributes, let's set them 186 | foreach ($attributes as $key => $value) { 187 | $this->writeAttribute($key, $value); 188 | } 189 | } 190 | 191 | return $this; 192 | } 193 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/addon.setup.php: -------------------------------------------------------------------------------- 1 | 'mithra62', 21 | 'author_url' => 'https://github.com/mithra62/ee_debug_toolbar', 22 | 'docs_url' => 'https://github.com/mithra62/ee_debug_toolbar/wiki', 23 | 'name' => DEBUG_TOOLBAR_ADDON_NAME, 24 | 'description' => 'Adds an unobtrusive interface for debugging output', 25 | 'version' => DEBUG_TOOLBAR_VERSION, 26 | 'namespace' => 'DebugToolbar', 27 | 'settings_exist' => true, 28 | 'services.singletons' => [ 29 | 'ToolbarService' => function ($addon) { 30 | return new ToolbarService(); 31 | }, 32 | 'SettingsService' => function ($addon) { 33 | return new SettingsService(); 34 | }, 35 | 'TrackerService' => function ($addon) { 36 | return new TrackerService(); 37 | }, 38 | 'OutputService' => function ($addon) { 39 | return new OutputService(); 40 | }, 41 | 'GarbageCollectionService' => function ($addon) { 42 | return new GarbageCollectionService(); 43 | }, 44 | ], 45 | 'services' => [ 46 | 'XmlService' => function ($addon) { 47 | return new XmlService(); 48 | }, 49 | ] 50 | ]; 51 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2023_12_27_000112_createactionactforaddonee_debug_toolbar.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt', 15 | 'method' => 'Act', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt') 28 | ->filter('method', 'Act') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2023_12_27_001733_createexthookresponsesendoutputforaddoneedebugtoolbar.php: -------------------------------------------------------------------------------- 1 | 'Eedt_ext', 15 | 'method' => 'response_send_output', 16 | 'hook' => 'before_response_send_output', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | $addon = ee('Addon')->get('eedt'); 34 | 35 | ee('Model')->get('Extension') 36 | ->filter('class', 'Eedt_ext') 37 | ->delete(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2023_12_27_001913_createeedebugsettingstable.php: -------------------------------------------------------------------------------- 1 | array('type' => 'int', 'constraint' => '10', 'unsigned' => true, 'auto_increment' => true), 15 | 'site_id' => array('type' => 'int', 'constraint' => '4', 'unsigned' => true, 'default' => 1), 16 | 'setting_key' => array('type' => 'varchar', 'constraint' => '30'), 17 | 'setting_value' => array('type' => 'text'), 18 | 'serialized' => array('type' => 'int', 'constraint' => '1', 'default' => null), 19 | ); 20 | 21 | ee()->dbforge->add_field($fields); 22 | ee()->dbforge->add_key('id', true); 23 | ee()->dbforge->create_table('eedt_settings'); 24 | } 25 | 26 | /** 27 | * Rollback the migration 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | ee()->dbforge->drop_table('eedt_settings'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2024_01_12_215007_createexthooktemplatefetchtemplateforaddoneedebugtoolbar.php: -------------------------------------------------------------------------------- 1 | 'Eedt_ext', 15 | 'method' => 'template_fetch_template', 16 | 'hook' => 'template_fetch_template', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | $addon = ee('Addon')->get('eedt'); 34 | 35 | ee('Model')->get('Extension') 36 | ->filter('class', 'Eedt_ext') 37 | ->delete(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2024_01_20_224821_createactionpanelajaxforaddonee_debug_toolbar.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt', 15 | 'method' => 'PanelAjax', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt') 28 | ->filter('method', 'PanelAjax') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2024_01_20_224837_createactiongetpaneldataforaddonee_debug_toolbar.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt', 15 | 'method' => 'GetPanelData', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt') 28 | ->filter('method', 'GetPanelData') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2024_01_23_004122_createexthooktemplatepostparseforaddoneedebugtoolbar.php: -------------------------------------------------------------------------------- 1 | 'Eedt_ext', 15 | 'method' => 'template_post_parse', 16 | 'hook' => 'template_post_parse', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/2024_02_14_014154_createexthookcorebootforaddoneedt.php: -------------------------------------------------------------------------------- 1 | 'Eedt_ext', 15 | 'method' => 'core_boot', 16 | 'hook' => 'core_boot', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt/database/migrations/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt/ext.eedt.php: -------------------------------------------------------------------------------- 1 | 'Debug Toolbar', 5 | 'ee_debug_toolbar_module_description' => 'Adds an unobtrusive interface for debugging output', 6 | 'extensions' => 'Extensions', 7 | 'ext_name' => 'Debug Toolbar', 8 | 'no_get_vars' => 'No $_GET vars found.', 9 | 'no_cookie_vars' => 'No $_COOKIE vars found.', 10 | 'no_post_vars' => 'No $_POST vars found.', 11 | 'no_session_vars' => 'No Session vars found.', 12 | 'time' => 'Time', 13 | 'config' => 'Config', 14 | 'configuration_data' => 'Configuration Data', 15 | 'memory' => 'Memory', 16 | 'in' => 'in', 17 | 'database' => 'Database', 18 | 'variables' => 'Variables', 19 | 'credits' => 'Credits', 20 | 'files' => 'Files', 21 | 'ee_session' => 'EE Session', 22 | 'file_information' => 'File Information', 23 | 'files_included' => 'Files Included', 24 | 'system_paths' => 'System Paths', 25 | 'headers' => 'Headers', 26 | 'app' => 'App', 27 | 'themes' => 'Themes', 28 | 'third_party' => 'Third Party', 29 | 'third_party_themes' => 'Third Party Themes', 30 | 'javascript' => 'Javascript', 31 | 'application_files' => 'Application Files', 32 | 'template_debugging' => 'Template Debugging', 33 | 'templates_not_enabled' => 'Templates Not Enabled', 34 | 'benchmarks' => 'Benchmarks', 35 | 'configuration' => 'Configuration', 36 | 'database_queries' => 'Database Queries', 37 | 'disabled' => 'Disabled', 38 | 'enabled' => 'Enabled', 39 | 'query_cache_is' => 'EE Query Cache is', 40 | 'mysql_query_cache_is' => 'MySQL Query Cache is', 41 | 'adapter' => 'Adaptor', 42 | 'member_themes' => 'Member Themes', 43 | 'bootstrap_file' => 'Bootstrap File', 44 | 'third_party_addon' => 'Third Party Add-ons', 45 | 'other_files' => 'Other Files', 46 | 'expressionengine_core' => 'ExpressionEngine Core Files', 47 | 'first_party_modules' => 'First Party Modules', 48 | 'theme' => 'Theme', 49 | 'theme_instructions' => 'Select the theme you want the Toolbar to use.', 50 | //'contributor_list' => 'Eric Lamb (mithra62) & Christopher Imrie', 51 | 'addon_developers' => 'Add-on Developers', 52 | 'toolbar_position' => 'Toolbar Position', 53 | 'toolbar_position_instructions' => 'Where do you want the toolbar to appear on the page?', 54 | 'eedt_in' => 'in', 55 | 'requested_url' => 'Requested URL', 56 | 'add_ons' => 'Add-ons', 57 | 58 | 'eedt.settings' => 'Settings', 59 | 'eedt.save' => 'Save', 60 | 'eedt.saving' => 'saving...', 61 | 'eedt.form.theme' => 'Theme', 62 | 'eedt.form.desc.theme' => 'Select the theme you want the Toolbar to use.', 63 | 'eedt.form.toolbar_position' => 'Toolbar Position', 64 | 'eedt.form.desc.toolbar_position' => 'Where do you want the toolbar to appear on the page?', 65 | 'eedt.form.header.settings' => 'General', 66 | 'eedt.header.settings_save' => 'Debug Toolbar Settings', 67 | 'eedt.settings_saved' => 'Settings Saved', 68 | 'eedt.templates_used' => 'Templates Used', 69 | 'eedt.profiler_not_enabled' => 'The Debug Profiler isnt\'t enabled; your debug output will be limited to what\'s available instead.', 70 | 'eedt.profiler_enabled_non_sa' => 'Your debug details are available for non Super Admins! Be VERY careful in production!', 71 | 'eedt.path_constants' => 'Path Constants', 72 | 73 | 'eedt_perf_alerts_module_name' => 'Debug Toolbar - Perfomance Alerts', 74 | 'eedt_perf_alerts_module_description' => 'Adds notifications to toolbar on suspicous performance', 75 | 'eedt_perf_alerts.form.max_exec_time' => 'Maximum Execution Time', 76 | 'eedt_perf_alerts.form.desc.form.max_exec_time' => 'What is the most time allowed for your ExpressionEngine site before throwing an alarm. You can use decimal format.', 77 | 'eedt_perf_alerts.form.max_memory' => 'Maximum Memory', 78 | 'eedt_perf_alerts.form.desc.form.max_memory' => 'How much memory, in MB, is too much? You must use decimal format.', 79 | 'eedt_perf_alerts.form.max_queries' => 'Maximum SQL Queries', 80 | 'eedt_perf_alerts.form.desc.form.max_queries' => 'How many SQL queries are too many for the site?', 81 | 'eedt_perf_alerts.form.max_sql_time' => 'Maximum SQL Execution Time', 82 | 'eedt_perf_alerts.form.desc.form.max_sql_time' => 'How much much time is too much for your expected SQL load?', 83 | 'eedt_perf_alerts.form.max_query_time' => 'Maximum Query Time', 84 | 'eedt_perf_alerts.form.desc.form.max_query_time' => 'What is the maximum amount of time an individual SQL query should take to load?', 85 | 'eedt_perf_alerts.form.max_query_memory' => 'Maximum Query Memory', 86 | 'eedt_perf_alerts.form.desc.form.max_query_memory' => 'What is the maximum amount of memory, in bytes, an individual SQL query should use?', 87 | 'eedt_errors.form.allowed_roles' => 'Allowed Roles', 88 | 'eedt_errors.form.desc.allowed_roles' => 'Which Member Roles are allowed to view the Toolbar. BE VERY CAREFUL WITH THIS SETTING.', 89 | 'total' => 'Total', 90 | 91 | 'eedt_perf_alerts.form.header.settings' => 'Performance Alerts', 92 | ]; 93 | -------------------------------------------------------------------------------- /system/user/addons/eedt/mcp.eedt.php: -------------------------------------------------------------------------------- 1 | route('settings'); 12 | } 13 | } -------------------------------------------------------------------------------- /system/user/addons/eedt/mod.eedt.php: -------------------------------------------------------------------------------- 1 | outputArray($config_data, 'no_config_vars'); ?> -------------------------------------------------------------------------------- /system/user/addons/eedt/views/partials/copyright.php: -------------------------------------------------------------------------------- 1 |

v

2 | 3 |


4 | :
5 | $url): ?> 9 | $count) echo ','; ?> 10 | 13 |

-------------------------------------------------------------------------------- /system/user/addons/eedt/views/partials/database.php: -------------------------------------------------------------------------------- 1 |
2 |

getLog(); 4 | echo $log->getQueryCount() . ' ' . lang('database_queries') . ' ' . lang('total'); ?>

5 |
6 |
7 | All 8 | | Memory 9 | | Slow 10 | | Duplicate 11 |
12 | 13 |
14 | 15 | 16 |

0

17 |
18 | getQueries() as $query): ?> 21 | = $settings['max_query_time']) { 25 | $class = 'flash'; 26 | } 27 | 28 | if($memory >= $settings['max_query_memory']) { 29 | $class = 'flash'; 30 | } 31 | ?> 32 | . [ 33 | s 34 | / filesizeFormat($memory); ?> 35 | ]
36 |
37 | 40 |
41 | 42 | 65 | 66 | 92 | 93 | 116 | -------------------------------------------------------------------------------- /system/user/addons/eedt/views/partials/files.php: -------------------------------------------------------------------------------- 1 | 4 |
5 |

6 |
7 |
8 | General 9 | | Add-ons 10 | | EE 11 | | Composer 12 | | 13 |
14 |
15 |
16 | 17 |
18 |

19 |

20 | 21 | getAllTemplates(); 23 | if($templates_used) { 24 | echo '

' . lang('eedt.templates_used') . '

'; 25 | foreach($templates_used AS $template) { 26 | if($template['template_name']) { 27 | echo '' . 28 | $template_groups[$template['group_id']] . '/' . $template['template_name'] . '
'; 29 | } 30 | } 31 | 32 | echo '
'; 33 | } 34 | ?> 35 |

36 | 37 | APPPATH:
38 | SYSDIR:
39 | FCPATH:
40 | SYSPATH:
41 | EESELF:
42 | BASEPATH:
43 | PATH_THEMES:
44 | PATH_THIRD:
45 | PATH_CACHE:
46 | PATH_MBR_THEMES: 47 |
48 | 49 | PATH_JAVASCRIPT: 50 |
51 | 52 |
53 | 54 | 65 | 66 | 75 | 76 | 85 | 86 | 95 | -------------------------------------------------------------------------------- /system/user/addons/eedt/views/partials/memory.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |

4 |
5 |
6 | Graph 7 | | List 8 |
9 |
10 |
11 |
12 | TMPL->log as $log) { 15 | echo "\n
"; 16 | echo '(' . number_format($log['time'], 4) . '/' . ee('eedt:ToolbarService')->filesizeFormat($log['memory']) . ') - ' . $log['message'] . '
'; 17 | echo "
"; 18 | $total++; 19 | } 20 | ?> 21 |
22 | 23 |

24 | 25 | 26 | -------------------------------------------------------------------------------- /system/user/addons/eedt/views/partials/time.php: -------------------------------------------------------------------------------- 1 |

2 | $value) { 4 | $key = ucwords(str_replace(array('_', '-'), ' ', $key)); 5 | echo $key . ': ' . $value . '
'; 6 | } 7 | ?> -------------------------------------------------------------------------------- /system/user/addons/eedt/views/partials/variables.php: -------------------------------------------------------------------------------- 1 |
2 |

3 |
4 |
5 | $_GET () 6 | | $_POST () 7 | | Headers 8 | | $_COOKIE 9 | | $_SESSION 10 | | 11 |
12 |
13 |
14 | 15 | 16 |
17 |

$_GET

18 | 19 | = 1): ?> 20 | 21 | $value): ?> 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 32 |
33 | 34 | 49 | 50 | 51 | 66 | 67 | 79 | 80 | 99 | 100 | -------------------------------------------------------------------------------- /system/user/addons/eedt/views/settings.php: -------------------------------------------------------------------------------- 1 | embed('ee:_shared/form'); -------------------------------------------------------------------------------- /system/user/addons/eedt/views/toolbar.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | $panel): 8 | echo $panel->getPanelContents(); 9 | endforeach; ?> 10 | 11 | 12 |
13 | 14 | 15 | $panel): ?> 16 |
17 | 18 | 19 |
20 | 21 | $panel): ?> 22 | showButton()) continue; ?> 23 | 24 | getButtonIcon()): ?> 25 | <?php echo $panel->getButtonIconAltText(); ?> 27 | 28 | 29 | getButtonLabel(); ?> 30 | 31 | 32 | 33 | 34 | « 35 |
36 |
37 | 38 | 39 | $panel): 40 | echo $panel->getPanelContents(); 41 | endforeach; ?> 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Extensions/AbstractHook.php: -------------------------------------------------------------------------------- 1 | lang->loadfile('eedt_email'); 18 | $this->toolbar = ee('eedt:ToolbarService'); 19 | } 20 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Extensions/EeDebugToolbarInitSettings.php: -------------------------------------------------------------------------------- 1 | 'send', 13 | 'email_log_dir' => '', 14 | ]; 15 | 16 | /** 17 | * @param array $default_settings 18 | * @return array 19 | */ 20 | public function process(array $default_settings): array 21 | { 22 | $default_settings = (ee()->extensions->last_call != '' ? ee()->extensions->last_call : $default_settings); 23 | return array_merge($default_settings, $this->default_settings); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Extensions/EeDebugToolbarSettingsForm.php: -------------------------------------------------------------------------------- 1 | toolbar->getSettings(); 12 | 13 | $field_group = $form->getGroup('eedt_email.form.header.settings'); 14 | $field_set = $field_group->getFieldSet('eedt_email.form.email_action'); 15 | $field_set->setDesc('eedt_email.form.desc.email_action'); 16 | $field = $field_set->getField('email_action', 'select'); 17 | $field->setValue($settings['email_action']) 18 | ->set('group_toggle', ['log' => 'logging', 'log_send' => 'logging']) 19 | ->setChoices(ee('eedt_email:EmailService')->getActionOptions()); 20 | 21 | $field_set = $field_group->getFieldSet('eedt_email.form.email_log_dir'); 22 | $field_set->set('group', 'logging')->setDesc('eedt_email.form.desc.form.email_log_dir'); 23 | $field = $field_set->getField('email_log_dir', 'text'); 24 | $field->setValue($settings['email_log_dir']); 25 | 26 | return $form; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Extensions/EedtInitSettings.php: -------------------------------------------------------------------------------- 1 | 'send', 13 | 'email_log_dir' => '', 14 | ]; 15 | 16 | /** 17 | * @param array $default_settings 18 | * @return array 19 | */ 20 | public function process(array $default_settings): array 21 | { 22 | $default_settings = (ee()->extensions->last_call != '' ? ee()->extensions->last_call : $default_settings); 23 | return array_merge($default_settings, $this->default_settings); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Extensions/EedtSettingsForm.php: -------------------------------------------------------------------------------- 1 | toolbar->getSettings(); 12 | 13 | $field_group = $form->getGroup('eedt_email.form.header.settings'); 14 | $field_set = $field_group->getFieldSet('eedt_email.form.email_action'); 15 | $field_set->setDesc('eedt_email.form.desc.email_action'); 16 | $field = $field_set->getField('email_action', 'select'); 17 | $field->setValue($settings['email_action']) 18 | ->set('group_toggle', ['log' => 'logging', 'log_send' => 'logging']) 19 | ->setChoices(ee('eedt_email:EmailService')->getActionOptions()); 20 | 21 | $field_set = $field_group->getFieldSet('eedt_email.form.email_log_dir'); 22 | $field_set->set('group', 'logging')->setDesc('eedt_email.form.desc.form.email_log_dir'); 23 | $field = $field_set->getField('email_log_dir', 'text'); 24 | $field->setValue($settings['email_log_dir']); 25 | 26 | return $form; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Extensions/EmailSend.php: -------------------------------------------------------------------------------- 1 | toolbar->getSettings(); 14 | if (!empty($settings['email_action']) && $settings['email_action'] == 'log') { 15 | ee()->extensions->end_script = true; 16 | } 17 | 18 | if(!empty($settings['email_action']) && in_array($settings['email_action'], ['log', 'log_send'])) { 19 | ee('eedt_email:EmailService')->log($email_content, $settings); 20 | } 21 | 22 | return true; 23 | } 24 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_email/Services/EmailService.php: -------------------------------------------------------------------------------- 1 | 'Send', 17 | 'log_send' => 'Log & Send', 18 | 'log' => 'Log Only', 19 | ]; 20 | } 21 | 22 | /** 23 | * @param array $email_content 24 | * @param array $settings 25 | * @return void 26 | */ 27 | public function log(array $email_content, array $settings) 28 | { 29 | $path = $settings['email_log_dir']; 30 | if (!$path) { 31 | $path = PATH_CACHE . 'emails'; 32 | } 33 | 34 | if (!is_dir($path)) { 35 | mkdir($path); 36 | } 37 | 38 | $log_file = $path . '/' . ee()->localize->now . '.' . 39 | implode($email_content['recipients']) . '.' . Str::snakecase($email_content['subject']) . 40 | '.txt'; 41 | $file = new File($log_file, ee('Filesystem')); 42 | $file->log(print_r($email_content, true)); 43 | } 44 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_email/addon.setup.php: -------------------------------------------------------------------------------- 1 | 'mithra62', 15 | 'author_url' => 'https://github.com/mithra62/ee_debug_toolbar', 16 | 'docs_url' => 'https://github.com/mithra62/ee_debug_toolbar/wiki', 17 | 'name' => DEBUG_TOOLBAR_EMAIL_ADDON_NAME, 18 | 'description' => 'Allows control over email during development', 19 | 'version' => DEBUG_TOOLBAR_EMAIL_VERSION, 20 | 'namespace' => 'DebugToolbar\Email', 21 | 'settings_exist' => false, 22 | 'services' => [ 23 | 'EmailService' => function ($addon) { 24 | return new EmailService(); 25 | }, 26 | ] 27 | ]; -------------------------------------------------------------------------------- /system/user/addons/eedt_email/database/migrations/2024_02_15_012256_createexthookemailsendforaddoneedtemail.php: -------------------------------------------------------------------------------- 1 | 'Eedt_email_ext', 15 | 'method' => 'email_send', 16 | 'hook' => 'email_send', 17 | 'settings' => serialize([]), 18 | 'priority' => 1, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_email_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/database/migrations/2024_02_15_012314_createexthookeedtsettingsformforaddoneedtemail.php: -------------------------------------------------------------------------------- 1 | 'Eedt_email_ext', 15 | 'method' => 'eedt_settings_form', 16 | 'hook' => 'eedt_settings_form', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_email_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/database/migrations/2024_02_15_012333_createexthookeedtinitsettingsforaddoneedtemail.php: -------------------------------------------------------------------------------- 1 | get('eedt_email'); 14 | 15 | $ext = [ 16 | 'class' => 'Eedt_email_ext', 17 | 'method' => 'eedt_init_settings', 18 | 'hook' => 'eedt_init_settings', 19 | 'settings' => serialize([]), 20 | 'priority' => 10, 21 | 'version' => DEBUG_TOOLBAR_VERSION, 22 | 'enabled' => 'y' 23 | ]; 24 | 25 | // If we didnt find a matching Extension, lets just insert it 26 | ee('Model')->make('Extension', $ext)->save(); 27 | } 28 | 29 | /** 30 | * Rollback the migration 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | $addon = ee('Addon')->get('eedt_email'); 36 | 37 | ee('Model')->get('Extension') 38 | ->filter('class', 'Eedt_email_ext') 39 | ->delete(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/database/migrations/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_email/ext.eedt_email.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default Add-On Icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_email/language/english/eedt_email_lang.php: -------------------------------------------------------------------------------- 1 | 'Debug Toolbar - Email', 5 | 'eedt_email_module_description' => 'Allows control over email during development', 6 | 'eedt_email.form.email_action' => 'Email Action', 7 | 'eedt_email.form.desc.email_action' => 'How do you want to handle emails?', 8 | 'eedt_email.form.email_log_dir' => 'Email Log Directory', 9 | 'eedt_email.form.desc.form.email_log_dir' => 'Where do you want to store emails? By default they\'ll be stored in your ExpressionEngine cache directory.', 10 | 'eedt_email.form.header.settings' => 'Email', 11 | ]; 12 | -------------------------------------------------------------------------------- /system/user/addons/eedt_email/language/english/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_email/language/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_email/mod.eedt_email.php: -------------------------------------------------------------------------------- 1 | canViewToolbar()) { 12 | return; 13 | } 14 | 15 | ee('eedt_errors:LoggerService')->deleteLog(); 16 | exit; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Actions/GetPanelErrors.php: -------------------------------------------------------------------------------- 1 | canViewToolbar()) { 12 | return; 13 | } 14 | 15 | $log_data = ee('eedt_errors:LoggerService')->getLogContents(); 16 | $toolbar = ee('eedt:ToolbarService'); 17 | $vars = [ 18 | 'errors' => $log_data, 19 | 'clear_logs_url' => ee()->config->site_url() . '?ACT=' . $toolbar->fetchActionId('ClearErrorLog', $class = 'Eedt_errors'), 20 | ]; 21 | 22 | echo ee()->load->view('eedt_errors', $vars, true); 23 | exit; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Exceptions/ErrorException.php: -------------------------------------------------------------------------------- 1 | '; 44 | } 45 | // XDebug has a different key name 46 | if (isset($frame['params']) && !isset($frame['args'])) { 47 | $frame['args'] = $frame['params']; 48 | } 49 | $trace[] = $frame; 50 | } 51 | $ref = new \ReflectionProperty('Exception', 'trace'); 52 | $ref->setAccessible(true); 53 | $ref->setValue($this, $trace); 54 | } 55 | } 56 | /** 57 | * Returns if error is one of fatal type. 58 | * 59 | * @param array $error error got from error_get_last() 60 | * @return boolean if error is one of fatal type 61 | */ 62 | public static function isFatalError($error) 63 | { 64 | return isset($error['type']) && in_array($error['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, self::E_HHVM_FATAL_ERROR]); 65 | } 66 | /** 67 | * @return string the user-friendly name of this exception 68 | */ 69 | public function getName() 70 | { 71 | static $names = [ 72 | E_COMPILE_ERROR => 'PHP Compile Error', 73 | E_COMPILE_WARNING => 'PHP Compile Warning', 74 | E_CORE_ERROR => 'PHP Core Error', 75 | E_CORE_WARNING => 'PHP Core Warning', 76 | E_DEPRECATED => 'PHP Deprecated Warning', 77 | E_ERROR => 'PHP Fatal Error', 78 | E_NOTICE => 'PHP Notice', 79 | E_PARSE => 'PHP Parse Error', 80 | E_RECOVERABLE_ERROR => 'PHP Recoverable Error', 81 | E_STRICT => 'PHP Strict Warning', 82 | E_USER_DEPRECATED => 'PHP User Deprecated Warning', 83 | E_USER_ERROR => 'PHP User Error', 84 | E_USER_NOTICE => 'PHP User Notice', 85 | E_USER_WARNING => 'PHP User Warning', 86 | E_WARNING => 'PHP Warning', 87 | self::E_HHVM_FATAL_ERROR => 'HHVM Fatal Error', 88 | ]; 89 | return isset($names[$this->getCode()]) ? $names[$this->getCode()] : 'Error'; 90 | } 91 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Extensions/AbstractHook.php: -------------------------------------------------------------------------------- 1 | lang->load('eedt_errors', $idiom = '', $return = false, $add_suffix = true, $alt_path = __DIR__ . '/../'); 18 | $this->toolbar = ee('eedt:ToolbarService'); 19 | } 20 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Extensions/EeDebugToolbarAddPanel.php: -------------------------------------------------------------------------------- 1 | extensions->last_call != '' ? ee()->extensions->last_call : $panels); 12 | ee()->benchmark->mark('eedt_errors_start'); 13 | $settings = $this->toolbar->getSettings(); 14 | if($settings['error_handler'] !== 'toolbar') { 15 | return $panels; 16 | } 17 | 18 | 19 | $vars['panel_fetch_url'] = $this->toolbar->createActUrl('getPanelErrors', 'Eedt_errors'); 20 | $vars['theme_img_url'] = ee('eedt:OutputService')->themeUrl() . 'eedt_errors/images/'; 21 | $vars['theme_js_url'] = ee('eedt:OutputService')->themeUrl() . 'eedt_errors/js/'; 22 | $vars['theme_css_url'] = ee('eedt:OutputService')->themeUrl() . 'eedt_errors/css/'; 23 | 24 | $icon_img = $vars['theme_img_url'] . 'good.png'; 25 | if(file_exists(ee('eedt_errors:LoggerService')->getLogFilePath()) && filesize(ee('eedt_errors:LoggerService')->getLogFilePath()) > 0) { 26 | $icon_img = $vars['theme_img_url'] . 'error.png'; 27 | } 28 | 29 | $panels['eedt_errors'] = new Model(); 30 | $panels['eedt_errors']->setName('eedt_errors'); 31 | $panels['eedt_errors']->setButtonIcon($icon_img); 32 | $panels['eedt_errors']->setButtonLabel(lang('Errors')); 33 | $panels['eedt_errors']->setPanelContents(''); 34 | $panels['eedt_errors']->setPanelFetchUrl($vars['panel_fetch_url']); 35 | $panels['eedt_errors']->addJs($vars['theme_js_url'] . 'eedt_errors.js'); 36 | 37 | ee()->benchmark->mark('eedt_errors_end'); 38 | 39 | return $panels; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Extensions/EeDebugToolbarInitSettings.php: -------------------------------------------------------------------------------- 1 | '', 13 | 'error_handler' => 'ee', 14 | 'hide_error_codes' => [ 15 | E_WARNING, 16 | E_NOTICE, 17 | E_USER_ERROR, 18 | E_DEPRECATED, 19 | E_STRICT 20 | ], 21 | 'log_error_codes' => [ 22 | E_ERROR, 23 | E_WARNING, 24 | E_PARSE, 25 | E_NOTICE, 26 | E_CORE_ERROR, 27 | E_CORE_WARNING, 28 | E_COMPILE_ERROR, 29 | E_COMPILE_WARNING, 30 | E_USER_ERROR, 31 | E_USER_WARNING, 32 | E_USER_NOTICE, 33 | E_STRICT, 34 | E_RECOVERABLE_ERROR, 35 | E_DEPRECATED, 36 | E_USER_DEPRECATED, 37 | ], 38 | 'ignored_errors' => [], 39 | ]; 40 | 41 | /** 42 | * @param array $default_settings 43 | * @return array 44 | */ 45 | public function process(array $default_settings): array 46 | { 47 | $default_settings = (ee()->extensions->last_call != '' ? ee()->extensions->last_call : $default_settings); 48 | return array_merge($default_settings, $this->default_settings); 49 | } 50 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Extensions/EeDebugToolbarSettingsForm.php: -------------------------------------------------------------------------------- 1 | toolbar->getSettings(); 12 | 13 | $field_group = $form->getGroup('eedt_errors.form.header.settings'); 14 | $field_set = $field_group->getFieldSet('eedt_errors.form.error_handler'); 15 | $field_set->setDesc('eedt_errors.form.desc.error_handler'); 16 | $field = $field_set->getField('error_handler', 'select'); 17 | $field->setValue($settings['error_handler']) 18 | ->set('group_toggle', ['toolbar' => 'error_handler']) 19 | ->setChoices(['ee' => 'ExpressionEngine', 'toolbar' => 'Debug Toolbar']); 20 | 21 | $field_set = $field_group->getFieldSet('eedt_errors.form.hide_error_codes'); 22 | $field_set->set('group', 'error_handler')->setDesc('eedt_errors.form.desc.hide_error_codes'); 23 | $field = $field_set->getField('hide_error_codes', 'checkbox'); 24 | $field->setValue($settings['hide_error_codes']) 25 | ->setChoices($this->getDisplayErrorCodes()); 26 | 27 | $field_set = $field_group->getFieldSet('eedt_errors.form.log_error_codes'); 28 | $field_set->set('group', 'error_handler')->setDesc('eedt_errors.form.desc.log_error_codes'); 29 | $field = $field_set->getField('log_error_codes', 'checkbox'); 30 | $field->setValue($settings['log_error_codes']) 31 | ->setChoices($this->getDisplayErrorCodes()); 32 | 33 | $field_set = $field_group->getFieldSet('eedt_errors.form.error_log_path'); 34 | $field_set->set('group', 'error_handler')->setDesc('eedt_errors.form.desc.error_log_path'); 35 | $field = $field_set->getField('error_log_path', 'text'); 36 | $field->setValue($settings['error_log_path']); 37 | 38 | return $form; 39 | } 40 | 41 | 42 | 43 | /** 44 | * @return string[] 45 | */ 46 | public function getDisplayErrorCodes(): array 47 | { 48 | return [ 49 | E_ERROR => 'E_ERROR', 50 | E_WARNING => 'E_WARNING', 51 | E_PARSE => 'E_PARSE', 52 | E_NOTICE => 'E_NOTICE', 53 | E_CORE_ERROR => 'E_CORE_ERROR', 54 | E_CORE_WARNING => 'E_CORE_WARNING', 55 | E_COMPILE_ERROR => 'E_COMPILE_ERROR', 56 | E_COMPILE_WARNING => 'E_COMPILE_WARNING', 57 | E_USER_ERROR => 'E_USER_ERROR', 58 | E_USER_WARNING => 'E_USER_WARNING', 59 | E_USER_NOTICE => 'E_USER_NOTICE', 60 | E_STRICT => 'E_STRICT', 61 | E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', 62 | E_DEPRECATED => 'E_DEPRECATED', 63 | E_USER_DEPRECATED => 'E_USER_DEPRECATED', 64 | ]; 65 | } 66 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Extensions/SessionsEnd.php: -------------------------------------------------------------------------------- 1 | db->table_exists('eedt_settings')) { 11 | return $session; 12 | } 13 | 14 | $settings = ee('eedt:SettingsService')->getSettings(); 15 | if (!empty($settings['error_handler']) && $settings['error_handler'] == 'toolbar') { 16 | $error_handler = ee('eedt_errors:ErrorHandlerService'); 17 | $error_handler->register(); 18 | } 19 | 20 | return $session; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Logging/Logger.php: -------------------------------------------------------------------------------- 1 | called_class = $class; 19 | return $this; 20 | } 21 | 22 | /** 23 | * @return string 24 | */ 25 | public function getCalledClass(): string 26 | { 27 | return $this->called_class; 28 | } 29 | 30 | /** 31 | * @param string $message 32 | * @param int $code 33 | * @param string $file 34 | * @param int $line 35 | * @param array $trace 36 | * @return void 37 | */ 38 | public function error(string $message, int $code, string $file, int $line, array $trace = []): void 39 | { 40 | $msg = [ 41 | 'message' => $message, 42 | 'code' => $code, 43 | 'file' => $file, 44 | 'line' => $line, 45 | 'trace' => $trace, 46 | ]; 47 | $this->log($msg); 48 | } 49 | 50 | /** 51 | * Logs with an arbitrary level. 52 | * @param $level 53 | * @param string $message 54 | * @param array $context 55 | * @return void 56 | */ 57 | public function log(array $msg): void 58 | { 59 | if (ee('eedt_errors:LoggerService')->shouldLog($msg)) { 60 | $logger = ee('eedt_errors:LoggerService')->getLogger(); 61 | $message = ee('eedt_errors:LoggerService')->format($msg); 62 | $logger->log($message . "\n" . ee('eedt_errors:LoggerService')->logDelimiter()); 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/Services/LoggerService.php: -------------------------------------------------------------------------------- 1 | settings = ee('eedt:ToolbarService')->getSettings(); 19 | } 20 | 21 | /** 22 | * @return string 23 | */ 24 | public function getLogFilePath(): string 25 | { 26 | $log_file = PATH_CACHE . 'error.log'; 27 | if(!empty($this->settings['error_log_path']) && file_exists($this->settings['error_log_path'])) { 28 | $log_file = $this->settings['error_log_path']; 29 | } 30 | 31 | return $log_file; 32 | } 33 | 34 | /** 35 | * @return bool 36 | */ 37 | public function deleteLog(): bool 38 | { 39 | if(file_exists($this->getLogFilePath())) { 40 | return unlink($this->getLogFilePath()); 41 | } 42 | 43 | return false; 44 | } 45 | 46 | /** 47 | * @return File 48 | * @throws \Exception 49 | */ 50 | public function getLogger(): File 51 | { 52 | if (is_null($this->logger)) { 53 | $this->logger = new File($this->getLogFilePath(), ee('Filesystem')); 54 | } 55 | 56 | return $this->logger; 57 | } 58 | 59 | /** 60 | * @param string $level 61 | * @param string $message 62 | * @param array $context 63 | * @return string 64 | */ 65 | public function format(array $message): string 66 | { 67 | $message['datetime'] = ee()->localize->now; 68 | return trim(json_encode($message)); 69 | } 70 | 71 | /** 72 | * @param string $level 73 | * @return bool 74 | */ 75 | public function shouldLog(array $message): bool 76 | { 77 | $settings = ee('eedt:SettingsService')->getSettings(); 78 | return in_array($message['code'], $settings['log_error_codes']); 79 | } 80 | 81 | /** 82 | * @return array 83 | * @throws \ExpressionEngine\Dependency\Safe\Exceptions\FilesystemException 84 | */ 85 | public function getLogContents() 86 | { 87 | $path = $this->getLogFilePath(); 88 | $return = []; 89 | if(!file_exists($path)) { 90 | return $return; 91 | } 92 | 93 | $contents = \ExpressionEngine\Dependency\Safe\file_get_contents($path); 94 | if($contents) { 95 | $errors = explode(ee('eedt_errors:LoggerService')->logDelimiter(), $contents); 96 | if($errors) { 97 | $errors = array_reverse($errors); 98 | foreach($errors AS $error) { 99 | $error = json_decode($error, true); 100 | if($error) { 101 | $error['datetime'] = date('r', $error['datetime']); 102 | $return[] = $error; 103 | } 104 | } 105 | } 106 | } 107 | 108 | return $return; 109 | } 110 | 111 | /** 112 | * @return string 113 | */ 114 | public function logDelimiter(): string 115 | { 116 | return str_repeat('+', 10); 117 | } 118 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/addon.setup.php: -------------------------------------------------------------------------------- 1 | 'mithra62', 16 | 'author_url' => 'https://github.com/mithra62/ee_debug_toolbar', 17 | 'docs_url' => 'https://github.com/mithra62/ee_debug_toolbar/wiki', 18 | 'name' => DEBUG_TOOLBAR_ERRORS_ADDON_NAME, 19 | 'description' => 'Tools for Errors and Error Handling', 20 | 'version' => DEBUG_TOOLBAR_ERRORS_VERSION, 21 | 'namespace' => 'DebugToolbar\Errors', 22 | 'settings_exist' => false, 23 | 'services' => [ 24 | 'ErrorHandlerService' => function ($addon) { 25 | return new ErrorHandlerService(); 26 | }, 27 | 'LoggerService' => function ($addon) { 28 | return new LoggerService(); 29 | }, 30 | ], 31 | ]; 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/2024_01_14_022645_createexthookeedebugtoolbaraddpanelforaddoneedterrors.php: -------------------------------------------------------------------------------- 1 | get('eedt_errors'); 14 | 15 | $ext = [ 16 | 'class' => 'Eedt_errors_ext', 17 | 'method' => 'ee_debug_toolbar_add_panel', 18 | 'hook' => 'eedt_add_panel', 19 | 'settings' => serialize([]), 20 | 'priority' => 10, 21 | 'version' => DEBUG_TOOLBAR_VERSION, 22 | 'enabled' => 'y' 23 | ]; 24 | 25 | // If we didnt find a matching Extension, lets just insert it 26 | ee('Model')->make('Extension', $ext)->save(); 27 | } 28 | 29 | /** 30 | * Rollback the migration 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | $addon = ee('Addon')->get('eedt_errors'); 36 | 37 | ee('Model')->get('Extension') 38 | ->filter('class', 'Eedt_errors_ext') 39 | ->delete(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/2024_01_14_022705_createexthookeedebugtoolbarinitsettingsforaddoneedterrors.php: -------------------------------------------------------------------------------- 1 | 'Eedt_errors_ext', 15 | 'method' => 'ee_debug_toolbar_init_settings', 16 | 'hook' => 'eedt_init_settings', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_errors_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/2024_01_14_022724_createexthookeedebugtoolbarsettingsformforaddoneedterrors.php: -------------------------------------------------------------------------------- 1 | 'Eedt_errors_ext', 15 | 'method' => 'ee_debug_toolbar_settings_form', 16 | 'hook' => 'eedt_settings_form', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_errors_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/2024_01_14_022745_createexthooksessionsendforaddoneedterrors.php: -------------------------------------------------------------------------------- 1 | 'Eedt_errors_ext', 15 | 'method' => 'sessions_end', 16 | 'hook' => 'sessions_end', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_errors_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/2024_01_14_022824_createactiongetpanelerrorsforaddoneedt_errors.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt_errors', 15 | 'method' => 'GetPanelErrors', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt_errors') 28 | ->filter('method', 'GetPanelErrors') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/2024_01_14_072847_createactionclearerrorlogforaddoneedt_errors.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt_errors', 15 | 'method' => 'ClearErrorLog', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt_errors') 28 | ->filter('method', 'ClearErrorLog') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/database/migrations/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/ext.eedt_errors.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default Add-On Icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/language/english/eedt_errors_lang.php: -------------------------------------------------------------------------------- 1 | 'Debug Toolbar - Errors', 5 | 'eedt_errors_module_description' => 'Tools for Errors and Error Handling', 6 | 7 | 'eedt_errors.form.error_handler' => 'Error Handler', 8 | 'eedt_errors.form.desc.error_handler' => 'Which Error Handler do you want to use?', 9 | 'eedt_errors.form.hide_error_codes' => 'Errors to Hide', 10 | 'eedt_errors.form.desc.hide_error_codes' => 'Which PHP Errors do you want to hide from your views? Note this only applies to Errors; uncaught Exceptions are always fatal.', 11 | 'eedt_errors.form.error_log_path' => 'Error Log Path', 12 | 'eedt_errors.form.desc.error_log_path' => 'The full system path to where you want to store your Error Logs. If none entered, your logs will be stored in the ExpressionEngine Cache directory', 13 | 'eedt_errors.form.header.settings' => 'Error Handling', 14 | 'eedt_errors.form.log_error_codes' => 'Errors to Log', 15 | 'eedt_errors.form.desc.log_error_codes' => 'Which PHP Errors do you want to log?', 16 | ]; 17 | -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/language/english/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/language/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_errors/mod.eedt_errors.php: -------------------------------------------------------------------------------- 1 |

2 | 3 |
4 | Clear Errors 5 |
6 | 7 |
8 | outputArray($errors, 'no_errors'); ?> 10 |
11 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/Actions/GetPanelLogs.php: -------------------------------------------------------------------------------- 1 | canViewToolbar()) { 12 | return; 13 | } 14 | 15 | $log_path = SYSPATH . "user/logs/"; 16 | $vars['logs_enabled'] = false; 17 | if (ee()->config->config['log_threshold'] >= 1) { 18 | $vars['logs_enabled'] = true; 19 | } 20 | 21 | $vars['log_dir_writable'] = false; 22 | if (is_writable($log_path)) { 23 | $vars['log_dir_writable'] = true; 24 | } 25 | 26 | if (!is_readable($log_path)) { 27 | echo lang('log_dir_not_readable'); 28 | exit; 29 | } else { 30 | $d = dir($log_path); 31 | $log_files = []; 32 | while (false !== ($entry = $d->read())) { 33 | if ($entry == '.' || $entry == '..') { 34 | continue; 35 | } 36 | 37 | $log_files[$entry] = $entry; 38 | } 39 | $d->close(); 40 | if (count($log_files) == '0') { 41 | echo lang('no_log_files'); 42 | exit; 43 | } 44 | } 45 | 46 | $vars['latest_log'] = $log_path . end($log_files); 47 | $vars['log_files'] = $log_files; 48 | echo ee()->load->view('log_viewer', $vars, true); 49 | exit; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/Extensions/AbstractHook.php: -------------------------------------------------------------------------------- 1 | lang->loadfile('eedt_logs'); 18 | $this->toolbar = ee('eedt:ToolbarService'); 19 | } 20 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/Extensions/EeDebugToolbarAddPanel.php: -------------------------------------------------------------------------------- 1 | benchmark->mark('eedt_log_viewer_start'); 12 | $panels = (ee()->extensions->last_call != '' ? ee()->extensions->last_call : $panels); 13 | 14 | $vars['panel_fetch_url'] = $this->toolbar->createActUrl('GetPanelLogs', 'Eedt_logs'); 15 | $vars['theme_img_url'] = ee('eedt:OutputService')->themeUrl() . 'eedt_logs/images/'; 16 | $vars['theme_js_url'] = ee('eedt:OutputService')->themeUrl() . 'eedt_logs/js/'; 17 | $vars['theme_css_url'] = ee('eedt:OutputService')->themeUrl() . 'eedt_logs/css/'; 18 | 19 | $panels['log_viewer'] = new Model(); 20 | $panels['log_viewer']->setName('log_viewer'); 21 | $panels['log_viewer']->setButtonIcon($vars['theme_img_url'] . 'logs.png'); 22 | $panels['log_viewer']->setButtonLabel(lang('Logs')); 23 | $panels['log_viewer']->setPanelFetchUrl($vars['panel_fetch_url']); 24 | 25 | ee()->benchmark->mark('eedt_log_viewer_end'); 26 | 27 | return $panels; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/addon.setup.php: -------------------------------------------------------------------------------- 1 | 'mithra62', 13 | 'author_url' => 'https://github.com/mithra62/ee_debug_toolbar', 14 | 'docs_url' => 'https://github.com/mithra62/ee_debug_toolbar/wiki', 15 | 'name' => DEBUG_TOOLBAR_LOGS_ADDON_NAME, 16 | 'description' => 'Displays the Developer Log in the toolbar.', 17 | 'version' => DEBUG_TOOLBAR_LOGS_VERSION, 18 | 'namespace' => 'DebugToolbar\Logs', 19 | 'settings_exist' => false, 20 | 'services' => [ 21 | 22 | ] 23 | ]; 24 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/database/migrations/2024_01_15_183025_createexthookeedebugtoolbaraddpanelforaddoneedtlogs.php: -------------------------------------------------------------------------------- 1 | 'Eedt_logs_ext', 15 | 'method' => 'ee_debug_toolbar_add_panel', 16 | 'hook' => 'eedt_add_panel', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_logs_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/database/migrations/2024_01_15_183042_createactiongetpanellogsforaddoneedt_logs.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt_logs', 15 | 'method' => 'GetPanelLogs', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt_logs') 28 | ->filter('method', 'GetPanelLogs') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/database/migrations/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/ext.eedt_logs.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default Add-On Icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/language/english/eedt_logs_lang.php: -------------------------------------------------------------------------------- 1 | 'Debug Toolbar - Logs', 5 | 'eedt_logs_module_description' => 'Displays the Developer Log in the toolbar.', 6 | ]; 7 | -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/language/english/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/language/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_logs/mod.eedt_logs.php: -------------------------------------------------------------------------------- 1 | 2 |

3 | 4 | 5 | 6 | 7 |

8 | 9 | 10 | 11 | 12 |

Log Viewer

13 |
14 | '; 21 | $lines = []; 22 | while ($line = fgets($f)) { 23 | $lineNo++; 24 | 25 | if ($lineNo != '1') { 26 | $lines[] = $line; 27 | } 28 | 29 | if ($lineNo == '1000') { 30 | //break; 31 | } 32 | } 33 | fclose($f); 34 | 35 | echo implode('
', ($lines)) . '
'; 36 | 37 | ?> 38 | 39 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/Actions/FetchMemoryAndSqlUsage.php: -------------------------------------------------------------------------------- 1 | session->userdata['session_id']; 12 | $is_cp = ee()->input->get('cp') == 'y' ? 'y' : 'n'; 13 | $data = ee()->db->where("session_id", $session_id) 14 | ->where('cp', $is_cp) 15 | ->limit(20) 16 | ->order_by("timestamp", "desc") 17 | ->get("eedt_memory_history") 18 | ->result_array(); 19 | 20 | //Garbage collect 21 | ee()->db->where("timestamp < ", ee()->localize->now - 14400)->delete("eedt_memory_history"); //4 hours 22 | ee()->output->send_ajax_response($data); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/Extensions/AbstractHook.php: -------------------------------------------------------------------------------- 1 | lang->load('eedt_memory_history', $idiom = '', $return = false, $add_suffix = true, $alt_path = __DIR__ . '/../'); 18 | $this->toolbar = ee('eedt:ToolbarService'); 19 | } 20 | } -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/Extensions/EeDebugToolbarAddPanel.php: -------------------------------------------------------------------------------- 1 | benchmark->mark('eedt_memory_history_start'); 12 | $panels = (ee()->extensions->last_call != '' ? ee()->extensions->last_call : $panels); 13 | $settings = $this->toolbar->getSettings(); 14 | 15 | $panels['memory_history'] = new Model(); 16 | $panels['memory_history']->setName("memory_history"); 17 | $panels['memory_history']->setPanelContents(ee()->load->view('memory_history', array('position' => $settings['memory_history_position']), true)); 18 | $panels['memory_history']->addJs('https://www.google.com/jsapi', true); 19 | $panels['memory_history']->addJs(ee('eedt:OutputService')->themeUrl() . 'eedt_memory_history/js/memory_history.js', true); 20 | $panels['memory_history']->addCss(ee('eedt:OutputService')->themeUrl() . 'eedt_memory_history/css/memory_history.css', true); 21 | $panels['memory_history']->setInjectionPoint(Model::PANEL_AFTER_TOOLBAR); 22 | 23 | $this->trackMemoryAndSqlUsage($vars); 24 | 25 | ee()->benchmark->mark('eedt_memory_history_end'); 26 | return $panels; 27 | } 28 | 29 | protected function trackMemoryAndSqlUsage($vars) 30 | { 31 | $log = ee('Database')->getLog(); 32 | $data = [ 33 | 'session_id' => ee()->session->userdata['session_id'], 34 | 'url' => $_SERVER["REQUEST_URI"] . $_SERVER["QUERY_STRING"], 35 | 'peak_memory' => (float)$vars['memory_usage'], 36 | 'sql_count' => $log->getQueryCount(),//$vars['query_count'], 37 | 'execution_time' => $vars['elapsed_time'], 38 | 'timestamp' => ee()->localize->now, 39 | 'cp' => ee()->input->get('D') == 'cp' ? 'y' : 'n' 40 | ]; 41 | ee()->db->insert('eedt_memory_history', $data); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/Extensions/EeDebugToolbarInitSettings.php: -------------------------------------------------------------------------------- 1 | "top right", 12 | ]; 13 | 14 | /** 15 | * @param array $default_settings 16 | * @return array 17 | */ 18 | public function process(array $default_settings): array 19 | { 20 | $default_settings = (ee()->extensions->last_call != '' ? ee()->extensions->last_call : $default_settings); 21 | return array_merge($default_settings, $this->default_settings); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/Extensions/EeDebugToolbarSettingsForm.php: -------------------------------------------------------------------------------- 1 | toolbar->getSettings(); 16 | $options = [ 17 | 'bottom left' => 'bottom-left', 18 | 'top left' => 'top-left', 19 | 'top right' => 'top-right', 20 | 'bottom right' => 'bottom-right' 21 | ]; 22 | 23 | $field_group = $form->getGroup('eedt_memory_history.form.header.settings'); 24 | $field_set = $field_group->getFieldSet('eedt_memory_history.form.position'); 25 | $field_set->setDesc('eedt_memory_history.form.desc.form.position'); 26 | $field = $field_set->getField('memory_history_position', 'select'); 27 | $field->setChoices($options) 28 | ->setValue($settings['memory_history_position']); 29 | 30 | return $form; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/addon.setup.php: -------------------------------------------------------------------------------- 1 | 'mithra62', 14 | 'author_url' => 'https://github.com/mithra62/ee_debug_toolbar', 15 | 'docs_url' => 'https://github.com/mithra62/ee_debug_toolbar/wiki', 16 | 'name' => DEBUG_TOOLBAR_MEMORY_HISTORY_ADDON_NAME, 17 | 'description' => 'Tracks memory usage across multiple pages.', 18 | 'version' => DEBUG_TOOLBAR_MEMORY_HISTORY_VERSION, 19 | 'namespace' => 'DebugToolbar\MemoryHistory', 20 | 'settings_exist' => false 21 | ]; 22 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/database/migrations/2024_01_15_190455_createexthookeedebugtoolbaraddpanelforaddoneedtmemoryhistory.php: -------------------------------------------------------------------------------- 1 | 'Eedt_memory_history_ext', 15 | 'method' => 'ee_debug_toolbar_add_panel', 16 | 'hook' => 'eedt_add_panel', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_memory_history_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/database/migrations/2024_01_15_190506_createexthookeedebugtoolbarsettingsformforaddoneedtmemoryhistory.php: -------------------------------------------------------------------------------- 1 | 'Eedt_memory_history_ext', 15 | 'method' => 'ee_debug_toolbar_settings_form', 16 | 'hook' => 'eedt_settings_form', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_memory_history_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/database/migrations/2024_01_15_190521_createexthookeedebugtoolbarinitsettingsforaddoneedtmemoryhistory.php: -------------------------------------------------------------------------------- 1 | 'Eedt_memory_history_ext', 15 | 'method' => 'ee_debug_toolbar_init_settings', 16 | 'hook' => 'eedt_init_settings', 17 | 'settings' => serialize([]), 18 | 'priority' => 10, 19 | 'version' => DEBUG_TOOLBAR_VERSION, 20 | 'enabled' => 'y' 21 | ]; 22 | 23 | // If we didnt find a matching Extension, lets just insert it 24 | ee('Model')->make('Extension', $ext)->save(); 25 | } 26 | 27 | /** 28 | * Rollback the migration 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | ee('Model')->get('Extension') 34 | ->filter('class', 'Eedt_memory_history_ext') 35 | ->delete(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/database/migrations/2024_01_15_190540_createactionfetchmemoryandsqlusageforaddoneedt_memory_history.php: -------------------------------------------------------------------------------- 1 | make('Action', [ 14 | 'class' => 'Eedt_memory_history', 15 | 'method' => 'FetchMemoryAndSqlUsage', 16 | 'csrf_exempt' => false, 17 | ])->save(); 18 | } 19 | 20 | /** 21 | * Rollback the migration 22 | * @return void 23 | */ 24 | public function down() 25 | { 26 | ee('Model')->get('Action') 27 | ->filter('class', 'Eedt_memory_history') 28 | ->filter('method', 'FetchMemoryAndSqlUsage') 29 | ->delete(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/database/migrations/2024_01_15_191256_create_memory_history_table.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'type' => 'INT', 16 | 'auto_increment' => true, 17 | 'unsigned' => true, 18 | ], 19 | 'session_id' => [ 20 | 'type' => 'VARCHAR', 21 | 'constraint' => '40', 22 | 'null' => true, 23 | ], 24 | 'url' => [ 25 | 'type' => 'VARCHAR', 26 | 'constraint' => '255', 27 | 'null' => true, 28 | ], 29 | 'peak_memory' => [ 30 | 'type' => 'FLOAT', 31 | 'null' => true, 32 | ], 33 | 'sql_count' => [ 34 | 'type' => 'INT', 35 | 'null' => true, 36 | ], 37 | 'execution_time' => [ 38 | 'type' => 'FLOAT', 39 | 'null' => true, 40 | ], 41 | 'timestamp' => [ 42 | 'type' => 'INT', 43 | 'null' => true, 44 | ], 45 | 'cp' => [ 46 | 'type' => 'ENUM', 47 | 'constraint' => '\'y\',\'n\'', 48 | 'default' => 'n', 49 | 'null' => false, 50 | ], 51 | ]; 52 | ee()->dbforge->add_field($fields); 53 | ee()->dbforge->add_key('id', true); 54 | ee()->dbforge->create_table('eedt_memory_history'); 55 | } 56 | 57 | /** 58 | * Rollback the migration 59 | * @return void 60 | */ 61 | public function down() 62 | { 63 | ee()->dbforge->drop_table('eedt_memory_history'); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/database/migrations/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/ext.eedt_memory_history.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default Add-On Icon 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/language/english/eedt_memory_history_lang.php: -------------------------------------------------------------------------------- 1 | 'Debug Toolbar - Memory History', 5 | 'eedt_memory_history_module_description' => 'Tracks memory usage across multiple pages.', 6 | 'memory_history' => 'Memory History', 7 | 'total' => 'Total', 8 | 'eedt_memory_history.form.header.settings' => 'Memory History Settings', 9 | 'eedt_memory_history.form.position' => 'Panel Position', 10 | 'eedt_memory_history.form.desc.form.position' => 'Where do you want the overlay to appear on the page?', 11 | ]; 12 | -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/language/english/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/language/index.html: -------------------------------------------------------------------------------- 1 | Directory access is forbidden. -------------------------------------------------------------------------------- /system/user/addons/eedt_memory_history/mod.eedt_memory_history.php: -------------------------------------------------------------------------------- 1 | '> 2 |
3 | -------------------------------------------------------------------------------- /themes/user/eedt/themes/bootstrap/css/eedt.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Core Overrides 3 | */ 4 | #Eedt_debug_toolbar, #Eedt_debug_toolbar * { 5 | box-sizing: content-box !important; 6 | margin: 0; 7 | padding:0; 8 | font: 11px/1.4em 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; 9 | } 10 | #Eedt_debug_toolbar img { 11 | width: auto; 12 | height: auto; 13 | display: inline; 14 | } 15 | 16 | /** 17 | * EEDT Bootstrap Theme 18 | */ 19 | #Eedt_debug_toolbar { 20 | font-size: 11px; 21 | position: fixed; 22 | left: 0; 23 | bottom:5px; 24 | color: #000; 25 | z-index: 100255; 26 | text-rendering: optimizelegibility; 27 | display: none; 28 | } 29 | #Eedt_debug_toolbar.top { 30 | bottom: auto; 31 | top: 5px; 32 | } 33 | 34 | #Eedt_debug_toolbar.right { 35 | left: auto; 36 | right: 0px; 37 | } 38 | 39 | 40 | #Eedt_debug_toolbar .Eedt_debug_toolbar_buttons_wrap { 41 | display: none; 42 | } 43 | #Eedt_debug_toolbar.toolbar-open { 44 | left: 0px; 45 | } 46 | #Eedt_debug_toolbar.right.toolbar-open { 47 | right: 0px; 48 | } 49 | #Eedt_debug_toolbar.toolbar-open .Eedt_debug_toolbar_buttons_wrap { 50 | display: inline; 51 | } 52 | 53 | #Eedt_debug_toolbar ol { 54 | margin: 10px 0px; 55 | background-color: #f7f7f7; 56 | overflow:scroll; 57 | overflow-x:scroll; 58 | overflow-y:hidden; 59 | 60 | counter-reset:li; /* Initiate a counter */ 61 | margin-left:0px; /* Remove the default left margin */ 62 | padding-left:0; /* Remove the default left padding */ 63 | 64 | } 65 | 66 | #Eedt_debug_toolbar li { 67 | position:relative; 68 | margin:0 0 0px 4em; 69 | padding:4px 8px 4px 0; 70 | list-style:none; 71 | border-top:1px solid #f6f6f6; 72 | } 73 | #Eedt_debug_toolbar li:hover { 74 | border-top:1px solid #eee; 75 | } 76 | #Eedt_debug_toolbar ol > li:before { 77 | font-family: Monaco, Menlo, Consolas, "Courier New", monospace; 78 | content:counter(li); 79 | counter-increment:li; 80 | 81 | position:absolute; 82 | color: #aaa; 83 | top:0px; 84 | left:-4em; 85 | bottom:0px; 86 | -moz-box-sizing:border-box; 87 | -webkit-box-sizing:border-box; 88 | box-sizing:border-box; 89 | margin-right:8px; 90 | width:3em; 91 | padding:5 5px 0 0; 92 | background-color:#eee; 93 | text-align:right; 94 | } 95 | #Eedt_debug_toolbar ol > li:hover:before { 96 | color:#000; 97 | background-color:#eee; 98 | } 99 | 100 | #Eedt_debug_toolbar h4 { 101 | font-size: 12px; 102 | font-weight: bold; 103 | border-bottom: 1px solid #efefef; 104 | padding-bottom: 4px; 105 | margin: 8px 0 5px; 106 | } 107 | #Eedt_debug_toolbar h4:first-child { 108 | margin-top:0; 109 | } 110 | 111 | #Eedt_debug_toolbar .clickable { 112 | cursor: pointer; 113 | float: left; 114 | } 115 | 116 | #Eedt_debug_toolbar #Eedt_debug_toolbar_toggle_btn, 117 | #Eedt_debug_toolbar .Eedt_debug_toolbar_button { 118 | 119 | background: #BFBFBF; 120 | padding: 10px 9px 9px; 121 | color: #333333; 122 | 123 | cursor: pointer; 124 | background-color: #f5f5f5; 125 | background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); 126 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); 127 | background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); 128 | background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); 129 | background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); 130 | background-repeat: repeat-x; 131 | border: 1px solid #bbbbbb; 132 | border-color: #e6e6e6 #e6e6e6 #bfbfbf; 133 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 134 | border-bottom-color: #a2a2a2; 135 | -webkit-border-radius: 0; 136 | -moz-border-radius: 0; 137 | border-radius: 0; 138 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); 139 | filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); 140 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 141 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 142 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 143 | } 144 | #Eedt_debug_toolbar #Eedt_debug_toolbar_toggle_btn:hover, 145 | #Eedt_debug_toolbar .Eedt_debug_toolbar_button:hover { 146 | color: #333333; 147 | background-color: #e6e6e6; 148 | text-decoration: none; 149 | background-position: 0 -15px; 150 | -webkit-transition: background-position 0.1s linear; 151 | -moz-transition: background-position 0.1s linear; 152 | -o-transition: background-position 0.1s linear; 153 | transition: background-position 0.1s linear; 154 | } 155 | #Eedt_debug_toolbar #Eedt_debug_toolbar_toggle_btn:active, 156 | #Eedt_debug_toolbar .Eedt_debug_toolbar_button:active { 157 | background-image: none; 158 | outline: 0; 159 | color: #333333; 160 | background-color: #e6e6e6; 161 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 162 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 163 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 164 | 165 | } 166 | 167 | #Eedt_debug_toolbar #Eedt_debug_toolbar_toggle_btn { 168 | border-bottom-color: #a2a2a2; 169 | -webkit-border-radius: 4px 0 0 4px; 170 | -moz-border-radius: 4px 0 0 4px; 171 | border-radius: 4px 0 0 4px; 172 | padding: 10px 8px 8px; 173 | width: 8px; 174 | height: 17px; 175 | cursor: pointer; 176 | float:left; 177 | } 178 | #Eedt_debug_toolbar .Eedt_debug_toolbar_button { 179 | border-right: 0px; 180 | float:left; 181 | position: relative; 182 | z-index: 2000; 183 | min-height:16px; 184 | } 185 | 186 | #Eedt_debug_toolbar.left #Eedt_debug_toolbar_toggle_btn { 187 | -webkit-border-radius: 0 4px 4px 0; 188 | -moz-border-radius: 0 4px 4px 0; 189 | } 190 | 191 | #Eedt_debug_toolbar.right .Eedt_debug_toolbar_button { 192 | float: right; 193 | border-right: none; 194 | } 195 | 196 | #Eedt_debug_toolbar.right #Eedt_debug_toolbar_toggle_btn { 197 | float:right; 198 | border-right:none; 199 | } 200 | 201 | #Eedt_debug_toolbar .EEDebug_last { 202 | border: 1px solid #999; 203 | } 204 | 205 | #Eedt_debug_toolbar .Eedt_debug_panel { 206 | text-align: left; 207 | position: absolute; 208 | bottom:37px; 209 | width: 628px; 210 | height:0; 211 | max-height: 500px; 212 | overflow: hidden; 213 | background: #fff; 214 | padding: 0 9px; 215 | border-right: 1px solid #e6e6e6; 216 | box-shadow: 0 2px 4px rgba(0,0,0, 0.2); 217 | -webkit-transition: height 0.2s linear; 218 | -moz-transition: height 0.2s linear; 219 | -o-transition: height 0.2s linear; 220 | transition: height 0.2s linear; 221 | } 222 | #Eedt_debug_toolbar.top .Eedt_debug_panel{ 223 | bottom: auto; 224 | top:37px; 225 | } 226 | #Eedt_debug_toolbar.right .Eedt_debug_panel{ 227 | right:0; 228 | } 229 | 230 | #Eedt_debug_toolbar .Eedt_debug_panel.active { 231 | padding: 7px 9px; 232 | height:500px; 233 | display: block; 234 | overflow: scroll; 235 | overflow-x: hidden; 236 | overflow-y: scroll; 237 | border-top: 4px solid #aaa; 238 | } 239 | 240 | #Eedt_debug_toolbar.top .Eedt_debug_panel.active { 241 | border-top: none; 242 | border-bottom: 4px solid #aaa; 243 | } 244 | 245 | #Eedt_debug_toolbar .Eedt_debug_toolbar_button img{ 246 | position: relative; 247 | top:-1px; 248 | } 249 | #Eedt_debug_toolbar .Eedt_debug_panel span.label { 250 | display:inline-block; 251 | width:100px 252 | } 253 | #Eedt_debug_toolbar .Eedt_debug_panel code { 254 | padding: 2px 4px; 255 | color: #d14; 256 | white-space: nowrap; 257 | background-color: #f7f7f9; 258 | border: 1px solid #e1e1e8; 259 | display:inline-block; 260 | padding: 0 3px 2px; 261 | margin: 1px 0; 262 | font-family: Monaco, Menlo, Consolas, "Courier New", monospace; 263 | font-size: 12px; 264 | 265 | -webkit-border-radius: 3px; 266 | -moz-border-radius: 3px; 267 | border-radius: 3px; 268 | } 269 | #Eedt_debug_toolbar .Eedt_debug_panel pre { 270 | font-family: Monaco, Menlo, Consolas, "Courier New", monospace; 271 | color: #333333; 272 | display: block; 273 | 274 | padding: 9.5px; 275 | margin: 0 0 10px; 276 | font-size: 12px; 277 | line-height: 20px; 278 | word-break: break-all; 279 | word-wrap: break-word; 280 | white-space: pre; 281 | white-space: pre-wrap; 282 | background-color: #f5f5f5; 283 | border: 1px solid #ccc; 284 | border: 1px solid rgba(0, 0, 0, 0.15); 285 | -webkit-border-radius: 4px; 286 | -moz-border-radius: 4px; 287 | border-radius: 4px; 288 | overflow: scroll; 289 | overflow-x: scroll; 290 | overflow-y: hidden; 291 | white-space: nowrap; 292 | } 293 | #Eedt_debug_toolbar .Eedt_debug_panel pre pre{ 294 | border-left-width: 4px; 295 | border-top-width: 4px; 296 | } 297 | #Eedt_debug_toolbar #EEDebug_exception { 298 | border: 1px solid #CD0A0A; 299 | display: block; 300 | } 301 | 302 | 303 | 304 | #Eedt_debug_toolbar a.EEDebug_actions { 305 | color: #000000; 306 | } 307 | 308 | #Eedt_debug_toolbar #EEDebug_database code { 309 | display:inline; 310 | border:none; 311 | font-size: 10px; 312 | } 313 | 314 | #Eedt_debug_toolbar #EEDebug_template_list { 315 | overflow:scroll; 316 | height:232px; 317 | /* Legacy */ 318 | overflow: scroll; 319 | 320 | /* Modern Browsers */ 321 | overflow-x:hidden; 322 | overflow-y:scroll; 323 | } 324 | 325 | #Eedt_debug_toolbar .Eedt_debug_panel h4 { 326 | font-size: 11px; 327 | font-weight: bold; 328 | margin: 0; 329 | color: #000; 330 | } 331 | #Eedt_debug_toolbar .flash { 332 | color: #FF0000; 333 | } -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/css/ee_debug_panel_copyright.css: -------------------------------------------------------------------------------- 1 | #Eedt_debug_toolbar #Eedt_debug_copyright_panel { 2 | overflow:hidden; 3 | } 4 | #Eedt_debug_toolbar #Eedt_debug_copyright_panel.active { 5 | height: 80px; 6 | } -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/css/ee_debug_panel_database.css: -------------------------------------------------------------------------------- 1 | #Eedt_debug_toolbar #Eedt_debug_database_panel code { 2 | display:inline; 3 | border:none; 4 | font-size: 12px; 5 | } -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/css/ee_debug_panel_memory.css: -------------------------------------------------------------------------------- 1 | /* EEDebug_memory */ 2 | 3 | 4 | #Eedt_debug_toolbar #EEDebug_graph { 5 | width: 700px; 6 | } 7 | #Eedt_debug_toolbar #EEDebug_graph, 8 | #Eedt_debug_toolbar #EEDebug_template_list{ 9 | display: none; 10 | } 11 | 12 | #Eedt_debug_toolbar .show_graph #EEDebug_graph, 13 | #Eedt_debug_toolbar .show_template_list #EEDebug_template_list { 14 | display: block; 15 | } 16 | 17 | 18 | #Eedt_debug_toolbar a.EEDebug_actions { 19 | color: #000000; 20 | } 21 | 22 | #Eedt_debug_toolbar .show_graph #EEDebug_graph_display, 23 | #Eedt_debug_toolbar .show_template_list #EEDebug_graph_list, 24 | #Eedt_debug_toolbar .EEDebug_tmpl_log_active, 25 | #Eedt_debug_toolbar .flash { 26 | color: #FF0000; 27 | } 28 | #Eedt_debug_toolbar #Eedt_debug_memory_panel { 29 | width: 660px; 30 | } 31 | #Eedt_debug_toolbar #Eedt_debug_memory_panel.active { 32 | overflow: scroll; 33 | overflow-x: hidden; 34 | overflow-y: scroll; 35 | height: 240px; 36 | } 37 | 38 | #Eedt_debug_toolbar #EEDebug_memory_cp.active { 39 | overflow: hidden; 40 | } 41 | -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/css/ee_debug_panel_time.css: -------------------------------------------------------------------------------- 1 | #Eedt_debug_toolbar #Eedt_debug_time_panel { 2 | overflow:auto; 3 | overflow-x:hidden; 4 | overflow-z:scroll; 5 | } 6 | #Eedt_debug_toolbar #Eedt_debug_time_panel.active { 7 | height:100px; 8 | } -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/css/eedt.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Core Overrides 3 | */ 4 | #Eedt_debug_toolbar, #Eedt_debug_toolbar * { 5 | box-sizing: content-box !important; 6 | margin: 0; 7 | padding:0; 8 | font: 12px/1.4em 'Lucida Grande', 'Lucida Sans Unicode', sans-serif; 9 | } 10 | #Eedt_debug_toolbar img { 11 | width: auto; 12 | height: auto; 13 | display: inline; 14 | } 15 | 16 | /** 17 | * EEDT Default Theme 18 | */ 19 | #Eedt_debug_toolbar { 20 | position: fixed; 21 | bottom: 5px; 22 | left: 0px; 23 | color: #000; 24 | z-index: 1000; 25 | display: none; 26 | } 27 | 28 | #Eedt_debug_toolbar.top { 29 | bottom: auto; 30 | top: 5px; 31 | } 32 | 33 | #Eedt_debug_toolbar.right { 34 | left: auto; 35 | right: 0px; 36 | } 37 | 38 | /* Toolbar open/close */ 39 | #Eedt_debug_toolbar .Eedt_debug_toolbar_buttons_wrap { 40 | display: none; 41 | } 42 | #Eedt_debug_toolbar.toolbar-open { 43 | left: 5px; 44 | } 45 | #Eedt_debug_toolbar.right.toolbar-open { 46 | right: 5px; 47 | } 48 | #Eedt_debug_toolbar.toolbar-open .Eedt_debug_toolbar_buttons_wrap { 49 | display: inline; 50 | } 51 | 52 | 53 | 54 | #Eedt_debug_toolbar ol { 55 | margin: 10px 0px; 56 | padding: 0 25px; 57 | list-style-type:lower-alpha; 58 | } 59 | 60 | #Eedt_debug_toolbar li { 61 | margin: 0 0 10px 0; 62 | list-style-type:decimal; 63 | } 64 | 65 | #Eedt_debug_toolbar h4 { 66 | margin: 0; 67 | font-size: 14px; 68 | font-weight: bold; 69 | } 70 | 71 | #Eedt_debug_toolbar_toggle_btn { 72 | font-weight: bold; 73 | background: #BFBFBF; 74 | width: 8px !important; 75 | height: 17px; 76 | cursor: pointer; 77 | float:left; 78 | } 79 | 80 | #Eedt_debug_toolbar .Eedt_debug_toolbar_button { 81 | border: 1px solid #999; 82 | border-right: 0px; 83 | background: #DFDFDF; 84 | padding: 5px 5px; 85 | cursor: pointer; 86 | float:left; 87 | position: relative; 88 | z-index: 2000; 89 | min-height: 17px; 90 | } 91 | #Eedt_debug_toolbar.right .Eedt_debug_toolbar_button { 92 | float: right; 93 | border: 1px solid #999; 94 | border-left: 0px; 95 | } 96 | 97 | 98 | #Eedt_debug_toolbar.left .Eedt_debug_toolbar_button_last, 99 | #Eedt_debug_toolbar.right .Eedt_debug_toolbar_button_last { 100 | border: 1px solid #999; 101 | } 102 | 103 | #Eedt_debug_toolbar .Eedt_debug_panel { 104 | text-align: left; 105 | position: absolute; 106 | bottom: 28px; 107 | width: 600px; 108 | height:0; 109 | max-height: 400px; 110 | overflow: scroll; 111 | overflow-x:hidden; 112 | overflow-y:scroll; 113 | background: #E8E8E8; 114 | padding: 0 5px; 115 | -webkit-transition: height 0.2s linear; 116 | -moz-transition: height 0.2s linear; 117 | -o-transition: height 0.2s linear; 118 | transition: height 0.2s linear; 119 | z-index: 1000; 120 | } 121 | 122 | #Eedt_debug_toolbar.top .Eedt_debug_panel{ 123 | bottom: auto; 124 | top:28px; 125 | } 126 | #Eedt_debug_toolbar.right .Eedt_debug_panel{ 127 | right:0; 128 | } 129 | 130 | #Eedt_debug_toolbar .Eedt_debug_panel.active { 131 | border: 1px solid #999; 132 | padding: 5px; 133 | height:600px; 134 | display: block; 135 | overflow: scroll; 136 | overflow-x: hidden; 137 | overflow-y: scroll; 138 | } 139 | 140 | 141 | #EEDebug_exception { 142 | border: 1px solid #CD0A0A; 143 | display: block; 144 | } 145 | 146 | 147 | #Eedt_debug_toolbar .Eedt_debug_panel code { 148 | background-color: #E8E8E8; 149 | padding:0; 150 | margin:0; 151 | border: 0; 152 | display:inline-block; 153 | font-family: Monaco, Menlo, Consolas, "Courier New", monospace; 154 | font-size: 12px; 155 | } 156 | 157 | #Eedt_debug_toolbar .Eedt_debug_panel pre { 158 | font: 12px/1.4em Monaco, Lucida Console, monospace; 159 | margin: 0 0 0 22px; 160 | word-wrap: break-word; 161 | } 162 | 163 | #Eedt_debug_toolbar .Eedt_debug_panel h4 { 164 | font-size: 14px; 165 | font-weight: bold; 166 | margin: 0; 167 | color: #000; 168 | } 169 | 170 | #Eedt_debug_toolbar .Eedt_debug_panel.Eedt_debug_panel_loading{ 171 | background-image: url(data:image/gif;base64,R0lGODlhIAAgAIQAAKyqrNza3MTGxOzu7LS2tPz6/OTm5MzOzLSytPT29Ly+vKyurOTi5MzKzPTy9Ly6vPz+/Ozq7NTS1Ojo6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCQATACwAAAAAIAAgAAAF2+AkjuQ0JEUxGYTSBEYpz1EC3fcUATywNLHZzIErrnq9xUFIihSKBUeExDgokI+gcIArTJkMAW+hLUWm3AGzFFAwTF9SKr6eDVIlIkRVFz4hDiMROGp9djhfNnuGTIoJOoiMQoM5XIuSQooOmphCeg5/dJ2CN38Qo0KIZ6g0q6x1f68lpaGyIpQFnLaWCXp8spqUEKKdwiKOwDePkDeFo5bDI4q/nX/LI0/EjFzUt2gFznV3aNomOAnlt9PpOqZ7A3QRJ1Dsx0WlzPfXfTX3+aX1aGzCMyhXoDUhAAAh+QQJCQAUACwAAAAAIAAgAISsqqzc2tzEwsTs7uy0trTk5uTMzsz8+vzk4uTMysz09vS8vrysrqzc3tzExsT08vS8urzs6uzU0tT8/vzo6OgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF3iAljiQ1KMdBRakylHC8KlNdr3atRHL85DYccPLojVi5w4M3GjwOSaZsYDtIYxFa7UqK8Kgv4+jJaxRgKa6Y1GBASr+Jah0jAACGoy1MLwXuDAgiWnN9MAJ3DkITaoYUbQAMEVRyjjILdwFaRZYwEolQjJ0wCHcLQaMwDAAEXo2psHShsSQ1KVu0QgebuZQKcYWwmxE2r33ENxRaCrHLIsgTfJaUooO2qaHMJFDGYlTBz18H0kYDViav1DtGWbbdSFUDV5Na7mv1VYs52nTtOfpyusmI8ACFCmK7OPUIAQAh+QQJCQAVACwAAAAAIAAgAISsqqzc2tzEwsTs7uy0trTk5uTMzsz8+vy0srTk4uTMysz09vS8vrysrqzc3tzExsT08vS8urzs6uzU0tT8/vzo6OgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF3mAljmQ1LMdRSekylHC8LlRdr3a9SHIM5TYckALpjVi5A4Q3GkAOSaZsYDtIYxJa7UqS8Kgv4+j55VZSZnEzVfpRVOoYlHi0heMl6lakheNhWgtCFGl/EkF6fn+ANRBaRYs+jXOFi4dvQZEyNl6VkZ2aeHOhMQgNDJSkJAkAABGPqiMTrQ9uiqQMrQGXhLEJDQANBRWBsQ+0Irx3kQGtDQkjfaQErQYlUJ5GzQQwXiYHy0YDVhUO0DF6FDtGWTXkPUhVA1cSJ1FqWkmDOYJ47Tn73mTD4ojNoQMLIPUIAQAh+QQJCQATACwAAAAAIAAgAISsqqzU1tTs7uy8vrzk4uT8+vy0trTMzszc3tz09vTExsTs6uysrqzc2tz08vTEwsTk5uT8/vy8urzo6OgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF3OAkjuQkJEUxLWkilHC8JlFdr3adLHLs5DYcMOLojVi5goM3EjgKSaZMYCtIYwta7Upa8Kgv4+j55U5SZnEzVfpFVOoYlHi0heMl6lakheNhWglCEWl/C0F6fn+ANQ5aRYs+jXOFi4dvQZEyNl6VkZ2aeHOhMTUpe6R1b4+pTTpuiqSPl4SttHw6rYEitHeRerW4b6RzgiRQnkZUsStfBb5GCAMEE0tTNjtGBAoAAAYQRkhVAlcQAQ8M3d7gYlpJExDp6t0H7GpZQCvzDAoImguO2EAwIEFBAHsxQgAAIfkECQkAEgAsAAAAACAAIACErKqs1NbU7O7svL685OLk/Pr8tLa0xMbE9Pb07OrsrK6s3N7c9PL0xMLE5Obk/P78vLq8zMrM6OjoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABdygJI6kJCBFISUpIpRwvCJPXa92jSRyzOQ2HPDB6I1YuQKDNxIwCkmmTGArSGMJWu1KSvCoL+Po+eVKUmZxM1X6PVTqGJR4tIXjJepWpIXjYVoIQg9pfwlBen5/gDUMWkWLPo1zhYuHb0GRMjZelZGdmnhzoTE1KXukdW+PqU06boqkj5eErbR8Oq2BIrR3kXq1uG+kc4IkUJ5GVLErPAsQC3gCViaFCwoAAAcORlmmngQQ2QAKDQHcR9NRYg4R2OMAEIM5xnEEB+8ABvNvyTEOAQ4YaCDBwSpIPUIAACH5BAkJABMALAAAAAAgACAAhKyqrNTW1Ozu7Ly+vLS2tOTi5Pz6/MTGxLSytPT29Ozq7KyurNze3PTy9MTCxLy6vOTm5Pz+/MzKzOjo6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXe4CSO5CQkhjEpaSKUcLwmUV2vdp0octzkNhww0uiNWDlDgzcSNAxJpkxgM0hjClrtSlLwqC/j6PnlTlJmcTNV+kVU6hiUeLSF4yXqVqSF42FaCUIRaX8KQXp+f4A1DVpFiz6Nc4WLh29BkTI2XpWRnZp4DwsEoTE1Bg8AABCmXagHqwGuYzoBqw60fI0QCwALBbSXESKxAAe0gSIFvgAMpnqEIxKrA6ZzgiMQBATBoVSKy8ECBndi5GUywztGWaieSFUCVwonUWpaSYM52XHuOfveeFLniM0hAwkg9QgBACH5BAkJABIALAAAAAAgACAAhKyqrNTW1Ozu7Ly+vOTi5Pz6/LS2tMzOzPT29MTGxOzq7KyurNze3PTy9MTCxOTm5Pz+/Ly6vOjo6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXhoCSOpCQgRSEpKSKUcLwiUF2vdo0octzkNhwQ0uiNWLlCgzcSNApJpkxgK0hjClrtSiI8TIWXcfTkCbiPiIEw7glSpQMAMGjLoMQRYQ5g2GNUWyIJcwl/MloIEg8LAAtshzAKQQFzdZExeA1yAAGYPjUNEXNfnyWTEAUGjqYxQa0yCrKwY3i0JDUpgreoBVpFt4EIP6m3Er+oEFyYySKJtM9CEGKfgcojWiqmeIokUMt/VNoks2/UY29m4CY2O0ZZuesiSFVn5CdRbVpJ0jnddvBy9Eslr4eCBihUTPIFrEcIACH5BAkJABMALAAAAAAgACAAhKyqrNTW1Ozu7MTCxOTi5Pz6/LS2tMzKzNze3PT29Ozq7KyurNza3PTy9MTGxOTm5Pz+/Ly6vMzOzOjo6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXe4CSO5MMc0TApRZEIZCyTxLEAuDE9UN8niplQgisCdAKfsiGkRYqLgeRBEjQKykKwybgBHIjmKuHbyhRBhiEgJl2DAvOoRW0Lk4VYo5e3z7AQTCIKPjB+Mns9W2QQfYcyjAkrZY8zhD0TSY2VQowNnpwziVeKoWd8PqYzZWiqZ62uYoCxJHyAcqqXLj2CsZoJiY6unpcQuJzFIpGxy5M9hqGaxiOMwpWAkiRYx4d4r5kF0G0CWpncmT5AYgrV54OAfHEkCgKMfO7USnzO+tl+7Pr43Qul4FOLSS56CQkBADs=); 172 | background-repeat: no-repeat; 173 | background-position: center center; 174 | background-color: #ddd; 175 | } 176 | #Eedt_debug_toolbar .Eedt_debug_panel.Eedt_debug_panel_loading * { 177 | display: none !important; 178 | } 179 | #Eedt_debug_toolbar .flash { 180 | color: #FF0000; 181 | } 182 | 183 | #Eedt_debug_toolbar .nice { 184 | color: #3548e7; 185 | } -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/config.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/copyright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/copyright.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/database.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/files.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/memory.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/time.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/images/variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/default/images/variables.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/js/ee_debug_panel_database.js: -------------------------------------------------------------------------------- 1 | /** 2 | * EE Debug Toolbar Log Viewer JS 3 | */ 4 | 5 | 6 | (function () { 7 | 8 | jQuery("#Eedt_debug_database_panel").on('click', "#EEDebug_slow_queries", function () { 9 | 10 | jQuery(".Eedt_debug_database_panel_container").hide(); 11 | jQuery(".EEDebug_slow_query").show(); 12 | 13 | jQuery("#Eedt_debug_database_panel_nav_items a").removeClass("flash"); 14 | jQuery("#EEDebug_slow_queries").addClass("flash"); 15 | }); 16 | 17 | jQuery("#Eedt_debug_database_panel").on('click', "#EEDebug_all_queries", function () { 18 | 19 | jQuery(".Eedt_debug_database_panel_container").hide(); 20 | jQuery(".EEDebug_normal_queries").show(); 21 | 22 | jQuery("#Eedt_debug_database_panel_nav_items a").removeClass("flash"); 23 | jQuery("#EEDebug_all_queries").addClass("flash"); 24 | }); 25 | 26 | jQuery("#Eedt_debug_database_panel").on('click', "#EEDebug_duplicate_queries", function () { 27 | 28 | jQuery(".Eedt_debug_database_panel_container").hide(); 29 | jQuery(".EEDebug_duplicate_query").show(); 30 | 31 | jQuery("#Eedt_debug_database_panel_nav_items a").removeClass("flash"); 32 | jQuery("#EEDebug_duplicate_queries").addClass("flash"); 33 | }); 34 | 35 | jQuery("#Eedt_debug_database_panel").on('click', "#EEDebug_memory_queries", function () { 36 | 37 | jQuery(".Eedt_debug_database_panel_container").hide(); 38 | jQuery(".EEDebug_memory_queries").show(); 39 | 40 | jQuery("#Eedt_debug_database_panel_nav_items a").removeClass("flash"); 41 | jQuery("#EEDebug_memory_queries").addClass("flash"); 42 | }); 43 | 44 | })(); -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/js/ee_debug_panel_files.js: -------------------------------------------------------------------------------- 1 | /** 2 | * EE Debug Toolbar Files JS 3 | */ 4 | 5 | 6 | (function () { 7 | 8 | jQuery("#Eedt_debug_files_panel").on('click', "#EEDebug_general_files", function () { 9 | 10 | jQuery(".Eedt_debug_files_panel_container").hide(); 11 | jQuery(".EEDebug_general_files").show(); 12 | 13 | jQuery("#Eedt_debug_files_panel_nav_items a").removeClass("flash"); 14 | jQuery("#EEDebug_general_files").addClass("flash"); 15 | }); 16 | 17 | jQuery("#Eedt_debug_files_panel").on('click', "#EEDebug_addon_files", function () { 18 | 19 | jQuery(".Eedt_debug_files_panel_container").hide(); 20 | jQuery(".EEDebug_addon_files").show(); 21 | 22 | jQuery("#Eedt_debug_files_panel_nav_items a").removeClass("flash"); 23 | jQuery("#EEDebug_addon_files").addClass("flash"); 24 | }); 25 | 26 | jQuery("#Eedt_debug_files_panel").on('click', "#EEDebug_ee_files", function () { 27 | 28 | jQuery(".Eedt_debug_files_panel_container").hide(); 29 | jQuery(".EEDebug_ee_files").show(); 30 | 31 | jQuery("#Eedt_debug_files_panel_nav_items a").removeClass("flash"); 32 | jQuery("#EEDebug_ee_files").addClass("flash"); 33 | }); 34 | 35 | jQuery("#Eedt_debug_files_panel").on('click', "#EEDebug_composer_files", function () { 36 | 37 | jQuery(".Eedt_debug_files_panel_container").hide(); 38 | jQuery(".EEDebug_composer_files").show(); 39 | 40 | jQuery("#Eedt_debug_files_panel_nav_items a").removeClass("flash"); 41 | jQuery("#EEDebug_composer_files").addClass("flash"); 42 | }); 43 | 44 | jQuery("#Eedt_debug_files_panel").on('click', "#EEDebug_other_files", function () { 45 | 46 | jQuery(".Eedt_debug_files_panel_container").hide(); 47 | jQuery(".EEDebug_other_files").show(); 48 | 49 | jQuery("#Eedt_debug_files_panel_nav_items a").removeClass("flash"); 50 | jQuery("#EEDebug_other_files").addClass("flash"); 51 | }); 52 | 53 | })(); -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/js/ee_debug_panel_memory.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Bind to Panel Init 3 | */ 4 | eedt.on("memory", "init", function(node, panel){ 5 | panel.loading(true); 6 | 7 | if(!eedt.config('template_debugging_enabled')) { 8 | panel.loading(false); 9 | return; 10 | } 11 | if(!window.google){ 12 | eedt.loadScript("https://www.google.com/jsapi?callback=jsapi_ready"); 13 | } else { 14 | jsapi_ready(); 15 | } 16 | }); 17 | 18 | 19 | 20 | /** 21 | * Google JSAPI Load 22 | */ 23 | function jsapi_ready() { 24 | google.load("visualization", "1", { 25 | packages:["corechart"], 26 | callback:function () { 27 | var c = new Eedt_memory_graph(eedt.data.tmpl_data, document.getElementById('EEDebug_graph')); 28 | } 29 | }); 30 | 31 | /** 32 | * EE Debug Chart Class 33 | * 34 | * Keep it inside this closure to minimise window object pollution 35 | * 36 | * @param data array 37 | * @param node HTMLElement 38 | * @constructor 39 | */ 40 | function Eedt_memory_graph(data, node) { 41 | var chart, 42 | datatable = new google.visualization.DataTable(), 43 | formatter = new google.visualization.NumberFormat({suffix:'MB'}), 44 | options = { 45 | //title:'', 46 | backgroundColor:'none', 47 | width:640, 48 | height:220, 49 | hAxis:{ 50 | slantedText:true 51 | }, 52 | vAxes:[ 53 | {format:'#MB'} 54 | ], 55 | legend:{ 56 | position:'none' 57 | }, 58 | tooltip:{ 59 | isHtml:false 60 | }, 61 | chartArea:{ 62 | width:660, 63 | height:"160", 64 | top:10, 65 | left:50 66 | } 67 | }; 68 | 69 | datatable.addColumn('string', 'Memory'); 70 | datatable.addColumn('number', 'Times'); 71 | datatable.addColumn({type:'string', role:'tooltip'}); 72 | datatable.addRows(data.length); 73 | 74 | for (var i = 0; i < data.length; i++) { 75 | var tooltip = String(data[i].desc + "\nMemory:" + data[i].memory_display + "\nTime:" + data[i].time); 76 | 77 | datatable.setValue(i, 0, data[i].time); 78 | datatable.setValue(i, 1, data[i].memory); 79 | datatable.setValue(i, 2, tooltip); 80 | } 81 | 82 | formatter.format(datatable, 1); 83 | 84 | chart = new google.visualization.LineChart(node); 85 | chart.draw(datatable, options); 86 | 87 | //setup the click to list function 88 | google.visualization.events.addListener(chart, 'select', function() { 89 | var selection = chart.getSelection(); 90 | var row = "#EEDebug_hash_"+selection[0].row; 91 | var col = selection[0].column; 92 | 93 | jQuery("#Eedt_debug_memory_panel").addClass("show_template_list").removeClass("show_graph"); 94 | jQuery("#EEDebug_template_list div").removeClass("EEDebug_tmpl_log_active"); 95 | jQuery(row)[0].scrollIntoView(); 96 | jQuery(row).addClass("EEDebug_tmpl_log_active"); 97 | }); 98 | //end click to list 99 | 100 | //Some indicators that the chart is ready 101 | 102 | jQuery("#EEDebug_graph_display").click(function () { 103 | jQuery("#Eedt_debug_memory_panel").removeClass("show_template_list").addClass("show_graph"); 104 | }); 105 | 106 | jQuery("#EEDebug_graph_list").click(function () { 107 | jQuery("#Eedt_debug_memory_panel").addClass("show_template_list").removeClass("show_graph"); 108 | }); 109 | 110 | jQuery("#EEDebug_graph_display").trigger("click"); 111 | 112 | eedt.panel("memory").loading(false); 113 | }; 114 | } 115 | 116 | -------------------------------------------------------------------------------- /themes/user/eedt/themes/default/js/ee_debug_panel_variables.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | jQuery("#Eedt_debug_variables_panel").on('click', "#EEDebug_get", function () { 4 | 5 | jQuery(".Eedt_debug_variables_panel_container").hide(); 6 | jQuery(".EEDebug_get").show(); 7 | 8 | jQuery("#Eedt_debug_variables_panel_nav_items a").removeClass("flash"); 9 | jQuery("#EEDebug_get").addClass("flash"); 10 | }); 11 | 12 | jQuery("#Eedt_debug_variables_panel").on('click', "#EEDebug_post", function () { 13 | 14 | jQuery(".Eedt_debug_variables_panel_container").hide(); 15 | jQuery(".EEDebug_post").show(); 16 | 17 | jQuery("#Eedt_debug_variables_panel_nav_items a").removeClass("flash"); 18 | jQuery("#EEDebug_post").addClass("flash"); 19 | }); 20 | 21 | jQuery("#Eedt_debug_variables_panel").on('click', "#EEDebug_headers", function () { 22 | 23 | jQuery(".Eedt_debug_variables_panel_container").hide(); 24 | jQuery(".EEDebug_headers").show(); 25 | 26 | jQuery("#Eedt_debug_variables_panel_nav_items a").removeClass("flash"); 27 | jQuery("#EEDebug_headers").addClass("flash"); 28 | }); 29 | 30 | jQuery("#Eedt_debug_variables_panel").on('click', "#EEDebug_cookie", function () { 31 | 32 | jQuery(".Eedt_debug_variables_panel_container").hide(); 33 | jQuery(".EEDebug_cookie").show(); 34 | 35 | jQuery("#Eedt_debug_variables_panel_nav_items a").removeClass("flash"); 36 | jQuery("#EEDebug_cookie").addClass("flash"); 37 | }); 38 | 39 | jQuery("#Eedt_debug_variables_panel").on('click', "#EEDebug_php_session", function () { 40 | 41 | jQuery(".Eedt_debug_variables_panel_container").hide(); 42 | jQuery(".EEDebug_php_session").show(); 43 | 44 | jQuery("#Eedt_debug_variables_panel_nav_items a").removeClass("flash"); 45 | jQuery("#EEDebug_php_session").addClass("flash"); 46 | }); 47 | 48 | jQuery("#Eedt_debug_variables_panel").on('click', "#EEDebug_ee_session", function () { 49 | 50 | jQuery(".Eedt_debug_variables_panel_container").hide(); 51 | jQuery(".EEDebug_ee_session").show(); 52 | 53 | jQuery("#Eedt_debug_variables_panel_nav_items a").removeClass("flash"); 54 | jQuery("#EEDebug_ee_session").addClass("flash"); 55 | }); 56 | 57 | })(); -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/config.php: -------------------------------------------------------------------------------- 1 | 'Hot Dog Stand theme by Eric Lamb (mithra62) based on Micro$oft color scheme of the same name.', 16 | ); -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/css/ee_debug_toolbar.css: -------------------------------------------------------------------------------- 1 | /** 2 | * EE Debug Toolbar CSS 3 | */ 4 | #Eedt_debug_toolbar { 5 | font: 11px/1.4em Lucida Grande, Lucida Sans Unicode, sans-serif; 6 | position: fixed; 7 | bottom: 5px; 8 | left: 0px; 9 | color: #000; 10 | z-index: 1000; 11 | display: none; 12 | } 13 | 14 | #Eedt_debug_toolbar.top { 15 | bottom: auto; 16 | top: 5px; 17 | } 18 | 19 | #Eedt_debug_toolbar.right { 20 | left: auto; 21 | right: 0px; 22 | } 23 | 24 | /* Toolbar open/close */ 25 | #Eedt_debug_toolbar .Eedt_debug_toolbar_buttons_wrap { 26 | display: none; 27 | } 28 | #Eedt_debug_toolbar.toolbar-open { 29 | left: 5px; 30 | } 31 | #Eedt_debug_toolbar.right.toolbar-open { 32 | right: 5px; 33 | } 34 | #Eedt_debug_toolbar.toolbar-open .Eedt_debug_toolbar_buttons_wrap { 35 | display: inline; 36 | } 37 | 38 | 39 | 40 | #Eedt_debug_toolbar ol { 41 | margin: 10px 0px; 42 | padding: 0 25px; 43 | list-style-type:lower-alpha; 44 | } 45 | 46 | #Eedt_debug_toolbar li { 47 | margin: 0 0 10px 0; 48 | list-style-type:decimal; 49 | } 50 | 51 | #Eedt_debug_toolbar h4 { 52 | margin: 0; 53 | font-size: 11px; 54 | font-weight: bold; 55 | } 56 | 57 | #Eedt_debug_toolbar_toggle_btn { 58 | font-weight: bold; 59 | background: #c6c6c6; 60 | width: 8px !important; 61 | color: #000; 62 | height: 17px; 63 | cursor: pointer; 64 | float:left; 65 | min-height: 17px; 66 | } 67 | 68 | .Eedt_debug_toolbar_button { 69 | border: 1px solid #000; 70 | border-right: 0px; 71 | background: #ff0000; 72 | padding: 5px 5px; 73 | cursor: pointer; 74 | float:left; 75 | position: relative; 76 | z-index: 2000; 77 | color:#ffffff; 78 | } 79 | #Eedt_debug_toolbar.right .Eedt_debug_toolbar_button { 80 | float: right; 81 | border: 1px solid #000; 82 | border-left: 0px; 83 | } 84 | 85 | 86 | #Eedt_debug_toolbar.left .Eedt_debug_toolbar_button_last, 87 | #Eedt_debug_toolbar.right .Eedt_debug_toolbar_button_last { 88 | border: 1px solid #000; 89 | } 90 | 91 | .Eedt_debug_panel { 92 | text-align: left; 93 | position: absolute; 94 | bottom: 28px; 95 | width: 600px; 96 | height:0; 97 | max-height: 400px; 98 | overflow: scroll; 99 | overflow-x:hidden; 100 | overflow-y:scroll; 101 | background: #ffff00; 102 | padding: 0 5px; 103 | -webkit-transition: height 0.2s linear; 104 | -moz-transition: height 0.2s linear; 105 | -o-transition: height 0.2s linear; 106 | transition: height 0.2s linear; 107 | z-index: 1000; 108 | } 109 | 110 | #Eedt_debug_toolbar.top .Eedt_debug_panel{ 111 | bottom: auto; 112 | top:28px; 113 | } 114 | #Eedt_debug_toolbar.right .Eedt_debug_panel{ 115 | right:0; 116 | } 117 | 118 | .Eedt_debug_panel.active { 119 | border: 1px solid #000; 120 | padding: 5px; 121 | height:600px; 122 | display: block; 123 | overflow: scroll; 124 | overflow-x: hidden; 125 | overflow-y: scroll; 126 | } 127 | 128 | 129 | #EEDebug_exception { 130 | border: 1px solid #CD0A0A; 131 | display: block; 132 | } 133 | 134 | 135 | .Eedt_debug_panel code { 136 | background-color: #E8E8E8; 137 | padding:0; 138 | margin:0; 139 | border: 0; 140 | display:inline-block; 141 | font-family: Monaco, Menlo, Consolas, "Courier New", monospace; 142 | font-size: 11px; 143 | } 144 | 145 | .Eedt_debug_panel pre { 146 | font: 11px/1.4em Monaco, Lucida Console, monospace; 147 | margin: 0 0 0 22px; 148 | word-wrap: break-word; 149 | } 150 | 151 | .Eedt_debug_panel h4 { 152 | font-size: 11px; 153 | font-weight: bold; 154 | margin: 0; 155 | color: #000; 156 | } 157 | 158 | #Eedt_debug_toolbar .Eedt_debug_panel.Eedt_debug_panel_loading{ 159 | background-image: url(data:image/gif;base64,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); 160 | background-repeat: no-repeat; 161 | background-position: center center; 162 | background-color: #ddd; 163 | } 164 | #Eedt_debug_toolbar .Eedt_debug_panel.Eedt_debug_panel_loading * { 165 | display: none !important; 166 | } 167 | 168 | #Eedt_debug_toolbar .flash { 169 | color: #000; 170 | } -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/config.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/copyright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/copyright.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/database.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/files.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/memory.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/time.png -------------------------------------------------------------------------------- /themes/user/eedt/themes/hot_dog_stand/images/variables.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt/themes/hot_dog_stand/images/variables.png -------------------------------------------------------------------------------- /themes/user/eedt_errors/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt_errors/images/error.png -------------------------------------------------------------------------------- /themes/user/eedt_errors/images/good.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt_errors/images/good.png -------------------------------------------------------------------------------- /themes/user/eedt_errors/js/eedt_errors.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 3 | jQuery("#Eedt_debug_eedt_errors_panel").on('click', "#EEDebug_errors_clear_errors", function () { 4 | eedt.ajax('Eedt_errors', 'ClearErrorLog', {}).then(function(data){ 5 | jQuery("#eedt_error_content").hide(); 6 | eedt.closePanels(); 7 | }); 8 | }); 9 | 10 | })(); -------------------------------------------------------------------------------- /themes/user/eedt_logs/images/logs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt_logs/images/logs.png -------------------------------------------------------------------------------- /themes/user/eedt_memory_history/css/memory_history.css: -------------------------------------------------------------------------------- 1 | #Eedt_memory_history { 2 | position: fixed; 3 | top:5px; 4 | right:5px; 5 | height:110px; 6 | width:260px; 7 | background: #032f4f; 8 | border:1px solid #000; 9 | z-index:999999999; 10 | } 11 | #Eedt_memory_history.left { 12 | right: auto; 13 | left: 5px; 14 | } 15 | #Eedt_memory_history.bottom { 16 | top: auto; 17 | bottom: 5px; 18 | } 19 | #Eedt_memory_history #Eedt_memory_history_chart { 20 | position: absolute; 21 | top:5px; 22 | bottom:5px; 23 | right:5px; 24 | left:5px; 25 | background: #032f4f; 26 | } -------------------------------------------------------------------------------- /themes/user/eedt_memory_history/images/memory_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mithra62/ee_debug_toolbar/ea34394b529a7daca88bff31ee9efb4e325ebca9/themes/user/eedt_memory_history/images/memory_history.png -------------------------------------------------------------------------------- /themes/user/eedt_memory_history/js/memory_history.js: -------------------------------------------------------------------------------- 1 | (function(){ 2 | 3 | eedt.ready(function($, eedt){ 4 | eedt.loadScript("https://www.google.com/jsapi?callback=EedtMemoryHistoryJSAPIReady"); 5 | }); 6 | 7 | })(); 8 | 9 | function EedtMemoryHistoryJSAPIReady(){ 10 | var def = new jQuery.Deferred(); 11 | 12 | //Load visualisation lib and fetch data 13 | google.load("visualization", "1", { 14 | packages:["corechart"], 15 | callback: function(){ 16 | var d = def; 17 | eedt.ajax('Eedt_memory_history', 'FetchMemoryAndSqlUsage', { 18 | 'cp': eedt.config('cp') ? 'y' : 'n' 19 | }).then(function(data){ 20 | d.resolve(data); 21 | }); 22 | } 23 | }); 24 | 25 | def.then(drawChart); 26 | 27 | //Draw chart 28 | function drawChart(ajaxData) { 29 | var series = parseData(ajaxData); 30 | 31 | 32 | var data = new google.visualization.DataTable(); 33 | data.addColumn('string', 'URL'); 34 | data.addColumn('number', 'Memory Usage'); 35 | data.addColumn('number', 'SQL Query Count'); 36 | data.addColumn('number', 'Total Execution Time'); 37 | data.addRows(series); 38 | 39 | 40 | var options = { 41 | title: "Memory, Query Count & Execution Time", 42 | titlePosition: 'out', 43 | titleTextStyle : { 44 | color:'#fff' 45 | }, 46 | legend: 'none', 47 | backgroundColor:'#032f4f', 48 | colors: ['#e46c63', '#8be47d'], 49 | chartArea : { 50 | top:20, 51 | left:0, 52 | width:250, 53 | height:200 54 | }, 55 | vAxis : { 56 | baselineColor: '#0e4a85', 57 | gridlines : { 58 | count: 10, 59 | color:'#0e4a85' 60 | } 61 | } 62 | }; 63 | 64 | var chart = new google.visualization.LineChart(document.getElementById('Eedt_memory_history_chart')); 65 | chart.draw(data, options); 66 | 67 | google.visualization.events.addListener(chart, 'select', function (e) { 68 | window.location = data.getValue(chart.getSelection()[0].row, 0); 69 | }); 70 | } 71 | 72 | function parseData(data) { 73 | var parsedData = [], 74 | memMax = false, 75 | sqlMax = false, 76 | execMax = false; 77 | 78 | //Calculate max so we can normalise 79 | for(var i = 0; i < data.length; i++){ 80 | 81 | data[i].peak_memory = Number(data[i].peak_memory); 82 | data[i].sql_count = Number(data[i].sql_count); 83 | data[i].execution_time = Number(data[i].execution_time); 84 | 85 | if(memMax === false) { 86 | memMax = data[i].peak_memory; 87 | } 88 | if(sqlMax === false) { 89 | sqlMax = data[i].sql_count; 90 | } 91 | if(execMax === false) { 92 | execMax = data[i].execution_time; 93 | } 94 | 95 | if(data[i].peak_memory > memMax) { 96 | memMax = data[i].peak_memory; 97 | } 98 | 99 | if(data[i].sql_count > sqlMax) { 100 | sqlMax = data[i].sql_count; 101 | } 102 | 103 | if(data[i].execution_time > execMax) { 104 | execMax = data[i].execution_time; 105 | } 106 | } 107 | 108 | for(var i = 0; i < data.length; i++){ 109 | parsedData.push( 110 | [ 111 | data[i].url, 112 | { 113 | v: (data[i].peak_memory / memMax) + 0.6, 114 | f: String(data[i].peak_memory) + "MB" 115 | }, 116 | { 117 | v: (data[i].sql_count / sqlMax) + 0.3, 118 | f: String(data[i].sql_count) + " queries" 119 | }, 120 | { 121 | v: data[i].execution_time / execMax, 122 | f: String(data[i].execution_time) + "s" 123 | } 124 | ] 125 | ); 126 | } 127 | 128 | return parsedData; 129 | } 130 | } 131 | 132 | 133 | --------------------------------------------------------------------------------