403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.190
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/phpmyadmin/js/dist/jqplot/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/phpmyadmin/js/dist/jqplot/plugins/jqplot.byteFormatter.js
/**
 * jqplot formatter for byte values
 *
 * @package phpMyAdmin
 */
(function ($) {
  'use strict';

  var formatByte = function (value, index) {
    var val = value;
    var i = index;
    var units = [Messages.strB, Messages.strKiB, Messages.strMiB, Messages.strGiB, Messages.strTiB, Messages.strPiB, Messages.strEiB];
    while (val >= 1024 && i <= 6) {
      val /= 1024;
      i++;
    }
    var format = '%.1f';
    if (Math.floor(val) === val) {
      format = '%.0f';
    }
    return $.jqplot.sprintf(format + ' ' + units[i], val);
  };
  /**
   * The index indicates what unit the incoming data will be in.
   * 0 for bytes, 1 for kilobytes and so on...
   *
   * @param index
   *
   * @return {String}
   */
  $.jqplot.byteFormatter = function (index) {
    var i = index || 0;
    return function (format, value) {
      var val = value;
      if (typeof val === 'number') {
        val = parseFloat(val) || 0;
        return formatByte(val, i);
      } else {
        return String(val);
      }
    };
  };
})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit