"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "63a5c8742a51a58083f7d9ba15518cce5bb1688b"
Commit beed60f6 authored by Lijiao's avatar Lijiao Committed by chicm-ms
Browse files

download log file (#1149)

parent 139e0a90
...@@ -92,7 +92,7 @@ class SlideBar extends React.Component<{}, SliderState> { ...@@ -92,7 +92,7 @@ class SlideBar extends React.Component<{}, SliderState> {
const aTag = document.createElement('a'); const aTag = document.createElement('a');
const isEdge = navigator.userAgent.indexOf('Edge') !== -1 ? true : false; const isEdge = navigator.userAgent.indexOf('Edge') !== -1 ? true : false;
const file = new Blob([nniLogfile], { type: 'application/json' }); const file = new Blob([nniLogfile], { type: 'application/json' });
aTag.download = 'nnimanagerLog.json'; aTag.download = 'nnimanager.log';
aTag.href = URL.createObjectURL(file); aTag.href = URL.createObjectURL(file);
aTag.click(); aTag.click();
if (!isEdge) { if (!isEdge) {
...@@ -101,7 +101,7 @@ class SlideBar extends React.Component<{}, SliderState> { ...@@ -101,7 +101,7 @@ class SlideBar extends React.Component<{}, SliderState> {
if (navigator.userAgent.indexOf('Firefox') > -1) { if (navigator.userAgent.indexOf('Firefox') > -1) {
const downTag = document.createElement('a'); const downTag = document.createElement('a');
downTag.addEventListener('click', function () { downTag.addEventListener('click', function () {
downTag.download = 'nnimanagerLog.json'; downTag.download = 'nnimanager.log';
downTag.href = URL.createObjectURL(file); downTag.href = URL.createObjectURL(file);
}); });
let eventMouse = document.createEvent('MouseEvents'); let eventMouse = document.createEvent('MouseEvents');
...@@ -122,7 +122,7 @@ class SlideBar extends React.Component<{}, SliderState> { ...@@ -122,7 +122,7 @@ class SlideBar extends React.Component<{}, SliderState> {
const aTag = document.createElement('a'); const aTag = document.createElement('a');
const isEdge = navigator.userAgent.indexOf('Edge') !== -1 ? true : false; const isEdge = navigator.userAgent.indexOf('Edge') !== -1 ? true : false;
const file = new Blob([dispatchLogfile], { type: 'application/json' }); const file = new Blob([dispatchLogfile], { type: 'application/json' });
aTag.download = 'dispatcherLog.json'; aTag.download = 'dispatcher.log';
aTag.href = URL.createObjectURL(file); aTag.href = URL.createObjectURL(file);
aTag.click(); aTag.click();
if (!isEdge) { if (!isEdge) {
...@@ -131,7 +131,7 @@ class SlideBar extends React.Component<{}, SliderState> { ...@@ -131,7 +131,7 @@ class SlideBar extends React.Component<{}, SliderState> {
if (navigator.userAgent.indexOf('Firefox') > -1) { if (navigator.userAgent.indexOf('Firefox') > -1) {
const downTag = document.createElement('a'); const downTag = document.createElement('a');
downTag.addEventListener('click', function () { downTag.addEventListener('click', function () {
downTag.download = 'dispatcherLog.json'; downTag.download = 'dispatcher.log';
downTag.href = URL.createObjectURL(file); downTag.href = URL.createObjectURL(file);
}); });
let eventMouse = document.createEvent('MouseEvents'); let eventMouse = document.createEvent('MouseEvents');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment