IncludeListStatIPCAM.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. %META:TOPICINFO{author="roman" comment="pending" date="1677528866" format="1.1" version="2"}%
  2. ---++ Список адресов в stat
  3. <div id="container1"></div>
  4. <script type="text/javascript">
  5. $(function() {
  6. $("#container1").load("%SCRIPTURLPATH{"rest"}%/RenderPlugin/tag",
  7. {
  8. name: 'DATABASE_SQL',
  9. description: 'stat',
  10. sql: "SELECT User_auth.ip, User_auth.mac, User_auth.comments, User_auth.dns_name, User_auth.dhcp_hostname, User_auth.last_found FROM User_auth WHERE User_auth.ou_id=5 AND User_auth.deleted = 0 ORDER BY ip_int",
  11. header: "|*IP*|*MAC*|*DNS Name*|*DHCP hostname*| *Последняя активность* | *Комментарий*|",
  12. format: "| $ip | $mac | $dns_name | $dhcp_hostname | $last_found | $comments |",
  13. topic: '%BASEWEB%.%BASETOPIC%',
  14. web: '%BASEWEB%',
  15. render: true }
  16. );
  17. });
  18. </script>
  19. <div id="container2"></div>
  20. <script type="text/javascript">
  21. $(function() {
  22. $("#container2").load("%SCRIPTURLPATH{"rest"}%/RenderPlugin/tag",
  23. {
  24. name: 'DATABASE_SQL',
  25. description: 'stat',
  26. sql: "SELECT COUNT(*) as cnt FROM User_auth WHERE User_auth.ou_id=5 AND User_auth.deleted = 0",
  27. format: "Count: $cnt",
  28. topic: '%BASEWEB%.%BASETOPIC%',
  29. web: '%BASEWEB%',
  30. render: true }
  31. );
  32. });
  33. </script>