Skip to content

Commit f294c36

Browse files
authored
Added linting script (#129)
1 parent 6f224c4 commit f294c36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+129
-10932
lines changed

.DS_Store

-10 KB
Binary file not shown.

.eslintrc.js

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,32 @@ module.exports = {
55
es2021: true,
66
node: true,
77
},
8-
extends: ['eslint:recommended', 'plugin:react/recommended'],
8+
plugins: [
9+
'react',
10+
'@typescript-eslint'
11+
],
12+
extends: [
13+
'eslint:recommended',
14+
'plugin:react/recommended',
15+
'plugin:@typescript-eslint/recommended'
16+
],
17+
ignorePatterns: [
18+
'.eslintrc.js',
19+
'*.config.js',
20+
'dist/*',
21+
'__tests__/*'
22+
],
23+
overrides: [
24+
],
925
parserOptions: {
10-
ecmaFeatures: {
11-
jsx: true,
12-
},
1326
ecmaVersion: 12,
14-
sourceType: 'module',
27+
sourceType: 'module'
28+
},
29+
settings: {
30+
react: {
31+
version: 'detect'
32+
}
1533
},
16-
plugins: ['react'],
1734
rules: {
1835
indent: ['warn', 2],
1936
'no-unused-vars': ['off', { vars: 'local' }],
@@ -45,5 +62,10 @@ module.exports = {
4562
},
4663
},
4764
],
48-
},
65+
66+
// ---- TYPESCRIPT ---- //
67+
'@typescript-eslint/explicit-function-return-type': 'off',
68+
"@typescript-eslint/no-unused-vars": "error",
69+
'@typescript-eslint/semi': ['warn', 'always']
70+
}
4971
};

.gitignore

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,15 @@
11
node_modules/
2-
security/
3-
thumbs.db
4-
.idea/
52
package-lock.json
6-
.webpack.config.js.icloud
7-
src/.index.js.icloud
8-
src/.store.js.icloud
9-
src/components/display/.RunningContainers.js.icloud
10-
src/components/display/.StoppedContainers.js.icloud
3+
yarn.lock
4+
5+
.history
6+
.gitignore
7+
.DS_Store
8+
119
src/database/docketeerdb
1210
server/database/docketeerdb
13-
.env
14-
.idea/
15-
thumbs.db
1611
dist/
17-
node_modules/
1812
security/
19-
thumbs.db
20-
.idea/
21-
package-lock.json
22-
.webpack.config.js.icloud
23-
src/.index.js.icloud
24-
src/.store.js.icloud
25-
src/components/display/.RunningContainers.js.icloud
26-
src/components/display/.StoppedContainers.js.icloud
27-
src/database/docketeerdb
2813
.env
29-
yarn.lock
30-
coverage
3114

32-
.history
33-
src/.DS_Store
34-
.gitignore
35-
src/.DS_Store
15+
coverage/

.vscode/settings.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"workbench.localHistory.enabled": true
2+
"workbench.localHistory.enabled": true,
3+
"editor.tabSize": 2,
4+
"editor.formatOnSave": true,
5+
"editor.formatOnPaste": true,
6+
"editor.formatOnType": true,
7+
"editor.codeActionsOnSave": {
8+
"source.fixAll.eslint": true
9+
}
310
}

README.md

Lines changed: 70 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ awesome when someone starts to use it.
1212

1313
# [Docketeer](https://www.docketeer.org/) · ![Github](https://img.shields.io/github/repo-size/open-source-labs/Docketeer) ![GitHub](https://img.shields.io/github/license/open-source-labs/Docketeer) ![GitHub](https://img.shields.io/badge/PRs-welcome-orange) ![GitHub](https://img.shields.io/github/last-commit/open-source-labs/Docketeer)
1414

15-
1615
## Table of Contents
16+
1717
- [About](#about)
1818
- [Installation](#installation)
1919
- [Features](#features)
@@ -23,26 +23,28 @@ awesome when someone starts to use it.
2323

2424
#
2525

26-
<!-- ![logo](https://user-images.githubusercontent.com/67434664/94055454-f7177a00-fdaa-11ea-95dd-1d4980400812.png) -->
27-
2826
![logo](assets/docketeer-title2.png)
2927

3028
## About
31-
Managing Docker images, containers and networks from the command line while also trying to monitor crucial metrics can be tedious and counterintuitive. To make this process more developer-friendly, we created Docketeer: a container management platform for Docker.
3229

30+
Managing Docker images, containers and networks from the command line while also trying to monitor crucial metrics can be tedious and counterintuitive. To make this process more developer-friendly, we created Docketeer: a container management platform for Docker.
3331

3432
## Installation
33+
3534
1. **Fork** and **clone** this [repository](https://github.com/open-source-labs/Docketeer.git) to your machine.
35+
3636
```
3737
git clone https://github.com/open-source-labs/Docketeer.git
3838
```
3939

4040
2. Navigate to the project directory and install dependencies.
41+
4142
```
4243
npm install
4344
```
4445

4546
3. Create a `.env` file in the project's top-level directory.
47+
4648
```
4749
root
4850
├─ .env
@@ -51,18 +53,20 @@ root
5153
```
5254

5355
4. In the .env file, configure the following environment variables for Twilio API, Slack Webhook, and Postgres URI. Refer to [Twilio](#-Twilio) setup section below. The Postgres URI is the only field that is required, others are optional. Create your own database to house user information and insert your URI in this file.
56+
5457
```js
5558
// .env
56-
TWILIO_NUMBER = ''
57-
TWILIO_ACCOUNT_SID = ''
58-
TWILIO_AUTH_TOKEN = ''
59-
SERVICE_SID = ''
60-
VERIFICATION_SERVICE_SID = ''
61-
SLACK_WEBHOOK = ''
62-
POSTGRES_URI = ''
59+
TWILIO_NUMBER = "";
60+
TWILIO_ACCOUNT_SID = "";
61+
TWILIO_AUTH_TOKEN = "";
62+
SERVICE_SID = "";
63+
VERIFICATION_SERVICE_SID = "";
64+
SLACK_WEBHOOK = "";
65+
POSTGRES_URI = "";
6366
```
6467

6568
5. Create a folder called `security` in the project's top-level directory. Inside of the `security` folder, create two files `email.js` and `sysadmin.js`. These files will store variables related to the email notification service and system admin setup respectively.
69+
6670
```
6771
root
6872
├─ security
@@ -72,143 +76,116 @@ root
7276
└─ src
7377
```
7478

75-
6. In the `email.js` file, input your organization's email credentials within the username and password properties. This email address will be used to send email notifications. The file is already in the `.gitignore` file.
76-
Important: Do not change the host and port values unless you are using a different email provider.
79+
6. In the `email.js` file, input your organization's email credentials within the username and password properties. This email address will be used to send email notifications. The file is already in the `.gitignore` file.
80+
Important: Do not change the host and port values unless you are using a different email provider.
81+
7782
```js
7883
// email.js
7984
module.exports = {
80-
host: 'smtp.gmail.com',
85+
host: "smtp.gmail.com",
8186
port: 465,
82-
username: '[email protected]',
83-
password: 'belugas',
87+
username: "[email protected]",
88+
password: "belugas",
8489
};
8590
```
8691

8792
7. In the `sysadmin.js` file, input information for the system admin account. If no information is input, the email and phone number for the system admin will be set to default values. These values can always be changed in the system admin's Settings tab.
93+
8894
```js
8995
// sysadmin.js
9096
module.exports = {
91-
phone: '',
92-
email: '',
97+
phone: "",
98+
email: "",
9399
};
94100
```
95101

96102
You are all set! Now just enter the following command to start up Docketeer!
97-
```
98-
npm run dev
99-
```
100-
101-
For now, the sign up function will create a System Admin user.
102-
103-
104-
## Returning Users: Version Update
105-
1. Navigate to the project directory and **add upstream** this [repository](https://github.com/open-source-labs/Docketeer.git) to your cloned fork.
106-
```
107-
git remote add upstream https://github.com/open-source-labs/Docketeer.git
108-
```
109103

110-
2. Pull down the updates.
111-
```
112-
git pull origin upstream
113-
```
114-
115-
3. Install new dependencies.
116-
```
117-
npm install
118-
```
119-
120-
4. You are all set! Now just enter the following command to start up Docketeer!
121104
```
122105
npm run dev
123106
```
124107

125-
108+
For now, the sign up function will create a System Admin user.
126109

127110
## Twilio setup
111+
128112
1. Follow documents found [here](https://www.twilio.com/docs/node/install) to download the helper library.
129113
2. In order to manage Twilio SMS notifications follow the [step plan](https://www.twilio.com/docs/notify/quickstart/sms#messagingservice).
130114
3. Store your (i) Twilio number, (ii) Account Sid, (iii) Auth Token from twilio.com/console, (iv) SERVICE_SID, (v) verification service SID in a newly created .env file in the Docketeer folder in the following format:
115+
131116
```js
132117
// .env.js
133-
MY_PHONE_NUMBER = 'your mobile number'
134-
TWILIO_ACCOUNT_SID = 'code from your console'
135-
TWILIO_AUTH_TOKEN = 'token from your console'
136-
SERVICE_SID = 'code from notify service instance'
137-
VERIFICATION_SERVICE_SID = 'code from verify service instance'
118+
MY_PHONE_NUMBER = "your mobile number";
119+
TWILIO_ACCOUNT_SID = "code from your console";
120+
TWILIO_AUTH_TOKEN = "token from your console";
121+
SERVICE_SID = "code from notify service instance";
122+
VERIFICATION_SERVICE_SID = "code from verify service instance";
138123
```
139124

140125
4. Verification service was created [here](https://www.twilio.com/console/verify/services); code length and serviceSID can be taken from your Twilio account console.
141126
5. All historical messages from the Twilio account can be found [here](https://www.twilio.com/console/sms/logs).
142127

143128
<!-- > Getting started with Docketeer is easy: visit [docketeer.org](https://www.docketeer.org/) and download the Docketeer desktop app. Drag and drop the .dmg file that you downloaded into your Applications folder to install it. Before you run the application, make sure Docker itself is running. -->
144129

145-
146130
## Features
147131

148132
### ➮ System Wide Notifications
133+
149134
Docketeer offers monitoring support for teams by incorporating sms, email and slack notification as well as configurable options based on a container's memory or cpu usage.
150135

151-
### ➮ Viewing
152-
You can view a list of running and exited containers, available images, volume history, and docker-compose files stored locally.
136+
### ➮ Viewing
137+
138+
You can view a list of running and exited containers, available images, volume history, and docker-compose files stored locally.
153139

154140
### ➮ Live Metrics
141+
155142
Users have real-time access to the total amount of resources (CPU, memory usage) that your containers are using and total block IO bytes by image over specific time periods.
156143
![alt text](assets/metrics.gif)
157144

158145
### ➮ Uploading
146+
159147
Within the Image and Docker Compose tab, you pull images from DockerHub by providing `repo:version` or uploading a `.yml` file.
160148

161149
### ➮ Process Logs
150+
162151
View process logs from any number of running or stopped containers. The table is both exportable and sortable by any parameter. You can filter logs by specifying the number of logs that you wish to receive (tail) as well as time (since). Process logs will help you analyze and debug problems faster by offering insights into what went wrong.
163152

164153
![alt text](assets/logs.gif)
165154

166155
<br> For a full demo of Docketeer's features, visit [docketeer.org](https://www.docketeer.org/demo).
167156

168-
<!-- ## Development 🛠
157+
<!-- ## Development 🛠
169158
All ideas and contributions to the project are welcome. To run the app in development mode, clone our repo to your local machine and execute the following commands:
170159
```
171160
npm run dev
172161
``` -->
173162

174-
175163
## Testing
164+
176165
To conduct tests on the codebase, clone our repo to your local machine and execute the following commands in the terminal:
166+
177167
```
178168
npm run test
179169
```
180170

181171
## Troubleshoot
182172

183173
#### **Cannot connect to the Docker daemon**
174+
184175
⤷ Make sure that you have Docker running!
185176

186177
#### **Working with WSL**
187-
⤷ Users may need to install a third-party App to run electron. A helpful article can be found [here](https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242).
188178

179+
⤷ Users may need to install a third-party App to run electron. A helpful article can be found [here](https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242).
189180

190181
## Contributing
182+
191183
Read our [contributing guide](https://github.com/open-source-labs/Docketeer/blob/master/CONTRIBUTING.md) for more information on how to purpose bugfixes and improvements to Docketeer.
192184

193185
### Authors
194-
- Nathan Cho [@nathanycho](https://github.com/nathanycho) | [LinkedIn](https://www.linkedin.com/in/nathanycho/)
195-
- Garima Bhatia [@GarimaB06](https://github.com/GarimaB06) | [LinkedIn](https://www.linkedin.com/in/garimab06/)
196-
- Eshaan Joshi [@eshaan32](https://github.com/eshaan32) | [LinkedIn](https://www.linkedin.com/in/eshaanjoshi/)
197-
- Jonathan Wong [@WongJonathann](https://github.com/WongJonathann) | [LinkedIn](https://www.linkedin.com/in/jon-wong-00/)
198-
- Sarah Moosa [@Sbethm](https://github.com/Sbethm) | [LinkedIn](https://www.linkedin.com/in/sarah-moosa-4b05721b6/)
199-
- Cedar Cooper [@CedarCooper](https://github.com/CedarCooper) | [LinkedIn](https://www.linkedin.com/in/cedar-cooper/)
200-
- Tiffany Chau [@tiffanynchau](https://github.com/tiffanynchau/) | [LinkedIn](https://www.linkedin.com/in/tiffanynchau/)
201-
- Jack Yuan [@jackyuan1](https://github.com/jackyuan1) | [LinkedIn](https://www.linkedin.com/in/jack-yuan-298244247/)
202-
- Drew Manley [@DrewManley](https://github.com/DrewManley) | [LinkedIn](https://www.linkedin.com/in/andrewmanley13/)
203-
- Abigail Gerig [@4estgirl](https://github.com/4estgirl) | [Linkedin](https://www.linkedin.com/in/abigail-gerig/)
204-
- Trine Medina [@TrineMedina](https://github.com/TrineMedina) | [Linkedin](https://www.linkedin.com/in/trinemedina/)
205-
- Christian Looff [@cmlooff](https://github.com/cmlooff) | [LinkedIn](https://www.linkedin.com/in/christian-looff/)
206-
- Reuel Warner-Rosen [@Ruliwr](https://github.com/Ruliwr) | [Linkedin](https://www.linkedin.com/in/Ruliwr/)
207-
- Matt Dias [@Schmang13](https://github.com/Schmang13) | [Linkedin](https://www.linkedin.com/in/matthew-j-dias/)
208-
- Christina Son [@cson17](https://github.com/cson17) | [Linkedin](https://www.linkedin.com/in/christinason17/)
209-
- Fernando Luna [@lunaf-github](https://github.com/lunaf-github) | [Linkedin](https://www.linkedin.com/in/fernando-luna)
210-
- Austin Andrews [@austinandrews](https://github.com/austinandrews) | [Linkedin](https://www.linkedin.com/in/austinandrews17/)
211-
- Eric Lay [@ericlay14](https://github.com/ericlay14) | [Linkedin](https://www.linkedin.com/in/ericlay14/)
186+
187+
<!-- Most recent contributors please add your name to the BOTTOM of the list -->
188+
212189
- Dan Lin [@DanLin91](https://github.com/DanLin91) | [Linkedin](https://www.linkedin.com/in/danlin91/)
213190
- Kadir Gundogdu [@kadirgund](https://github.com/kadirgund) | [Linkedin](https://www.linkedin.com/in/kadirgund/)
214191
- Minchan Jun [@MinchanJun](https://github.com/MinchanJun) | [Linkedin](https://www.linkedin.com/in/minchan-jun/)
@@ -221,7 +198,7 @@ Read our [contributing guide](https://github.com/open-source-labs/Docketeer/blob
221198
- Alex Smith [@ajsmith925](https://github.com/ajsmith925) | [Linkedin](https://www.linkedin.com/in/ajsmith925/)
222199
- Catherine Larcheveque [@clarcheveque](https://github.com/clarcheveque) | [Linkedin](https://www.linkedin.com/in/clarcheveque/)
223200
- Charles Ryu [@charcharryu](https://github.com/charcharryu) | [Linkedin](https://www.linkedin.com/in/charcharryu/)
224-
- Griffin Silver [@griffinrogersilver](https://github.com/griffinrogersilver) | [Linkedin](https://www.linkedin.com/in/griffin-silver-1ab675140/)
201+
- Griffin Silver [@griffinrogersilver](https://github.com/griffinrogersilver) | [Linkedin](https://www.linkedin.com/in/griffin-silver-1ab675140/)
225202
- Lorenzo Guevara [@lo-guevara](https://github.com/lo-guevara) | [Linkedin](https://www.linkedin.com/in/lorenzoguevara/)
226203
- May Li [@msscloudy](https://github.com/msscloudy) | [Linkedin](https://www.linkedin.com/in/maysli)
227204
- Ricardo Cortez [@rcortez88](https://github.com/rcortez88) | [Linkedin](https://www.linkedin.com/in/rcortez88/)
@@ -232,10 +209,29 @@ Read our [contributing guide](https://github.com/open-source-labs/Docketeer/blob
232209
- Dylan Feldman [@dfeldman24](https://github.com/dfeldman24) | [Linkedin](https://www.linkedin.com/in/dylan-feldman)
233210
- Tre Hultzen [@THultz](https://github.com/THultz) | [Linkedin](https://www.linkedin.com/in/tre-hultzen/)
234211
- Kenneth Hui [@kennethhui121](https://github.com/kennethhui121) | [Linkedin](https://www.linkedin.com/in/kenneth-hui/)
212+
- Eric Lay [@ericlay14](https://github.com/ericlay14) | [Linkedin](https://www.linkedin.com/in/ericlay14/)
213+
- Austin Andrews [@austinandrews](https://github.com/austinandrews) | [Linkedin](https://www.linkedin.com/in/austinandrews17/)
214+
- Fernando Luna [@lunaf-github](https://github.com/lunaf-github) | [Linkedin](https://www.linkedin.com/in/fernando-luna)
215+
- Christina Son [@cson17](https://github.com/cson17) | [Linkedin](https://www.linkedin.com/in/christinason17/)
216+
- Christian Looff [@cmlooff](https://github.com/cmlooff) | [LinkedIn](https://www.linkedin.com/in/christian-looff/)
217+
- Reuel Warner-Rosen [@Ruliwr](https://github.com/Ruliwr) | [Linkedin](https://www.linkedin.com/in/Ruliwr/)
218+
- Trine Medina [@TrineMedina](https://github.com/TrineMedina) | [Linkedin](https://www.linkedin.com/in/trinemedina/)
219+
- Matt Dias [@Schmang13](https://github.com/Schmang13) | [Linkedin](https://www.linkedin.com/in/matthew-j-dias/)
220+
- Abigail Gerig [@4estgirl](https://github.com/4estgirl) | [Linkedin](https://www.linkedin.com/in/abigail-gerig/)
221+
- Jack Yuan [@jackyuan1](https://github.com/jackyuan1) | [LinkedIn](https://www.linkedin.com/in/jack-yuan-298244247/)
222+
- Sarah Moosa [@Sbethm](https://github.com/Sbethm) | [LinkedIn](https://www.linkedin.com/in/sarah-moosa-4b05721b6/)
223+
- Cedar Cooper [@CedarCooper](https://github.com/CedarCooper) | [LinkedIn](https://www.linkedin.com/in/cedar-cooper/)
224+
- Tiffany Chau [@tiffanynchau](https://github.com/tiffanynchau/) | [LinkedIn](https://www.linkedin.com/in/tiffanynchau/)
225+
- Drew Manley [@DrewManley](https://github.com/DrewManley) | [LinkedIn](https://www.linkedin.com/in/andrewmanley13/)
226+
- Eshaan Joshi [@eshaan32](https://github.com/eshaan32) | [LinkedIn](https://www.linkedin.com/in/eshaanjoshi/)
227+
- Garima Bhatia [@GarimaB06](https://github.com/GarimaB06) | [LinkedIn](https://www.linkedin.com/in/garimab06/)
228+
- Nathan Cho [@nathanycho](https://github.com/nathanycho) | [LinkedIn](https://www.linkedin.com/in/nathanycho/)
229+
- Jonathan Wong [@WongJonathann](https://github.com/WongJonathann) | [LinkedIn](https://www.linkedin.com/in/jon-wong-00/)
235230

236231
### License
232+
237233
Docketeer is [MIT Licensed](https://github.com/open-source-labs/Docketeer/blob/master/LICENSE)
238234

235+
## Show your support
239236

240-
## Show your support
241-
Give a ⭐️ if this project helped you!
237+
Give a ⭐️ if this project helped you!

0 commit comments

Comments
 (0)