@@ -17,7 +17,7 @@ import {
1717 PlusOutlined ,
1818 SettingOutlined ,
1919} from '@ant-design/icons' ;
20- import { App , Button , Card , Tag , Tooltip , Typography , theme } from 'antd' ;
20+ import { App , Button , Tag , Tooltip , Typography } from 'antd' ;
2121import {
2222 BAIFlex ,
2323 BAIGraphQLPropertyFilter ,
@@ -335,7 +335,6 @@ const AutoScalingRuleList: React.FC<AutoScalingRuleListProps> = ({
335335} ) => {
336336 'use memo' ;
337337 const { t } = useTranslation ( ) ;
338- const { token } = theme . useToken ( ) ;
339338 const { message, modal } = App . useApp ( ) ;
340339 const [ isPendingRefetch , startRefetchTransition ] = useTransition ( ) ;
341340 const [ fetchKey , updateFetchKey ] = useFetchKey ( ) ;
@@ -504,9 +503,34 @@ const AutoScalingRuleList: React.FC<AutoScalingRuleListProps> = ({
504503
505504 return (
506505 < >
507- < Card
508- title = { t ( 'modelService.AutoScalingRules' ) }
509- extra = {
506+ < BAIFlex direction = "column" align = "stretch" gap = "sm" >
507+ < BAIFlex align = "center" gap = "sm" >
508+ < BAIGraphQLPropertyFilter
509+ style = { { flex : 1 } }
510+ filterProperties = { [
511+ {
512+ key : 'createdAt' ,
513+ propertyLabel : t ( 'autoScalingRule.CreatedAt' ) ,
514+ type : 'datetime' ,
515+ operators : [ 'after' , 'before' ] ,
516+ defaultOperator : 'after' ,
517+ } ,
518+ {
519+ key : 'lastTriggeredAt' ,
520+ propertyLabel : t ( 'autoScalingRule.LastTriggered' ) ,
521+ type : 'datetime' ,
522+ operators : [ 'after' , 'before' ] ,
523+ defaultOperator : 'after' ,
524+ } ,
525+ ] }
526+ value = { graphQLFilter }
527+ onChange = { ( filter ) => {
528+ startRefetchTransition ( ( ) => {
529+ setQueryParams ( { filter : filter ?? null } ) ;
530+ setTablePaginationOption ( { current : 1 } ) ;
531+ } ) ;
532+ } }
533+ />
510534 < Button
511535 type = "primary"
512536 icon = { < PlusOutlined /> }
@@ -518,34 +542,7 @@ const AutoScalingRuleList: React.FC<AutoScalingRuleListProps> = ({
518542 >
519543 { t ( 'modelService.AddRules' ) }
520544 </ Button >
521- }
522- >
523- < BAIGraphQLPropertyFilter
524- style = { { marginBottom : token . marginMD } }
525- filterProperties = { [
526- {
527- key : 'createdAt' ,
528- propertyLabel : t ( 'autoScalingRule.CreatedAt' ) ,
529- type : 'datetime' ,
530- operators : [ 'after' , 'before' ] ,
531- defaultOperator : 'after' ,
532- } ,
533- {
534- key : 'lastTriggeredAt' ,
535- propertyLabel : t ( 'autoScalingRule.LastTriggered' ) ,
536- type : 'datetime' ,
537- operators : [ 'after' , 'before' ] ,
538- defaultOperator : 'after' ,
539- } ,
540- ] }
541- value = { graphQLFilter }
542- onChange = { ( filter ) => {
543- startRefetchTransition ( ( ) => {
544- setQueryParams ( { filter : filter ?? null } ) ;
545- setTablePaginationOption ( { current : 1 } ) ;
546- } ) ;
547- } }
548- />
545+ </ BAIFlex >
549546 < AutoScalingRuleListNodes
550547 autoScalingRulesFrgmt = { autoScalingRuleNodes }
551548 presetMap = { presetMap }
@@ -580,7 +577,7 @@ const AutoScalingRuleList: React.FC<AutoScalingRuleListProps> = ({
580577 } }
581578 onDeleteRule = { handleDeleteRule }
582579 />
583- </ Card >
580+ </ BAIFlex >
584581 < BAIUnmountAfterClose >
585582 < AutoScalingRuleEditorModal
586583 open = { isOpenEditorModal }
0 commit comments