Skip to content

Commit

Permalink
report cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarzin committed Nov 7, 2023
1 parent 4b41279 commit d2aae03
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/Http/Controllers/Admin/ReportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,8 @@ public function logicalServerConfigs()
trans('cruds.logicalServer.fields.configuration'), // K
trans('cruds.logicalServer.fields.applications'), // L
trans('cruds.application.fields.application_block'), // M
trans('cruds.logicalServer.fields.servers'), // N
trans('cruds.logicalServer.fields.cluster'), // N
trans('cruds.logicalServer.fields.servers'), // O
];

$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
Expand All @@ -2316,6 +2317,7 @@ public function logicalServerConfigs()
$sheet->getColumnDimension('L')->setAutoSize(true);
$sheet->getColumnDimension('M')->setAutoSize(true);
$sheet->getColumnDimension('N')->setAutoSize(true);
$sheet->getColumnDimension('O')->setAutoSize(true);

// center (CPU, Men, Disk)
$sheet->getStyle('F')->getAlignment()->setHorizontal(\PhpOffice\PhpSpreadsheet\Style\Alignment::HORIZONTAL_CENTER);
Expand All @@ -2342,7 +2344,8 @@ public function logicalServerConfigs()
$sheet->setCellValue("L{$row}", $logicalServer->applications->implode('name', ', '));
$sheet->setCellValue("M{$row}", $logicalServer->applications->first() !== null ?
($logicalServer->applications->first()->application_block !== null ? $logicalServer->applications->first()->application_block->name : '') : '');
$sheet->setCellValue("N{$row}", $logicalServer->servers->implode('name', ', '));
$sheet->setCellValue("N{$row}", $logicalServer->cluster->name ?? "");
$sheet->setCellValue("O{$row}", $logicalServer->servers->implode('name', ', '));

$row++;
}
Expand Down

0 comments on commit d2aae03

Please sign in to comment.