{!env.isOnline &&
-
+
}
{renderedServices.length === 10 &&
Displaying at most 10 application configurations per environment.
@@ -55,7 +55,7 @@ function renderServices(
gimletClient,
store,
deploymentFromParams,
- scmUrl,
+ settings,
alerts,
appFilter) {
let services = [];
@@ -105,7 +105,7 @@ function renderServices(
gimletClient={gimletClient}
store={store}
deploymentFromParams={deploymentFromParams}
- scmUrl={scmUrl}
+ scmUrl={settings.scmUrl}
serviceAlerts={alerts[deployment]}
/>
@@ -142,7 +142,7 @@ function renderServices(
gimletClient={gimletClient}
store={store}
deploymentFromParams={deploymentFromParams}
- scmUrl={scmUrl}
+ scmUrl={settings.scmUrl}
/>
)
}
@@ -158,24 +158,74 @@ function fileName(fileInfos, appName) {
}
function ConnectEnvCard(props) {
- const {envName} = props
+ let { env, trial } = props
const navigate = useNavigate()
+ let expired = false
+ let stuck = false
+ let startingUp = false
+ if (trial) {
+ const expiringAt = new Date(env.expiry * 1000);
+ expired = expiringAt < new Date()
+ const age = new Date() - expiringAt
+ stuck = age > 5*60*1000
+ startingUp = !expired && !stuck
+ }
+
+ const color = startingUp ? 'blue' : 'red'
+
return (
-
+
-
+
-
Environment disconnected
-
- This environment is disconnected.
-
+
Environment disconnected
+
+ {startingUp &&
+ <>
+ This environment is still initializing and should be up in a couple of minutes.
+
+
+ >
+ }
+ {expired &&
+ <>
+ This environment is disconnected.
+ Your trial expired, so the underlying Kubernetes cluster is stopped.
+
+ >
+ }
+ {!expired && stuck &&
+ <>
+ This environment is disconnected as
+ your trial Kubernetes cluster is stuck - please contact support.
+ >
+ }
+ {!trial &&
+ <>
+ This environment is disconnected.
+
+ >
+ }
diff --git a/web/src/components/nav/nav.jsx b/web/src/components/nav/nav.jsx
index 318c10134..062b54cb3 100644
--- a/web/src/components/nav/nav.jsx
+++ b/web/src/components/nav/nav.jsx
@@ -7,6 +7,7 @@ import logo from "./logo.svg";
import DefaultProfilePicture from '../../../src/views/profile/defaultProfilePicture.png';
import { ThemeSelector } from '../../views/repositories/themeSelector';
import { useMatch, useLocation, useParams, useNavigate } from 'react-router-dom'
+import { format, formatDistance } from "date-fns";
const navigation = [
{name: 'Repositories', href: '/repositories'},
@@ -411,24 +412,34 @@ function Connecting(props) {
const env = envs[0]
const isOnline = Object.keys(connectedAgents).includes(env.name)
+ const expiringAt = new Date(env.expiry * 1000);
+ const expired = expiringAt < new Date()
+ const exactDate = format(env.expiry * 1000, 'h:mm:ss a, MMMM do yyyy')
+ const dateLabel = formatDistance(env.expiry * 1000, new Date());
+
if (isOnline) {
- return null
+ return (
+