Skip to content

Commit 2255378

Browse files
wuriyantowuriyanto
authored andcommitted
dashboard: add logo
1 parent ef84700 commit 2255378

4 files changed

Lines changed: 61 additions & 39 deletions

File tree

dashboard/ui/public/tob.png

2.75 KB
Loading

dashboard/ui/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const router = createBrowserRouter([
1414
errorElement: <ErrorPage/>
1515
},
1616
{
17-
path: "/dashboard",
17+
path: "/dashboard/*",
1818
element: <Dashboard/>,
1919
errorElement: <ErrorPage/>
2020
},

dashboard/ui/src/pages/dashboard.js

Lines changed: 55 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -139,43 +139,63 @@ function Dashboard() {
139139

140140
return (
141141
<div style={{ padding: '20px', fontFamily: 'Arial, sans-serif', backgroundColor: '#f4f4f4' }}>
142-
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
143-
<h1 style={{ textAlign: 'center', flex: 1 }}>{dashboardTitle}</h1>
144-
<button
145-
onClick={logout}
142+
<div style={{
143+
display: 'flex',
144+
justifyContent: 'space-between',
145+
alignItems: 'center',
146+
flexWrap: 'wrap',
147+
marginBottom: '20px'
148+
}}>
149+
<div style={{ flex: '1 1 auto', marginBottom: '10px' }}>
150+
<img
151+
src="tob.png"
152+
alt="Logo"
153+
style={{
154+
width: '100px',
155+
height: 'auto',
156+
}}
157+
/>
158+
</div>
159+
<div style={{ flex: '1 1 auto', textAlign: 'center' }}>
160+
<h1>{dashboardTitle}</h1>
161+
</div>
162+
<div style={{ flex: '1 1 auto', textAlign: 'right' }}>
163+
<button
164+
onClick={logout}
165+
style={{
166+
padding: '10px 20px',
167+
backgroundColor: '#007bff',
168+
color: '#fff',
169+
border: 'none',
170+
borderRadius: '5px',
171+
fontWeight: 'bold',
172+
cursor: 'pointer',
173+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
174+
}}
175+
>
176+
Logout
177+
</button>
178+
</div>
179+
</div>
180+
181+
<div style={{ display: 'flex', justifyContent: 'center', marginBottom: '20px' }}>
182+
<input
183+
type="text"
184+
placeholder="Search services..."
185+
value={searchTerm}
186+
onChange={handleSearchTermChange}
146187
style={{
147-
padding: '10px 20px',
148-
backgroundColor: '#007bff',
149-
color: '#fff',
150-
border: 'none',
151-
borderRadius: '5px',
152-
fontWeight: 'bold',
153-
cursor: 'pointer',
154-
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
188+
width: '80%',
189+
maxWidth: '600px',
190+
padding: '10px',
191+
borderRadius: '8px',
192+
border: '1px solid #ddd',
193+
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.1)',
194+
margin: '0 auto',
155195
}}
156-
>
157-
Logout
158-
</button>
196+
/>
159197
</div>
160198

161-
<input
162-
type="text"
163-
placeholder="Search services..."
164-
value={searchTerm}
165-
onChange={handleSearchTermChange}
166-
style={{
167-
width: '80%',
168-
maxWidth: '600px',
169-
padding: '10px',
170-
marginBottom: '20px',
171-
borderRadius: '8px',
172-
border: '1px solid #ddd',
173-
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.1)',
174-
display: 'block',
175-
marginLeft: 'auto',
176-
marginRight: 'auto',
177-
}}
178-
/>
179199
{loading && <p>Loading services...</p>}
180200
{error && <p>Error: {error}</p>}
181201
{!loading && !error && (
@@ -189,7 +209,7 @@ function Dashboard() {
189209
display: 'flex',
190210
flexDirection: 'column',
191211
alignItems: 'flex-start',
192-
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
212+
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.5)',
193213
}}>
194214

195215
<style>{keyframes}</style>
@@ -238,7 +258,7 @@ function Dashboard() {
238258
<footer style={{
239259
position: 'fixed',
240260
bottom: '10px',
241-
right: '10px',
261+
right: '20px',
242262
fontSize: '15px',
243263
color: '#666',
244264
}}>

dashboard/ui/src/pages/login.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ export default function Login(props) {
140140
</form>
141141
</main>
142142
<footer style={{
143-
textAlign: 'right',
144-
padding: '10px 20px',
145-
backgroundColor: '#f4f4f4',
143+
position: 'fixed',
144+
bottom: '10px',
145+
right: '20px',
146+
fontSize: '15px',
147+
color: '#666',
146148
}}>
147149
Status Page by <a href="https://github.com/telkomdev/tob" target="_blank" rel="noopener noreferrer" style={{ color: '#007bff', textDecoration: 'none' }}>Tob</a>
148150
</footer>

0 commit comments

Comments
 (0)