klattimer / SystemDashboard

A lightweight python system dashboard written in cherry py delivered over the web.
MIT License
10 stars 2 forks source link

Added config file for host and ip #16

Closed PeskyPotato closed 5 years ago

PeskyPotato commented 5 years ago

Changes

Summary

Partially addresses issue #10 adding a JSON file and parsing it in app.py makes it easier to add functionality in the future.

klattimer commented 5 years ago

Could you pass the whole config object to server? Not just the host/port - then we can make it available there generally, maybe some sanity checks on the values in server too. Then I'll happily merge this.

PeskyPotato commented 5 years ago

Sure thing, I'll add some checks for ipv4 and ipv6 addresses and pass in the entire dictionary into the classServer

klattimer commented 5 years ago

Do you want another task to work on? I can assign something to you if you like?

PeskyPotato commented 5 years ago

It's cool, I've started changing the css yesterday to have a dark theme because anything I use has to have a dark theme : ) . If you want I could include the option to select the css file in config.json.

klattimer commented 5 years ago

Yeah, please do that. Would be nice to have some simple theming, but I've got plans for the UI in the future so keep abreast of changes there.

klattimer commented 5 years ago

For the dark theme how much are you changing? It might make sense to start a :root colour palette in the CSS, so you only have to change that, and that way we can simplify the CSS quite a bit.

I already need that css file splitting into bits to support each unique thing, instead of it all piled together in the way that it is.

PeskyPotato commented 5 years ago

Definitely, this is how the root currently looks after the changes I've made. I'll work on it a bit more, would you want me to make a pull request for this or hold off till you make any changes?

:root {
    --base-size: 240px;
    --body-bg: rgba(232, 217, 183, 0.3);
    --widget-bg: rgba(255,255,255,0.7);
    --inner-widget-bg: rgba(255,255,255,0.9);
    --header-bg: #565654;
    --widget-grid-header-bg: white; 
    --menu-bg: #E0DBD2;
    --data-table-color: black;
    --info-table-color: black;
    --menu-a-color: rgba(0,0,0,0.6);
    --menu-a-hover-color: rgba(255,255,255,0.8);
    --logfile-color: black;
    --logfile-hover-bg: rgba(0,0,0,0.03);
}
klattimer commented 5 years ago

Take a look at my most recent commits I think it's a bit nicer. Also, can we move this discussion to another issue.