diff --git a/.gitignore b/.gitignore index 996ba6a..190f101 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ .idea output dist +private packages/**/lib packages/**/dist node_modules @@ -14,4 +15,5 @@ packages/**/coverage .coverage client/config.json server/config.mjs -server/config.json \ No newline at end of file +server/config.json +server/cert diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d8edc..965d088 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### 1.0.2 ++ [x] Added cpu threads load chart ++ [x] Re-disposition RAM and CPU panels content ++ [x] Added https server creation. Use server conf option `https` to set paths to cert and key ++ [x] Added dark/light modes ++ [x] Visual improvements + ### 1.0.1 + [x] Added php proxy server + [x] Added uptime values from sidecar (parsed from http://uptime.minaprotocol.com) diff --git a/HOWTO.EN.md b/HOWTO.EN.md index 121bfd3..d74a3f0 100644 --- a/HOWTO.EN.md +++ b/HOWTO.EN.md @@ -198,6 +198,7 @@ Copy the files from the `server` folder of the repository to a convenient place Next, we have two options: 1) We open a port on the Mina server to access GraphQL for the Monitor server side 2) We forward the GraphQL port using SSH from the Mina server to the Monitor server +3) We forward the Monitor Server port using SSH from the Mina server to your local computer **Option 1** Open the GraphQL port (flag `-insecure-rest-server` when starting Mina). @@ -252,4 +253,32 @@ In the client's configuration file, we write: } ``` -Compile and run with any of the options listed above. \ No newline at end of file +Compile and run with any of the options listed above. + +**Option 3** +Let you start the monitor server on a computer with an ip address of `1.1.1.1` and port` 8000`. +The server config states + +```json +{ +"host": "1.1.1.1:8000" +} +``` + +We forward the Monitor Server with the command +```shell +ssh -L 8000: 1.1.1.1: 8000 your_user_name@1.1.1.1 +``` + +After executing this command, the server side of the monitor will work locally on port 8000. +Now you can specify in the settings: + +For client: + +```json +{ + "hosts": { + "node1": "localhost: 8000" + } +} +``` \ No newline at end of file diff --git a/HOWTO.RU.md b/HOWTO.RU.md index 8606585..8244015 100644 --- a/HOWTO.RU.md +++ b/HOWTO.RU.md @@ -192,6 +192,7 @@ npm run serve_x Далее у нас два варианта: 1) Мы открываем порт на сервере Mina для доступа к GraphQL для серверной части Монитора 2) Мы пробрасываем порт GraphQL средствами SSH от сервера Mina на сервер Монитора +3) Мы пробрасываем порт Monitor Server средствами SSH от сервера Mina на ваш локальный компьютер **Вариант 1** Открываем порт GraphQL (флаг `-insecure-rest-server` при запуске Mina). @@ -238,4 +239,31 @@ node monitor.mjs } ``` -Компилируем и запускаем любым из вариантов. \ No newline at end of file +Компилируем и запускаем любым из вариантов. + +**Вариант 3** +Пусть вы запустили сервер монитора на компьютере с ip адресом `1.1.1.1` и портом `8000`. +В конфигурации сервера указано + +```json +{ + "host": "1.1.1.1:8000" +} +``` + +Пробрасываем Monitor Server командой +```shell +ssh -L 8000:1.1.1.1:8000 user_name@1.1.1.1 +``` +После выполнения этой команды у вас локально на порту 8000 будет работать серверная часть монитора. +Теперь вы можете указать в настройках: + +Для Клиента: + +```json +{ + "hosts": { + "node1": "localhost:8000" + } +} +``` diff --git a/README.RU.md b/README.RU.md index 61f8449..e10ffe9 100644 --- a/README.RU.md +++ b/README.RU.md @@ -18,7 +18,7 @@ - клиент - JavaScript, HTML, CSS ### Использованы компоненты -+ [x] [Mina Node Monitor]() by [Serhii Pimenov](https://github.com/olton) ++ [x] [Mina Node Monitor](https://github.com/olton/mina-node-monitor) by [Serhii Pimenov](https://github.com/olton) + [x] [Metro 4](https://github.com/olton/Metro-UI-CSS) by [Serhii Pimenov](https://github.com/olton) + [x] [ChartJS](https://github.com/olton/chartjs) by [Serhii Pimenov](https://github.com/olton) + [x] [SystemInformation](https://github.com/sebhildebrandt/systeminformation) by [Sebastian Hildebrandt](https://github.com/sebhildebrandt) @@ -53,7 +53,7 @@ npm i ```json { "hosts": { - "node1": "192.168.1.2:3085" + "node1": "xxx.xxx.xxx.xxx:xxxx" }, "useHost": "node1", "intervals": { @@ -66,13 +66,14 @@ npm i "cpu": 2000, "uptime": 600000 }, + "theme": "auto", "useProxy": false, "proxy": "https://server/proxy.php" } ``` Секция `hosts` содержит информацию о серверах, на которых установлена серверная часть Монитора. -Каждый адрес должен определять открытый внешний сетевой интерфейс и его порт. +Каждый адрес должен определять открытый внешний сетевой интерфейс/ip и его порт. Параметр `useHost` определяет какой сервер из списка в секции `hosts` будет использоваться. Параметр `showIp` определяет показывать или нет IP адрес в блоке **HOSTNAME** (иногда не стоит светить IP адрес). @@ -90,6 +91,7 @@ npm i - `mem` - интервал обновления информации о загрузке оперативной памяти сервера - `cpu` - интервал обновления информации о загрузке CPU(s) - `uptime` - interval for retrieve information about sidecar calculating server uptime +- `theme` - default `auto` (dark\light mode dependence from os), value can be `dark`, `light` Section for using proxy (читайте про прокси-сервер ниже) - `useProxy` - use or not proxy server @@ -110,7 +112,11 @@ Section for using proxy (читайте про прокси-сервер ниж "restartAfter": 30, "restartCmd": "systemctl --user restart mina", "host": "192.168.1.2:3085", - "graphql": "localhost:3085" + "graphql": "localhost:3085", + "https": { + "key": "", + "cert": "" + } } ``` @@ -128,6 +134,7 @@ where - `canRestartNode` - Если значение этого ключа **true**, сервер может перезапустить узел мины - `restartAfter` - значение в минутах, если узел синхронизирован, но при этом отстает по высоте блоков от Mina Explorer в течении указанного времени, узел будет перезапущен - `restartCmd` - Команда для перезапуска узла Mina +- `https` - contains paths to cert and key to create https server ### Сборка клиентского приложения diff --git a/README.UA.md b/README.UA.md index 73dd52d..cfaa21a 100644 --- a/README.UA.md +++ b/README.UA.md @@ -18,7 +18,7 @@ - кліент - JavaScript, HTML, CSS ### Використано компоненти -+ [x] [Mina Node Monitor]() by [Serhii Pimenov](https://github.com/olton) ++ [x] [Mina Node Monitor](https://github.com/olton/mina-node-monitor) by [Serhii Pimenov](https://github.com/olton) + [x] [Metro 4](https://github.com/olton/Metro-UI-CSS) by [Serhii Pimenov](https://github.com/olton) + [x] [ChartJS](https://github.com/olton/chartjs) by [Serhii Pimenov](https://github.com/olton) + [x] [SystemInformation](https://github.com/sebhildebrandt/systeminformation) by [Sebastian Hildebrandt](https://github.com/sebhildebrandt) @@ -54,7 +54,7 @@ npm i ```json { "hosts": { - "node1": "192.168.1.2:3085" + "node1": "xxx.xxx.xxx.xxx:xxxxx" }, "useHost": "node1", "intervals": { @@ -67,13 +67,14 @@ npm i "cpu": 2000, "uptime": 600000 }, + "theme": "auto", "useProxy": false, "proxy": "https://server/proxy.php" } ``` Секція `hosts` містить інформацію про сервери, на яких встановлена серверна частина Монітору. -Кожна адреса повинна визначати мережевий інтерфейс та його порт. +Кожна адреса повинна визначати мережевий інтерфейс/ip та його порт. Параметр `useHost` визначає який сервер зі списку в секції` hosts` буде використовуватись. Параметр `showIp` визначає показувати чи ні IP адресу в блоці ** Addresses ** (іноді не варто світити IP адресу). @@ -91,6 +92,7 @@ npm i - `mem` - інтервал оновлення інформації про завантаження оперативної пам'яті сервера - `cpu` - інтервал оновлення інформації про завантаження CPU (s) - `uptime` - interval for retrieve information about sidecar calculating server uptime +- `theme` - default `auto` (dark\light mode dependence from os), value can be `dark`, `light` Section for using proxy (інформацію про проксі-сервер викладено нижче) - `useProxy` - use or not proxy server @@ -113,7 +115,11 @@ Section for using proxy (інформацію про проксі-сервер "restartAfter": 30, "restartCmd": "systemctl --user restart mina", "host": "192.168.1.2:3085", - "graphql": "localhost:3085" + "graphql": "localhost:3085", + "https": { + "key": "", + "cert": "" + } } ``` @@ -131,6 +137,7 @@ Section for using proxy (інформацію про проксі-сервер - `canRestartNode` - Якщо значення цього ключа **true**, сервер може перезапустити вузол міни - `restartAfter` - значення в хвилинах, якщо вузол синхронізований, але при цьому відстає по висоті блоків від Mina Explorer протягом зазначеного часу, вузол буде перезапущений - `restartCmd` - Команда для перезапуска вузла Mina +- `https` - contains paths to cert and key to create https server ### Збірка клієнтського додатка diff --git a/README.md b/README.md index d017ca6..4c4fe5a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@
# Mina Node Monitor -**Mina Node Monitor** is an extended graphical version of the` mina client status` command with additional indicators. +**Mina Monitor** is an extended graphical version of the` mina client status` command with additional indicators. This is a `client-server` application for visual monitoring of the validator node and alerts when the node has a problem. ## Key Features @@ -18,7 +18,7 @@ This is a `client-server` application for visual monitoring of the validator nod - client - JavaScript, HTML, CSS ### Credits -+ [x] [Mina Node Monitor]() by [Serhii Pimenov](https://github.com/olton) ++ [x] [Mina Monitor](https://github.com/olton/mina-node-monitor) by [Serhii Pimenov](https://github.com/olton) + [x] [Metro 4](https://github.com/olton/Metro-UI-CSS) by [Serhii Pimenov](https://github.com/olton) + [x] [ChartJS](https://github.com/olton/chartjs) by [Serhii Pimenov](https://github.com/olton) + [x] [SystemInformation](https://github.com/sebhildebrandt/systeminformation) by [Sebastian Hildebrandt](https://github.com/sebhildebrandt) @@ -52,7 +52,7 @@ Create file `config.json` in a `client` folder. Example below demonstrate witch ```json { "hosts": { - "node1": "192.168.1.2:3085" + "node1": "xxx.xxx.xxx.xxx:xxxx" }, "useHost": "node1", "intervals": { @@ -65,13 +65,14 @@ Create file `config.json` in a `client` folder. Example below demonstrate witch "cpu": 2000, "uptime": 600000 }, + "theme": "auto", "useProxy": false, - "proxy": "https://server/proxy.php" + "proxy": "https://server/proxy.php", } ``` Section `hosts` contain information about your servers addresses. -Each address must be an opened network interface on the mina node server. +Each address must be an opened network interface/ip and port on the mina node server. Parameter `useHost` defines host where client retrieves data. Section `intervals` contain information about intervals (in milliseconds), with which data will be retrieve. @@ -84,11 +85,14 @@ Section `intervals` contain information about intervals (in milliseconds), with - `mem` - interval for retrieve information about server memory - `cpu` - interval for retrieve information about server CPU(s) - `uptime` - interval for retrieve information about sidecar calculating server uptime +- `theme` - default `auto` (dark\light mode dependence from os), value can be `dark`, `light` Section for using proxy (read about proxy below) - `useProxy` - use or not proxy server - `proxy` - proxy server address + + #### Config file for server Create file `config.json` in a `server` folder. Example below demonstrate witch data you must create. ```json @@ -103,8 +107,12 @@ Create file `config.json` in a `server` folder. Example below demonstrate witch "canRestartNode": true, "restartAfter": 30, "restartCmd": "systemctl --user restart mina", - "host": "192.168.1.2:3085", - "graphql": "localhost:3085" + "host": "xxx.xxx.xxx.xxx:xxxx", + "graphql": "xxx.xxx.xxx.xxx:xxxx", + "https": { + "key": "", + "cert": "" + } } ``` @@ -118,10 +126,11 @@ where - `alertInterval` - the interval with which the server will check node state and send alerts in telegrams - `blockDiff` - difference in blocks with MinaExplorer at which an alert will be sent - `host` - IP and PORT on which the server will run -- `graphql` - Mina node GraphQL address +- `graphql` - Mina node GraphQL address (by default `localhost:3085`) - `canRestartNode` - if true, server can restart mina node - `restartAfter` - value in minutes, if node synced and height is lower from Mina Explorer within the specified time, node will restart after this interval - `restartCmd` - command for restart mina node +- `https` - contains paths to cert and key to create https server ### Build web client To build client use command: diff --git a/client/css/index.css b/client/css/index.css index 0a7362d..c47eff1 100644 --- a/client/css/index.css +++ b/client/css/index.css @@ -3,22 +3,46 @@ --text-color: #adbaa9; --border-color: #444c56; --panel-background: #22272e; + --accent-color: #fff; --alert-color: #ea0b0b; --warning-color: #ff8330; - --chart-stroke-color: #7dc37b; - --chart-fill-color: rgba(125, 195, 123, 0.3); + --info-color1: #7dc37b; + --info-color2: #1ba1e2; + --info-color3: #ffdb10; + --fill-color: rgba(125, 195, 123, 0.3); } .fg-normal { - color: var(--text-color) !important; + color: var(--text-color); +} +.fg-accent { + color: var(--accent-color); +} +.fg-warning { + color: var(--warning-color); +} +.fg-alert { + color: var(--alert-color); } .fg-stroke { - color: var(--chart-stroke-color); + color: var(--info-color1); +} +.fg-fill { + color: var(--fill-color); +} +.fg-info1 { + color: var(--info-color1); +} +.fg-info2 { + color: var(--info-color2); +} +.fg-info3 { + color: var(--info-color3); } .bd-system { - border-color: var(--border-color) !important; + border-color: var(--border-color); } .bg-system { - background: var(--body-background) !important; + background: var(--body-background); } body { background: var(--body-background); @@ -31,28 +55,30 @@ body { height: 36px; } hr { - background: var(--border-color) !important; + background: var(--border-color); } #max-block { - color: #fff000; + color: var(--info-color3); } #max-unvalidated { - color: #ff0000; + color: var(--alert-color); } #explorer-height { - color: #0b98da; + color: var(--info-color2); } .panel { height: 100%; background: var(--panel-background); color: var(--text-color); - border: 1px solid var(--border-color); + border-color: var(--border-color) !important; + border: 1px solid; padding: 0 10px; } .panel .panel-title { - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid; + border-color: var(--border-color); text-align: center; - color: darkorange; + color: var(--warning-color); font-size: 12px; font-weight: bold; } @@ -68,16 +94,16 @@ hr { .panel.alert, .panel.warning { background: var(--alert-color); - color: #fff !important; + color: var(--accent-color); } .panel.alert .panel-title, .panel.warning .panel-title { border: none; - color: #fff !important; + color: var(--accent-color); } .panel.alert #node-status, .panel.warning #node-status { - color: #fff !important; + color: var(--accent-color); } .panel.alert #max-block, .panel.warning #max-block, @@ -85,7 +111,7 @@ hr { .panel.warning #max-unvalidated, .panel.alert #explorer-height, .panel.warning #explorer-height { - color: #fff; + color: var(--accent-color); } .panel.warning { background: var(--warning-color); @@ -116,16 +142,18 @@ hr { margin-top: 8px; } .info-table tr:not(:last-child) { - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid; + border-color: var(--border-color); } .info-table tbody td { padding: 4px 0; } .info-table tbody td:nth-child(2) { - color: #fff; + color: var(--accent-color); } .progress { - border: 1px solid var(--border-color); + border: 1px solid; + border-color: var(--border-color); overflow: visible; } .progress .value { @@ -133,26 +161,153 @@ hr { transform: none; } .progress-back { - background: var(--body-background); + background: var(--alert-color); } .progress-bar { - background: var(--chart-stroke-color) !important; + background: var(--info-color1) !important; } #ip-address, #bind-ip, #p2p-port, #client-port { font-size: 18px; - color: #fff; + color: var(--accent-color); font-weight: 500; line-height: 1.2; } #sidecar-position, #sidecar-uptime, #sidecar-score { - color: #fff000; + color: var(--info-color3); } canvas { max-width: 100%; } +:root { + --body-background-light: #f6f8fa; + --text-color-light: #24292e; + --border-color-light: #e1e4e8; + --panel-background-light: #ffffff; + --accent-color-light: #444c56; + --alert-color-light: #ea0b0b; + --warning-color-light: #ff8330; + --info-color1-light: #7dc37b; + --info-color2-light: #1ba1e2; + --info-color3-light: #ffe725; + --fill-color-light: rgba(125, 195, 123, 0.3); +} +body.light-mode { + background: var(--body-background-light); + color: var(--text-color-light); +} +body.light-mode .fg-normal { + color: var(--text-color-light); +} +body.light-mode .fg-accent { + color: var(--accent-color-light); +} +body.light-mode .fg-warning { + color: var(--warning-color-light); +} +body.light-mode .fg-alert { + color: var(--alert-color-light); +} +body.light-mode .fg-stroke { + color: var(--info-color1-light); +} +body.light-mode .fg-fill { + color: var(--fill-color-light); +} +body.light-mode .fg-info1 { + color: var(--info-color1-light); +} +body.light-mode .fg-info2 { + color: var(--info-color2-light); +} +body.light-mode .fg-info3 { + color: var(--accent-color-light); +} +body.light-mode .bd-system { + border-color: var(--border-color-light); +} +body.light-mode .bg-system { + background: var(--body-background-light); +} +body.light-mode hr { + background: var(--border-color-light); +} +body.light-mode #max-block { + color: var(--accent-color-light); +} +body.light-mode #max-unvalidated { + color: var(--alert-color-light); +} +body.light-mode #explorer-height { + color: var(--info-color2-light); +} +body.light-mode .panel { + background: var(--panel-background-light); + color: var(--text-color-light); + border-color: var(--border-color-light) !important; +} +body.light-mode .panel .panel-title { + border-color: var(--border-color-light); + color: var(--accent-color-light); +} +body.light-mode .panel.alert, +body.light-mode .panel.warning { + background: var(--alert-color-light); + color: #fff; +} +body.light-mode .panel.alert .panel-title, +body.light-mode .panel.warning .panel-title { + color: #fff; +} +body.light-mode .panel.alert #node-status, +body.light-mode .panel.warning #node-status { + color: #fff; +} +body.light-mode .panel.alert #max-block, +body.light-mode .panel.warning #max-block, +body.light-mode .panel.alert #max-unvalidated, +body.light-mode .panel.warning #max-unvalidated, +body.light-mode .panel.alert #explorer-height, +body.light-mode .panel.warning #explorer-height, +body.light-mode .panel.alert .fg-stroke, +body.light-mode .panel.warning .fg-stroke, +body.light-mode .panel.alert .fg-normal, +body.light-mode .panel.warning .fg-normal, +body.light-mode .panel.alert .fg-accent, +body.light-mode .panel.warning .fg-accent { + color: #fff; +} +body.light-mode .panel.warning { + background: var(--warning-color-light); +} +body.light-mode .info-table tr:not(:last-child) { + border-color: var(--border-color-light); +} +body.light-mode .info-table tbody td:nth-child(2) { + color: var(--accent-color-light); +} +body.light-mode .progress { + border-color: var(--panel-background-light); +} +body.light-mode .progress-back { + background: var(--alert-color-light); +} +body.light-mode .progress-bar { + background: var(--info-color1-light); +} +body.light-mode #ip-address, +body.light-mode #bind-ip, +body.light-mode #p2p-port, +body.light-mode #client-port { + color: var(--accent-color-light); +} +body.light-mode #sidecar-position, +body.light-mode #sidecar-uptime, +body.light-mode #sidecar-score { + color: var(--accent-color-light); +} /*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/client/css/index.css.map b/client/css/index.css.map index 8f45373..e7fff36 100644 --- a/client/css/index.css.map +++ b/client/css/index.css.map @@ -1 +1 @@ -{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACE,0BAAA;EACA,qBAAA;EACA,uBAAA;EACA,2BAAA;EACA,sBAAA;EACA,wBAAA;EACA,6BAAA;EACA,4CAAA;;AAGF;EACE,OAAO,iBAAP;;AAGF;EACE,OAAO,yBAAP;;AAGF;EACE,cAAc,mBAAd;;AAGF;EACE,YAAY,sBAAZ;;AAGF;EACE,YAAY,sBAAZ;EACA,OAAO,iBAAP;;AAGF;EACE,sBAAA;;AAGF;EACE,YAAA;;AAGF;EACE,YAAY,mBAAZ;;AAGF;EAAY,cAAA;;AACZ;EAAkB,cAAA;;AAClB;EAAkB,cAAA;;AAElB;EACE,YAAA;EACA,YAAY,uBAAZ;EACA,OAAO,iBAAP;EACA,kBAAkB,mBAAlB;EACA,eAAA;;AALF,MAOE;EACE,yBAAyB,mBAAzB;EACA,kBAAA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;;AAZJ,MAeE;EACE,YAAA;EACA,aAAA;EACA,uBAAA;EACA,mBAAA;;AAEA,MANF,eAMI;EACA,WAAA;;AAIJ,MAAC;AAAQ,MAAC;EACR,YAAY,kBAAZ;EACA,WAAA;;AAFF,MAAC,MAIC;AAJO,MAAC,QAIR;EACE,YAAA;EACA,WAAA;;AANJ,MAAC,MAQC;AARO,MAAC,QAQR;EACE,WAAA;;AATJ,MAAC,MAWC;AAXO,MAAC,QAWR;AAXF,MAAC,MAWa;AAXL,MAAC,QAWI;AAXd,MAAC,MAW+B;AAXvB,MAAC,QAWsB;EAC5B,WAAA;;AAGJ,MAAC;EACC,YAAY,oBAAZ;;AAIJ;AAAW;AAAc;AAAe;AAAc;AAAe;AAAc;AAAgB;EACjG,eAAA;EACA,iBAAA;EACA,cAAA;;AAGF;EACE,mBAAA;;AAGF;EACE,eAAA;;AAGF;AAAsB;EACpB,gBAAA;;AAGF;EACE,eAAA;;AADF,WAEE,GAAE,IAAI;EACJ,yBAAyB,mBAAzB;;AAHJ,WAME,MAAM;EACJ,cAAA;;AACA,WAFF,MAAM,GAEH,UAAU;EACT,WAAA;;AAKN;EACE,kBAAkB,mBAAlB;EACA,iBAAA;;AAFF,SAIE;EACE,UAAA;EACA,eAAA;;AAGJ;EACE,YAAY,sBAAZ;;AAEF;EACE,YAAY,yBAAZ;;AAGF;AAAa;AAAU;AAAW;EAChC,eAAA;EACA,WAAA;EACA,gBAAA;EACA,gBAAA;;AAGF;AAAmB;AAAiB;EAClC,cAAA;;AAGF;EACE,eAAA","file":"index.css"} \ No newline at end of file +{"version":3,"sources":["index.less","light.less"],"names":[],"mappings":"AAAA;EACE,0BAAA;EACA,qBAAA;EACA,uBAAA;EACA,2BAAA;EACA,oBAAA;EACA,sBAAA;EACA,wBAAA;EACA,sBAAA;EACA,sBAAA;EACA,sBAAA;EACA,sCAAA;;AAGF;EACE,OAAO,iBAAP;;AAGF;EACE,OAAO,mBAAP;;AAGF;EACE,OAAO,oBAAP;;AAGF;EACE,OAAO,kBAAP;;AAGF;EACE,OAAO,kBAAP;;AAGF;EACE,OAAO,iBAAP;;AAGF;EACE,OAAO,kBAAP;;AAGF;EACE,OAAO,kBAAP;;AAGF;EACE,OAAO,kBAAP;;AAIF;EACE,cAAc,m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AAFF,IAnEA,WAyDF,OAUG,MAIC;AAJO,IAnET,WAyDF,OAUY,QAIR;EACE,WAAA;;AALJ,IAnEA,WAyDF,OAUG,MAOC;AAPO,IAnET,WAyDF,OAUY,QAOR;EACE,WAAA;;AARJ,IAnEA,WAyDF,OAUG,MAUC;AAVO,IAnET,WAyDF,OAUY,QAUR;AAVF,IAnEA,WAyDF,OAUG,MAUa;AAVL,IAnET,WAyDF,OAUY,QAUI;AAVd,IAnEA,WAyDF,OAUG,MAU+B;AAVvB,IAnET,WAyDF,OAUY,QAUsB;AAVhC,IAnEA,WAyDF,OAUG,MAUiD;AAVzC,IAnET,WAyDF,OAUY,QAUwC;AAVlD,IAnEA,WAyDF,OAUG,MAU6D;AAVrD,IAnET,WAyDF,OAUY,QAUoD;AAV9D,IAnEA,WAyDF,OAUG,MAUyE;AAVjE,IAnET,WAyDF,OAUY,QAUgE;EACtE,WAAA;;AAGJ,IAjFA,WAyDF,OAwBG;EACC,YAAY,0BAAZ;;AAlFN,IAAI,WAsFF,YACE,GAAE,IAAI;EACJ,cAAc,yBAAd;;AAIA,IA5FF,WAsFF,YAKE,MAAM,GACH,UAAU;EACT,OAAO,yBAAP;;AA7FR,IAAI,WAkGF;EACE,cAAc,6BAAd;;AAnGJ,IAAI,WAqGF;EACE,YAAY,wBAAZ;;AAtGJ,IAAI,WAwGF;EACE,YAAY,wBAAZ;;AAzGJ,IAAI,WA4GF;AA5GF,IAAI,WA4GW;AA5Gf,IAAI,WA4GqB;AA5GzB,IAAI,WA4GgC;EAChC,OAAO,yBAAP;;AA7GJ,IAAI,WAgHF;AAhHF,IAAI,WAgHiB;AAhHrB,IAAI,WAgHkC;EAClC,OAAO,yBAAP","file":"index.css"} \ No newline at end of file diff --git a/client/css/index.less b/client/css/index.less index 3bee008..e213cb8 100644 --- a/client/css/index.less +++ b/client/css/index.less @@ -3,26 +3,58 @@ --text-color: #adbaa9; --border-color: #444c56; --panel-background: #22272e; + --accent-color: #fff; --alert-color: #ea0b0b; --warning-color: #ff8330; - --chart-stroke-color: #7dc37b; - --chart-fill-color: rgba(125, 195, 123, .3); + --info-color1: #7dc37b; + --info-color2: #1ba1e2; + --info-color3: #ffdb10; + --fill-color: rgba(125, 195, 123, .3); } .fg-normal { - color: var(--text-color)!important; + color: var(--text-color); +} + +.fg-accent { + color: var(--accent-color); +} + +.fg-warning { + color: var(--warning-color); +} + +.fg-alert { + color: var(--alert-color); } .fg-stroke { - color: var(--chart-stroke-color); + color: var(--info-color1); +} + +.fg-fill { + color: var(--fill-color); +} + +.fg-info1 { + color: var(--info-color1); } +.fg-info2 { + color: var(--info-color2); +} + +.fg-info3 { + color: var(--info-color3); +} + + .bd-system { - border-color: var(--border-color)!important; + border-color: var(--border-color); } .bg-system { - background: var(--body-background)!important; + background: var(--body-background); } body { @@ -39,24 +71,26 @@ body { } hr { - background: var(--border-color)!important; + background: var(--border-color); } -#max-block {color: #fff000;} -#max-unvalidated {color: #ff0000;} -#explorer-height {color: #0b98da;} +#max-block {color: var(--info-color3);} +#max-unvalidated {color: var(--alert-color);} +#explorer-height {color: var(--info-color2);} .panel { height: 100%; background: var(--panel-background); color: var(--text-color); - border: 1px solid var(--border-color); + border-color: var(--border-color)!important; + border: 1px solid; padding: 0 10px; .panel-title { - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid; + border-color: var(--border-color); text-align: center; - color: darkorange; + color: var(--warning-color); font-size: 12px; font-weight: bold; } @@ -74,17 +108,17 @@ hr { &.alert, &.warning{ background: var(--alert-color); - color: #fff!important; + color: var(--accent-color); .panel-title { border: none; - color: #fff!important; + color: var(--accent-color); } #node-status { - color: #fff!important; + color: var(--accent-color); } #max-block, #max-unvalidated, #explorer-height { - color: #fff; + color: var(--accent-color); } } &.warning{ @@ -113,19 +147,21 @@ hr { .info-table { margin-top: 8px; tr:not(:last-child) { - border-bottom: 1px solid var(--border-color) + border-bottom: 1px solid; + border-color: var(--border-color); } tbody td { padding: 4px 0; &:nth-child(2) { - color: #fff; + color: var(--accent-color); } } } .progress { - border: 1px solid var(--border-color); + border: 1px solid; + border-color: var(--border-color); overflow: visible; .value { @@ -134,23 +170,25 @@ hr { } } .progress-back { - background: var(--body-background); + background: var(--alert-color); } .progress-bar { - background: var(--chart-stroke-color)!important; + background: var(--info-color1)!important; } #ip-address, #bind-ip, #p2p-port, #client-port { font-size: 18px; - color: #fff; + color: var(--accent-color); font-weight: 500; line-height: 1.2; } #sidecar-position, #sidecar-uptime, #sidecar-score { - color: #fff000; + color: var(--info-color3); } canvas { max-width: 100%; -} \ No newline at end of file +} + +@import "light"; \ No newline at end of file diff --git a/client/css/light.css b/client/css/light.css new file mode 100644 index 0000000..70ab911 --- /dev/null +++ b/client/css/light.css @@ -0,0 +1,128 @@ +:root { + --body-background-light: #f6f8fa; + --text-color-light: #24292e; + --border-color-light: #e1e4e8; + --panel-background-light: #ffffff; + --accent-color-light: #444c56; + --alert-color-light: #ea0b0b; + --warning-color-light: #ff8330; + --info-color1-light: #7dc37b; + --info-color2-light: #1ba1e2; + --info-color3-light: #ffe725; + --fill-color-light: rgba(125, 195, 123, 0.3); +} +body.light-mode { + background: var(--body-background-light); + color: var(--text-color-light); +} +body.light-mode .fg-normal { + color: var(--text-color-light); +} +body.light-mode .fg-accent { + color: var(--accent-color-light); +} +body.light-mode .fg-warning { + color: var(--warning-color-light); +} +body.light-mode .fg-alert { + color: var(--alert-color-light); +} +body.light-mode .fg-stroke { + color: var(--info-color1-light); +} +body.light-mode .fg-fill { + color: var(--fill-color-light); +} +body.light-mode .fg-info1 { + color: var(--info-color1-light); +} +body.light-mode .fg-info2 { + color: var(--info-color2-light); +} +body.light-mode .fg-info3 { + color: var(--accent-color-light); +} +body.light-mode .bd-system { + border-color: var(--border-color-light); +} +body.light-mode .bg-system { + background: var(--body-background-light); +} +body.light-mode hr { + background: var(--border-color-light); +} +body.light-mode #max-block { + color: var(--accent-color-light); +} +body.light-mode #max-unvalidated { + color: var(--alert-color-light); +} +body.light-mode #explorer-height { + color: var(--info-color2-light); +} +body.light-mode .panel { + background: var(--panel-background-light); + color: var(--text-color-light); + border-color: var(--border-color-light) !important; +} +body.light-mode .panel .panel-title { + border-color: var(--border-color-light); + color: var(--accent-color-light); +} +body.light-mode .panel.alert, +body.light-mode .panel.warning { + background: var(--alert-color-light); + color: #fff; +} +body.light-mode .panel.alert .panel-title, +body.light-mode .panel.warning .panel-title { + color: #fff; +} +body.light-mode .panel.alert #node-status, +body.light-mode .panel.warning #node-status { + color: #fff; +} +body.light-mode .panel.alert #max-block, +body.light-mode .panel.warning #max-block, +body.light-mode .panel.alert #max-unvalidated, +body.light-mode .panel.warning #max-unvalidated, +body.light-mode .panel.alert #explorer-height, +body.light-mode .panel.warning #explorer-height, +body.light-mode .panel.alert .fg-stroke, +body.light-mode .panel.warning .fg-stroke, +body.light-mode .panel.alert .fg-normal, +body.light-mode .panel.warning .fg-normal, +body.light-mode .panel.alert .fg-accent, +body.light-mode .panel.warning .fg-accent { + color: #fff; +} +body.light-mode .panel.warning { + background: var(--warning-color-light); +} +body.light-mode .info-table tr:not(:last-child) { + border-color: var(--border-color-light); +} +body.light-mode .info-table tbody td:nth-child(2) { + color: var(--accent-color-light); +} +body.light-mode .progress { + border-color: var(--panel-background-light); +} +body.light-mode .progress-back { + background: var(--alert-color-light); +} +body.light-mode .progress-bar { + background: var(--info-color1-light); +} +body.light-mode #ip-address, +body.light-mode #bind-ip, +body.light-mode #p2p-port, +body.light-mode #client-port { + color: var(--accent-color-light); +} +body.light-mode #sidecar-position, +body.light-mode #sidecar-uptime, +body.light-mode #sidecar-score { + color: var(--accent-color-light); +} +/*# sourceMappingURL=light.css.map */ \ No newline at end of file diff --git a/client/css/light.css.map b/client/css/light.css.map new file mode 100644 index 0000000..12b0784 --- /dev/null +++ b/client/css/light.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["light.less"],"names":[],"mappings":"AAAA;EACE,gCAAA;EACA,2BAAA;EACA,6BAAA;EACA,iCAAA;EACA,6BAAA;EACA,4BAAA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AnEA,WAyDF,OAUG,MAU+B;AAVvB,IAnET,WAyDF,OAUY,QAUsB;AAVhC,IAnEA,WAyDF,OAUG,MAUiD;AAVzC,IAnET,WAyDF,OAUY,QAUwC;AAVlD,IAnEA,WAyDF,OAUG,MAU6D;AAVrD,IAnET,WAyDF,OAUY,QAUoD;AAV9D,IAnEA,WAyDF,OAUG,MAUyE;AAVjE,IAnET,WAyDF,OAUY,QAUgE;EACtE,WAAA;;AAGJ,IAjFA,WAyDF,OAwBG;EACC,YAAY,0BAAZ;;AAlFN,IAAI,WAsFF,YACE,GAAE,IAAI;EACJ,cAAc,yBAAd;;AAIA,IA5FF,WAsFF,YAKE,MAAM,GACH,UAAU;EACT,OAAO,yBAAP;;AA7FR,IAAI,WAkGF;EACE,cAAc,6BAAd;;AAnGJ,IAAI,WAqGF;EACE,YAAY,wBAAZ;;AAtGJ,IAAI,WAwGF;EACE,YAAY,wBAAZ;;AAzGJ,IAAI,WA4GF;AA5GF,IAAI,WA4GW;AA5Gf,IAAI,WA4GqB;AA5GzB,IAAI,WA4GgC;EAChC,OAAO,yBAAP;;AA7GJ,IAAI,WAgHF;AAhHF,IAAI,WAgHiB;AAhHrB,IAAI,WAgHkC;EAClC,OAAO,yBAAP","file":"light.css"} \ No newline at end of file diff --git a/client/css/light.less b/client/css/light.less new file mode 100644 index 0000000..4796bb8 --- /dev/null +++ b/client/css/light.less @@ -0,0 +1,131 @@ +:root { + --body-background-light: #f6f8fa; + --text-color-light: #24292e; + --border-color-light: #e1e4e8; + --panel-background-light: #ffffff; + --accent-color-light: #444c56; + --alert-color-light: #ea0b0b; + --warning-color-light: #ff8330; + --info-color1-light: #7dc37b; + --info-color2-light: #1ba1e2; + --info-color3-light: #ffe725; + --fill-color-light: rgba(125, 195, 123, .3); +} + +body.light-mode { + background: var(--body-background-light); + color: var(--text-color-light); + + .fg-normal { + color: var(--text-color-light); + } + + .fg-accent { + color: var(--accent-color-light); + } + + .fg-warning { + color: var(--warning-color-light); + } + + .fg-alert { + color: var(--alert-color-light); + } + + .fg-stroke { + color: var(--info-color1-light); + } + + .fg-fill { + color: var(--fill-color-light); + } + + .fg-info1 { + color: var(--info-color1-light); + } + + .fg-info2 { + color: var(--info-color2-light); + } + + .fg-info3 { + color: var(--accent-color-light); + } + + + .bd-system { + border-color: var(--border-color-light); + } + + .bg-system { + background: var(--body-background-light); + } + + hr { + background: var(--border-color-light); + } + + #max-block {color: var(--accent-color-light);} + #max-unvalidated {color: var(--alert-color-light);} + #explorer-height {color: var(--info-color2-light);} + + .panel { + background: var(--panel-background-light); + color: var(--text-color-light); + border-color: var(--border-color-light)!important; + + .panel-title { + border-color: var(--border-color-light); + color: var(--accent-color-light); + } + + &.alert, &.warning{ + background: var(--alert-color-light); + color: #fff; + + .panel-title { + color: #fff; + } + #node-status { + color: #fff; + } + #max-block, #max-unvalidated, #explorer-height, .fg-stroke, .fg-normal, .fg-accent { + color: #fff; + } + } + &.warning{ + background: var(--warning-color-light); + } + } + + .info-table { + tr:not(:last-child) { + border-color: var(--border-color-light); + } + + tbody td { + &:nth-child(2) { + color: var(--accent-color-light); + } + } + } + + .progress { + border-color: var(--panel-background-light); + } + .progress-back { + background: var(--alert-color-light); + } + .progress-bar { + background: var(--info-color1-light); + } + + #ip-address, #bind-ip, #p2p-port, #client-port { + color: var(--accent-color-light); + } + + #sidecar-position, #sidecar-uptime, #sidecar-score { + color: var(--accent-color-light); + } + +} \ No newline at end of file diff --git a/client/index.html b/client/index.html index 0b91699..227b2e6 100644 --- a/client/index.html +++ b/client/index.html @@ -8,38 +8,37 @@ - +System info | -+ | |
System time | -+ | |
CPU info | -+ | |
RAM info | -+ | |
NET info | -+ | |
Mina GraphQL | -+ | |
Mina Explorer | -+ | |
Uptime | -+ |