Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
download log file (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvybriage authored and chicm-ms committed Jun 3, 2019
1 parent 139e0a9 commit beed60f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/webui/src/components/SlideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class SlideBar extends React.Component<{}, SliderState> {
const aTag = document.createElement('a');
const isEdge = navigator.userAgent.indexOf('Edge') !== -1 ? true : false;
const file = new Blob([nniLogfile], { type: 'application/json' });
aTag.download = 'nnimanagerLog.json';
aTag.download = 'nnimanager.log';
aTag.href = URL.createObjectURL(file);
aTag.click();
if (!isEdge) {
Expand All @@ -101,7 +101,7 @@ class SlideBar extends React.Component<{}, SliderState> {
if (navigator.userAgent.indexOf('Firefox') > -1) {
const downTag = document.createElement('a');
downTag.addEventListener('click', function () {
downTag.download = 'nnimanagerLog.json';
downTag.download = 'nnimanager.log';
downTag.href = URL.createObjectURL(file);
});
let eventMouse = document.createEvent('MouseEvents');
Expand All @@ -122,7 +122,7 @@ class SlideBar extends React.Component<{}, SliderState> {
const aTag = document.createElement('a');
const isEdge = navigator.userAgent.indexOf('Edge') !== -1 ? true : false;
const file = new Blob([dispatchLogfile], { type: 'application/json' });
aTag.download = 'dispatcherLog.json';
aTag.download = 'dispatcher.log';
aTag.href = URL.createObjectURL(file);
aTag.click();
if (!isEdge) {
Expand All @@ -131,7 +131,7 @@ class SlideBar extends React.Component<{}, SliderState> {
if (navigator.userAgent.indexOf('Firefox') > -1) {
const downTag = document.createElement('a');
downTag.addEventListener('click', function () {
downTag.download = 'dispatcherLog.json';
downTag.download = 'dispatcher.log';
downTag.href = URL.createObjectURL(file);
});
let eventMouse = document.createEvent('MouseEvents');
Expand Down

0 comments on commit beed60f

Please sign in to comment.