Changeset 227


Ignore:
Timestamp:
Oct 28, 2007, 11:27:32 PM (17 years ago)
Author:
ecprice
Message:

Remove the hostname as separate from machine name.

Location:
trunk/web/templates
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/info.tmpl

    r211 r227  
    6969    <tr><td>Contact email:</td><td><input type="text" name="contact" value="$defaults.contact"/></td></tr>
    7070$errorRow('contact', $err)
    71 #if $machine.nics
    72     <tr><td>Hostname:</td><td><input type="text" name="hostname" value="$defaults.hostname"/>.servers.csail.mit.edu</td></tr>
    73 #end if
    74 $errorRow('hostname', $err)
    7571#if not $on
    7672    <tr><td>Machine Name:</td><td><input type="text" name="name" value="$defaults.name"/></td></tr>
  • trunk/web/templates/list.tmpl

    r207 r227  
    6666#set $nic = $machine.nics[0]
    6767        <td>$nic.ip</td>
    68         <td>$nic.hostname</td>
    6968#else
    70         <td></td>
    7169        <td></td>
    7270#end if
     
    105103        <td>owner</td>
    106104        <td>IP</td>
    107         <td>Hostname</td>
    108105        <td>Uptime</td>
    109106        <td>VNC</td>
  • trunk/web/templates/main.py

    r211 r227  
    259259    """
    260260    data_dict['num_nics'] = len(machine.nics)
    261     nic_fields_template = [('nic%s_hostname', 'NIC %s hostname'),
     261    nic_fields_template = [('nic%s_hostname', 'NIC %s Hostname'),
    262262                           ('nic%s_mac', 'NIC %s MAC Addr'),
    263263                           ('nic%s_ip', 'NIC %s IP'),
     
    266266    for i in range(len(machine.nics)):
    267267        nic_fields.extend([(x % i, y % i) for x, y in nic_fields_template])
    268         data_dict['nic%s_hostname' % i] = (machine.nics[i].hostname +
    269                                            '.servers.csail.mit.edu')
     268        if not i:
     269            data_dict['nic%s_hostname' % i] = (machine.name +
     270                                               '.servers.csail.mit.edu')
    270271        data_dict['nic%s_mac' % i] = machine.nics[i].mac_addr
    271272        data_dict['nic%s_ip' % i] = machine.nics[i].ip
     
    329330        contact = validation.testContact(user, fields.getfirst('contact'),
    330331                                         machine)
    331         hostname = validation.testHostname(owner, fields.getfirst('hostname'),
    332                                            machine)
    333332        name = validation.testName(user, fields.getfirst('name'), machine)
    334333        oldname = machine.name
     
    349348                ctx.current.save(disk)
    350349       
    351         # XXX first NIC gets hostname on change? 
    352         # Interface doesn't support more.
    353         for nic in machine.nics[:1]:
    354             nic.hostname = hostname
    355             ctx.current.save(nic)
    356 
    357350        if owner is not None:
    358351            machine.owner = owner
     
    513506    for name in 'machine_id name administrator owner memory contact'.split():
    514507        setattr(defaults, name, getattr(machine, name))
    515     if machine.nics:
    516         defaults.hostname = machine.nics[0].hostname
    517508    defaults.disk = "%0.2f" % (machine.disks[0].size/1024.)
    518509    d = dict(user=user,
Note: See TracChangeset for help on using the changeset viewer.