Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
4rthem committed Oct 10, 2023
1 parent 6452050 commit f4c6584
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 6 deletions.
1 change: 1 addition & 0 deletions bin/dev/deploy-minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ case $1 in
(cd "${CHART_DIR}" && helm dependency update)
fi
kubectl create ns $NS || true
kubectl -n $NS delete jobs --all
helm uninstall ${RELEASE_NAME} --namespace $NS || true;
kubectl -n $NS delete pvc elasticsearch-databox-master-elasticsearch-databox-master-0 || true
while [ $(kubectl -n $NS get pvc | wc -l) -gt 0 ] || [ $(kubectl -n $NS get pods | wc -l) -gt 0 ]
Expand Down
5 changes: 5 additions & 0 deletions databox/client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9119,6 +9119,11 @@ react-i18next@^11.16.9:
html-escaper "^2.0.2"
html-parse-stringify "^3.0.1"

react-icons@^4.8.0:
version "4.11.0"
resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.11.0.tgz#4b0e31c9bfc919608095cc429c4f1846f4d66c65"
integrity sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==

react-is@^16.13.1, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
Expand Down
7 changes: 7 additions & 0 deletions expose/client/src/component/ConfigWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import FullPageLoader from "./FullPageLoader";
export default function ConfigWrapper() {
const [loaded, setLoaded] = useState(false);

React.useEffect(() => {
const _mtm = window._mtm = window._mtm || [];
_mtm.push({'mtm.startTime': (new Date().getTime()), 'event': 'mtm.Start'});
const d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.async=true; g.src='{YOUR_MATOMO_TAG_MANAGER_CONTAINER_URL}'; s.parentNode.insertBefore(g,s);
}, [])

if (!loaded) {
apiClient
.get(`${config.getApiBaseUrl()}/config`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default class AssetProxy extends PureComponent {
webVTTLink={asset.webVTTLink}
fluid={fluid}
mimeType={type}
assetId={asset.assetId}
/>
case type.startsWith('image/'):
if (this.props.magnifier) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {getPosterPlaceholder} from "./placeholders";

type Props = {
title?: string,
assetId: string | undefined,
description?: string,
url: string,
posterUrl?: string,
Expand All @@ -20,6 +21,7 @@ export default React.forwardRef(function VideoPlayer({
webVTTLink,
fluid,
mimeType,
assetId,
}: Props, ref) {
const player = React.useRef<VideoJsPlayer>();

Expand Down Expand Up @@ -64,6 +66,8 @@ export default React.forwardRef(function VideoPlayer({
<video
ref={setRef}
className="video-js vjs-big-play-centered"
data-matomo-resource={assetId}
data-matomo-title={title}
>
{webVTTLink && <track
kind="captions"
Expand Down
6 changes: 3 additions & 3 deletions infra/helm/ps/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: elasticsearch
repository: https://helm.elastic.co
version: 7.10.1
digest: sha256:1879e5719704ae1fd6e451ccaf696690356021b1640cb21073051fcc894993fb
generated: "2022-10-19T17:12:20.370969568+02:00"
version: 7.17.3
digest: sha256:5603ff8185f4a14b9a1bf190e3839e6f1875aa99c4e199bbb64ee183df072708
generated: "2023-09-12T11:50:49.87771556+02:00"
2 changes: 1 addition & 1 deletion infra/helm/ps/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ appVersion: 1.17.0

dependencies:
- name: elasticsearch
version: "7.10.1"
version: "7.17.3"
repository: "https://helm.elastic.co"
condition: elasticsearch.enabled
3 changes: 3 additions & 0 deletions infra/helm/ps/templates/config/php-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ metadata:
name: php-config
data:
APP_ENV: prod
{{- if not .Values.security.verifySsl }}
VERIFY_SSL: "false"
{{- end }}
TRUSTED_PROXIES: 127.0.0.1,REMOTE_ADDR
{{- if .Values.newrelic.enabled }}
NEWRELIC_ENABLED: "1"
Expand Down
4 changes: 2 additions & 2 deletions infra/helm/ps/templates/databox/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ kind: Secret
metadata:
name: databox-secrets
stringData:
SECRETS_PUBLIC_KEY: {{ required "Missing .databox.app.secrets.publicKey value" .secrets.publicKey | quote }}
SECRETS_SECRET_KEY: {{ required "Missing .databox.app.secrets.secretKey value" .secrets.secretKey | quote }}
SECRETS_PUBLIC_KEY: {{ required "Missing .databox.app.secrets.publicKey value" .publicKey | quote }}
SECRETS_SECRET_KEY: {{ required "Missing .databox.app.secrets.secretKey value" .secretKey | quote }}
---
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions infra/helm/ps/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ image:
password:
email:

security:
verifySsl: true

auth:
enabled: true
autoConnectIdP:
Expand Down
7 changes: 7 additions & 0 deletions infra/helm/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ auth:
hostname: "api-auth.phrasea.minikube"
baseUrl: "https://api-auth.phrasea.minikube"

security:
verifySsl: false

databox:
api:
hostname: "api-databox.phrasea.minikube"
baseUrl: "https://api-databox.phrasea.minikube"
app:
secrets:
publicKey: 'j0J1OtLTd78OVhVMEQwd+98EusYkAdN8VNhHIENLlWI='
secretKey: 'Y6cqN347d5ShtLCmR3DGE+A2Z+SBw4S1wOTTFrISF3M='
client:
hostname: "databox.phrasea.minikube"
baseUrl: "https://databox.phrasea.minikube"
Expand Down
5 changes: 5 additions & 0 deletions uploader/client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7291,6 +7291,11 @@ [email protected]:
import-local "^3.0.2"
jest-cli "^26.6.0"

js-cookie@^3.0.5:
version "3.0.5"
resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-3.0.5.tgz#0b7e2fd0c01552c58ba86e0841f94dc2557dcdbc"
integrity sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==

"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
Expand Down

0 comments on commit f4c6584

Please sign in to comment.