Skip to content

Commit

Permalink
bugfix for #1326 - retrieved ingest details first, then used the sour…
Browse files Browse the repository at this point in the history
…ce file id to retrieve source file details
  • Loading branch information
ericsvendsen-mil committed Sep 13, 2018
1 parent aa1ada0 commit 37ff8a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@

var getIngestRecordDetails = function () {
vm.loading = true;
feedService.getSourceDetails($routeParams.id).then(function (data) {
feedService.getIngestDetails($routeParams.id).then(function (data) {
vm.ingestRecord = data;
feedService.getSourceDetails(vm.ingestRecord.source_file.id).then(function (sourceData) {
vm.ingestRecord.products = sourceData.products;
});
}).catch(function (error) {
console.log(error);
}).finally(function () {
Expand Down
4 changes: 2 additions & 2 deletions scale-ui/app/modules/feed/models/Ingest.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
this.transfer_started = transfer_started;
this.transfer_started_formatted = moment.utc(transfer_started).format(scaleConfig.dateFormats.day_second_utc_nolabel);
this.transfer_ended = transfer_ended;
this.transfer_ended_formatted = moment.utc(transfer_ended).format(scaleConfig.dateFormats.day_second_utc_nolabel);
this.transfer_ended_formatted = transfer_ended ? moment.utc(transfer_ended).format(scaleConfig.dateFormats.day_second_utc_nolabel) : '';
this.media_type = media_type;
this.file_size = file_size;
this.file_size_formatted = scaleService.calculateFileSizeFromBytes(file_size);
Expand All @@ -38,7 +38,7 @@

// public methods
Ingest.prototype = {

};

// static methods, assigned to class
Expand Down
2 changes: 1 addition & 1 deletion scale-ui/app/styles/components/fileAncestryTree.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.label {
div {
margin-top: 15px;
margin-top: 70px;
}
}
}

0 comments on commit 37ff8a5

Please sign in to comment.