Changeset 211


Ignore:
Timestamp:
Oct 22, 2007, 5:41:04 PM (17 years ago)
Author:
andersk
Message:

Use standard units.

Location:
trunk/web/templates
Files:
3 edited

Legend:

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

    r207 r211  
    7676    <tr><td>Machine Name:</td><td><input type="text" name="name" value="$defaults.name"/></td></tr>
    7777$errorRow('name', $err)
    78     <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="$defaults.memory"/>MB (max $max_mem)</td></tr>
     78    <tr><td>Ram:</td><td><input type="text" size=3 name="memory" value="$defaults.memory"/>MiB (max $max_mem)</td></tr>
    7979$errorRow('memory', $err)
    80     <tr><td>Disk:</td><td><input type="text" size=3 name="disk" value="$defaults.disk"/>GB (max $max_disk)</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
     80    <tr><td>Disk:</td><td><input type="text" size=3 name="disk" value="$defaults.disk"/>GiB (max $max_disk)</td><td>WARNING: Modifying disk size may corrupt your data.</td></tr>
    8181$errorRow('disk', $err)
    8282#else
  • trunk/web/templates/main.py

    r209 r211  
    287287        disk_fields.extend([(x % name, y % name) for x, y in
    288288                            disk_fields_template])
    289         data_dict['%s_size' % name] = "%0.1f GB" % (disk.size / 1024.)
     289        data_dict['%s_size' % name] = "%0.1f GiB" % (disk.size / 1024.)
    290290    return disk_fields
    291291
     
    497497                      display_fields[disk_point+1:])
    498498   
    499     main_status['memory'] += ' MB'
     499    main_status['memory'] += ' MiB'
    500500    for field, disp in display_fields:
    501501        if field in ('uptime', 'cputime') and locals()[field] is not None:
  • trunk/web/templates/validation.py

    r209 r211  
    110110    except ValueError:
    111111        raise InvalidInput('memory', memory,
    112                            "Minimum %s MB" % MIN_MEMORY_SINGLE)
     112                           "Minimum %s MiB" % MIN_MEMORY_SINGLE)
    113113    if memory > maxMemory(user, machine, on):
    114114        raise InvalidInput('memory', memory,
    115                            'Maximum %s MB' % maxMemory(user, machine))
     115                           'Maximum %s MiB' % maxMemory(user, machine))
    116116    return memory
    117117
     
    128128    except ValueError:
    129129        raise InvalidInput('disk', disk,
    130                            "Minimum %s GB" % MIN_DISK_SINGLE)
     130                           "Minimum %s GiB" % MIN_DISK_SINGLE)
    131131    return disk
    132132           
Note: See TracChangeset for help on using the changeset viewer.