-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from netdevopsbr/change_tables
Close #90 - Change how tables are displayed using django_tables2
- Loading branch information
Showing
7 changed files
with
114 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
example = {'virtualmachines': [{'name': 'EVE-NG', 'changes': {'status': False, 'custom_fields': None, 'local_context': True, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'containerlab', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'NS1', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'wikijs-test', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'ISPTools', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'RSYSLOG-CGNAT', 'changes': {'status': False, 'custom_fields': None, 'local_context': True, 'resources': None, 'tag': False, 'interfaces': None, 'ips': False}, 'result': True}, {'name': 'SPEEDTEST', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'TESTE-DEFENSE-IA', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'KRILL-RPKI-AS265234', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'netbox-dev2', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'VM-TESTE', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': None, 'ips': False}, 'result': True}, {'name': 'elastiflow', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'ELK-NETFLOW', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'ZEUS', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'SPEEDTEST-OOKLA', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'RADIUS-BKP', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'ZABBIX-GRAFANA', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'netbox-template', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'VMforDocker', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'Win10-LAB', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'netbox-beta', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'testing', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'teste', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'netbox-v3-dev', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'Ubuntu-SRV-20.04', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'DOKUWIKI-PUBLICO-OLD', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'wikijs-testing', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'WIN10-ALVOCOM', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'asstat-deb10', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'EVE-NG', 'changes': {'status': False, 'custom_fields': None, 'local_context': True, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'ELASTIC-ISAC', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': None, 'ips': False}, 'result': True}, {'name': 'nfsen-debian', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'PNETLAB', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'ZABBIX', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'GRAYLOG', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'NS3', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'netbox-devop2', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'DEFENSE-IA', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'LAB-GRAFANA', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'BKP', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'Ubuntu-SRV-20.04', 'changes': {'status': False, 'custom_fields': None, 'local_context': True, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'NetDev-CentOs-LAB', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'GenieACS', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': None, 'ips': False}, 'result': True}, {'name': 'vault', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'KRILL-RPKI-AS268881', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'netbox-v3-huawei', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'RSYSLOG-CGNAT', 'changes': {'status': False, 'custom_fields': None, 'local_context': True, 'resources': None, 'tag': False, 'interfaces': None, 'ips': False}, 'result': True}, {'name': 'NS4', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'planos', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}, {'name': 'speedtest-servers', 'changes': {'status': False, 'custom_fields': None, 'local_context': False, 'resources': None, 'tag': False, 'interfaces': False, 'ips': False}, 'result': True}], 'nodes': [{'changes': {'status': False, 'cluster': False, 'interfaces': False}, 'result': True}, {'changes': {'status': False, 'cluster': False, 'interfaces': False}, 'result': True}, {'changes': {'status': False, 'cluster': False, 'interfaces': False}, 'result': True}], 'remove_unused': [{'name': 'DEFENSE', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> DEFENSE']}, {'name': 'DOKUWIKI-PUBLICO-OLD', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> DOKUWIKI-PUBLICO-OLD']}, {'name': 'ELASTIC-ISAC', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> ELASTIC-ISAC']}, {'name': 'ELK-NETFLOW', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> ELK-NETFLOW']}, {'name': 'EVE-NG', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> EVE-NG']}, {'name': 'GRAYLOG', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> GRAYLOG']}, {'name': 'GenieACS', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> GenieACS']}, {'name': 'ISPTools', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> ISPTools']}, {'name': 'BKP', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> BKP']}, {'name': 'KRILL-RPKI-AS265234', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> KRILL-RPKI-AS265234']}, {'name': 'KRILL-RPKI-AS268881', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> KRILL-RPKI-AS268881']}, {'name': 'LAB-GRAFANA', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> LAB-GRAFANA']}, {'name': 'LAB-ZABBIX-6', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> LAB-ZABBIX-6']}, {'name': 'NS1', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> NS1']}, {'name': 'NS3', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> NS3']}, {'name': 'NS4', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> NS4']}, {'name': 'NetDev-CentOs-LAB', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> NetDev-CentOs-LAB']}, {'name': 'PNETLAB', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> PNETLAB']}, {'name': 'RADIUS-BKP', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> RADIUS-BKP']}, {'name': 'RSYSLOG-CGNAT', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> RSYSLOG-CGNAT']}, {'name': 'SPEEDTEST', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> SPEEDTEST']}, {'name': 'SPEEDTEST-OOKLA', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> SPEEDTEST-OOKLA']}, {'name': 'TESTE-DEFENSE-IA', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> TESTE-DEFENSE-IA']}, {'name': 'Ubuntu-SRV-20.04', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> Ubuntu-SRV-20.04']}, {'name': 'VM-TESTE', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> VM-TESTE']}, {'name': 'VMforDocker', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> VMforDocker']}, {'name': 'WIN10-ALVOCOM', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> WIN10-ALVOCOM']}, {'name': 'Win10-LAB', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> Win10-LAB']}, {'name': 'ZABBIX-GRAFANA', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> ZABBIX-GRAFANA']}, {'name': 'ZEUS', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> ZEUS']}, {'name': 'asstat-deb10', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> asstat-deb10']}, {'name': 'containerlab', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> containerlab']}, {'name': 'elastiflow', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> elastiflow']}, {'name': 'testing', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> testing']}, {'name': 'netbox-beta', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> netbox-beta']}, {'name': 'netbox-dev2', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> netbox-dev2']}, {'name': 'netbox-devop2', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> netbox-devop2']}, {'name': 'netbox-template', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> netbox-template']}, {'name': 'netbox-v3-dev', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> netbox-v3-dev']}, {'name': 'netbox-v3-huawei', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> netbox-v3-huawei']}, {'name': 'nfsen-debian', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> nfsen-debian']}, {'name': 'planos', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> planos']}, {'name': 'speedtest-servers', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> speedtest-servers']}, {'name': 'teste', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> teste']}, {'name': 'vault', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> vault']}, {'name': 'wikijs-test', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> wikijs-test']}, {'name': 'wikijs-testing', 'result': False, 'log': ['[OK] VM exists on both systems (Netbox and Proxmox) -> wikijs-testing']}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,7 @@ def all(): | |
|
||
json_vm_all.append(json_vm) | ||
|
||
print(f"json_vm: {json_vm}") | ||
return json_vm_all | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.