Merge "On the create instance from, when the image name is empty, show id" into stable/ussuri
This commit is contained in:
commit
66c9f6120d
|
@ -682,6 +682,7 @@
|
||||||
if (isValidSnapshot(image) && enabledSnapshot) {
|
if (isValidSnapshot(image) && enabledSnapshot) {
|
||||||
model.imageSnapshots.push(image);
|
model.imageSnapshots.push(image);
|
||||||
} else if (isValidImage(image) && enabledImage) {
|
} else if (isValidImage(image) && enabledImage) {
|
||||||
|
image.name_or_id = image.name || image.id;
|
||||||
model.images.push(image);
|
model.images.push(image);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -135,10 +135,10 @@
|
||||||
var images = [
|
var images = [
|
||||||
{container_format: 'aki', properties: {}},
|
{container_format: 'aki', properties: {}},
|
||||||
{container_format: 'ari', properties: {}},
|
{container_format: 'ari', properties: {}},
|
||||||
{container_format: 'ami', properties: {}},
|
{container_format: 'ami', properties: {}, name: 'ami_image'},
|
||||||
{container_format: 'raw', properties: {}},
|
{container_format: 'raw', properties: {}, name: 'raw_image'},
|
||||||
{container_format: 'ami', properties: {image_type: 'image'}},
|
{container_format: 'ami', properties: {image_type: 'image'}, id: '1'},
|
||||||
{container_format: 'raw', properties: {image_type: 'image'}},
|
{container_format: 'raw', properties: {image_type: 'image'}, id: '2'},
|
||||||
{container_format: 'ami', properties: {
|
{container_format: 'ami', properties: {
|
||||||
block_device_mapping: '[{"source_type": "snapshot"}]'}},
|
block_device_mapping: '[{"source_type": "snapshot"}]'}},
|
||||||
{container_format: 'raw', properties: {
|
{container_format: 'raw', properties: {
|
||||||
|
@ -387,10 +387,10 @@
|
||||||
expect(model.newInstanceSpec).toBeDefined();
|
expect(model.newInstanceSpec).toBeDefined();
|
||||||
|
|
||||||
var expectedImages = [
|
var expectedImages = [
|
||||||
{container_format: 'ami', properties: {}},
|
{container_format: 'ami', properties: {}, name: 'ami_image', name_or_id: 'ami_image'},
|
||||||
{container_format: 'raw', properties: {}},
|
{container_format: 'raw', properties: {}, name: 'raw_image', name_or_id: 'raw_image'},
|
||||||
{container_format: 'ami', properties: {image_type: 'image'}},
|
{container_format: 'ami', properties: {image_type: 'image'}, id: '1', name_or_id: '1'},
|
||||||
{container_format: 'raw', properties: {image_type: 'image'}}
|
{container_format: 'raw', properties: {image_type: 'image'}, id: '2', name_or_id: '2'}
|
||||||
];
|
];
|
||||||
expect(model.images).toEqual(expectedImages);
|
expect(model.images).toEqual(expectedImages);
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@
|
||||||
// Mapping for dynamic table columns
|
// Mapping for dynamic table columns
|
||||||
var tableColumnsMap = {
|
var tableColumnsMap = {
|
||||||
image: [
|
image: [
|
||||||
{ id: 'name', title: gettext('Name'), priority: 1 },
|
{ id: 'name_or_id', title: gettext('Name'), priority: 1 },
|
||||||
{ id: 'updated_at', title: gettext('Updated'), filters: ['simpleDate'], priority: 2 },
|
{ id: 'updated_at', title: gettext('Updated'), filters: ['simpleDate'], priority: 2 },
|
||||||
{ id: 'size', title: gettext('Size'), filters: ['bytes'], priority: 2 },
|
{ id: 'size', title: gettext('Size'), filters: ['bytes'], priority: 2 },
|
||||||
{ id: 'disk_format', title: gettext('Type'), filters: [getImageDiskFormat], priority: 2 },
|
{ id: 'disk_format', title: gettext('Type'), filters: [getImageDiskFormat], priority: 2 },
|
||||||
|
|
Loading…
Reference in New Issue