Skip to content

Commit 3761bd7

Browse files
authored
Merge pull request #22 from oslabs-beta/prod_dhp
Prod_dhp
2 parents 09c91e2 + 12e09c8 commit 3761bd7

File tree

12 files changed

+226
-183
lines changed

12 files changed

+226
-183
lines changed

dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use an official Node.js runtime as a parent image
2+
FROM node
3+
# Set the working directory to /app
4+
WORKDIR /app
5+
6+
COPY package*.json ./
7+
8+
# Run npm install to install app dependencies
9+
RUN npm install
10+
11+
# Set the PATH env variable
12+
# ENV PATH="/usr/local/bin:${PATH}"
13+
# COPY /usr/local/bin/docker /usr/local/bin/docker
14+
ENV DOCKERVERSION=19.03.12
15+
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKERVERSION}.tgz \
16+
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 -C /usr/local/bin docker/docker \
17+
&& rm docker-${DOCKERVERSION}.tgz
18+
19+
# Copy the current directory contents into the container at /app
20+
COPY . .
21+
22+
# Make port 4000 available to the world outside this container
23+
EXPOSE 4000
24+
25+
# Start the app
26+
CMD ["npm", "start"]
27+
28+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
{{ define "__subject" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ if gt (.Alerts.Resolved | len) 0 }}, RESOLVED:{{ .Alerts.Resolved | len }}{{ end }}{{ end }}] {{ .GroupLabels.SortedPairs.Values | join " " }} {{ if gt (len .CommonLabels) (len .GroupLabels) }}({{ with .CommonLabels.Remove .GroupLabels.Names }}{{ .Values | join " " }}{{ end }}){{ end }}{{ end }}
3+
4+
{{ define "__text_values_list" }}{{ if len .Values }}{{ $first := true }}{{ range $refID, $value := .Values -}}
5+
{{ if $first }}{{ $first = false }}{{ else }}, {{ end }}{{ $refID }}={{ $value }}{{ end -}}
6+
{{ else }}[no value]{{ end }}{{ end }}
7+
8+
{{ define "__text_alert_list" }}{{ range . }}
9+
Value: {{ template "__text_values_list" . }}
10+
Labels:
11+
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }}
12+
{{ end }}Annotations:
13+
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }}
14+
{{ end }}{{ if gt (len .GeneratorURL) 0 }}Source: {{ .GeneratorURL }}
15+
{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: {{ .SilenceURL }}
16+
{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: {{ .DashboardURL }}
17+
{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: {{ .PanelURL }}
18+
{{ end }}{{ end }}{{ end }}
19+
20+
{{ define "default.title" }}{{ template "__subject" . }}{{ end }}
21+
22+
{{ define "default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing**
23+
{{ template "__text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }}
24+
25+
{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved**
26+
{{ template "__text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }}
27+
28+
29+
{{ define "__teams_text_alert_list" }}{{ range . }}
30+
Value: {{ template "__text_values_list" . }}
31+
Labels:
32+
{{ range .Labels.SortedPairs }} - {{ .Name }} = {{ .Value }}
33+
{{ end }}
34+
Annotations:
35+
{{ range .Annotations.SortedPairs }} - {{ .Name }} = {{ .Value }}
36+
{{ end }}
37+
{{ if gt (len .GeneratorURL) 0 }}Source: [{{ .GeneratorURL }}]({{ .GeneratorURL }})
38+
39+
{{ end }}{{ if gt (len .SilenceURL) 0 }}Silence: [{{ .SilenceURL }}]({{ .SilenceURL }})
40+
41+
{{ end }}{{ if gt (len .DashboardURL) 0 }}Dashboard: [{{ .DashboardURL }}]({{ .DashboardURL }})
42+
43+
{{ end }}{{ if gt (len .PanelURL) 0 }}Panel: [{{ .PanelURL }}]({{ .PanelURL }})
44+
45+
{{ end }}
46+
{{ end }}{{ end }}
47+
48+
49+
{{ define "teams.default.message" }}{{ if gt (len .Alerts.Firing) 0 }}**Firing**
50+
{{ template "__teams_text_alert_list" .Alerts.Firing }}{{ if gt (len .Alerts.Resolved) 0 }}
51+
52+
{{ end }}{{ end }}{{ if gt (len .Alerts.Resolved) 0 }}**Resolved**
53+
{{ template "__teams_text_alert_list" .Alerts.Resolved }}{{ end }}{{ end }}
944 KB
Binary file not shown.

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
"@babel/preset-env": "^7.19.3",
4646
"@babel/preset-react": "^7.18.6",
4747
"@babel/preset-typescript": "^7.18.6",
48-
"@electron-forge/cli": "^6.0.5",
49-
"@electron-forge/maker-deb": "^6.0.5",
50-
"@electron-forge/maker-rpm": "^6.0.5",
51-
"@electron-forge/maker-squirrel": "^6.0.5",
52-
"@electron-forge/maker-zip": "^6.0.5",
5348
"@jest/globals": "^29.3.1",
5449
"@redux-devtools/core": "^3.13.1",
5550
"@reduxjs/toolkit": "^1.9.0",

src/components/Home.tsx

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,9 @@ const Home = () => {
211211
</li>
212212
</ul>
213213
</div>
214-
<a className='btn btn-ghost normal-case text-xl'>docketeer</a>
214+
<Link to='/home/' className='btn btn-ghost normal-case text-xl'>
215+
docketeer
216+
</Link>
215217
</div>
216218
<div className='navbar-center hidden xl:flex'>
217219
<ul className='menu menu-horizontal px-1 text-xs'>
@@ -320,14 +322,16 @@ const Home = () => {
320322
</Routes>
321323
<footer className='footer items-center p-4 bg-neutral text-neutral-content fixed bottom-0 inset-x-0 z-50'>
322324
<div className='items-center grid-flow-col'>
323-
<img
324-
src={Docketeer}
325-
alt='footer-product-logo'
326-
className='w-auto h-10'
327-
/>
325+
<a href='https://www.docketeer.org/demo'>
326+
<img
327+
src={Docketeer}
328+
alt='footer-product-logo'
329+
className='w-auto h-10'
330+
/>
331+
</a>
328332
</div>
329333
<div className='grid-flow-col gap-4 md:place-self-center md:justify-self-end'>
330-
<a>
334+
<a href='https://twitter.com/dockDockGoose7'>
331335
<svg
332336
xmlns='http://www.w3.org/2000/svg'
333337
width='24'
@@ -338,26 +342,38 @@ const Home = () => {
338342
<path d='M24 4.557c-.883.392-1.832.656-2.828.775 1.017-.609 1.798-1.574 2.165-2.724-.951.564-2.005.974-3.127 1.195-.897-.957-2.178-1.555-3.594-1.555-3.179 0-5.515 2.966-4.797 6.045-4.091-.205-7.719-2.165-10.148-5.144-1.29 2.213-.669 5.108 1.523 6.574-.806-.026-1.566-.247-2.229-.616-.054 2.281 1.581 4.415 3.949 4.89-.693.188-1.452.232-2.224.084.626 1.956 2.444 3.379 4.6 3.419-2.07 1.623-4.678 2.348-7.29 2.04 2.179 1.397 4.768 2.212 7.548 2.212 9.142 0 14.307-7.721 13.995-14.646.962-.695 1.797-1.562 2.457-2.549z'></path>
339343
</svg>
340344
</a>
341-
<a>
345+
<a href='https://github.com/open-source-labs/Docketeer'>
342346
<svg
343347
xmlns='http://www.w3.org/2000/svg'
344348
width='24'
345349
height='24'
346350
viewBox='0 0 24 24'
347351
className='fill-current'
348352
>
349-
<path d='M19.615 3.184c-3.604-.246-11.631-.245-15.23 0-3.897.266-4.356 2.62-4.385 8.816.029 6.185.484 8.549 4.385 8.816 3.6.245 11.626.246 15.23 0 3.897-.266 4.356-2.62 4.385-8.816-.029-6.185-.484-8.549-4.385-8.816zm-10.615 12.816v-8l8 3.993-8 4.007z'></path>
353+
<path d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z' />
354+
</svg>
355+
</a>
356+
<a href='[email protected]'>
357+
<svg
358+
width='24'
359+
height='24'
360+
xmlns='http://www.w3.org/2000/svg'
361+
fill-rule='evenodd'
362+
clip-rule='evenodd'
363+
className='fill-current'
364+
>
365+
<path d='M22.288 21h-20.576c-.945 0-1.712-.767-1.712-1.712v-13.576c0-.945.767-1.712 1.712-1.712h20.576c.945 0 1.712.767 1.712 1.712v13.576c0 .945-.767 1.712-1.712 1.712zm-10.288-6.086l-9.342-6.483-.02 11.569h18.684v-11.569l-9.322 6.483zm8.869-9.914h-17.789l8.92 6.229s6.252-4.406 8.869-6.229z' />
350366
</svg>
351367
</a>
352-
<a>
368+
<a href='https://www.linkedin.com/company/docketeer/'>
353369
<svg
354370
xmlns='http://www.w3.org/2000/svg'
355371
width='24'
356372
height='24'
357373
viewBox='0 0 24 24'
358374
className='fill-current'
359375
>
360-
<path d='M9 8h-3v4h3v12h5v-12h3.642l.358-4h-4v-1.667c0-.955.192-1.333 1.115-1.333h2.885v-5h-3.808c-3.596 0-5.192 1.583-5.192 4.615v3.385z'></path>
376+
<path d='M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z' />
361377
</svg>
362378
</a>
363379
</div>

src/components/displays/ProcessLogsTable.tsx

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -250,24 +250,22 @@ const ProcessLogsTable = () => {
250250
</div>
251251
</div>
252252
</div>
253-
<div className='mb-250'>
254-
<div className='card bg-neutral text-neutral-content rounded-lg'>
255-
<div className='card-body space-y-2'>
256-
<h2 className='card-title text-sm'>CONTAINER PROCESS LOGS</h2>
257-
<div className='items-center'>
258-
<div className='overflow-x-auto'>
259-
<table className='table max-w-full table-fixed mb-20'>
260-
<thead>
261-
<tr>
262-
<th className='text-xs'>CONTAINER</th>
263-
<th className='text-xs'>LOG TYPE</th>
264-
<th className='text-xs'>TIMESTAMP</th>
265-
<th className='text-xs'>MESSAGE</th>
266-
</tr>
267-
</thead>
268-
{renderRows}
269-
</table>
270-
</div>
253+
<div className='card bg-neutral text-neutral-content rounded-lg'>
254+
<div className='card-body space-y-2'>
255+
<h2 className='card-title text-sm'>CONTAINER PROCESS LOGS</h2>
256+
<div className='items-center'>
257+
<div className='overflow-x-auto'>
258+
<table className='table max-w-full table-fixed mb-20'>
259+
<thead>
260+
<tr>
261+
<th className='text-xs'>CONTAINER</th>
262+
<th className='text-xs'>LOG TYPE</th>
263+
<th className='text-xs'>TIMESTAMP</th>
264+
<th className='text-xs'>MESSAGE</th>
265+
</tr>
266+
</thead>
267+
{renderRows}
268+
</table>
271269
</div>
272270
</div>
273271
</div>

src/components/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ body {
2929
}
3030

3131
.usersFlex {
32-
margin: 4.25rem 0;
32+
margin: 4.25rem 0 1rem 0;
3333
}
3434

3535
.usersFlex > * {

0 commit comments

Comments
 (0)