fix: integrate split button (#25993) (#25994)

Signed-off-by: Jonathan Winters <wintersjonathan0@gmail.com>
This commit is contained in:
jwinters01
2026-01-15 11:28:08 -08:00
committed by GitHub
parent 2d762e4a2b
commit c4f3bb8be4
3 changed files with 14 additions and 22 deletions

View File

@@ -222,6 +222,9 @@ $header: 120px;
.argo-button {
height: 34px;
}
.argo-split-button {
height: 34px;
}
}
}
.top-bar__right-side {

View File

@@ -1,4 +1,4 @@
import {DropDownMenu, NotificationType, SlidingPanel, Tooltip} from 'argo-ui';
import {NotificationType, SlidingPanel, Tooltip, SplitButtonAction} from 'argo-ui';
import * as classNames from 'classnames';
import React, {useState, useEffect, useCallback, useRef, useContext, FC} from 'react';
import * as ReactDOM from 'react-dom';
@@ -1212,24 +1212,7 @@ Are you sure you want to disable auto-sync and rollback application '${props.mat
},
{
iconClassName: classNames('fa fa-redo', {'status-icon--spin': !!refreshing}),
title: (
<React.Fragment>
<ActionMenuItem actionLabel='Refresh' />{' '}
<DropDownMenu
items={[
{
title: 'Hard Refresh',
action: () => !refreshing && services.applications.get(app.metadata.name, app.metadata.namespace, objectListKind, 'hard')
}
]}
anchor={() => (
<button className='argo-button--base application-details__dropdown-anchor-inner'>
<i className='fa fa-caret-down' />
</button>
)}
/>
</React.Fragment>
),
title: <ActionMenuItem actionLabel='Refresh' />,
disabled: !!refreshing,
action: () => {
if (!refreshing) {
@@ -1237,8 +1220,14 @@ Are you sure you want to disable auto-sync and rollback application '${props.mat
AppUtils.setAppRefreshing(app);
appChanged.current.next(app);
}
}
}
},
subActions: [
{
title: 'Hard Refresh',
action: () => !refreshing && services.applications.get(app.metadata.name, app.metadata.namespace, objectListKind, 'hard')
}
]
} as SplitButtonAction
];
},
[selectNode, appContext, confirmDeletion, setOperationStatusVisible, setRollbackPanelVisible, deleteApplication, objectListKind]

View File

@@ -2442,7 +2442,7 @@ arg@^4.1.0:
"argo-ui@git+https://github.com/argoproj/argo-ui.git":
version "1.0.0"
resolved "git+https://github.com/argoproj/argo-ui.git#6d8ee8b016bf2e1fa81b646cf625f4d0887dd06a"
resolved "git+https://github.com/argoproj/argo-ui.git#2bfda77cec418c4123fe61e35f22d09432af15b7"
dependencies:
"@fortawesome/fontawesome-free" "^6.2.1"
"@tippy.js/react" "^3.1.1"