feat: duplicate deployment
This commit is contained in:
@@ -18,7 +18,7 @@ const useAccessColumns = (
|
||||
|
||||
const filterActions = (record: RouteItem) => {
|
||||
return rowActionList.filter((action) => {
|
||||
if (action.key === 'chat') {
|
||||
if (action.key === 'chat' || action.key === 'api') {
|
||||
return record.ready_targets > 0;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { useState } from 'react';
|
||||
|
||||
const useViewApIInfo = () => {
|
||||
const [apiAccessInfo, setAPIAccessInfo] = useState<any>({
|
||||
show: false,
|
||||
data: {}
|
||||
});
|
||||
|
||||
const openViewAPIInfo = (row: any) => {
|
||||
setAPIAccessInfo({
|
||||
show: true,
|
||||
data: row
|
||||
});
|
||||
};
|
||||
|
||||
const closeViewAPIInfo = () => {
|
||||
setAPIAccessInfo({
|
||||
show: false,
|
||||
data: {}
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
apiAccessInfo,
|
||||
openViewAPIInfo,
|
||||
closeViewAPIInfo
|
||||
};
|
||||
};
|
||||
|
||||
export default useViewApIInfo;
|
||||
Reference in New Issue
Block a user