open-vault/ui/app/helpers/is-wildcard-string.js
Angel Garbarino 382a519756
Ui/transform info table row roles (#9942)
* add dynamic segement to list-root so that you can sepecify the tab you want to go to

* create new info-table-item-array component to handle array items passed into a info-table

* do not underline links if they are in an info-table-row confirmed with design

* implement the InfoTableItemArray component

* amend wildcard helper to take in regular string

* setup the logic and more logic

* fix routing to roles issue

* test for new component

* change data-test-mode to count

* handle case when wildcardCount is 0
2020-09-15 12:11:24 -06:00

20 lines
587 B
JavaScript

import { helper as buildHelper } from '@ember/component/helper';
export function isWildcardString(string) {
if (!string) {
return false;
}
// string is actually an object which is what comes in in the searchSelect component
if (typeof string === 'object') {
// if the dropdown is used the object is a class which cannot be converted into a string
if (Object.prototype.hasOwnProperty.call(string, 'store')) {
return false;
}
string = Object.values(string).toString();
}
return string.includes('*');
}
export default buildHelper(isWildcardString);