Changeset 6208
- Timestamp:
- Aug 16, 2008, 1:08:53 AM (16 years ago)
- Location:
- exodus
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
exodus/models.py
r6206 r6208 99 99 100 100 class Omni(models.Model): 101 iface = models.ForeignKey(NIC )101 iface = models.ForeignKey(NIC,related_name='omni') 102 102 status = models.ForeignKey(Status,default=1) 103 103 ip = models.IPAddressField() … … 114 114 class DhcpStatic(models.Model): 115 115 hostname = models.CharField(max_length=10) 116 macaddress = models.CharField(max_length=17) 116 macaddress = models.CharField(max_length=17) 117 117 address = models.IPAddressField() 118 118 omni = models.ForeignKey(Omni) -
exodus/templates/node-detail.html
r6183 r6208 17 17 18 18 {% for nic in object.nic_set.all %} 19 <p> 20 <h3>iface: {{ nic.iface }} </h3> 21 status: {{ nic.status }} <br> 22 type: {{ nic.type }} <br> 23 description: {{ nic.shortdesc }} <br> 19 <p> 20 <h3>iface: {{ nic.iface }} </h3> 21 status: {{ nic.status }} <br> 22 type: {{ nic.type }} <br> 23 description: {{ nic.shortdesc }} <br> 24 25 {% if nic.ssid %} 26 SSID: {{ nic.ssid }} <br> 27 Channel: {{ nic.channel }} <br> 28 Antenna: {{ nic.antenna }} <br> 29 Polar: {{ nic.polar }} <br> 30 Mode: {{ nic.mode }} <br> 31 {% endif %} 24 32 25 {% if nic.ssid %} 26 SSID: {{ nic.ssid }} <br> 27 Channel: {{ nic.channel }} <br> 28 Antenna: {{ nic.antenna }} <br> 29 Polar: {{ nic.polar }} <br> 30 Mode: {{ nic.mode }} <br> 31 {% endif %} 32 33 {% for link in nic.link_set.all %} 34 <ul> 35 <li>Description: {{ link.shortdesc }} </li> 36 <li>IP: {{ link.ip }}/{{ link.linkpool.netmask }} </li> 37 38 <li>LinkPool id: {{ link.linkpool.id }} </li> 39 <li>Type: {{ link.linkpool.type }} 40 <ul> 41 {% for linknic in link.linkpool.link_set.all %} 42 {% ifequal linknic.iface.id nic.id %} 43 <li> {{ linknic.iface.node }} </li> 44 {% else %} 45 <li><a href=../../{{ linknic.iface.node.id }}/node> {{ linknic.iface.node }}</a></li> 46 {% endifequal %} 47 {% endfor %} 48 </ul> 49 50 {% if link.linkpool.dhcpstart %} 51 <li>DHCP {{ link.linkpool.dhcpstart }}-{{ link.linkpool.dhcpstop }}</li> 52 {% for dhcp in link.linkpool.dhcpstatic_set.all %} 53 <ul> 54 <li>Hostname: {{ dhcp.hostname }} </li> 55 <li>MacAddress: {{ dhcp.macaddress }} </li> 56 </ul> 57 {% endfor %} 58 {% endif %} 59 60 61 62 </ul> 63 64 {% endfor %} 65 66 </p> 33 <ul>Link 1 assosiated</ul> 34 {% for interlink in nic.link1.all %} 35 <ul> 36 <li>Description: {{ interlink.shortdesc }} </li> 37 <li>IP: {{ interlink.ip1 }}/{{ interlink.netmask }} </li> 38 <li>Type: {{ interlink.type }} 39 </ul> 40 {% endfor %} 41 42 <ul>Link 2 assosiated</ul> 43 {% for interlink in nic.link2.all %} 44 <ul> 45 <li>Description: {{ interlink.shortdesc }} </li> 46 <li>IP: {{ interlink.ip2 }}/{{ interlink.netmask }} </li> 47 <li>Type: {{ interlink.type }} 48 </ul> 49 {% endfor %} 50 51 {% for omni in nic.omni.all %} 52 <ul> 53 <li>DHCP {{ omni.dhcpstart }}-{{ omni.dhcpstop }}</li> 54 {% for dhcp in omni.dhcpstatic.all %} 55 <ul> 56 <li>Hostname: {{ dhcp.hostname }} </li> 57 <li>MacAddress: {{ dhcp.macaddress }} </li> 58 </ul> 59 {% endfor %} 60 </ul> 61 {% endfor %} 67 62 {% endfor %} 68 63
Note:
See TracChangeset
for help on using the changeset viewer.