File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 4848
4949if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' ){
5050
51+ /*
5152 $app->uses('getconf');
5253 $server_config = $app->getconf->get_server_config($_SESSION['monitor']['server_id'], 'server');
53-
5454 $monit_url = trim($server_config['monit_url']);
55+ */
56+
57+ $ monit_url = sprintf (
58+ '%s://%s/monitor/iframe_proxy.php?context=monit ' ,
59+ (!empty ($ _SERVER ['HTTPS ' ]) && $ _SERVER ['HTTPS ' ] !== 'off ' ) ? 'https ' : 'http ' ,
60+ $ _SERVER ['HTTP_HOST ' ]
61+ );
62+
5563 if ($ monit_url != '' ){
64+ /*
5665 $monit_url = str_replace('[SERVERNAME]', $_SESSION['monitor']['server_name'], $monit_url);
5766 $monit_user = trim($server_config['monit_user']);
5867 $monit_password = trim($server_config['monit_password']);
6877 $monit_url_parts = parse_url($monit_url);
6978
7079 $monit_url = $monit_url_parts['scheme'].'://'.$auth_string.$monit_url_parts['host'].(isset($monit_url_parts['port']) ? ':' . $monit_url_parts['port'] : '').(isset($monit_url_parts['path']) ? $monit_url_parts['path'] : '').(isset($monit_url_parts['query']) ? '?' . $monit_url_parts['query'] : '').(isset($monit_url_parts['fragment']) ? '#' . $monit_url_parts['fragment'] : '');
71-
80+ */
7281 $ app ->tpl ->setVar ("monit_url " , $ monit_url );
7382 } else {
7483 $ app ->tpl ->setVar ("no_monit_url_defined_txt " , $ app ->lng ("no_monit_url_defined_txt " ));
You can’t perform that action at this time.
0 commit comments