Browse Source

[Refactor][UI]Add a back button when viewing an error file (#13354)

Co-authored-by: imizao <lai.jinwen@vpclub.cn>
3.2.0-release
imizao 2 years ago committed by GitHub
parent
commit
23c7363f64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      dolphinscheduler-ui/src/service/service.ts
  2. 16
      dolphinscheduler-ui/src/views/resource/file/edit/index.tsx

4
dolphinscheduler-ui/src/service/service.ts

@ -72,9 +72,9 @@ const err = (err: AxiosError): Promise<AxiosError> => {
} }
service.interceptors.request.use((config: AxiosRequestConfig<any>) => { service.interceptors.request.use((config: AxiosRequestConfig<any>) => {
config.headers && (config.headers.sessionId = userStore.getSessionId)
const language = cookies.get('language')
config.headers = config.headers || {} config.headers = config.headers || {}
config.headers.sessionId = userStore.getSessionId
const language = cookies.get('language')
if (language) config.headers.language = language if (language) config.headers.language = language
return config return config

16
dolphinscheduler-ui/src/views/resource/file/edit/index.tsx

@ -109,7 +109,21 @@ export default defineComponent({
</div> </div>
) : ( ) : (
<NSpace justify='center'> <NSpace justify='center'>
<NSpin show={true} /> <NSpace vertical>
<NSpin show={true} />
<NSpace>
<NButton
type='info'
size='small'
text
style={{ marginRight: '15px' }}
onClick={this.handleReturn}
class='btn-cancel'
>
{t('resource.file.return')}
</NButton>
</NSpace>
</NSpace>
</NSpace> </NSpace>
)} )}
</Card> </Card>

Loading…
Cancel
Save