mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
Sentence case for Select targets, All hosts, Linux (#2219)
This commit is contained in:
parent
d81a6317a0
commit
fc19722ec2
@ -47,17 +47,30 @@ const TargetPillSelector = ({
|
|||||||
entity,
|
entity,
|
||||||
isSelected,
|
isSelected,
|
||||||
onClick,
|
onClick,
|
||||||
}: ITargetPillSelectorProps): JSX.Element => (
|
}: ITargetPillSelectorProps): JSX.Element => {
|
||||||
<button
|
const displayText = () => {
|
||||||
className="target-pill-selector"
|
switch (entity.display_text) {
|
||||||
data-selected={isSelected}
|
case "All Hosts":
|
||||||
onClick={(e) => onClick(entity)(e)}
|
return "All hosts";
|
||||||
>
|
case "All Linux":
|
||||||
<img alt="" src={isSelected ? CheckIcon : PlusIcon} />
|
return "Linux";
|
||||||
<span className="selector-name">{entity.display_text}</span>
|
default:
|
||||||
<span className="selector-count">{entity.count}</span>
|
return entity.display_text;
|
||||||
</button>
|
}
|
||||||
);
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
className="target-pill-selector"
|
||||||
|
data-selected={isSelected}
|
||||||
|
onClick={(e) => onClick(entity)(e)}
|
||||||
|
>
|
||||||
|
<img alt="" src={isSelected ? CheckIcon : PlusIcon} />
|
||||||
|
<span className="selector-name">{displayText()}</span>
|
||||||
|
<span className="selector-count">{entity.count}</span>
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const SelectTargets = ({
|
const SelectTargets = ({
|
||||||
baseClass,
|
baseClass,
|
||||||
@ -228,7 +241,7 @@ const SelectTargets = ({
|
|||||||
if (isEmpty(searchText) && isTargetsLoading) {
|
if (isEmpty(searchText) && isTargetsLoading) {
|
||||||
return (
|
return (
|
||||||
<div className={`${baseClass}__wrapper body-wrap`}>
|
<div className={`${baseClass}__wrapper body-wrap`}>
|
||||||
<h1>Select Targets</h1>
|
<h1>Select targets</h1>
|
||||||
<div className={`${baseClass}__page-loading`}>
|
<div className={`${baseClass}__page-loading`}>
|
||||||
<Spinner />
|
<Spinner />
|
||||||
</div>
|
</div>
|
||||||
@ -239,7 +252,7 @@ const SelectTargets = ({
|
|||||||
if (isEmpty(searchText) && isTargetsError) {
|
if (isEmpty(searchText) && isTargetsError) {
|
||||||
return (
|
return (
|
||||||
<div className={`${baseClass}__wrapper body-wrap`}>
|
<div className={`${baseClass}__wrapper body-wrap`}>
|
||||||
<h1>Select Targets</h1>
|
<h1>Select targets</h1>
|
||||||
<div className={`${baseClass}__page-error`}>
|
<div className={`${baseClass}__page-error`}>
|
||||||
<h4>
|
<h4>
|
||||||
<img alt="" src={ErrorIcon} />
|
<img alt="" src={ErrorIcon} />
|
||||||
@ -264,7 +277,7 @@ const SelectTargets = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`${baseClass}__wrapper body-wrap`}>
|
<div className={`${baseClass}__wrapper body-wrap`}>
|
||||||
<h1>Select Targets</h1>
|
<h1>Select targets</h1>
|
||||||
<div className={`${baseClass}__target-selectors`}>
|
<div className={`${baseClass}__target-selectors`}>
|
||||||
{allHostsLabels &&
|
{allHostsLabels &&
|
||||||
allHostsLabels.length > 0 &&
|
allHostsLabels.length > 0 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user