Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 3.1.5 main #98

Merged
merged 24 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b0b1841
DIGG-90: Security updates npm
Kopin1 Sep 20, 2023
0cbce6e
DIGG-90: Updating to node 18
Kopin1 Sep 22, 2023
98fe6d2
DIGG-90-main: Update docker to an image with node 18
dajjen Sep 27, 2023
b8dd327
DIGG-90-main: Update readme with new nodeversion
dajjen Sep 27, 2023
baf121d
Fixed merge conflict when merging DIGG-90-main into stage-main
dajjen Sep 27, 2023
ead7d12
Updating react types and replacing show-more-text packadge with older…
Kopin1 Sep 27, 2023
4636585
Merge pull request #46 from diggsweden/DIGG-90-main
dajjen Sep 27, 2023
311a922
DIGG-70: Update env.local with settings to connect to a local apollo …
MickeA Sep 29, 2023
23b6e47
Merge pull request #52 from diggsweden/DIGG-70-main
dajjen Oct 11, 2023
04afe14
DIGG-90-main security update production frontend
Nov 27, 2023
925eb48
DIGG-107-main update sandbox.editera url in settings.sandbox
Nov 28, 2023
8374a70
Merge branch 'stage-main' into DIGG-107-main
AlessandroGasperini Nov 28, 2023
3f64c0d
DIGG-107-main readme.md fix
Dec 1, 2023
322b64a
DIGG-107-main readme.md fix
Dec 1, 2023
1a6d15e
DIGG-107-main readme.md fix
Dec 1, 2023
3fe5014
Merge pull request #64 from diggsweden/DIGG-107-main
MickeA Dec 4, 2023
24fd358
Merge pull request #62 from diggsweden/DIGG-90-main
MickeA Dec 4, 2023
2d31652
DIGG-126-main get correct description in datasets
Dec 4, 2023
86f2004
Merge pull request #79 from diggsweden/DIGG-126-main
AlessandroGasperini Dec 5, 2023
1285642
DIGG-90: Updatig types and downgrading types-ramda
Dec 8, 2023
58cfacf
DIGG-90: Updatig node version
Dec 11, 2023
b6123bb
Merge pull request #86 from diggsweden/DIGG-90-main
dajjen Dec 11, 2023
5f1b023
DIGG-126: dataset description fix
Dec 18, 2023
1ce9ab7
Merge pull request #96 from diggsweden/DIGG-126-main
MickeA Dec 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ HTTP_PROXY=http://proxy.digg.se:8080
HTTP_PROXY_USER=secretuser
HTTP_PROXY_PASS=secretpass

# Connect to a local backend.
## Connect to a local strapi backend.
#APOLLO_URL=http://localhost:1301
#REACT_APP_APOLLO_URL=http://localhost:1301
#IMAGE_DOMAIN=localhost
#REACT_APP_MEDIA_BASE_URL=http://localhost:1337

# Connect to production backend. (dataportal.se).
## Connect to a local apollo-gateway proxy server.
#APOLLO_URL=http://localhost:1400
#REACT_APP_APOLLO_URL=http://localhost:1400
#IMAGE_DOMAIN=localhost
#REACT_APP_MEDIA_BASE_URL=http://localhost:1337

## Connect to production gateway.
APOLLO_URL=https://graphql.digg.se/
REACT_APP_APOLLO_URL=https://graphql.digg.se/
IMAGE_DOMAIN=graphql.digg.se
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ yarn-error.log*

# misc
.DS_Store
.idea/
*.pem
.idea/

Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM node:16-alpine as base
FROM node:18-alpine as base
WORKDIR /base
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

FROM node:16-alpine as builder
FROM node:18-alpine as builder
WORKDIR /build
COPY . .
COPY --from=base /base ./
RUN yarn build

FROM node:16-alpine as production
FROM node:18-alpine as production
ENV NODE_ENV=production

WORKDIR /app
Expand All @@ -36,4 +36,4 @@ RUN chgrp -R 0 /app && \
chmod -R g=u /app
USER 1001

CMD ["yarn","start"]
CMD ["yarn","start"]
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Swedish data portal is tightly integrated with the EntryScape product suite
EntryScape Registry is a solution for managing a registry of data catalogs and related information

## Requirements
![node-current](https://img.shields.io/badge/node-16.13.2-green)
![node-current](https://img.shields.io/badge/node-18.18.0-green)
![npm-current](https://img.shields.io/badge/npm-8.1.2-green)
![nextjs-current](https://img.shields.io/badge/nextjs-12.1.6-green)

Expand All @@ -23,7 +23,7 @@ Start by creating an ```.env.local``` file. Use the ```.env.local.example``` as
### Run application in development mode
Starts the application in development mode with hot-code reloading, error reporting, and more. See [Nextjs Development](https://nextjs.org/docs/app/api-reference/next-cli#development) for more information.
Run:
```sh
```sh
yarn
yarn dev
```
Expand All @@ -33,7 +33,7 @@ Visit [http://localhost:3000](http://localhost:3000) in the browser.
Builds the application for production usage. See [Nextjs production build](https://nextjs.org/docs/app/api-reference/next-cli#build) for more info.
And Start the Next.js production server. See [Nextjs start production](https://nextjs.org/docs/app/api-reference/next-cli#production) for more info.

Use real data from dataportalen.se by using the variables under "Connect to production backend. (dataportal.se)." in env.local.example file.
Use real data from dataportalen.se by using the variables under "Connect to production backend. (dataportal.se)." in env.local.example file.
Run:
```sh
yarn
Expand All @@ -46,7 +46,17 @@ Visit [http://localhost:3000](http://localhost:3000) in the browser.
### Run application with Docker

```sh
#build image
yarn build
```

Detta kommer generera applikationen som statiska filer under .next-mappen.

## Docker
Docker version running is [node:18-alpine](https://hub.docker.com/layers/library/node/18-alpine/images/sha256-28630a8b97ae8336d77b6dae5705bea816bdc1d6383901bb4495c521929a4091?context=explore)


```sh
#bygg image
docker build . -t nextjs-dataportal

#create container
Expand Down
8 changes: 6 additions & 2 deletions components/EntrystoreProvider/EntrystoreProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ export const EntrystoreProvider: React.FC<EntrystoreProviderProps> = ({
es
)
);
valuePromises.push(getLocalizedValue(graph, 'dcterms:description', nextLang, es));
valuePromises.push(
getLocalizedValue(graph, 'dcterms:description', nextLang, es, { resourceURI })
);
if (fetchMore) {
valuePromises.push(getLocalizedValue(graph, 'dcterms:publisher', nextLang, es));
valuePromises.push(
Expand Down Expand Up @@ -269,7 +271,9 @@ export const EntrystoreProvider: React.FC<EntrystoreProviderProps> = ({
es
)
);
valuePromises.push(getLocalizedValue(graph, 'dcterms:description', nextLang, es));
valuePromises.push(
getLocalizedValue(graph, 'dcterms:description', nextLang, es, { resourceURI })
);
if (fetchMore) {
valuePromises.push(getLocalizedValue(graph, 'dcterms:publisher', nextLang, es));
valuePromises.push(
Expand Down
9 changes: 4 additions & 5 deletions components/pages/DataSetPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useContext, useEffect } from 'react';
import { EntrystoreContext } from '..';
import ShowMoreText from 'react-show-more-text';
import ShowMore from 'react-show-more';
import { useRouter } from 'next/router';
import useTranslation from 'next-translate/useTranslation';
import { SettingsContext } from '../SettingsProvider';
Expand Down Expand Up @@ -404,17 +404,16 @@ export const DataSetPage: React.FC = () => {
</div>

{/* Description */}
<div className="description">
<ShowMoreText
<div className="description text-md">
<ShowMore
lines={8}
more={t('pages|datasetpage$view_more')}
less={t('pages|datasetpage$view_less')}
className="text-md"
anchorClass="text-md view-more-text-link"
expanded={false}
>
<span className="text-md">{entry.description}</span>
</ShowMoreText>
</ShowMore>
</div>

{/* Left column */}
Expand Down
43 changes: 21 additions & 22 deletions env/Settings.Sandbox.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
import { generateRandomKey } from "../utilities";
import { EnvSettings } from "./EnvSettings";
import { generateRandomKey } from '../utilities';
import { EnvSettings } from './EnvSettings';

export class Settings_Sandbox extends EnvSettings {
ENTRYSCAPE_DATASETS_PATH="sandbox.admin.dataportal.se"
ENTRYSCAPE_SPECS_PATH="editera.dataportal.se"
ENTRYSCAPE_TERMS_PATH="editera.dataportal.se"
ENTRYSCAPE_ORG_STATS_URL="https://sandbox.admin.dataportal.se/charts/orgData.json"
ENTRYSCAPE_THEME_STATS_URL="https://sandbox.admin.dataportal.se/charts/themeData.json"
ENTRYSCAPE_THEME_STATS_URL_EN="https://sandbox.admin.dataportal.se/charts/themeData_en.json"
ENTRYSCAPE_DATASETS_PATH = 'sandbox.admin.dataportal.se';
ENTRYSCAPE_SPECS_PATH = 'sandbox.editera.dataportal.se';
ENTRYSCAPE_TERMS_PATH = 'sandbox.editera.dataportal.se';
ENTRYSCAPE_ORG_STATS_URL = 'https://sandbox.admin.dataportal.se/charts/orgData.json';
ENTRYSCAPE_THEME_STATS_URL = 'https://sandbox.admin.dataportal.se/charts/themeData.json';
ENTRYSCAPE_THEME_STATS_URL_EN = 'https://sandbox.admin.dataportal.se/charts/themeData_en.json';

ENTRYSCAPE_CONCEPT_STATS_URL="https://editera.dataportal.se/stats/entityData.json"
ENTRYSCAPE_HISTORY_STATS_URL="https://sandbox.admin.dataportal.se/stats/historyData.json"
ENTRYSCAPE_CONCEPT_STATS_URL = 'https://sandbox.editera.dataportal.se/stats/entityData.json';
ENTRYSCAPE_HISTORY_STATS_URL = 'https://sandbox.admin.dataportal.se/stats/historyData.json';

ENTRYSCAPE_BLOCKS_URL="https://static.cdn.entryscape.com/blocks/0.20/app.js"
ENTRYSCAPE_BLOCKS_URL = 'https://static.cdn.entryscape.com/blocks/0.20/app.js';

ENTRYSCAPE_OPENDATA_SV_URL="https://static.entryscape.com/blocks/0.20/ext/opendata-sv.js"
ENTRYSCAPE_OPENDATA_EN_URL="https://static.entryscape.com/blocks/0.20/ext/opendata-en.js"
ENTRYSCAPE_OPENDATA_SV_URL = 'https://static.entryscape.com/blocks/0.20/ext/opendata-sv.js';
ENTRYSCAPE_OPENDATA_EN_URL = 'https://static.entryscape.com/blocks/0.20/ext/opendata-en.js';

ENTRYSCAPE_SITEMAP_JSON_URL="https://sandbox.admin.dataportal.se/sitemap.json";
ENTRYSCAPE_SITEMAP_JSON_URL = 'https://sandbox.admin.dataportal.se/sitemap.json';

API_DETECTION_PATH = "https://sandbox.admin.dataportal.se/detectedapis.json";
API_DETECTION_PATH = 'https://sandbox.admin.dataportal.se/detectedapis.json';

CANONICAL_URL = "https://www-sandbox.dataportal.se";
CANONICAL_URL = 'https://www-sandbox.dataportal.se';

DCAT_BUNDLE_PATH = "/dcatse_bundle_2022-02-20.json";
DCAT_BUNDLE_PATH = '/dcatse_bundle_2022-02-20.json';

envName = 'sandbox';

nonce = generateRandomKey(256)
nonce = generateRandomKey(256);

public constructor()
{
super();
public constructor() {
super();
}
}
}
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"lucene": "^2.1.1",
"next": "12.3.0",
"next": "12.3.2",
"next-absolute-url": "^1.2.2",
"next-translate": "^1.5.0",
"node-fetch": "^3.2.10",
Expand All @@ -38,31 +38,30 @@
"react-children-utilities": "^2.8.0",
"react-dom": "^18.2.0",
"react-markdown": "^8.0.3",
"react-show-more-text": "^1.5.2",
"react-show-more": "^2.0.0",
"react-vis": "^1.11.7",
"rehype-raw": "^6.1.1",
"remark-gfm": "^3.0.1",
"sass": "^1.54.9",
"sharp": "^0.31.0",
"swagger-ui-react": "4.14.0",
"sharp": "^0.32.6",
"swagger-ui-react": "5.10.3",
"winston": "^3.8.2"
},
"devDependencies": {
"@emotion/babel-preset-css-prop": "^11.10.0",
"@types/graphql": "^14.5.0",
"@types/node": "18.7.16",
"@types/react": "18.0.18",
"@types/react-dom": "^18.0.6",
"@types/react": "18.2.42",
"@types/react-dom": "^18.2.17",
"@types/react-truncate": "^2.3.4",
"@types/react-vis": "^1.11.11",
"apollo": "^2.34.0",
"eslint": "8.23.0",
"eslint-config-next": "12.3.0",
"typescript": "4.8.3"
},
"engines": {
"npm": ">=8.1.2",
"node": ">=16.13.2"
"node": ">=18.18.0"
},
"resolutions": {
"**/**/@braintree/sanitize-url": ">=6.0.0",
Expand All @@ -74,6 +73,9 @@
"**/**/parse-url": ">=8.1.0",
"**/**/prismjs": "^1.28.0",
"**/**/shelljs": "^0.8.5",
"**/**/minimatch": ">=3.0.5"
"**/**/minimatch": ">=3.0.5",
"**/**/@babel/traverse": ">=7.23.2",
"**/**/sharp": ">=0.32.6",
"types-ramda": "0.29.4"
}
}
2 changes: 1 addition & 1 deletion types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ declare module 'react-truncate' {
export default content;
}

declare module 'react-show-more-text';
declare module 'react-show-more';

declare module 'fetch-enhanced';

Expand Down
Loading
Loading