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