<?php
// Fix: nd.host -> nd.hostname em interface_dashboard.php
$f = "/var/www/html/mikrotik/views/interface_dashboard.php";
$c = file_get_contents($f);
$c = str_replace('nd.host AS device_host', 'nd.hostname AS device_host', $c);
file_put_contents($f, $c);
echo "OK fix hostname\n";
echo (strpos($c, 'nd.hostname AS device_host') !== false ? "CONFIRMADO\n" : "FALHOU\n");
