show port in source column

pull/2077/head
Isaac Connor 2018-01-17 13:27:44 -08:00
parent 655d7be3c9
commit ace66cf977
1 changed files with 2 additions and 2 deletions

View File

@ -230,8 +230,8 @@ for( $monitor_i = 0; $monitor_i < count($displayMonitors); $monitor_i += 1 ) {
} elseif ( $monitor['Type'] == 'File' || $monitor['Type'] == 'cURL' ) {
$source = preg_replace( '/^.*\//', '', $monitor['Path'] );
} elseif ( $monitor['Type'] == 'Ffmpeg' || $monitor['Type'] == 'Libvlc' ) {
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
$source = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
$url_parts = parse_url( $monitor['Path'] );
$source = $url_parts['host']. ( $url_parts['port'] ? ':'.$url_parts['port'] : '' );
}
if ( $source == '' ) {
$source = 'Monitor ' . $monitor['Id'];