Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jul 18, 2024
1 parent 855dec0 commit 555f736
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 190 deletions.
190 changes: 0 additions & 190 deletions public/js/action-list.js

This file was deleted.

36 changes: 36 additions & 0 deletions public/js/module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* Icinga DB Web | (c) 2024 Icinga GmbH | GPLv2 */

(function (Icinga, $) {

"use strict";

class IcingaDB {
/**
* Constructor
*
* @param {Icinga.Module} module
*/
constructor(module) {
try {
let Class = require("icinga/icinga-php-library/compat/ActionListBehavior");
let behavior = new Class(module.icinga);
module.icinga.behaviors[Class.name.toLowerCase()] = behavior;
behavior.bind($(document));

Class = require("icinga/icinga-php-library/compat/LoadMoreBehavior");
behavior = new Class(module.icinga);
module.icinga.behaviors[Class.name.toLowerCase()] = behavior;
behavior.bind($(document));

} catch (e) {
console.warn('Unable to provide behaviors. Libraries not available:', e);
return;
}

this.icinga = module.icinga;
}
}

Icinga.availableModules.icingadb = IcingaDB;

})(Icinga, jQuery);

0 comments on commit 555f736

Please sign in to comment.