template(name='information')
  .setting-content
    unless currentUser.isAdmin
      | {{_ 'error-notAuthorized'}}
    else
      .content-title
        span
          i.fa.fa-info-circle
          | {{_ 'info'}}
      .content-body
        .side-menu
          ul
            li.active
              a.js-setting-menu(data-id="information-display")
                i.fa.fa-info-circle
                | {{_ 'info'}}
        .main-body
          +statistics

template(name='statistics')
    table
      tbody
        tr
          th WeKan ® {{_ 'info'}}
          td {{statistics.version}}
        tr
          th {{_ 'Meteor_version'}}
          td {{statistics.meteor.meteorVersion}}
        tr
          th {{_ 'Node_version'}}
          td {{statistics.process.nodeVersion}}
        tr
          th {{_ 'MongoDB_version'}}
          td {{statistics.mongo.mongoVersion}}
        tr
          th {{_ 'MongoDB_storage_engine'}}
          td {{statistics.mongo.mongoStorageEngine}}
        tr
          th {{_ 'MongoDB_Oplog_enabled'}}
          td {{statistics.mongo.mongoOplogEnabled}}
        tr
          th {{_ 'OS_Type'}}
          td {{statistics.os.type}}
        tr
          th {{_ 'OS_Platform'}}
          td {{statistics.os.platform}}
        tr
          th {{_ 'OS_Arch'}}
          td {{statistics.os.arch}}
        tr
          th {{_ 'OS_Release'}}
          td {{statistics.os.release}}
        tr
          th {{_ 'OS_Uptime'}}
          td {{humanReadableTime statistics.os.uptime}}
        tr
          th {{_ 'OS_Loadavg'}}
          td {{numFormat statistics.os.loadavg.[0]}}, {{numFormat statistics.os.loadavg.[1]}}, {{numFormat statistics.os.loadavg.[2]}}
        tr
          th {{_ 'OS_Totalmem'}}
          td {{bytesToSize statistics.os.totalmem}}
        tr
          th {{_ 'OS_Freemem'}}
          td {{bytesToSize statistics.os.freemem}}
        tr
          th {{_ 'OS_Cpus'}}
          td {{statistics.os.cpus.length}}
        unless isSandstorm
          tr
            th {{_ 'Node_heap_total_heap_size'}}
            td {{bytesToSize statistics.nodeHeapStats.totalHeapSize}}
          tr
            th {{_ 'Node_heap_total_heap_size_executable'}}
            td {{bytesToSize statistics.nodeHeapStats.totalHeapSizeExecutable}}
          tr
            th {{_ 'Node_heap_total_physical_size'}}
            td {{bytesToSize statistics.nodeHeapStats.totalPhysicalSize}}
          tr
            th {{_ 'Node_heap_total_available_size'}}
            td {{bytesToSize statistics.nodeHeapStats.totalAvailableSize}}
          tr
            th {{_ 'Node_heap_used_heap_size'}}
            td {{bytesToSize statistics.nodeHeapStats.usedHeapSize}}
          tr
            th {{_ 'Node_heap_heap_size_limit'}}
            td {{bytesToSize statistics.nodeHeapStats.heapSizeLimit}}
          tr
            th {{_ 'Node_heap_malloced_memory'}}
            td {{bytesToSize statistics.nodeHeapStats.mallocedMemory}}
          tr
            th {{_ 'Node_heap_peak_malloced_memory'}}
            td {{bytesToSize statistics.nodeHeapStats.peakMallocedMemory}}
          tr
            th {{_ 'Node_heap_does_zap_garbage'}}
            td {{statistics.nodeHeapStats.doesZapGarbage}}
          tr
            th {{_ 'Node_heap_number_of_native_contexts'}}
            td {{statistics.nodeHeapStats.numberOfNativeContexts}}
          tr
            th {{_ 'Node_heap_number_of_detached_contexts'}}
            td {{statistics.nodeHeapStats.numberOfDetachedContexts}}
          tr
            th {{_ 'Node_memory_usage_rss'}}
            td {{bytesToSize statistics.nodeMemoryUsage.rss}}
          tr
            th {{_ 'Node_memory_usage_heap_total'}}
            td {{bytesToSize statistics.nodeMemoryUsage.heapTotal}}
          tr
            th {{_ 'Node_memory_usage_heap_used'}}
            td {{bytesToSize statistics.nodeMemoryUsage.heapUsed}}
          tr
            th {{_ 'Node_memory_usage_external'}}
            td {{bytesToSize statistics.nodeMemoryUsage.external}}
