Skip to content

Commit 4e468ce

Browse files
author
secus
committed
Update favicon and add new site logo.- New favicon and logo added
1 parent c43f791 commit 4e468ce

8 files changed

Lines changed: 102 additions & 20 deletions

File tree

apps/container-engine-frontend/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head>
55
<meta charset="UTF-8" />
6-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<link rel="icon" type="image/svg+xml" href="/open-container-engine-logo.ico" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<link href="/src/index.css" rel="stylesheet">
99
<title>Open container engine</title>
Binary file not shown.
326 KB
Loading

apps/container-engine-frontend/public/vite.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

apps/container-engine-frontend/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import axios from 'axios';
22

33
// Base API configuration
4-
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || window.location.origin;
4+
const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || "http://localhost:3000";
55

66
// Create axios instance with default config
77
const api = axios.create({

apps/container-engine-frontend/src/pages/DeploymentsPage.tsx

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,44 @@ const DeploymentsPage: React.FC = () => {
149149

150150
{!loading && deployments.length === 0 && !error && (
151151
<div className="bg-white shadow-lg rounded-lg p-6 sm:p-8 text-center">
152-
<p className="text-lg sm:text-xl text-gray-700 mb-4">No deployments found.</p>
152+
<div className="mx-auto flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 mb-4">
153+
<svg className="h-6 w-6 text-indigo-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
154+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 11H5m14-4H3m16 8H7m12 4H9" />
155+
</svg>
156+
</div>
157+
<h3 className="text-lg sm:text-xl font-semibold text-gray-900 mb-2">No deployments found</h3>
153158
<p className="text-sm sm:text-base text-gray-500 mb-6">It looks like you haven't deployed anything yet. Get started by creating your first deployment!</p>
154-
<Link
155-
to="/deployments/new"
156-
className="inline-flex items-center px-4 sm:px-5 py-2 border border-transparent text-sm sm:text-base font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
157-
>
158-
Create New Deployment
159-
</Link>
159+
160+
<div className="flex flex-col sm:flex-row gap-3 justify-center items-center">
161+
<Link
162+
to="/deployments/new?try=helloworld"
163+
className="inline-flex items-center px-4 sm:px-6 py-2 sm:py-3 border border-transparent text-sm sm:text-base font-medium rounded-md shadow-sm text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500 transition duration-200"
164+
>
165+
<svg className="-ml-1 mr-2 h-4 w-4 sm:h-5 sm:w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
166+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 10V3L4 14h7v7l9-11h-7z" />
167+
</svg>
168+
Try Demo Deployment
169+
</Link>
170+
171+
<span className="text-gray-400 hidden sm:inline">or</span>
172+
<span className="text-gray-400 sm:hidden">or</span>
173+
174+
<Link
175+
to="/deployments/new"
176+
className="inline-flex items-center px-4 sm:px-6 py-2 sm:py-3 border border-gray-300 text-sm sm:text-base font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition duration-200"
177+
>
178+
<svg className="-ml-1 mr-2 h-4 w-4 sm:h-5 sm:w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor">
179+
<path fillRule="evenodd" d="M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z" clipRule="evenodd" />
180+
</svg>
181+
Create Custom Deployment
182+
</Link>
183+
</div>
184+
185+
<div className="mt-6 p-4 bg-blue-50 rounded-lg">
186+
<p className="text-xs sm:text-sm text-blue-700">
187+
💡 <strong>Pro tip:</strong> The Demo Deployment will automatically create a sample deployment with a simple web server that you can access immediately!
188+
</p>
189+
</div>
160190
</div>
161191
)}
162192

apps/container-engine-frontend/src/pages/LandingPage.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const LandingPage: React.FC = () => {
2121
<nav className="container mx-auto px-4 sm:px-6 py-4">
2222
<div className="flex justify-between items-center">
2323
<div className="flex items-center space-x-3">
24-
<div className="w-8 h-8 sm:w-10 sm:h-10 bg-linear-to-r from-blue-600 to-indigo-600 rounded-lg flex items-center justify-center">
25-
<span className="text-white font-bold text-sm sm:text-lg">CE</span>
24+
<div className="w-8 h-8 sm:w-10 sm:h-10 rounded-lg flex items-center justify-center">
25+
<img src="/open-container-engine-logo.png" alt="Open Container Engine" className="w-full h-full object-contain rounded-md" />
2626
</div>
2727
<span className="text-lg sm:text-2xl font-bold bg-linear-to-r from-blue-600 to-indigo-600 bg-clip-text text-transparent">
2828
<span className="hidden sm:inline">Container Engine</span>
@@ -511,8 +511,8 @@ const LandingPage: React.FC = () => {
511511
<div className="grid md:grid-cols-4 gap-8 mb-8">
512512
<div>
513513
<div className="flex items-center space-x-3 mb-4">
514-
<div className="w-8 h-8 bg-linear-to-r from-blue-600 to-indigo-600 rounded-lg flex items-center justify-center">
515-
<span className="text-white font-bold">CE</span>
514+
<div className="w-8 h-8 rounded-lg flex items-center justify-center">
515+
<img src="/open-container-engine-logo.png" alt="Open Container Engine" className="w-full h-full object-contain" />
516516
</div>
517517
<span className="text-xl font-bold text-white">Container Engine</span>
518518
</div>

apps/container-engine-frontend/src/pages/NewDeploymentPage.tsx

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// src/pages/NewDeploymentPage.tsx
2-
import React, { useState } from 'react';
2+
import React, { useState, useEffect } from 'react';
33
import api from '../api/api';
44
import DashboardLayout from '../components/Layout/DashboardLayout';
5-
import { useNavigate } from 'react-router-dom';
5+
import { useNavigate, useSearchParams } from 'react-router-dom';
66
import {
77
RocketLaunchIcon,
88
CubeIcon,
@@ -19,6 +19,7 @@ import {
1919

2020
const NewDeploymentPage: React.FC = () => {
2121
const navigate = useNavigate();
22+
const [searchParams] = useSearchParams();
2223
const [app_name, setapp_name] = useState('');
2324
const [image, setImage] = useState('');
2425
const [port, setPort] = useState(80);
@@ -27,6 +28,20 @@ const NewDeploymentPage: React.FC = () => {
2728
const [loading, setLoading] = useState(false);
2829
const [error, setError] = useState<string | null>(null);
2930
const [success, setSuccess] = useState<string | null>(null);
31+
const [isHelloWorldDemo, setIsHelloWorldDemo] = useState(false);
32+
33+
// Check for Demo Deployment parameter and auto-fill form
34+
useEffect(() => {
35+
const tryParam = searchParams.get('try');
36+
if (tryParam === 'helloworld') {
37+
setIsHelloWorldDemo(true);
38+
setapp_name('demo-deployment');
39+
setImage('nginxdemos/hello:latest');
40+
setPort(80);
41+
setReplicas(1);
42+
setEnvVars([{ key: '', value: '' }]);
43+
}
44+
}, [searchParams]);
3045

3146
const handleEnvVarChange = (index: number, field: 'key' | 'value', value: string) => {
3247
const newEnvVars = [...envVars];
@@ -69,20 +84,32 @@ const NewDeploymentPage: React.FC = () => {
6984

7085
// Verify we have the deployment ID
7186
if (response.data && response.data.id) {
72-
setSuccess(`Deployment '${response.data.app_name}' created successfully! Waiting for container to start...`);
87+
if (isHelloWorldDemo) {
88+
setSuccess(`🎉 Demo deployment created successfully! Your demo app is starting up...`);
89+
} else {
90+
setSuccess(`Deployment '${response.data.app_name}' created successfully! Waiting for container to start...`);
91+
}
7392

7493
// Wait longer and check deployment status more thoroughly
7594
await new Promise(resolve => setTimeout(resolve, 3000));
7695

7796
// Check if deployment and pods are ready before redirecting
7897
const deploymentReady = await checkDeploymentReady(response.data.id);
7998
if (deploymentReady) {
80-
setSuccess(`Deployment '${response.data.app_name}' is ready! Redirecting...`);
99+
if (isHelloWorldDemo) {
100+
setSuccess(`🚀 Demo deployment is ready! Redirecting to your new app...`);
101+
} else {
102+
setSuccess(`Deployment '${response.data.app_name}' is ready! Redirecting...`);
103+
}
81104
await new Promise(resolve => setTimeout(resolve, 1000));
82105
// Navigate to deployment detail page
83106
navigate(`/deployments/${response.data.id}`);
84107
} else {
85-
setSuccess(`Deployment '${response.data.app_name}' created successfully! Container may still be starting...`);
108+
if (isHelloWorldDemo) {
109+
setSuccess(`Demo deployment created successfully! The container may still be starting...`);
110+
} else {
111+
setSuccess(`Deployment '${response.data.app_name}' created successfully! Container may still be starting...`);
112+
}
86113
await new Promise(resolve => setTimeout(resolve, 2000));
87114
// Navigate anyway, LogsPage will handle the loading state
88115
navigate(`/deployments/${response.data.id}`);
@@ -183,6 +210,23 @@ const NewDeploymentPage: React.FC = () => {
183210
<div className="p-8">
184211
{/* Header Section */}
185212
<div className="mb-8">
213+
{/* Demo Deployment Banner */}
214+
{isHelloWorldDemo && (
215+
<div className="mb-6 bg-gradient-to-r from-green-500 to-blue-500 rounded-2xl p-6 text-white shadow-xl">
216+
<div className="flex items-center">
217+
<div className="w-12 h-12 bg-white bg-opacity-20 rounded-xl flex items-center justify-center mr-4">
218+
<RocketLaunchIcon className="h-6 w-6 text-white" />
219+
</div>
220+
<div>
221+
<h3 className="text-xl font-bold mb-1">🎉 Demo Deployment Mode</h3>
222+
<p className="text-green-100">
223+
We've pre-filled the form with a sample demo application. Click "Deploy Application" to see it in action!
224+
</p>
225+
</div>
226+
</div>
227+
</div>
228+
)}
229+
186230
<div className="flex items-center justify-between">
187231
<div className="flex items-center space-x-4">
188232
<button
@@ -270,7 +314,16 @@ const NewDeploymentPage: React.FC = () => {
270314
/>
271315
<CubeIcon className="absolute left-4 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400" />
272316
</div>
273-
<p className="text-xs text-gray-500">Docker image from Docker Hub or your private registry</p>
317+
{isHelloWorldDemo ? (
318+
<div className="p-3 bg-green-50 border border-green-200 rounded-lg">
319+
<p className="text-sm text-green-700 flex items-center">
320+
<CheckCircleIcon className="h-4 w-4 mr-2 text-green-500" />
321+
<strong>Demo Image:</strong> This is a lightweight NGINX container that displays a simple demo page with system information.
322+
</p>
323+
</div>
324+
) : (
325+
<p className="text-xs text-gray-500">Docker image from Docker Hub or your private registry</p>
326+
)}
274327
</div>
275328
</div>
276329

0 commit comments

Comments
 (0)