Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* global d3:true, require:false, requirejs:false */ // eslint-disable-line no-unused-vars
  2. requirejs.config({
  3. baseUrl: "js/lib",
  4. paths: {
  5. app: "../app",
  6. jquery: "jquery-3.3.1.min",
  7. visibility: "visibility.min",
  8. humanize: "humanize.min",
  9. bootstrap: "bootstrap.min",
  10. d3: "d3.min",
  11. d3evolution: "d3evolution.min",
  12. d3pie: "d3pie.min",
  13. footable: "footable.min",
  14. nprogress: "nprogress.min",
  15. },
  16. shim: {
  17. bootstrap: {exports:"bootstrap", deps:["jquery"]},
  18. d3pie: {exports:"d3pie", deps:["d3.global", "jquery"]},
  19. d3evolution: {exports:"D3Evolution", deps:["d3", "jquery"]},
  20. footable: {deps:["bootstrap", "jquery"]}
  21. }
  22. });
  23. document.title = window.location.hostname +
  24. (window.location.port ? ":" + window.location.port : "") +
  25. (window.location.pathname !== "/" ? window.location.pathname : "") +
  26. " - Rspamd Web Interface";
  27. // Ugly hack to get d3pie work with requirejs
  28. define("d3.global", ["d3"], function (d3global) { // eslint-disable-line strict
  29. d3 = d3global;
  30. });
  31. // Notify user on module loading failure
  32. requirejs.onError = function (e) {
  33. "use strict";
  34. document.getElementsByClassName("notification-area")[0].innerHTML =
  35. "<div class=\"alert alert-error\">" +
  36. "<strong>Module loading error: " + e.requireType + ", module: " + e.requireModules + "</strong>" +
  37. "<button type=\"button\" class=\"btn btn-info btn-xs pull-right\" " +
  38. "onClick=\"window.location.reload(); this.parentNode.parentNode.removeChild(this.parentNode);\" " +
  39. "title=\"Reload current page\">" +
  40. "<i class=\"glyphicon glyphicon-repeat\"></i> Reload" +
  41. "</button>" +
  42. "</div>";
  43. throw e;
  44. };
  45. // Load main UI
  46. require(["app/rspamd"],
  47. function (rspamd) {
  48. "use strict";
  49. rspamd.setup();
  50. rspamd.connect();
  51. }
  52. );