forked from github/dataease
Merge pull request #11232 from dataease/pr@dev-v2@fixDS
Pr@dev v2@fix ds
This commit is contained in:
commit
e700067500
@ -89,14 +89,10 @@ public class ChartDataServer implements ChartDataApi {
|
||||
public void innerExportDetails(ChartExcelRequest request, HttpServletResponse response) throws Exception {
|
||||
HttpServletRequest httpServletRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
String linkToken = httpServletRequest.getHeader(AuthConstant.LINK_TOKEN_KEY);
|
||||
if (StringUtils.isEmpty(linkToken) || !request.isDataEaseBi()) {
|
||||
exportCenterManage.addTask(request.getViewId(), "chart", request);
|
||||
return;
|
||||
}
|
||||
if ((StringUtils.isNotEmpty(linkToken) && !request.isDataEaseBi()) || (request.isDataEaseBi() && StringUtils.isEmpty(linkToken))) {
|
||||
OutputStream outputStream = response.getOutputStream();
|
||||
try {
|
||||
findExcelData(request);
|
||||
|
||||
Workbook wb = new SXSSFWorkbook();
|
||||
|
||||
//给单元格设置样式
|
||||
@ -151,6 +147,10 @@ public class ChartDataServer implements ChartDataApi {
|
||||
} catch (Exception e) {
|
||||
DEException.throwException(e);
|
||||
}
|
||||
}else {
|
||||
exportCenterManage.addTask(request.getViewId(), "chart", request);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, h, onUnmounted } from 'vue'
|
||||
import { ref, h, onUnmounted, computed } from 'vue'
|
||||
import { EmptyBackground } from '@/components/empty-background'
|
||||
import { ElButton, ElMessage, ElMessageBox, ElTabPane, ElTabs } from 'element-plus-secondary'
|
||||
import { RefreshLeft } from '@element-plus/icons-vue'
|
||||
@ -15,6 +15,8 @@ import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import Icon from '@/components/icon-custom/src/Icon.vue'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { useLinkStoreWithOut } from '@/store/modules/link'
|
||||
import { useAppStoreWithOut } from '@/store/modules/app'
|
||||
|
||||
const { t } = useI18n()
|
||||
const tableData = ref([])
|
||||
@ -150,8 +152,12 @@ const init = params => {
|
||||
}
|
||||
}, 5000)
|
||||
}
|
||||
const linkStore = useLinkStoreWithOut()
|
||||
const appStore = useAppStoreWithOut()
|
||||
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
|
||||
|
||||
const taskExportTopicCall = task => {
|
||||
if (!linkStore.getLinkToken && !isDataEaseBi.value && !appStore.getIsIframe) {
|
||||
if (JSON.parse(task).exportStatus === 'SUCCESS') {
|
||||
openMessageLoading(
|
||||
JSON.parse(task).exportFromName + ' 导出成功,前往',
|
||||
@ -167,6 +173,7 @@ const taskExportTopicCall = task => {
|
||||
callbackExportError
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const openMessageLoading = (text, type = 'success', cb) => {
|
||||
|
@ -276,7 +276,11 @@ public abstract class Provider {
|
||||
session.setPassword(configuration.getSshPassword());
|
||||
}
|
||||
session.setConfig("StrictHostKeyChecking", "no");
|
||||
session.connect();
|
||||
try {
|
||||
session.connect(1000 * 5);
|
||||
} catch (Exception e) {
|
||||
DEException.throwException("SSH 连接失败:" + e.getMessage());
|
||||
}
|
||||
session.setPortForwardingL(configuration.getLPort(), configuration.getHost(), configuration.getPort());
|
||||
|
||||
return session;
|
||||
|
Loading…
Reference in New Issue
Block a user