Commit 6733ec07 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

ui: Truncate model names in several cases

parent 0810b76c
......@@ -6458,6 +6458,8 @@ table.list-machines .wave {
margin-right:0;
border-right: none;
width: 195px;
overflow: hidden;
overflow-y: auto;
}
.create-vm .list-cont > h4 {
......
......@@ -1313,7 +1313,8 @@
this.$(".ssh .empty").hide();
}
_.each(keys, _.bind(function(key){
var el = $('<li id="ssh-key-option-{1}" class="ssh-key-option">{0}</li>'.format(_.escape(key.get("name")), key.id));
var name = _.escape(util.truncate(key.get("name"), 45));
var el = $('<li id="ssh-key-option-{1}" class="ssh-key-option">{0}</li>'.format(name, key.id));
var check = $('<input class="check" type="checkbox"></input>')
el.append(check);
el.data("model", key);
......@@ -1518,7 +1519,8 @@
this.keys.append(this.make("li", {'class':'empty'}, 'No keys selected'))
}
_.each(keys, _.bind(function(key) {
var el = this.make("li", {'class':'selected-ssh-key'}, key.get('name'));
var name = _.escape(util.truncate(key.get("name"), 20))
var el = this.make("li", {'class':'selected-ssh-key'}, name);
this.keys.append(el);
}, this))
},
......
......@@ -273,7 +273,7 @@
collection: vm.ports,
container: ports_container,
parent: this,
truncate: 55
truncate: 50
});
this.ports_views[vm.id] = ports_view
ports_view.show();
......@@ -385,7 +385,7 @@
if (vm != this.current_vm_instance) { return };
// truncate name
el.find(".machine-detail.name").text(util.truncate(vm.get("name"), 35));
el.find(".machine-detail.name").text(util.truncate(vm.get("name"), 53));
el.find(".fqdn").text(vm.get("fqdn"));
// set the state (i18n ??)
el.find(".state-label").text(STATE_TEXTS[vm.state()]);
......
......@@ -5,7 +5,7 @@
<div class="inner clearfix main-content">
<div class="model-logo vm-icon medium2 state1"
data-rv-style="model.vm.status|vm_style"></div>
<h3 class="title" data-rv-text="model.vm.name|truncate 40"></h3>
<h3 class="title" data-rv-text="model.vm.name|truncate 30"></h3>
<h5 class="subtitle">
<span class="key" data-rv-show="model.mac_address">MAC:</span>
<span class="value" data-rv-text="model.mac_address"></span>
......
......@@ -46,7 +46,7 @@
</div>
<div class="ico"><img data-rv-src="model.status|get_vm_icon" /></div>
<div class="name">
<span class="" data-rv-text="model.name"></span>
<span class="" data-rv-text="model.name|truncate 40"></span>
<div data-rv-class="model.state|status_cls">
<span data-rv-text="model.state|status_display"></span>
<div class="indicators">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment