alert idc|group length

pull/26/head
wangyong 2015-12-14 18:42:17 +08:00
parent be2f0b2172
commit c6e0b2007d
1 changed files with 4 additions and 4 deletions

View File

@ -34,9 +34,9 @@
<option value="">机房</option> <option value="">机房</option>
{% for idc in idc_all %} {% for idc in idc_all %}
{% ifequal idc.name idc_name %} {% ifequal idc.name idc_name %}
<option value="{{idc.name}}" selected> {{ idc.name }}</option> <option value="{{idc.name}}" selected> {{ idc.name|slice:":20" }}</option>
{% else %} {% else %}
<option value="{{idc.name}}"> {{ idc.name }}</option> <option value="{{idc.name}}"> {{ idc.name|slice:":20" }}</option>
{% endifequal %} {% endifequal %}
{% endfor %} {% endfor %}
</select> </select>
@ -47,9 +47,9 @@
<option value="">主机组</option> <option value="">主机组</option>
{% for asset_group in asset_group_all %} {% for asset_group in asset_group_all %}
{% ifequal asset_group.name group_name %} {% ifequal asset_group.name group_name %}
<option value="{{ asset_group.name }}" selected> {{ asset_group.name }} </option> <option value="{{ asset_group.name }}" selected> {{ asset_group.name|slice:":20" }} </option>
{% else %} {% else %}
<option value="{{ asset_group.name }}"> {{ asset_group.name }} </option> <option value="{{ asset_group.name }}"> {{ asset_group.name|slice:":20" }} </option>
{% endifequal %} {% endifequal %}
{% endfor %} {% endfor %}
</select> </select>