Add EventDiskSpace as a term and add a Debug modal button
parent
bb4bd935d6
commit
6aa4302fe0
|
|
@ -80,6 +80,7 @@ $attrTypes = array(
|
|||
'DiskBlocks' => translate('AttrDiskBlocks'),
|
||||
'DiskPercent' => translate('AttrDiskPercent'),
|
||||
'DiskSpace' => translate('AttrDiskSpace'),
|
||||
'EventDiskSpace' => translate('AttrEventDiskSpace'),
|
||||
'EndDateTime' => translate('AttrEndDateTime'),
|
||||
'EndDate' => translate('AttrEndDate'),
|
||||
'EndTime' => translate('AttrEndTime'),
|
||||
|
|
@ -489,6 +490,7 @@ if ( canEdit('Events') ) {
|
|||
}
|
||||
}
|
||||
?>
|
||||
<button type="button" value="Debug" data-on-click-this="debugFilter"><?php echo translate('Debug') ?></button>
|
||||
<button type="button" value="Reset" data-on-click-this="resetFilter"><?php echo translate('Reset') ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -395,6 +395,50 @@ function delTerm( element ) {
|
|||
parseRows(rows);
|
||||
}
|
||||
|
||||
function debugFilter() {
|
||||
getModal('filterdebug');
|
||||
}
|
||||
|
||||
// Load the Delete Confirmation Modal HTML via Ajax call
|
||||
function getModal(id) {
|
||||
$j.getJSON(thisUrl + '?request=modal&modal='+id+'&fid='+filterid)
|
||||
.done(function(data) {
|
||||
if ( !data ) {
|
||||
console.error("Get modal returned no data");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $j('#'+id).length ) {
|
||||
console.log("replacing");
|
||||
$j('#'+id).replaceWith(data.html);
|
||||
} else {
|
||||
console.log("Adding to body"+data.html);
|
||||
$j('body').append(data.html);
|
||||
}
|
||||
manageModalBtns(id);
|
||||
modal = $j('#'+id+'Modal');
|
||||
if ( ! modal.length ) {
|
||||
console.log("No modal found");
|
||||
}
|
||||
$j('#'+id+'Modal').modal('show');
|
||||
})
|
||||
.fail(function(jqxhr, textStatus, error) {
|
||||
console.log("Request Failed: " + textStatus + ", " + error);
|
||||
console.log("Response Text: " + jqxhr.responseText);
|
||||
});
|
||||
}
|
||||
|
||||
function manageModalBtns(id) {
|
||||
console.log(id);
|
||||
// Manage the CANCEL modal button
|
||||
var cancelBtn = document.getElementById(id+"CancelBtn");
|
||||
if ( cancelBtn ) {
|
||||
document.getElementById(id+"CancelBtn").addEventListener("click", function onCancelClick(evt) {
|
||||
$j('#'+id).modal('hide');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function init() {
|
||||
updateButtons( $('executeButton') );
|
||||
$j('#Id').chosen();
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@
|
|||
global $monitors;
|
||||
global $zones;
|
||||
global $booleanValues;
|
||||
global $filter;
|
||||
?>
|
||||
var filterid = '<?php echo $filter->Id() ?>';
|
||||
var filterQuery = '<?php echo isset($filterQuery) ? validJsStr(htmlspecialchars_decode($filterQuery)) : '' ?>';
|
||||
var sortQuery = '<?php echo isset($sortQuery) ? validJsStr(htmlspecialchars_decode($sortQuery)) : '' ?>';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue