mirror of https://github.com/openspug/spug
F 修复文件管理器错误
parent
dacb0f55ee
commit
4fdafabbed
|
@ -33,7 +33,7 @@ class ObjectView(View):
|
|||
Argument('file', help='请输入文件路径')
|
||||
).parse(request.GET)
|
||||
if error is None:
|
||||
host = Host.objects.filter(pk=1).first()
|
||||
host = Host.objects.filter(pk=form.id).first()
|
||||
if not host:
|
||||
return json_response(error='未找到指定主机')
|
||||
filename = os.path.basename(form.file)
|
||||
|
|
|
@ -83,7 +83,7 @@ class FileManager extends React.Component {
|
|||
fetchFiles = () => {
|
||||
this.setState({fetching: true});
|
||||
const path = '/' + this.state.pwd.join('/');
|
||||
http.get('/api/file/', {params: {id: 1, path}})
|
||||
http.get('/api/file/', {params: {id: this.id, path}})
|
||||
.then(res => {
|
||||
const objects = lds.orderBy(res, [this._kindSort, 'name'], ['desc', 'asc']);
|
||||
this.setState({objects})
|
||||
|
|
Loading…
Reference in New Issue