3 |
3 |
import os
|
4 |
4 |
|
5 |
5 |
DEFAULT_IMAGES = [
|
6 |
|
{'id': 'ubuntu-10.10-x86_64-server', 'type':'standard', 'title': 'Ubuntu 10.10 server 64bit', 'description': 'Apache, MySQL, php5 preinstalled', 'size': '834', 'logo':'static/ubuntu.png'},
|
7 |
|
{'id': 'fedora-14-desktop', 'type':'standard', 'title': 'Fedora 14 desktop 32bit', 'description': 'Apache, MySQL, php5 preinstalled', 'size': '912', 'logo':'static/fedora.png'},
|
8 |
|
{'id': 'windows7-pro', 'type':'standard', 'title': 'Windows 7 professional', 'description': 'MS Office 7 preinstalled', 'size': '8142', 'logo':'static/windows.png'},
|
9 |
|
{'id': 'windows-xp', 'type':'standard', 'title': 'Windows XP', 'description': 'MS Office XP preinstalled', 'size': '6192', 'logo':'static/windows.png'},
|
10 |
|
{'id': 'netbsd-server', 'type':'custom', 'title': 'NetBSD server', 'description': 'my secure torrent server', 'size': '898', 'logo':'static/netbsd.png'},
|
11 |
|
{'id': 'gentoo-playroom', 'type':'custom', 'title': 'Centoo', 'description': 'online pinaball olympiad server', 'size': '912', 'logo':'static/gentoo.png'},
|
|
6 |
{'id': 'ubuntu-10.10-x86_64-server', 'type':'standard', 'title': 'Ubuntu 10.10 server 64bit', 'description': 'Apache, MySQL, php5 preinstalled', 'size': '834', 'logo':'ubuntu.png'},
|
|
7 |
{'id': 'fedora-14-desktop', 'type':'standard', 'title': 'Fedora 14 desktop 32bit', 'description': 'Apache, MySQL, php5 preinstalled', 'size': '912', 'logo':'fedora.png'},
|
|
8 |
{'id': 'windows7-pro', 'type':'standard', 'title': 'Windows 7 professional', 'description': 'MS Office 7 preinstalled', 'size': '8142', 'logo':'windows.png'},
|
|
9 |
{'id': 'windows-xp', 'type':'standard', 'title': 'Windows XP', 'description': 'MS Office XP preinstalled', 'size': '6192', 'logo':'windows.png'},
|
|
10 |
{'id': 'netbsd-server', 'type':'custom', 'title': 'NetBSD server', 'description': 'my secure torrent server', 'size': '898', 'logo':'netbsd.png'},
|
|
11 |
{'id': 'gentoo-playroom', 'type':'custom', 'title': 'Centoo', 'description': 'online pinaball olympiad server', 'size': '912', 'logo':'gentoo.png'},
|
12 |
12 |
]
|
13 |
13 |
|
14 |
14 |
DEFAULT_NODES = [
|
15 |
|
{'id':1, 'name':'My mail server', 'state':'3','public_ip':'147.102.1.62', 'thumb' : 'static/ubuntu.png'},
|
16 |
|
{'id':2, 'name':'My name server', 'state':'3','public_ip':'147.102.1.64', 'thumb' : 'static/debian.png'},
|
17 |
|
{'id':3, 'name':'My file server', 'state':'3','public_ip':'147.102.1.65', 'thumb' : 'static/fedora.png'},
|
18 |
|
{'id':4, 'name':'My torrent server', 'state':'3','public_ip':'147.102.1.66', 'thumb' : 'static/gentoo.png'},
|
19 |
|
{'id':5, 'name':'My firewall', 'state':'3','public_ip':'147.102.1.67', 'thumb' : 'static/netbsd.png'},
|
20 |
|
{'id':6, 'name':'My windows workstation', 'state':'0','public_ip':'147.102.1.69', 'thumb' : 'static/windows.png'},
|
|
15 |
{'id':1, 'name':'My mail server', 'state':'3','public_ip':'147.102.1.62', 'thumb' : 'ubuntu.png'},
|
|
16 |
{'id':2, 'name':'My name server', 'state':'3','public_ip':'147.102.1.64', 'thumb' : 'debian.png'},
|
|
17 |
{'id':3, 'name':'My file server', 'state':'3','public_ip':'147.102.1.65', 'thumb' : 'slackware.png'},
|
|
18 |
{'id':4, 'name':'My torrent server', 'state':'3','public_ip':'147.102.1.66', 'thumb' : 'gentoo.png'},
|
|
19 |
{'id':5, 'name':'My firewall', 'state':'3','public_ip':'147.102.1.67', 'thumb' : 'netbsd.png'},
|
|
20 |
{'id':6, 'name':'My windows workstation', 'state':'0','public_ip':'147.102.1.69', 'thumb' : 'windows-off.png'},
|
21 |
21 |
]
|
22 |
22 |
|
23 |
23 |
def template(name, context):
|