private function buildServerListBody($type, $separator, $server, $services, $percents) { $listContent = ''; foreach ($services as $serviceId => $service) { list($column1, $column2) = array_pad(explode(":", $service['dbcolumns']), 2, 1); if (is_numeric($column2)) { $server[$column2] = $column2; } if ($type == 'table') { $separator['opener'] = "<td data-title=\"{$service['name']}\">"; } $body = $separator['opener']; $body .= $service['show_numbers'] ? $service['resize'] ? convertUnit($server[$column1]) . "/" . convertUnit($server[$column2]) : $server[$column1] : $percents[$server['server_id']][$serviceId] . '%'; if ($service['percentages']) { $body .= $this->load->view('serverList/' . $type . '/percentage', ['percents' => $percents[$server['server_id']][$serviceId]], true); $body .= $separator['closer']; } $listContent .= $this->load->view('serverList/' . $type . '/body', ['name' => $service['name'], 'body' => $body], true); } return $listContent; }
<td><?php echo $serverHistory['cpu_cores']; ?> </td> </tr> <tr> <td>Memory</td> <td><?php echo convertUnit($serverHistory['memory_total']); ?> </td> </tr> <tr> <td>Disk space</td> <td><?php echo convertUnit($serverHistory['disk_total']); ?> </td> </tr> <tr> <td>Last time online</td> <td><?php echo $lastTimeOnline; ?> </td> </tr> </table> </div> </div> </div>