diff --git a/horizon/static/framework/widgets/magic-search/hz-magic-search-bar.directive.js b/horizon/static/framework/widgets/magic-search/hz-magic-search-bar.directive.js index eed1600867..16c1ca304c 100644 --- a/horizon/static/framework/widgets/magic-search/hz-magic-search-bar.directive.js +++ b/horizon/static/framework/widgets/magic-search/hz-magic-search-bar.directive.js @@ -35,7 +35,35 @@ * * @example * ``` - * + * + * var filterFacets = [ + * { + * label: gettext('Name'), + * name: 'name', + * singleton: true + * }, + * { + * label: gettext('VCPUs'), + * name: 'vcpus', + * singleton: true + * }, + * { + * label: gettext('RAM'), + * name: 'ram', + * singleton: true + * }, + * { + * label: gettext('Public'), + * name: 'isPublic', + * singleton: true, + * options: [ + * { label: gettext('No'), key: false }, + * { label: gettext('Yes'), key: true } + * ] + * }]; + * + * * * * ``` diff --git a/horizon/static/framework/widgets/magic-search/hz-magic-search-context.directive.js b/horizon/static/framework/widgets/magic-search/hz-magic-search-context.directive.js index 55fa4e9d7f..425d1c9f6e 100644 --- a/horizon/static/framework/widgets/magic-search/hz-magic-search-context.directive.js +++ b/horizon/static/framework/widgets/magic-search/hz-magic-search-context.directive.js @@ -41,7 +41,9 @@ * * @param {object} filterFacets Facets allowed for searching * @param {object=} filterStrings Help content shown in search bar - * @param {object=} clientFullTextSearch if full text search is to be done on the client + * @param {boolean=} clientFullTextSearch if true, performs full text search + * exclusively on the client + * * Facets: * ``` * var nameFacet = { @@ -72,9 +74,8 @@ * @example * ``` * + * filter-strings="filterStrings" + * filter-facets="filterFacets"> * * *
diff --git a/horizon/static/framework/widgets/magic-search/magic-search.module.js b/horizon/static/framework/widgets/magic-search/magic-search.module.js index 90e60d3159..11fdffefef 100644 --- a/horizon/static/framework/widgets/magic-search/magic-search.module.js +++ b/horizon/static/framework/widgets/magic-search/magic-search.module.js @@ -25,12 +25,6 @@ * used with the Eucalyptus third-party MagicSearch module at * https://github.com/eucalyptus/magic-search. * - * | Directives | - * |-------------------------------------------------------------------| - * | {@link MagicSearch.directive:hzMagicSearchBar `hzMagicSearchBar`} | - * | {@link MagicSearch.directive:magicOverrides `magicOverrides`} | - * | {@link MagicSearch.directive:stMagicSearch `stMagicSearch`} | - * */ angular .module('horizon.framework.widgets.magic-search', ['ui.bootstrap']) diff --git a/horizon/static/framework/widgets/magic-search/st-magic-search.directive.js b/horizon/static/framework/widgets/magic-search/st-magic-search.directive.js index 63586eb3b3..5cb5d40e25 100644 --- a/horizon/static/framework/widgets/magic-search/st-magic-search.directive.js +++ b/horizon/static/framework/widgets/magic-search/st-magic-search.directive.js @@ -41,7 +41,35 @@ * * @example * ``` - * + * + * var filterFacets = [ + * { + * label: gettext('Name'), + * name: 'name', + * singleton: true + * }, + * { + * label: gettext('VCPUs'), + * name: 'vcpus', + * singleton: true + * }, + * { + * label: gettext('RAM'), + * name: 'ram', + * singleton: true + * }, + * { + * label: gettext('Public'), + * name: 'isPublic', + * singleton: true, + * options: [ + * { label: gettext('No'), key: false }, + * { label: gettext('Yes'), key: true } + * ] + * }]; + * + * * * *