Skip to content

Commit aceb51f

Browse files
authored
Merge pull request #46 from oslabs-beta/dev
Merge final v9.0 changes from development to master
2 parents 9dd4b20 + bf8045f commit aceb51f

File tree

103 files changed

+4658
-3468
lines changed

Some content is hidden

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

103 files changed

+4658
-3468
lines changed

.DS_Store

2 KB
Binary file not shown.

.github/workflows/jest.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Jest
2+
on:
3+
pull_request:
4+
types: [opened, edited, reopened, synchronize]
5+
branches:
6+
- dev
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: "18.13.0"
16+
17+
- name: Cache node modules
18+
uses: actions/cache@v3
19+
env:
20+
cache-name: cache-node-modules
21+
with:
22+
path: ~/.npm
23+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
24+
restore-keys: |
25+
${{ runner.os }}-build-${{ env.cache-name }}-
26+
${{ runner.os }}-build-
27+
${{ runner.os }}-
28+
29+
- name: Install Dependencies
30+
run: npm install
31+
32+
- name: Run the tests
33+
run: npm test

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ src/database/docketeerdb
2929
yarn.lock
3030
coverage
3131

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

README.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ root
5050
└─ src
5151
```
5252

53-
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.
53+
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.
5454
```js
5555
// .env
5656
TWILIO_NUMBER = ''
@@ -98,13 +98,30 @@ You are all set! Now just enter the following command to start up Docketeer!
9898
npm run dev
9999
```
100100

101-
To log in as sysadmin, use the following credentials
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.
102106
```
103-
username: sysadmin
104-
password: belugas
107+
git remote add upstream https://github.com/open-source-labs/Docketeer.git
108+
```
109+
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!
121+
```
122+
npm run dev
105123
```
106124

107-
To change the system admin password, create a new user with your preferred credentials, then change the role and role_id manually in the database.
108125

109126

110127
## Twilio setup
@@ -136,15 +153,15 @@ You can view a list of running and exited containers, available images, volume h
136153

137154
### ➮ Live Metrics
138155
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.
139-
![alt text](assets/docketeer-metrics.gif)
156+
![alt text](assets/metrics.gif)
140157

141158
### ➮ Uploading
142159
Within the Image and Docker Compose tab, you pull images from DockerHub by providing `repo:version` or uploading a `.yml` file.
143160

144161
### ➮ Process Logs
145162
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.
146163

147-
![alt text](assets/docketeer-process-logs.gif)
164+
![alt text](assets/logs.gif)
148165

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

@@ -174,6 +191,10 @@ npm run test
174191
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.
175192

176193
### 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/)
177198
- Sarah Moosa [@Sbethm](https://github.com/Sbethm) | [LinkedIn](https://www.linkedin.com/in/sarah-moosa-4b05721b6/)
178199
- Cedar Cooper [@CedarCooper](https://github.com/CedarCooper) | [LinkedIn](https://www.linkedin.com/in/cedar-cooper/)
179200
- Tiffany Chau [@tiffanynchau](https://github.com/tiffanynchau/) | [LinkedIn](https://www.linkedin.com/in/tiffanynchau/)

__tests__/ContainersTab.test.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('Containers', () => {
5050
test('Name of container should properly display', ()=>{
5151
const h3 = screen.getAllByRole('heading', { level: 3 });
5252
const name = h3[0].innerHTML;
53-
expect(name).toEqual('Name: blissful_matsumoto');
53+
expect(name).toEqual('blissful_matsumoto');
5454
});
5555

5656
test('Stop button is called', async () => {
@@ -61,10 +61,10 @@ describe('Containers', () => {
6161
test('Toggle Display button works', () => {
6262
render(<ToggleDisplay {...props}/>);
6363
const button = screen.getAllByRole('button');
64-
expect(button[4]).toHaveTextContent('Show Details');
65-
fireEvent.click(button[4]);
66-
expect(button[4]).toHaveTextContent('Hide Details');
67-
64+
expect(button[0]).toHaveTextContent('Show Details');
65+
fireEvent.click(button[0]);
66+
expect(button[0]).toHaveTextContent('Hide Details');
67+
expect(button[1]).toHaveTextContent('STOP');
6868
});
6969
});
7070

@@ -78,7 +78,7 @@ describe('Containers', () => {
7878

7979
test('Name of container should properly display', () => {
8080
const name = screen.getAllByText('zealous');
81-
expect(name).toHaveLength(2);
81+
expect(name).toHaveLength(1);
8282
});
8383

8484
test('Run and remove button should fire', async () => {
@@ -89,9 +89,7 @@ describe('Containers', () => {
8989
await fireEvent.click(removeButton);
9090
expect(runButton).toBeCalled;
9191
expect(removeButton).toBeCalled;
92-
9392
});
94-
9593
});
9694
});
9795

__tests__/ImageTab.test.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import React from 'react';
2+
import * as helper from '../src/components/helper/commands';
23
import { describe, beforeEach, expect, test, jest } from '@jest/globals';
34
import Images from '../src/components/tabs/Images';
45
import {
@@ -57,14 +58,15 @@ describe('Images', () => {
5758
});
5859

5960
// currently gets stuck at window.runExec method --> reads undefined
60-
// describe('pull button on click', () => {
61-
// test('fires pull button functionality', () => {
62-
// const { container } = render(<Images {...props} />);
63-
// const pullButton = screen.getByRole('button', { name: 'Pull' });
64-
// fireEvent.click(pullButton);
65-
// expect(pullButton).toBeCalled;
66-
// });
67-
// });
61+
describe('pull button on click', () => {
62+
test('fires pull button functionality', () => {
63+
// const { container } = render(<Images {...props} />);
64+
const pullButton = screen.getByRole('button', { name: 'PULL' });
65+
fireEvent.click(pullButton);
66+
expect(pullButton).toBeCalled;
67+
expect(Images.handleClick).toBeCalled;
68+
});
69+
});
6870

6971
describe('Images', () => {
7072
test('Renders an image if one is found', () => {

0 commit comments

Comments
 (0)