Added search through stacktrace
This commit is contained in:
@@ -70,6 +70,12 @@ table.jtable a:visited {
|
|||||||
color: #888;
|
color: #888;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.filterelem {
|
||||||
|
padding: 10px;
|
||||||
|
vertical-align: top;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.hand {
|
.hand {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ class SearchFilter
|
|||||||
public $chan;
|
public $chan;
|
||||||
public $version;
|
public $version;
|
||||||
public $grid;
|
public $grid;
|
||||||
|
public $stacktrace;
|
||||||
public $sort_by;
|
public $sort_by;
|
||||||
public $sort_order;
|
public $sort_order;
|
||||||
public static $sort_keys = array("date", "os", "version", "grid");
|
public static $sort_keys = array("date", "os", "version", "grid");
|
||||||
@@ -50,6 +51,11 @@ class SearchFilter
|
|||||||
{
|
{
|
||||||
$this->grid = $_GET["grid"];
|
$this->grid = $_GET["grid"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strlen($_GET["stacktrace"]))
|
||||||
|
{
|
||||||
|
$this->stacktrace = $_GET["stacktrace"];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWhere()
|
function getWhere()
|
||||||
@@ -59,6 +65,16 @@ class SearchFilter
|
|||||||
if ($this->version) $cond[] = kl_str_sql("client_version=!s", $this->version);
|
if ($this->version) $cond[] = kl_str_sql("client_version=!s", $this->version);
|
||||||
if ($this->chan) $cond[] = kl_str_sql("client_channel=!s", $this->chan);
|
if ($this->chan) $cond[] = kl_str_sql("client_channel=!s", $this->chan);
|
||||||
if ($this->grid) $cond[] = kl_str_sql("grid=!s", $this->grid);
|
if ($this->grid) $cond[] = kl_str_sql("grid=!s", $this->grid);
|
||||||
|
|
||||||
|
if ($this->stacktrace)
|
||||||
|
{
|
||||||
|
$parts = preg_split("/\\s+/", trim($this->stacktrace));
|
||||||
|
foreach($parts as $part)
|
||||||
|
{
|
||||||
|
$cond[] = kl_str_sql("raw_stacktrace like !s", "%{$part}%");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!count($cond)) return "";
|
if (!count($cond)) return "";
|
||||||
return "where " . implode(" and ", $cond);
|
return "where " . implode(" and ", $cond);
|
||||||
}
|
}
|
||||||
@@ -122,8 +138,8 @@ class SearchFilter
|
|||||||
<div style="display: inline-block;" class="ui-widget ui-corner-all ui-widget-content">
|
<div style="display: inline-block;" class="ui-widget ui-corner-all ui-widget-content">
|
||||||
<div class="ui-widget-header" style="padding: 5px">Filter</div>
|
<div class="ui-widget-header" style="padding: 5px">Filter</div>
|
||||||
|
|
||||||
<div style="display: inline-block;">
|
<div class="filterelem">
|
||||||
<div class="radio" style="padding: 10px">
|
<div class="radio">
|
||||||
Channel<br />
|
Channel<br />
|
||||||
<input type="radio" id="chan1" name="chan" value="" <?php echo !$this->chan ? 'checked="checked"' : '' ?>/><label for="chan1">All</label>
|
<input type="radio" id="chan1" name="chan" value="" <?php echo !$this->chan ? 'checked="checked"' : '' ?>/><label for="chan1">All</label>
|
||||||
<input type="radio" id="chan2" name="chan" value="Singularity" <?php echo $this->chan == "Singularity" ? 'checked="checked"' : '' ?>/><label for="chan2">Singularity</label>
|
<input type="radio" id="chan2" name="chan" value="Singularity" <?php echo $this->chan == "Singularity" ? 'checked="checked"' : '' ?>/><label for="chan2">Singularity</label>
|
||||||
@@ -131,9 +147,9 @@ class SearchFilter
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: inline-block;" style="padding: 10px">
|
<div class="filterelem">
|
||||||
Version<br/>
|
Version<br/>
|
||||||
<select class="ui-widget-content" name="version" onchange="this.form.submit();" style="width: 100px;">
|
<select class="ui-widget-content" name="version" onchange="this.form.submit();" style="width: 100px; margin-top: 3px;">
|
||||||
<option value="" <?php echo !$this->version ? 'selected="selected"' : '' ?>>All</option>
|
<option value="" <?php echo !$this->version ? 'selected="selected"' : '' ?>>All</option>
|
||||||
<?php
|
<?php
|
||||||
for($i = 0; $i < count($ver); $i++)
|
for($i = 0; $i < count($ver); $i++)
|
||||||
@@ -145,8 +161,8 @@ for($i = 0; $i < count($ver); $i++)
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: inline-block;">
|
<div class="filterelem">
|
||||||
<div class="radio" style="padding: 10px">
|
<div class="radio">
|
||||||
Operating system<br />
|
Operating system<br />
|
||||||
<input type="radio" id="os_all" name="os" value="" <?php echo !$this->os ? 'checked="checked"' : '' ?>/><label for="os_all">All</label>
|
<input type="radio" id="os_all" name="os" value="" <?php echo !$this->os ? 'checked="checked"' : '' ?>/><label for="os_all">All</label>
|
||||||
<input type="radio" id="os_windows" name="os" value="Windows NT" <?php echo $this->os == "Windows NT" ? 'checked="checked"' : '' ?>/><label for="os_windows">Windows</label>
|
<input type="radio" id="os_windows" name="os" value="Windows NT" <?php echo $this->os == "Windows NT" ? 'checked="checked"' : '' ?>/><label for="os_windows">Windows</label>
|
||||||
@@ -155,9 +171,9 @@ for($i = 0; $i < count($ver); $i++)
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: inline-block;">
|
<div class="filterelem">
|
||||||
Grid<br/>
|
Grid<br/>
|
||||||
<select class="ui-widget-content" name="grid" onchange="this.form.submit();" style="width: 200px; margin: 0px 20px 0 0; ">
|
<select class="ui-widget-content" name="grid" onchange="this.form.submit();" style="width: 200px; margin-top: 3px;">
|
||||||
<option value="" <?php echo !$this->grid ? 'selected="selected"' : '' ?>>All</option>
|
<option value="" <?php echo !$this->grid ? 'selected="selected"' : '' ?>>All</option>
|
||||||
<?php
|
<?php
|
||||||
for($i = 0; $i < count($grids); $i++)
|
for($i = 0; $i < count($grids); $i++)
|
||||||
@@ -169,6 +185,11 @@ for($i = 0; $i < count($grids); $i++)
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="filterelem">
|
||||||
|
Stacktrace contains<br/>
|
||||||
|
<input class="ui-widget-content ui-button" type="text" name="stacktrace" value="<?php echo htmlentities($this->stacktrace) ?>" style="text-align: left; padding-left: 4px;" />
|
||||||
|
<input class="ui-widget-content toolbarbutton" type="submit" name="do_search" value="Search" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user