Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlarsen committed Mar 27, 2020
0 parents commit 20514e9
Show file tree
Hide file tree
Showing 59 changed files with 136,588 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"extends": [
"eslint-config-airbnb-base",
"prettier",
"eslint:recommended",
"plugin:react/recommended"
],
"plugins": ["prettier"],
"env": {
"browser": true
},
"rules": {
"prettier/prettier": "error",
"import/no-unresolved": "off"
},
"parser": "babel-eslint",
"settings": {
"import/resolver": {
"webpack": {
"config": {
"resolve": {
"modules": ["webpacker", "node_modules"]
}
}
}
},
"react": {
"version": "detect"
}
}
}
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
10 changes: 10 additions & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Dockerfile
.DS_Store
.git
.gitignore
.eslintrc
README.md
node_modules
public
src
yarn.lock
23 changes: 23 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:12.14.1-alpine

WORKDIR /home/node

# node ENV
ENV NODE_ENV=production

# run everything as node user
USER node

# packages to install
COPY package.json .

# install packages, supress warnings
RUN yarn install

# copy app files after yarn init, so updates are faster
COPY app.js .
COPY build ./build

EXPOSE 8000

CMD ["yarn", "start"]
31 changes: 31 additions & 0 deletions docker/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const express = require('express')
const path = require('path')
const fs = require('fs')
const app = express()
const port = 8000
const f = 'results.json'

// serve results.json to the React frontend
app.get(`/${f}`, (req, res) => {
fs.readFile(f, (err, data) => {
if (err) {
console.error(err)
res.status(500).send(`Error reading ${f} `)
return
}
let json = JSON.parse(data)
res.header('Access-Control-Allow-Origin', '*') // allow CORS
res.json(json)
})
})

app.use(express.static(path.join(__dirname, 'build')))

// catch-all for all other routes
app.get('/*', (req, res) => {
res.json({})
})

app.listen(port, () => {
console.log(`\n\nMKIT Running - browse to http://localhost:${port}\n\n`)
})
22 changes: 22 additions & 0 deletions docker/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"files": {
"main.css": "/static/css/main.2a1b2a24.chunk.css",
"main.js": "/static/js/main.f8b1fb57.chunk.js",
"main.js.map": "/static/js/main.f8b1fb57.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.1ed35a58.js",
"runtime-main.js.map": "/static/js/runtime-main.1ed35a58.js.map",
"static/js/2.8328f9c1.chunk.js": "/static/js/2.8328f9c1.chunk.js",
"static/js/2.8328f9c1.chunk.js.map": "/static/js/2.8328f9c1.chunk.js.map",
"index.html": "/index.html",
"precache-manifest.fec04e7cd3240938e10a21f44e59b468.js": "/precache-manifest.fec04e7cd3240938e10a21f44e59b468.js",
"service-worker.js": "/service-worker.js",
"static/css/main.2a1b2a24.chunk.css.map": "/static/css/main.2a1b2a24.chunk.css.map",
"static/js/2.8328f9c1.chunk.js.LICENSE.txt": "/static/js/2.8328f9c1.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.1ed35a58.js",
"static/js/2.8328f9c1.chunk.js",
"static/css/main.2a1b2a24.chunk.css",
"static/js/main.f8b1fb57.chunk.js"
]
}
Binary file added docker/build/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docker/build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><title>Darkbit MKIT Viewer</title><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Darkbit Managed Kubernetes Inspector Tool"/><link rel="icon" href="/favicon.png"/><link rel="manifest" href="/manifest.json"/><link href="/static/css/main.2a1b2a24.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,i,l=t[0],f=t[1],a=t[2],c=0,s=[];c<l.length;c++)i=l[c],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(p&&p(t);s.length;)s.shift()();return u.push.apply(u,a||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,l=1;l<r.length;l++){var f=r[l];0!==o[f]&&(n=!1)}n&&(u.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={1:0},u=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/";var l=this.webpackJsonpmkit=this.webpackJsonpmkit||[],f=l.push.bind(l);l.push=t,l=l.slice();for(var a=0;a<l.length;a++)t(l[a]);var p=f;r()}([])</script><script src="/static/js/2.8328f9c1.chunk.js"></script><script src="/static/js/main.f8b1fb57.chunk.js"></script></body></html>
1 change: 1 addition & 0 deletions docker/build/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker/build/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docker/build/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions docker/build/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
26 changes: 26 additions & 0 deletions docker/build/precache-manifest.fec04e7cd3240938e10a21f44e59b468.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "71d8e4589ad45a9d50691a206c433374",
"url": "/index.html"
},
{
"revision": "80776a599dc8f283a990",
"url": "/static/css/main.2a1b2a24.chunk.css"
},
{
"revision": "1c65c4dd6b795e56827c",
"url": "/static/js/2.8328f9c1.chunk.js"
},
{
"revision": "5356fa2f66e46e6c05e4cbe319ac7f1d",
"url": "/static/js/2.8328f9c1.chunk.js.LICENSE.txt"
},
{
"revision": "80776a599dc8f283a990",
"url": "/static/js/main.f8b1fb57.chunk.js"
},
{
"revision": "ffdf72dbf2e2b5e18973",
"url": "/static/js/runtime-main.1ed35a58.js"
}
]);
3 changes: 3 additions & 0 deletions docker/build/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
Loading

0 comments on commit 20514e9

Please sign in to comment.