Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin web ui #94

Draft
wants to merge 41 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a945605
remove default gui submodule from addons
jupe Sep 23, 2017
657f9b8
remove default gui submodule from addons
jupe Sep 23, 2017
1a6a16c
very simple admin page for update service
jupe Sep 23, 2017
a3ff3cd
draft ui for admin to allow update server
jupe Sep 23, 2017
7130931
fixing cluster API
jupe Sep 26, 2017
4802a55
improve simple stdin shell
jupe Sep 26, 2017
f1b5f3a
remove stdin handler and replace unpkg.com with cdnjs.cloudflare.com
jupe Sep 26, 2017
8be1efc
revert gitUpdater changes
jupe Sep 27, 2017
027cca2
tuning admin ui - workers table
jupe Sep 28, 2017
4bb4c79
tuning admin ui
jupe Sep 28, 2017
00fc2df
further develop socketio routes
jupe Sep 29, 2017
0423170
cleaning a bit - fix unittest and eslint warnings
jupe Sep 29, 2017
4831571
separate cluster route to separate controller
jupe Sep 29, 2017
103190e
remove console print
jupe Sep 30, 2017
07fd68b
wip: use opentmi-jsclient for admingui
Oct 2, 2017
98d3ba2
wip: improve admin chart
Oct 2, 2017
e4b3922
wip: reorder master stats a bit and use promises
Oct 2, 2017
dcd7c5d
wip: eslintignore
Oct 2, 2017
d57ab52
move eslintignore to root
Oct 2, 2017
2366474
wip: eslint fixes
Oct 2, 2017
e68ba75
wip: eslint cleaning
Oct 3, 2017
614dac8
handle server closing more carefully
Oct 3, 2017
9286093
wip: adminui tuning
Oct 3, 2017
a65d29d
Merge branch 'master' into adminui
jupe Oct 5, 2017
003c013
Merge commit '69287af412b61ee714d623de1088c040b7dabf3b' into adminui
Oct 5, 2017
819eaec
Merge branch 'master' into adminui
jupe Oct 5, 2017
bc3dd3a
eslint fixes
jupe Oct 5, 2017
f6555b1
move whole ui implementation to own repository.
Oct 14, 2017
b141674
add adminui addon to submodule
Oct 14, 2017
975c8f6
Merge branch 'master' into adminui
jupe Oct 14, 2017
e376ce0
Merge branch 'master' into adminui
jupe Oct 15, 2017
dd563d5
Merge branch 'master' into adminui
jupe Oct 15, 2017
cc0ae4a
Merge branch 'master' into adminui
jupe Oct 15, 2017
d101001
Merge branch 'master' into adminui
jupe Oct 15, 2017
f40fc08
Update socketio.js
jupe Oct 15, 2017
ba44373
Update package.json
jupe Oct 15, 2017
d9e6082
Update gitUpdater.js
jupe Oct 15, 2017
b11818f
Update master.js
jupe Oct 15, 2017
d721fd8
Update master.js
jupe Oct 15, 2017
5cde388
Update index.js
jupe Oct 15, 2017
6b4a2eb
Update local-event-bus.js
jupe Nov 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ data/
db/
db.log/
log/
doc/
doc/
app/static/admin/opentmi-client.js
7 changes: 4 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "default-gui"]
path = app/addons/default-gui
url = https://github.com/OpenTMI/opentmi-default-gui.git
[submodule "app/addons/opentmi-adminui"]
path = app/addons/opentmi-adminui
url = https://github.com/opentmi/opentmi-adminui.git
branch = master
1 change: 0 additions & 1 deletion app/addons/default-gui
Submodule default-gui deleted from f1a737
1 change: 1 addition & 0 deletions app/addons/opentmi-adminui
Submodule opentmi-adminui added at 2160b2
8 changes: 5 additions & 3 deletions app/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ module.exports = (app) => {
app.use(compression({
threshold: 512
}));

app.use(express.static(`${nconf.get('root')}/public`));

/*
const publicFolder = `${nconf.get('root')}/app/public`;
logger.debug(`share public folder: ${publicFolder}`);
app.use(express.static(publicFolder));
*/
// Logging middleware
app.use(expressWinston.logger({
winstonInstance: logger,
Expand Down
7 changes: 5 additions & 2 deletions app/tools/eventBus/cluster-event-bus.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ function emit(event) {
_.each(cluster.workers, (worker, id) => {
logger.silly(`Sending event to Worker#${id}.`);
if (worker.isConnected()) {
// @todo better intercommunication..
worker.send(event.toJSON());
}
});
} else {
logger.silly('Sending event to Master');
process.send(event.toJSON());
try {
process.send(event.toJSON());
} catch (error) {
logger.warn(`Cannot write to master: ${error}`);
}
}
}

Expand Down
Loading