<commit_before>      <div id="menu"><div class="menu_row">
        <form name="opts" method="get" action="index.php">
          <div class="menu_cell left">
            <div class="menu_cell">
              <div class="select"><select name="env" onchange="document.opts.c.value = ''; document.opts.h.value = ''; document.opts.submit()">
<?php
$environment_search = json_decode(file_get_contents($conf['graphite_search_url'] . $conf['graphite_prefix'] . "*"), TRUE);
$environments = $environment_search['results']; natsort($environments);
$environments = str_replace($conf['graphite_prefix'], "", $environments);
$cluster_search = json_decode(file_get_contents($conf['graphite_search_url'] . $conf['graphite_prefix'] . "$env.*"), TRUE);
$clusters = $cluster_search['results']; natsort($clusters);
$clusters = str_replace($conf['graphite_prefix'] . "$env.", "", $clusters);
$host_search = json_decode(file_get_contents($conf['graphite_search_url'] . $conf['graphite_prefix'] . "$env.$c.*"), TRUE);
$hosts = $host_search['results']; natsort($hosts);
$hosts = str_replace($conf['graphite_prefix'] . "$env.$c.", "", $hosts);

print print_dropdown_menus($environments, $env, "Select environment");
?>
              </select></div>
            </div>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="c" onchange="document.opts.h.value = ''; document.opts.submit()">
<?php
print print_dropdown_menus($clusters, $c, "All clusters");
?>
              </select></div>
            </div>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="h" onchange="document.opts.submit()">
<?php
print print_dropdown_menus($hosts, $h, "All hosts");
?>
              </select></div>
            </div>
<?php
if (isset($m)) { $onchange = "document.opts.m.value = ''; document.opts.submit();"; }
else { $onchange = "document.opts.submit();"; }
?>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="g" onchange="<?php echo $onchange; ?>">
<?php
print print_dropdown_menus(find_dashboards($env, $c), $g, "All reports");
?>
              </select></div>
            </div>
<?php
if (isset($h)) {
?>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select onchange="location = this.options[this.selectedIndex].value;">
<?php
$host_metrics=array_keys(find_metrics("$env.$c.$h", $conf['host_metric_group_depth']));
print print_dropdown_menus($host_metrics, "", "Go to metricgroup");
?>
              </select></div>
            </div>
<?php
}
elseif (isset($c)) {
?>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="m" onchange="document.opts.g.value = ''; document.opts.submit()">
<?php
$all_metrics=array_keys(find_metrics("$env.$c.*", "10"));<commit_msg>Reverting this for metricgroup options.<commit_after>      <div id="menu"><div class="menu_row">
        <form name="opts" method="get" action="index.php">
          <div class="menu_cell left">
            <div class="menu_cell">
              <div class="select"><select name="env" onchange="document.opts.c.value = ''; document.opts.h.value = ''; document.opts.submit()">
<?php
$environment_search = json_decode(file_get_contents($conf['graphite_search_url'] . $conf['graphite_prefix'] . "*"), TRUE);
$environments = $environment_search['results']; natsort($environments);
$environments = str_replace($conf['graphite_prefix'], "", $environments);
$cluster_search = json_decode(file_get_contents($conf['graphite_search_url'] . $conf['graphite_prefix'] . "$env.*"), TRUE);
$clusters = $cluster_search['results']; natsort($clusters);
$clusters = str_replace($conf['graphite_prefix'] . "$env.", "", $clusters);
$host_search = json_decode(file_get_contents($conf['graphite_search_url'] . $conf['graphite_prefix'] . "$env.$c.*"), TRUE);
$hosts = $host_search['results']; natsort($hosts);
$hosts = str_replace($conf['graphite_prefix'] . "$env.$c.", "", $hosts);

print print_dropdown_menus($environments, $env, "Select environment");
?>
              </select></div>
            </div>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="c" onchange="document.opts.h.value = ''; document.opts.submit()">
<?php
print print_dropdown_menus($clusters, $c, "All clusters");
?>
              </select></div>
            </div>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="h" onchange="document.opts.submit()">
<?php
print print_dropdown_menus($hosts, $h, "All hosts");
?>
              </select></div>
            </div>
<?php
if (isset($m)) { $onchange = "document.opts.m.value = ''; document.opts.submit();"; }
else { $onchange = "document.opts.submit();"; }
?>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="g" onchange="<?php echo $onchange; ?>">
<?php
print print_dropdown_menus(find_dashboards($env, $c), $g, "All reports");
?>
              </select></div>
            </div>
<?php
if (isset($h)) {
?>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select onchange="location = this.options[this.selectedIndex].value;">
                <option value="#reports" selected="selected">Go to metricgroup</option>
<?php
$host_metrics=array_keys(find_metrics("$env.$c.$h", $conf['host_metric_group_depth']));
foreach ($host_metrics as $metric_group) {
	print "				<option value=\"#$metric_group\">$metric_group</option>\n";
}
?>
              </select></div>
            </div>
<?php
}
elseif (isset($c)) {
?>
            <div class="menu_cell">&gt;</div>
            <div class="menu_cell">
              <div class="select"><select name="m" onchange="document.opts.g.value = ''; document.opts.submit()">
<?php
$all_metrics=array_keys(find_metrics("$env.$c.*", "10"));
{'fraction_non_alphanumeric': 0.20630557801131771, 'fraction_numerical': 0.0006467259498787389, 'mean_word_length': 3.6371814092953523, 'pattern_counts': {'":': 0, '<': 121, '<?xml version=': 0, '>': 119, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3759718', 'n_tokens_mistral': 1931, 'n_tokens_neox': 1909, 'n_words': 326}