mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Workplace Search] Fix button order and remove extra source name label (#114899)
* Remove extra source title from Personal dashboard * Change button order to match other views We typically have the right-most button the Save button and the reset button to the left * Fix typo * Fix failing test EUI requires the name but we don’t want to dispaly it, so sending an empty string * Remove Synchronization nav items from Custom Source * Hide syncTriggerCallout for custom sources
This commit is contained in:
parent
c737c393cf
commit
493b408673
4 changed files with 9 additions and 8 deletions
|
@ -35,10 +35,10 @@ export const PrivateSourcesSidebar = () => {
|
|||
: PRIVATE_VIEW_ONLY_PAGE_DESCRIPTION;
|
||||
|
||||
const {
|
||||
contentSource: { id = '', name = '' },
|
||||
contentSource: { id = '' },
|
||||
} = useValues(SourceLogic);
|
||||
|
||||
const navItems = [{ id, name, items: useSourceSubNav() }];
|
||||
const navItems = [{ id, name: '', items: useSourceSubNav() }];
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -119,6 +119,7 @@ export const Overview: React.FC = () => {
|
|||
const [isModalVisible, setIsModalVisible] = useState(false);
|
||||
const closeModal = () => setIsModalVisible(false);
|
||||
const handleSyncClick = () => setIsModalVisible(true);
|
||||
const showSyncTriggerCallout = !custom && isIndexedSource && isOrganization;
|
||||
|
||||
const onSyncConfirm = () => {
|
||||
initializeSourceSynchronization(id);
|
||||
|
@ -491,7 +492,7 @@ export const Overview: React.FC = () => {
|
|||
<EuiText size="s">
|
||||
<FormattedMessage
|
||||
id="xpack.enterpriseSearch.workplaceSearch.sources.synchronizationCallout"
|
||||
defaultMessage="Configure {syncFrequencyLink} or permissions {blockTimeWindowsLink}."
|
||||
defaultMessage="Configure {syncFrequencyLink} or {blockTimeWindowsLink}."
|
||||
values={{
|
||||
syncFrequencyLink: (
|
||||
<EuiLinkTo to={getContentSourcePath(SYNC_FREQUENCY_PATH, id, isOrganization)}>
|
||||
|
@ -586,7 +587,7 @@ export const Overview: React.FC = () => {
|
|||
)}
|
||||
</>
|
||||
)}
|
||||
{isIndexedSource && isOrganization && syncTriggerCallout}
|
||||
{showSyncTriggerCallout && syncTriggerCallout}
|
||||
</EuiFlexGroup>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
|
|
|
@ -37,7 +37,7 @@ export const useSourceSubNav = () => {
|
|||
if (!id) return undefined;
|
||||
|
||||
const isCustom = serviceType === CUSTOM_SERVICE_TYPE;
|
||||
const showSynchronization = isIndexedSource && isOrganization;
|
||||
const showSynchronization = isIndexedSource && isOrganization && !isCustom;
|
||||
|
||||
const navItems: Array<EuiSideNavItemType<unknown>> = [
|
||||
{
|
||||
|
|
|
@ -75,9 +75,6 @@ export const Security: React.FC = () => {
|
|||
};
|
||||
|
||||
const headerActions = [
|
||||
<EuiButtonEmpty disabled={!unsavedChanges || dataLoading} onClick={resetState}>
|
||||
{RESET_BUTTON}
|
||||
</EuiButtonEmpty>,
|
||||
<EuiButton
|
||||
disabled={!hasPlatinumLicense || !unsavedChanges || dataLoading}
|
||||
onClick={showConfirmModal}
|
||||
|
@ -86,6 +83,9 @@ export const Security: React.FC = () => {
|
|||
>
|
||||
{SAVE_SETTINGS_BUTTON}
|
||||
</EuiButton>,
|
||||
<EuiButtonEmpty disabled={!unsavedChanges || dataLoading} onClick={resetState}>
|
||||
{RESET_BUTTON}
|
||||
</EuiButtonEmpty>,
|
||||
];
|
||||
|
||||
const allSourcesToggle = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue