Add support for magic-search-bar

Change-Id: Ibf4dc019c85210dd87f63222aa16d5f37a182922
This commit is contained in:
Peter Piela 2016-03-19 09:39:11 -04:00
parent c35aa806b1
commit f3008cb175
2 changed files with 46 additions and 0 deletions

View File

@ -1,5 +1,6 @@
/*
* © Copyright 2016 Hewlett Packard Enterprise Development Company LP
* Copyright 2016 Cray Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -35,6 +36,43 @@
ctrl.basePath = basePath;
ctrl.actions = actions;
/**
* Filtering - client-side MagicSearch
* all facets for node table
*/
ctrl.nodeFacets = [
{
'label': gettext('Name'),
'name': 'name',
'singleton': true
},
{
'label': gettext('UUID'),
'name': 'uuid',
'singleton': true
},
{
'label': gettext('Power State'),
'name': 'power_state',
'singleton': true
},
{
'label': gettext('Provisioning State'),
'name': 'provision_state',
'singleton': true
},
{
'label': gettext('Maintenance'),
'name': 'maintenance',
'singleton': true
},
{
'label': gettext('Driver'),
'name': 'driver',
'singleton': true
}
];
init();
// RETRIVE NODES AND PORTS
@ -65,3 +103,4 @@
}
})();

View File

@ -7,6 +7,13 @@
class="table table-striped table-rsp table-detail">
<thead>
<tr>
<th colspan="100" class="search-header">
<hz-magic-search-bar group-classes="input-group-sm" icon-classes="fa-search"
filter-facets="table.nodeFacets">
</hz-magic-search-bar>
</th>
</tr>
<tr>
<th colspan="100" class="action-col">
<action-list dropdown class="pull-right">