Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 391b5e2

Browse files
oodamienghillert
authored andcommitted
Stream Deployment: improve generated filename on configuration export
Resolve #666
1 parent b6d1459 commit 391b5e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/src/app/streams/stream-deploy/stream-deploy.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {saveAs} from 'file-saver/FileSaver';
1616
import {BsModalService} from 'ngx-bootstrap';
1717
import {AppPropertiesSource, StreamDeployAppPropertiesComponent} from './app-properties/app-properties.component';
1818
import {Properties} from 'spring-flo';
19+
import moment = require('moment');
1920

2021
/**
2122
* Component used to deploy stream definitions.
@@ -487,7 +488,8 @@ export class StreamDeployComponent implements OnInit, OnDestroy {
487488
free: FormGroup, file: FormGroup, config: StreamDeployConfig
488489
}) {
489490
const propertiesString = this.toRaw(value).map((a) => `${a.key}=${a.value}`).join('\n');
490-
const filename = `${value.config.id}.${new Date().getTime()}.txt`;
491+
const date = moment().format('YYYY-MM-DDTHms');
492+
const filename = `${value.config.id}.${date}.txt`;
491493
const blob = new Blob([propertiesString], {type: 'text/plain'});
492494
saveAs(blob, filename);
493495
}

0 commit comments

Comments
 (0)