Skip to content

Commit ccc2d40

Browse files
committed
PRE-BUILD COMMANDS! NOW IN CONSOLE!
1 parent 3879d76 commit ccc2d40

35 files changed

+805
-325
lines changed

app/actions/eon_detail_actions.js

Lines changed: 8 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,28 @@
11
import * as types from '../constants/eon_detail_action_types';
22

3-
// ACTION CREATORS
4-
let pollerId;
5-
6-
export function BEGIN_install(eon) {
7-
return {
8-
type: types.INSTALL,
9-
payload: eon
10-
};
11-
}
12-
13-
export function SUCCESS_install() {
14-
return {
15-
type: types.INSTALL_SUCCESS
16-
};
17-
}
18-
19-
export function FAIL_install(err) {
20-
return {
21-
type: types.INSTALL_FAIL,
22-
payload: {
23-
err
24-
}
25-
};
26-
}
27-
28-
export function BEGIN_uninstall() {
29-
return {
30-
type: types.UNINSTALL
31-
};
32-
}
33-
34-
export function SUCCESS_uninstall() {
35-
return {
36-
type: types.UNINSTALL_SUCCESS
37-
};
38-
}
39-
40-
export function FAIL_uninstall(err) {
41-
return {
42-
type: types.UNINSTALL_FAIL,
43-
payload: {
44-
err
45-
}
46-
};
47-
}
48-
493
export function CHANGE_TAB(tab) {
504
return {
515
type: types.CHANGE_TAB,
526
payload: tab
537
};
548
}
559

56-
// SSH ACTION CREATORS
57-
export function BEGIN_connectSSH() {
10+
export function SHOW_COMMAND(tab) {
5811
return {
59-
type: types.CONNECT_SSH
60-
};
61-
}
62-
63-
64-
export function SUCCESS_connectSSH() {
65-
return {
66-
type: types.CONNECT_SSH_SUCCESS
67-
};
68-
}
69-
70-
export function FAIL_connectSSH(err) {
71-
return {
72-
type: types.CONNECT_SSH_FAIL,
73-
payload: {
74-
err
75-
}
76-
};
77-
}
78-
79-
export function BEGIN_sshCommand() {
80-
return {
81-
type: types.SSH_COMMAND
82-
};
83-
}
84-
85-
export function SUCCESS_sshCommand() {
86-
return {
87-
type: types.SSH_COMMAND_SUCCESS
88-
};
89-
}
90-
91-
export function RESPONSE_sshCommand(stdout,stderr) {
92-
return {
93-
type: types.SSH_COMMAND_RESPONSE,
94-
payload: {
95-
stderr,
96-
stdout
97-
}
12+
type: types.SHOW_COMMAND,
13+
payload: tab
9814
};
9915
}
10016

101-
export function STOP_POLLING() {
17+
export function HIDE_COMMAND() {
10218
return {
103-
type: types.STOP_POLLING
19+
type: types.HIDE_COMMAND
10420
};
10521
}
10622

107-
export function FAIL_sshCommand(err) {
23+
export function RUN_COMMAND(command) {
10824
return {
109-
type: types.SSH_COMMAND_FAIL,
110-
payload: {
111-
err
112-
}
25+
type: types.RUN_COMMAND,
26+
payload: command
11327
};
114-
}
115-
116-
export function stopPolling() {
117-
dispatch(STOP_POLLING);
11828
}

app/actions/ui_actions.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
import * as types from '../constants/ui_action_types';
2+
23
export function SET_TERMINAL_FONT_SIZE(fontSize) {
34
return {
45
type: types.SET_TERMINAL_FONT_SIZE,
56
payload: fontSize
67
};
8+
}
9+
export function SET_STATE_LIST_DEPTH(depth) {
10+
console.warn("Setting depth to: ", depth);
11+
return {
12+
type: types.SET_STATE_LIST_DEPTH,
13+
payload: depth
14+
};
715
}

app/actions/zmq_actions.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ export function ERROR(err) {
2222
type: types.ERROR,
2323
payload: err
2424
};
25-
}
25+
}
26+
export function TOGGLE_PAUSE() {
27+
return {
28+
type: types.TOGGLE_PAUSE
29+
};
30+
}

app/app.global.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ $right-content-width: calc(100% - #{$left-bar-width});
1717
body {
1818
background-color:#000;
1919
}
20+
.react-json-view {
21+
* {
22+
opacity:1!important;
23+
}
24+
}
2025
.app-wrapper {
2126
$darker_col: 6;
2227
padding-top:0;
@@ -37,6 +42,8 @@ body {
3742
@import "styles/tab-list";
3843
@import "styles/tab-content";
3944
@import "styles/loading-overlay";
45+
@import "styles/state-list";
46+
@import "styles/command-bar";
4047
@import "styles/is-mac";
4148

4249
.container-fluid {
@@ -69,7 +76,7 @@ body {
6976
position:relative;
7077
height:100%;
7178
width:100%;
72-
padding:15px;
79+
padding:0;
7380
.json-pretty {
7481
background-color:#000;
7582
}

app/background/zmq.js

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,22 @@ function onMessage(sender, event_message, service, cb) {
2626
if (service.id === "logMessage") {
2727
jsonData = JSON.parse(jsonData);
2828
}
29-
newData = {
30-
fields: Object.keys(jsonData),
31-
latestMessage: jsonData
32-
};
33-
if (!data[service.id]) {
34-
data[service.id] = {};
35-
}
29+
// newData = {
30+
// ,
31+
// latestMessage: jsonData
32+
// };
33+
3634
data[service.id] = {
37-
...data[service.id],
38-
...newData
35+
fields: Object.keys(jsonData),
36+
latestMessage: jsonData,
37+
messages: [
38+
...data[service.id].messages,
39+
jsonData
40+
]
3941
};
40-
42+
writeLog("message count: " + data[service.id].messages.length);
4143
let msgResp = {};
42-
msgResp[service.id] = data[service.id]
44+
msgResp[service.id] = data[service.id];
4345
sender.send(types.MESSAGE, msgResp);
4446
}
4547

@@ -52,6 +54,16 @@ export function startZmq() {
5254
ipcMain.on(types.CONNECT, (evt, ip, service) => {
5355
const { sender } = evt;
5456
const addr = `tcp://${ip}:${service.port}`;
57+
if (!data[service.id]) {
58+
data[service.id] = {
59+
latestMessage: {},
60+
messages: []
61+
};
62+
}
63+
// if (!data[service.id].messages) {
64+
// data[service.id].messages = [];
65+
// }
66+
data[service.id].messages = [];
5567
msgHandler = throttle((msg) => { return onMessage(sender, msg, service); }, 200, { leading: true });
5668
sock.on('message', msgHandler);
5769
writeLog(`Connecting to ${addr}`, service.key);

app/components/EonDetail/DriveViewer.js

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)