Skip to content

Commit

Permalink
Merge pull request #106 from uselagoon/dependency_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood authored Mar 1, 2023
2 parents 4874b72 + 9626b3c commit e2a37f3
Show file tree
Hide file tree
Showing 25 changed files with 1,604 additions and 2,481 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ services:

networks:
amazeeio-network:
external: true
external: true
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@apollo/react-hooks": "^3.1.5",
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"@zeit/next-css": "^1.0.1",
"apollo-cache-inmemory": "^1.3.9",
"apollo-client": "^2.4.5",
"apollo-link": "^1.2.3",
Expand All @@ -28,21 +27,23 @@
"date-fns": "^2.9.0",
"dotenv-extended": "^2.2.0",
"express": "^4.18.1",
"git-url-parse": "11.1.2",
"git-up": "^7.0.0",
"git-url-parse": "13.1.0",
"graphql": "^14.5.8",
"graphql-tag": "^2.10.0",
"isomorphic-unfetch": "^2.1.1",
"moment": "^2.22.2",
"moment-duration-format": "^2.2.2",
"next": "^8.0.3",
"next": "12",
"object-hash": "^3.0.0",
"parse-url": "^8.1.0",
"postcss-nested": "^3.0.0",
"ramda": "^0.25.0",
"react": "^16.8.4",
"react": "18.2.0",
"react-apollo": "^2.1.11",
"react-beautiful-dnd": "^13.0.0",
"react-copy-to-clipboard": "^5.0.1",
"react-dom": "^16.8.4",
"react-dom": "18.2.0",
"react-hexgrid": "^1.0.3",
"react-highlight-words": "^0.14.0",
"react-markdown": "^6.0.0",
Expand All @@ -55,7 +56,7 @@
"styled-jsx-plugin-postcss": "^0.1.3",
"subscriptions-transport-ws": "^0.11.0",
"svg-inline-loader": "^0.8.0",
"webpack": "^4.41.2"
"webpack": "5.75.0"
},
"devDependencies": {
"@babel/core": "^7.7.4",
Expand Down
Binary file added src/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/Honeycomb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ProblemsByProject from 'components/ProblemsByProject';
import { LoadingPageNoHeader } from 'pages/_loading';
import { ErrorNoHeader } from 'pages/_error';
import { bp, color } from 'lib/variables';
import './styling.css';
// import './styling.css';

const config = {
"width": 1200,
Expand Down
60 changes: 0 additions & 60 deletions src/components/Honeycomb/styling.css

This file was deleted.

2 changes: 2 additions & 0 deletions src/components/ProjectDetailsSidebar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const Project = ({ project }) => {
const [copied, setCopied] = useState(false);
const gitUrlParsed = giturlparse(project.gitUrl);
const gitLink = `${gitUrlParsed.resource}/${gitUrlParsed.full_name}`;


const environmentCount = R.countBy(R.prop('environmentType'))(
project.environments
);
Expand Down
31 changes: 16 additions & 15 deletions src/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@ const webpackShared = require('./webpack.shared-config');
require('dotenv-extended').load();
const fs = require('fs');

const withCSS = require('@zeit/next-css');


const taskBlocklist =
(process.env.LAGOON_UI_TASK_BLOCKLIST &&
process.env.LAGOON_UI_TASK_BLOCKLIST.split(',')) ||
[];

// Here we load the plugin registry from plugins.json
let pluginRegistry = {};
if(fs.existsSync("plugins.json")) {
if (fs.existsSync("plugins.json")) {
const pluginString = fs.readFileSync("plugins.json");
pluginRegistry = JSON.parse(pluginString);
}

module.exports = withCSS({
module.exports = {
publicRuntimeConfig: {
GRAPHQL_API: process.env.GRAPHQL_API,
GRAPHQL_API_TOKEN: process.env.GRAPHQL_API_TOKEN,
KEYCLOAK_API: process.env.KEYCLOAK_API,
GRAPHQL_API:process.env.GRAPHQL_API,
KEYCLOAK_API:process.env.KEYCLOAK_API,
LAGOON_UI_ICON: process.env.LAGOON_UI_ICON,
LAGOON_UI_TASK_BLOCKLIST: taskBlocklist,
LAGOON_VERSION: process.env.LAGOON_VERSION,
Expand All @@ -36,25 +35,27 @@ module.exports = withCSS({
distDir: '../build',
webpack(config, options) {
// Add aliases from shared config file.
Object.keys(webpackShared.alias).forEach(name => config.resolve.alias[name] = webpackShared.alias[name]);

if (webpackShared && webpackShared.alias) {
Object.keys(webpackShared.alias).forEach(name => config.resolve.alias[name] = webpackShared.alias[name]);
}

const originalEntry = config.entry;
config.entry = async () => {
const entries = await originalEntry();

if (
entries['main.js'] &&
!entries['main.js'].includes('./lib/polyfills.js')
) {
entries['main.js'].unshift('./lib/polyfills.js');
}

return entries;
};

// Debug config.
// console.dir(config, { depth: null });

return config;
}
});
};
Binary file added src/pages/.DS_Store
Binary file not shown.
91 changes: 49 additions & 42 deletions src/pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,54 +1,61 @@
import 'isomorphic-unfetch';
import App, { Container, createUrl } from 'next/app';
import React from 'react';
import Head from 'next/head';
import getConfig from 'next/config';
import Typekit from 'react-typekit';
import Favicon from 'components/Favicon';
import Authenticator, { AuthContext } from 'lib/Authenticator';
import ApiConnection from 'lib/ApiConnection';
import "isomorphic-unfetch";
import { useRouter } from "next/router";
import React from "react";
import Head from "next/head";
import getConfig from "next/config";
import Typekit from "react-typekit";
import Favicon from "components/Favicon";
import Authenticator, { AuthContext } from "lib/Authenticator";
import ApiConnection from "lib/ApiConnection";
import Script from "next/script";
import App from "next/app";

const { serverRuntimeConfig, publicRuntimeConfig } = getConfig();

class MyApp extends App {
render() {
const { router, Component, pageProps, err } = this.props;
const url = createUrl(router);

// Catch runtime errors in production and skip authentication to avoid
// infinite auth > error > auth > error loops.
if (err) {
return (
<Container>
<Head>
<link rel="stylesheet" href="/static/normalize.css" />
<Typekit kitId="ggo2pml" />
</Head>
<Component {...pageProps} errorMessage={err.toString()} url={url} />
<Favicon />
</Container>
);
}

const LagoonApp = ({ Component, pageProps, err }) => {
const { pathname } = useRouter();
// Catch runtime errors in production and skip authentication to avoid
// infinite auth > error > auth > error loops.
if (err) {
return (
<Container>
<>
<Head>
<link rel="stylesheet" href="/static/normalize.css" />
<Typekit kitId="ggo2pml" />
<script
type="text/javascript"
src={`${publicRuntimeConfig.KEYCLOAK_API}/js/keycloak.js`}
/>
</Head>
<Authenticator>
<ApiConnection>
<Component {...pageProps} url={url} />
</ApiConnection>
</Authenticator>
<Component
{...pageProps}
errorMessage={err.toString()}
url={pathname}
/>
<Favicon />
</Container>
</>
);
}
}

export default MyApp;
return (
<>
<Script
src={`${publicRuntimeConfig.KEYCLOAK_API}/js/keycloak.js`}
strategy="beforeInteractive"
/>
<Head>
<link rel="stylesheet" href="/static/normalize.css" />
<Typekit kitId="ggo2pml" />
</Head>
<Authenticator>
<ApiConnection>
<Component {...pageProps} url={pathname} />
</ApiConnection>
</Authenticator>
<Favicon />
</>
);
};

LagoonApp.getInitialProps = async (appContext) => {
const appProps = await App.getInitialProps(appContext);
return { ...appProps };
};

export default LagoonApp;
2 changes: 1 addition & 1 deletion src/pages/_error.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import Head from 'next-server/head';
import Head from 'next/head'
import StatusLayout from 'layouts/StatusLayout';

const statusCodes = {
Expand Down
9 changes: 6 additions & 3 deletions src/pages/projects.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { bp } from 'lib/variables';
/**
* Displays the projects page.
*/
const ProjectsPage = () => (
const ProjectsPage = () => {

return (
<>
<Head>
<title>Projects</title>
Expand Down Expand Up @@ -54,7 +56,8 @@ const ProjectsPage = () => (
</MainLayout>
))}
</Query>
</>
);
</>)
}
;

export default ProjectsPage;
44 changes: 0 additions & 44 deletions src/pages/stories/_error.stories.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/pages/stories/_loading.stories.js

This file was deleted.

Loading

0 comments on commit e2a37f3

Please sign in to comment.