Skip to content

Commit

Permalink
fix: 修复配置部分问题
Browse files Browse the repository at this point in the history
  • Loading branch information
tingfuyeh committed Oct 18, 2023
1 parent 7e428fa commit 217ee83
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion web/src/polaris/administration/breaker/PageDuck.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default class ServicePageDuck extends GridPageDuck {
return 'id'
}
get watchTypes() {
return [...super.watchTypes, this.types.SEARCH, this.types.SET_CUSTOM_FILTERS, this.types.SET_TYPE]
return [...super.watchTypes, this.types.SEARCH, this.types.SET_CUSTOM_FILTERS, this.types.SET_TYPE, this.types.LOAD]
}
get params() {
return [
Expand Down
8 changes: 7 additions & 1 deletion web/src/polaris/configuration/fileGroup/detail/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ export default purify(function ServiceDetail(props: DuckCmpProps<ServiceDetailDu
[],
)
return (
<DetailPage store={store} duck={duck} dispatch={dispatch} title={`${group}(${namespace})`} backRoute={'/filegroup'}>
<DetailPage
store={store}
duck={duck}
dispatch={dispatch}
title={`${group}(${namespace})`}
backRoute={'/configuration'}
>
<Tabs ceiling tabs={tabs} activeId={tab} onActive={handlers.switch}>
<TabPanel id={TAB.File}>
<File duck={ducks[TAB.File]} store={store} dispatch={dispatch} />
Expand Down
27 changes: 22 additions & 5 deletions web/src/polaris/configuration/fileGroup/detail/file/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ insertCSS(
.no-switcher .tea-tree__switcher{
display:none;
}
.config-editor .tea-monaco-editor-container {
padding-top: 50px;
}
.config-editor .tea-icon-fullscreenquit {
top: 65px;
}
.file-tree-container {
overflow-y: auto;
overflow-x: hidden;
border: 1px solid #cfd5de;
border-top:none;
}
`,
)

Expand Down Expand Up @@ -174,15 +186,15 @@ export default function Page(props: DuckCmpProps<Duck>) {
<Card>
<Card.Body>
<Row showSplitLine gap={40}>
<div style={{ width: '450px', height: 1000, overflowY: 'hidden', margin: '15px 20px' }}>
<div style={{ width: '450px', height: 1002, overflowY: 'hidden', margin: '15px 20px' }}>
<SearchBox
value={searchKeyword}
onChange={handlers.setSearchKeyword}
placeholder={'请输入文件名搜索'}
onSearch={handlers.searchPath}
style={{ width: '100%' }}
/>
<div style={{ height: 910, overflowY: 'scroll' }}>
<div className={'file-tree-container'}>
<Tree
activable
onActive={(activeIds, { nodeId }) => {
Expand All @@ -208,7 +220,7 @@ export default function Page(props: DuckCmpProps<Duck>) {
}}
fullExpandable
height={900}
style={{ width: '500px' }}
style={{ width: '450px', maxWidth: '450px' }}
// onSelect={v => {
// handlers.select(v)
// }}
Expand Down Expand Up @@ -280,7 +292,9 @@ export default function Page(props: DuckCmpProps<Duck>) {
<FormItem label='加密状态'>
<FormText>
<Text theme={currentNode.encrypted ? 'warning' : 'text'}>
{currentNode.encrypted ? `已开启加密, 加密算法为: ${currentNode.encryptAlgo}` : '未加密'}
{currentNode.encrypted
? `已开启加密, 加密算法为: ${currentNode.encryptAlgo}`
: '未加密'}
</Text>
</FormText>
</FormItem>
Expand Down Expand Up @@ -379,7 +393,10 @@ export default function Page(props: DuckCmpProps<Duck>) {
</Col>
</Row>
) : (
<section style={{ border: '1px solid #cfd5de', width: '100%' }}>
<section
style={{ border: '1px solid #cfd5de', width: '100%', height: '750px' }}
className={'config-editor'}
>
<MonacoEditor
language={toHighlightLanguage(currentNode?.format)}
value={editing ? editContent : currentNode?.content}
Expand Down

0 comments on commit 217ee83

Please sign in to comment.