Ask Your Question
0

Search instance by name

asked 2019-10-04 06:37:34 -0500

Ana_torres gravatar image

Hi,

I want to change the filter order in the horizon instances tab. by default the first filter that appears is "Instance ID", I would like to put as default "Instance Name". I don't know if it's possible to change this with the "customization" that horizon already has.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-10-05 10:14:01 -0500

updated 2019-10-05 10:14:28 -0500

You can handle the formatting of the HTML template that handles the Horizon table that displays the table. I guess the line you are looking for is _detail_overview.html This piece of code indicates the thing you are trying to achieve.

Pasting sample of code here for future references in case the link is changed/broken

    <div class="detail">
      <dl class="dl-horizontal">
          <dt>{% trans "Name" %}</dt>
          <dd data-display="{{ instance.name|default:instance.id }}" class="word-wrap">{{ instance.name }}</dd>
          <dt>{% trans "ID" %}</dt>
          <dd>{{ instance.id }}</dd>
       </dl>
      </div>

I hope that helps !!

edit flag offensive delete link more

Comments

Thank you, It helps me a lot

Ana_torres gravatar imageAna_torres ( 2019-10-07 04:24:02 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-10-04 06:37:34 -0500

Seen: 29 times

Last updated: Oct 05