Skip to content

Commit c7a7577

Browse files
authored
Merge pull request #73 from oslabs-beta/dev
merges v201 into main
2 parents 056b1b7 + 4ea30c6 commit c7a7577

Some content is hidden

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

57 files changed

+8914
-4983
lines changed

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Changelog for kaptn v2.0.1 and earlier.
2+
3+
4+
## Version 2.0.1 -
5+
6+
- Adds interactive, expandable visx graphs for pods' and nodes' historical cpu and memory usage.
7+
8+
- Adds variable refresh rate.
9+
10+
- Adds various other bugs fixes and additions including: Fixes bug with user directory in CLI
11+
12+
13+
## Version 2.0.0 -
14+
15+
- **Kaptn Krane Cluster Manager:**
16+
View live and historical metrics, and scale, delete or restart resources like pods, nodes, and deployments in our revolutionary, easy-to-use interface that harnesses the power of kubectl commands. Features including filtering by namespace, sorting by cpu and memory percent, one-click control of your clusters, and much more makes taking command of Kubernetes easier than ever before!
17+
18+
- **New Start Page:**
19+
We've completely revamped the start page, including the addition of installation checks and quickstart links. Now you can troubleshoot problems more quickly, and get right into your workflow.
20+
21+
- Adds various other bugs fixes and additions including: clear terminal log button, redesign of CLI, Instant Help Desk, Learning Center and much more!
22+
23+
## Version 1.2.0 -
24+
25+
- Adds ability to use kubectl commands without choosing a working directory.
26+
27+
## Version 1.1.0 -
28+
29+
- **_Now available for Mac, Windows, and Linux_**
30+
31+
- **Cluster Metrics Visualizer:**
32+
Easily sync your Kaptn workspace to Grafana and Prometheus to allow for clear and real-time visualization of your clusters' health. Utilize our quick set-up if you are not already connected, and consider Kaptn your only stop for working with and monitoring your Kubernetes clusters.
33+
34+
- **Instant Help Desk:**
35+
Get help information on demand and at the click of a button with the Instant Help Desk. Now you can get more info about any command or type without leaving the command line, and losing the code you've already written.
36+
37+
- **Kaptn Learning Center:**
38+
Inside the Easy Setup page you can now find the Learning Center with resources you need to learn Kubernetes. You can follow tutorials, read articles and documentation, and master Kubernetes faster than ever.
39+
40+
- **Light/Dark Mode:**
41+
Whether it's eye strain, or just personal preference, we know engineers can be selective about their work environments. So we created a Light/Dark mode that allows you to work with your favorite color combination. Now you can focus on coding with no distractions to your workflow.
42+
43+
This update also includes various bugs fixes, including:
44+
45+
- Bug where kubectl commands could not be used on some Mac operating systems.

README.md

Lines changed: 63 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ Kaptn is a fully downloadable desktop application that provides a user-friendly
3030
## Features
3131

3232
- Kaptn Krane Cluster Manager - NEW!
33-
- View live metrics and refresh on demand
33+
- View live and historical metrics, and refresh stats at adjustable intervals
3434
- Scale, delete/restart, and rollback deployments, nodes, and pods
3535
- View logs, yamls, and describe resources
36-
- Intuitive UI including custom speedometer-style gauges for CPU and Memory Usage, and one-click control of your clusters
36+
- Intuitive UI including custom speedometer-style gauges for CPU and Memory Usage, visx graphs, and one-click control of your clusters
37+
- Filter and sort resources by namespace, max CPU and memory, and more.
3738
- User-friendly terminal interface
3839
- Take command of the command line interface with pre-selected kubectl options, or free-type
3940
- Clearly visualize the commands within our interactive terminal
@@ -48,62 +49,93 @@ Kaptn is a fully downloadable desktop application that provides a user-friendly
4849

4950
## Updates
5051

51-
Version 2.0.0 -
5252

53-
- **Kaptn Krane Cluster Manager:**
54-
View live metrics and scale, delete or restart resources like pods, nodes, and deployments in our revolutionary, easy-to-use interface that harnesses the power of kubectl commands. Features including filtering by namespace, sorting by cpu and memory percent, one-click control of your clusters, and much more makes taking command of Kubernetes easier than ever before!
53+
Version 2.0.1 -
5554

56-
- **New Start Page:**
57-
We've completely revamped the start page, including the addition of installation checks and quickstart links. Now you can troubleshoot problems more quickly, and get right into your workflow.
55+
- Adds interactive, expandable visx graphs for pods' and nodes' historical cpu and memory usage.
5856

59-
- Adds various other bugs fixes and additions including: clear terminal log button, redesign of CLI, Instant Help Desk, Learning Center and much more!
57+
- Adds variable refresh rate.
6058

61-
Version 1.2.0 -
59+
- Adds various other bugs fixes and additions including: Fixes bug with user directory in CLI
6260

63-
- Adds ability to use kubectl commands without choosing a working directory.
61+
For details on all previous updates and releases, please see the [CHANGELOG](https://github.com/oslabs-beta/kaptn/blob/main/CHANGELOG.md), or [Releases](https://github.com/oslabs-beta/kaptn/releases) page.
6462

65-
Version 1.1.0 -
63+
#
6664

67-
- **_Now available for Mac, Windows, and Linux_**
65+
## Getting Started
6866

69-
- **Cluster Metrics Visualizer:**
70-
Easily sync your Kaptn workspace to Grafana and Prometheus to allow for clear and real-time visualization of your clusters' health. Utilize our quick set-up if you are not already connected, and consider Kaptn your only stop for working with and monitoring your Kubernetes clusters.
67+
1. Download the latest release [here](https://github.com/oslabs-beta/kaptn/releases).
7168

72-
- **Instant Help Desk:**
73-
Get help information on demand and at the click of a button with the Instant Help Desk. Now you can get more info about any command or type without leaving the command line, and losing the code you've already written.
7469

75-
- **Kaptn Learning Center:**
76-
Inside the Easy Setup page you can now find the Learning Center with resources you need to learn Kubernetes. You can follow tutorials, read articles and documentation, and master Kubernetes faster than ever.
70+
__For Windows (portable) -__ Open the .exe file.
7771

78-
- **Light/Dark Mode:**
79-
Whether it's eye strain, or just personal preference, we know engineers can be selective about their work environments. So we created a Light/Dark mode that allows you to work with your favorite color combination. Now you can focus on coding with no distractions to your workflow.
72+
__For Linux (AppImage) -__ Follow the instructions [here](https://docs.appimage.org/introduction/quickstart.html) to run the application.
8073

81-
This update also includes various bugs fixes, including:
74+
__For Mac (Intel/x64/Universal) -__ Double-click the .dmg installer, and drag and drop Kaptn in your Applications folder. If you get a warning that the app is from an unidentified developer, go to System Preferences > Security & Privacy > General and click "Open Anyway".
8275

83-
- Bug where kubectl commands could not be used on some Mac operating systems.
76+
__For Mac (Apple Silicon/ARM64) -__ We do not have Mac code-signing, and therefore cannot offically offer an Apple Silicon/ARM64 version for download here. You can still use the "Mac Universal" version above, OR there is this work-around to create an Apple Silicon version on your computer:
8477

85-
#
78+
First fork/clone the project. Then open a terminal in the project, and run:
8679

87-
## Getting Started
80+
npm i
8881

89-
1. Download the latest release [here](https://github.com/oslabs-beta/kaptn/releases).
90-
2. Run the installer.
82+
After that, run:
83+
84+
npm run build:mac
9185

92-
If you get a warning that the app is from an unidentified developer, go to System Preferences > Security & Privacy > General and click "Open Anyway".
86+
After completion, the .dmg file will be available in the "dist" folder. If you get a warning that the app is from an unidentified developer, go to System Preferences > Security & Privacy > General and click "Open Anyway".
87+
88+
#
9389

9490
## Usage Guidelines
9591

9692
### Overview
9793

98-
Our application defaults to start page, where you will be able to choose which page you'd like to visit.
94+
Our application defaults to start page, where installation checks will run, and where you will be able to choose which page you'd like to visit.
9995

10096
![newStartPage](https://github.com/oslabs-beta/kaptn/assets/119518056/a2d473da-37a9-4b6d-b69d-f8fcd95f2b41)
10197

10298
### Krane Cluster Manager
10399

104-
Our all-new Krane Cluster Manager allows you to control your clusters at the click of a button. Simply choose from the options at the top of the screen, and you can view live metrics on your nodes, pods, and deployments. You can scale, delete/restart, rollback your resources, and filter by namespace, sort by CPU, Memory, and much more.
105-
106-
![kraneNodesGIF](https://github.com/oslabs-beta/kaptn/assets/119518056/25abaa5e-54b5-4d92-9b83-52d32fe96605)
100+
Our all-new Krane Cluster Manager allows you to control your clusters at the click of a button. Simply choose "Nodes & Pods" or "Deployments" at the top of the screen, and you'll have the following options:
101+
102+
- Nodes:
103+
- View Live CPU and Memory Use
104+
- View Graphs of Historical CPU and Memory Use
105+
- View Node Yaml
106+
- Decribe Node
107+
- Drain Node
108+
- Cordon Node
109+
- Uncordon Node
110+
- Delete / Restart Node
111+
112+
- Pods:
113+
- View Live CPU and Memory Use
114+
- View Graphs of Historical CPU and Memory Use
115+
- View Pod Logs
116+
- View Pod Yaml
117+
- Decribe Pod
118+
- Delete / Restart Pod
119+
- Filter by Namespace
120+
- Sort by Namespace, Max CPU and Memory, and more.
121+
122+
![v201screencaps-nodesPods](https://github.com/oslabs-beta/kaptn/assets/119518056/60f19526-8c79-40c9-9a8c-000d38240dc6)
123+
124+
125+
- Deployments:
126+
- View ReplicaSets and Statuses
127+
- View Deployment Yaml
128+
- View Deployment Logs
129+
- Describe Deployment
130+
- View Rollout Status
131+
- View Rollout History
132+
- Rollback to Previous Version
133+
- Perform Rolling Restart
134+
- Scale Deployment
135+
- Delete Deployment
136+
- Filter by Namespace
137+
138+
![v201screencaps-Deploys](https://github.com/oslabs-beta/kaptn/assets/119518056/33a362be-1be1-404e-9018-a3599735b9c7)
107139

108140
### Supercharged CLI
109141

main.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
const path = require("path");
2-
const { app, BrowserWindow, ipcMain } = require("electron");
2+
const { app, BrowserWindow, ipcMain, ipcRenderer } = require("electron");
33
const { exec, spawnSync, spawn, execSync } = require("child_process");
44
const fixPath = require("fix-path");
55

6+
// const storage = require("electron-json-storage");
7+
68
const isDev = process.env.NODE_ENV === "development";
79

810
function createMainWindow() {
@@ -17,6 +19,7 @@ function createMainWindow() {
1719
webPreferences: {
1820
nodeIntegration: true,
1921
contextIsolation: false,
22+
// enableRemoteModule: true,
2023
},
2124
});
2225

@@ -45,28 +48,28 @@ ipcMain.on("getDirectory_command", (event, arg) => {
4548
// Handle failed command execution
4649
if (err) {
4750
let output = kubDir;
48-
return event.sender.send("got_directory", kubDir);
51+
return event.sender.send("got_directory", app.getPath("home"));
4952
}
5053
// Handle successful command execution but returned error (stderr)
5154
if (stderr) {
52-
return event.sender.send("got_directory", kubDir);
55+
return event.sender.send("got_directory", app.getPath("home"));
5356
}
5457
// Handle successful command execution with no errors
55-
return event.sender.send("got_directory", kubDir);
58+
return event.sender.send("got_directory", app.getPath("home"));
5659
});
5760
} else {
5861
exec(` ${getDirectoryCommand}`, { cwd: currDir }, (err, stdout, stderr) => {
5962
// Handle failed command execution
6063
if (err) {
6164
let output = kubDir;
62-
return event.sender.send("got_directory", kubDir);
65+
return event.sender.send("got_directory", app.getPath("home"));
6366
}
6467
// Handle successful command execution but returned error (stderr)
6568
if (stderr) {
66-
return event.sender.send("got_directory", kubDir);
69+
return event.sender.send("got_directory", app.getPath("home"));
6770
}
6871
// Handle successful command execution with no errors
69-
return event.sender.send("got_directory", kubDir);
72+
return event.sender.send("got_directory", app.getPath("home"));
7073
});
7174
}
7275
});

0 commit comments

Comments
 (0)