Blame | Last modification | View Log | Download | RSS feed
select
attribute_category.name category,
attribute.name attribute,
attribute_value.value
from
attribute_value
join attribute using (attribute_id)
join attribute_category using (attribute_category_id)
where
1=1
and attribute.display_in_summary
and attribute_value.removed is null
and entity_id = 164
and _base_class_id = 3
order by
attribute_category.sort_order,
attribute_category.name,
attribute.sort_order,
attribute.name,
attribute_value.value
;
Block Devices
Memory
CPU
Physical
General (Note, Alias, Operating System, Location)
insert into attribute_category (name,sort_order) values ( 'General', 10 );
insert into attribute_category (name,sort_order) values ( 'Block Devices', 50 );
insert into attribute_category (name,sort_order) values ( 'Memory', 40 );
insert into attribute_category (name,sort_order) values ( 'Processor', 30 );
insert into attribute_category (name,sort_order) values ( 'Physical', 20 );
update attribute set attribute_category_id = (select attribute_category_id from attribute_category where name = 'Block Devices' ) where name like '/dev/%';
update attribute set attribute_category_id = (select attribute_category_id from attribute_category where name = 'Power' ) where name like 'Power%';
update attribute set attribute_category_id = (select attribute_category_id from attribute_category where name = 'Memory' ) where name like 'Memory%';
update attribute set attribute_category_id = (select attribute_category_id from attribute_category where name = 'Processor' ) where name like 'CPU%';
update attribute set attribute_category_id = (select attribute_category_id from attribute_category where name = 'Processor' ) where name like 'Enclosure%' or name like 'Firmware%' or name = 'Manufacturer' or name = 'Model' or name = 'Serial Number' or name = 'UUID';
alter table attribute add sort_order int unsigned not null default 100;
update attribute_category set sort_order = 10 where name = 'General';
update attribute_category set sort_order = 50 where name = 'Block Devices';
update attribute_category set sort_order = 40 where name = 'Memory';
update attribute_category set sort_order = 30 where name = 'Processor';
update attribute_category set sort_order = 20 where name = 'Physical';