From ac6b1b16e03a2c0833db3cd59b8b031ce946485c Mon Sep 17 00:00:00 2001 From: Cilibiu Bogdan Date: Tue, 3 Jul 2018 11:33:51 +0300 Subject: [PATCH] check repository licence (#478) --- src/app/components/about/about.component.html | 2 +- src/app/components/about/about.component.ts | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/app/components/about/about.component.html b/src/app/components/about/about.component.html index dfb666c47..057ba3e45 100644 --- a/src/app/components/about/about.component.html +++ b/src/app/components/about/about.component.html @@ -6,7 +6,7 @@

version: {{ repository.edition }} {{ repository.version.display }}

-
+
License
diff --git a/src/app/components/about/about.component.ts b/src/app/components/about/about.component.ts index 3f4c0ae23..3b5cb988f 100644 --- a/src/app/components/about/about.component.ts +++ b/src/app/components/about/about.component.ts @@ -70,15 +70,18 @@ export class AboutComponent implements OnInit { {type: 'text', key: 'isThumbnailGenerationEnabled', title: 'Thumbnail Generation', sortable: true} ]); - this.license = new ObjectDataTableAdapter([repository.license], [ - {type: 'date', key: 'issuedAt', title: 'Issued At', sortable: true}, - {type: 'date', key: 'expiresAt', title: 'Expires At', sortable: true}, - {type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true}, - {type: 'text', key: 'holder', title: 'Holder', sortable: true}, - {type: 'text', key: 'mode', title: 'Type', sortable: true}, - {type: 'text', key: 'isClusterEnabled', title: 'Cluster Enabled', sortable: true}, - {type: 'text', key: 'isCryptodocEnabled', title: 'Cryptodoc Enable', sortable: true} - ]); + + if (repository.license) { + this.license = new ObjectDataTableAdapter([repository.license], [ + {type: 'date', key: 'issuedAt', title: 'Issued At', sortable: true}, + {type: 'date', key: 'expiresAt', title: 'Expires At', sortable: true}, + {type: 'text', key: 'remainingDays', title: 'Remaining Days', sortable: true}, + {type: 'text', key: 'holder', title: 'Holder', sortable: true}, + {type: 'text', key: 'mode', title: 'Type', sortable: true}, + {type: 'text', key: 'isClusterEnabled', title: 'Cluster Enabled', sortable: true}, + {type: 'text', key: 'isCryptodocEnabled', title: 'Cryptodoc Enable', sortable: true} + ]); + } }); this.http.get('/versions.json')