Skip to content
Snippets Groups Projects
Unverified Commit c693f3f9 authored by Martin Weise's avatar Martin Weise
Browse files

Removed unused logo files, bind logos via ENV variable

parent 6d7c903f
Branches
Tags
1 merge request!87Resolve "Allow own logo in frontend"
import requests as rq
class MetadataServiceClient:
def __init__(self, host):
self.gateway = "http://" + host + ":9095/api/oai"
def identify(self):
response = rq.get(self.gateway)
if response.status_code == 200:
return response.text
raise Exception("Failed to identify", response)
def identify1(self):
response = rq.get(self.gateway + "?verb=Identify")
if response.status_code == 200:
return response.text
raise Exception("Failed to identify", response)
def list_identifiers(self):
response = rq.get(self.gateway + "?verb=ListIdentifiers")
if response.status_code == 200:
return response.text
raise Exception("Failed to list identifiers", response)
def get_record(self, identifier, metadata_prefix="oai_dc"):
response = rq.get(
self.gateway + "?verb=GetRecord&metadataPrefix=" + metadata_prefix + "&identifier=" + identifier)
if response.status_code == 200:
return response.text
raise Exception("Failed to get record", response)
def list_metadata_formats(self):
response = rq.get(self.gateway + "?verb=ListMetadataFormats")
if response.status_code == 200:
return response.text
raise Exception("Failed to get record", response)
......@@ -338,6 +338,7 @@ services:
- "443:3000"
volumes:
- ${SHARED_FILESYSTEM}:/tmp
- /logos:/app/static/logos
depends_on:
identifier-service:
condition: service_healthy
......
......@@ -336,6 +336,7 @@ services:
- "3000:3000"
volumes:
- ${SHARED_FILESYSTEM}:/tmp
- /logos:/app/static/logos
depends_on:
identifier-service:
condition: service_healthy
......@@ -345,5 +346,6 @@ services:
BROKER_USERNAME: ${BROKER_USERNAME}
BROKER_PASSWORD: ${BROKER_PASSWORD}
SHARED_FILESYSTEM: ${SHARED_FILESYSTEM}
LOGO: ${LOGO}
logging:
driver: json-file
......@@ -308,7 +308,7 @@ services:
- "3000:3000"
volumes:
- /tmp:/tmp
- "./fda-ui/.prod:/certs"
- /logos:/app/static/logos
depends_on:
fda-identifier-service:
condition: service_healthy
......
......@@ -36,6 +36,7 @@ ENV BROKER_USERNAME=fda
ENV BROKER_PASSWORD=fda
ENV SANDBOX=false
ENV SHARED_FILESYSTEM=/tmp
ENV LOGO=/logos.png
ENV VERSION=1.1
ENTRYPOINT ["yarn", "start"]
......@@ -37,11 +37,7 @@
<v-img
contain
class="tu-logo"
src="/tu_logo_512.png" />
<v-img
contain
class="univie-logo"
src="/univie_logo_512.png" />
:src="logo" />
</div>
</v-navigation-drawer>
<v-app-bar fixed app>
......@@ -191,6 +187,14 @@ export default {
}
console.debug('env sandbox found', this.$config.sandbox)
return this.$config.sandbox
},
logo () {
if (this.$config.logo === undefined) {
console.debug('env logo not found, default to /logos.png')
return '/logos.png'
}
console.debug('env logo found', this.$config.logo)
return this.$config.logo
}
},
watch: {
......
......@@ -85,7 +85,8 @@ export default {
brokerPassword: process.env.BROKER_PASSWORD || 'fda',
sandbox: process.env.SANDBOX || false,
sharedFilesystem: process.env.SHARED_FILESYSTEM || '/tmp',
version: process.env.VERSION || 'latest'
version: process.env.VERSION || 'latest',
logo: process.env.LOGO || '/logos.png'
},
proxy: {
......
fda-ui/static/logos.png

45.8 KiB

fda-ui/static/tu_logo.png

64.9 KiB

fda-ui/static/tu_logo_512.png

15.7 KiB

fda-ui/static/univie_logo.png

50.7 KiB

fda-ui/static/univie_logo_512.png

30.1 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment