Skip to content

Commit 2d85681

Browse files
committed
Fix log ranges offset
1 parent 77d9b16 commit 2d85681

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

moss-ui/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ UI : [React](https://reactjs.org/) [Less](http://lesscss.org/) [Ant design](http
1818

1919
# Getting Started
2020

21+
本地开发
22+
`npm run start`
23+
24+
自动打包
25+
`npm run build`
26+
27+
提示命令行
2128
`npm run 6`
2229

2330
# 相关

moss-ui/src/models/application/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ const application = {
187187
) => {
188188
const requestConf: any = {
189189
method: 'get',
190-
responseType: 'Arraybuffer',
190+
responseType: 'buffer',
191191
url: `admin/instances/${id}/actuator/logfile/${value}`,
192192
}
193193

moss-ui/src/pages/Admin/Pages/Application/LogDel.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,18 @@ class LogDel extends React.Component<
119119
}
120120

121121
public handleChange = (value: any) => {
122-
this.getLogDel(this.props.match.params.id, value)()
122+
this.getLogDel(this.props.match.params.id, value, 0)()
123123
this.setState({
124124
selectValue: value,
125125
})
126126
}
127127

128-
private getLogDel = (id: any, value: string) => () => {
129-
const { logRequestOffset } = this.state
128+
private getLogDel = (id: any, value: string, offset: number) => () => {
130129
return applicationService
131-
.fetchApplicationModifyLogDel(id, value, logRequestOffset)
130+
.fetchApplicationModifyLogDel(id, value, offset)
132131
.then(resp => {
133132
this.setState({
134-
logRequestOffset: logRequestOffset + resp.request.response.length,
133+
logRequestOffset: offset + resp.request.response.length,
135134
})
136135
})
137136
}

moss-web/src/main/resources/static/umi.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)