-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
184 additions
and
41 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2022-08-07 17:30, success 0.050390s | ||
2022-08-07 17:30, success, 0.050390s |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { NextPage } from 'next' | ||
import { FunctionComponent } from 'react'; | ||
import Log from '../../types/Log'; | ||
|
||
interface ServiceLogProps { | ||
item: Log | ||
} | ||
|
||
const ServiceLog: FunctionComponent<ServiceLogProps> = ({ item }) => { | ||
return ( | ||
<div> | ||
{item.status === 'success' ? '✅' : '❌'} | ||
</div> | ||
) | ||
} | ||
|
||
export default ServiceLog; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { FunctionComponent } from 'react'; | ||
import Service from "../../types/Service"; | ||
import ServiceLog from "../log"; | ||
|
||
interface ServiceItemProps { | ||
item: Service | ||
} | ||
|
||
const ServiceItem: FunctionComponent<ServiceItemProps> = ({ item }) => { | ||
return ( | ||
<div> | ||
<div className='flex basis-full'> | ||
<h1>{item.status === 'success' ? '✅' : '❌'}</h1> | ||
<h1 className='p-10'>{item.name}</h1> | ||
</div> | ||
|
||
<div className='flex'> | ||
{ | ||
item.logs.map(log => ( | ||
<div key={log.created_at} className='flex-1'> | ||
<ServiceLog item={log} /> | ||
</div> | ||
)) | ||
} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default ServiceItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import useIncidents from './hooks/useServices'; | ||
import type { NextPage } from 'next' | ||
import Service from './types/Service'; | ||
import ServiceItem from './components/service'; | ||
|
||
const ServicesSection: NextPage = () => { | ||
const [data, isPostsLoading] = useIncidents(); | ||
return ( | ||
<div> | ||
<div className="overflow-y-scroll h-72 relative max-w-sm mx-auto bg-white dark:bg-slate-800 shadow-lg ring-1 ring-black/5 rounded-xl flex flex-col divide-y dark:divide-slate-200/5"> | ||
<div className="card"> | ||
<div className="card-body"> | ||
All System operational | ||
</div> | ||
</div> | ||
</div> | ||
<div className="overflow-y-scroll h-72 relative max-w-sm mx-auto bg-white dark:bg-slate-800 shadow-lg ring-1 ring-black/5 rounded-xl flex flex-col divide-y dark:divide-slate-200/5"> | ||
<div className="card"> | ||
<div className="card-body"> | ||
{ | ||
isPostsLoading ? ( | ||
<p>Loading...</p> | ||
) : ( | ||
<ul> | ||
{ | ||
(data as Service[]).map(service => ( | ||
<ServiceItem key={service.id} item={service} /> | ||
)) | ||
} | ||
</ul> | ||
) | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default ServicesSection; |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,68 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; | ||
|
||
@layer base { | ||
body { | ||
@apply bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-50; | ||
} | ||
|
||
a { | ||
@apply text-blue-500 dark:text-blue-400; | ||
} | ||
} | ||
|
||
@layer components { | ||
.card { | ||
@apply p-4 bg-white border border-gray-200 dark:bg-gray-700 dark:border-gray-600 shadow rounded-lg p-4 mb-2; | ||
} | ||
|
||
.pill { | ||
@apply px-2 py-1 inline-flex text-xs leading-5 font-semibold rounded-full; | ||
} | ||
|
||
.histogram { | ||
@apply h-6 w-full mx-auto; | ||
} | ||
.hitbox { | ||
align-items: flex-end; | ||
box-sizing: border-box; | ||
height: 100%; | ||
width: 100%; | ||
padding: 1px; | ||
border-radius: 3.75px; | ||
} | ||
.bar { | ||
@apply bg-gray-300 dark:bg-gray-600; | ||
padding-bottom: 1px; | ||
height: 100%; | ||
width: 85%; | ||
border-radius: 100px; | ||
} | ||
|
||
.bar.green { | ||
@apply bg-green-400 dark:bg-green-700; | ||
} | ||
|
||
.bar.red { | ||
@apply bg-red-400 dark:bg-red-700; | ||
} | ||
|
||
.bar.yellow { | ||
@apply bg-yellow-400 dark:bg-yellow-700; | ||
} | ||
|
||
.tooltip { | ||
@apply relative; | ||
} | ||
|
||
.tooltip .content { | ||
@apply invisible absolute z-50 inline-block; | ||
@apply rounded-lg py-1 px-2 bg-gray-100 dark:bg-gray-800 shadow; | ||
@apply opacity-0 transition-all duration-200 scale-50; | ||
} | ||
|
||
.tooltip:hover .content { | ||
@apply visible opacity-100 scale-100; | ||
} | ||
} |