Skip to content

Commit 92b5e53

Browse files
committed
Merge branch 'feature/539' of https://github.com/MetaCell/netpyne-ui into feature/539
2 parents f94ce53 + 8ab1319 commit 92b5e53

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

webapp/components/topbar/dialogs/SaveFile.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ const saveOptions = [
3434
},
3535
];
3636

37+
const getTimeStamp = () => new Date().toGMTString().replace(',', '').replace(/[ ,:]/g, '_');
38+
3739
export default class SaveFile extends React.Component {
3840
constructor (props) {
3941
super(props);
4042
this.state = {
41-
fileName: 'output',
43+
fileName: 'output_' + getTimeStamp(),
4244
netParams: true,
4345
simConfig: true,
4446
simData: true,

webapp/redux/middleware/utils.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { Base64 } from 'js-base64';
22

3-
const getTimeStamp = () => new Date().toGMTString().replace(',', '').replace(/[ ,:]/g, '_');
4-
5-
const createFileName = (name) => name + getTimeStamp();
3+
const createFileName = (name) => name
64

75
const forceBlobDownload = (blob, filename) => {
86
const url = window.URL.createObjectURL(blob);
@@ -18,7 +16,7 @@ export const downloadJsonResponse = (jsonData) => {
1816
let filename = createFileName('NetPyNE_Model_');
1917

2018
if (jsonData.simConfig && jsonData.simConfig.filename) {
21-
filename = createFileName(`${jsonData.simConfig.filename}_`);
19+
filename = createFileName(`${jsonData.simConfig.filename}`);
2220
}
2321

2422
filename += '.json';

0 commit comments

Comments
 (0)