From 0cb68c50e37e43bf105734de6302fb9043df3f54 Mon Sep 17 00:00:00 2001 From: mycognosist Date: Wed, 13 May 2020 14:40:04 +0100 Subject: [PATCH] Add pattern library info and GitHub repo icon links --- src/assets/github_logo.png | Bin 0 -> 1714 bytes src/software/microservices/peach-buttons.md | 4 +++ src/software/microservices/peach-menu.md | 2 ++ src/software/microservices/peach-network.md | 20 +++++++++--- src/software/microservices/peach-oled.md | 2 ++ src/software/microservices/peach-stats.md | 2 ++ src/software/pattern_library.md | 33 ++++++++++++++++++++ src/software/web_interface.md | 2 ++ 8 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 src/assets/github_logo.png diff --git a/src/assets/github_logo.png b/src/assets/github_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..8b25551a97921681334176ee143b41510a117d86 GIT binary patch literal 1714 zcmaJ?X;2eq7*4oFu!ne{XxAht2qc?8LXr|_LPCfTpaBK7K$c{I0Ld=NLIOeuC;@2) zZ$K%a)k+m-s0>xHmKxL%0V&0TRzzznhgyqrIC$F)0{WwLXLrBvd*^wc_uSc%h%m9E z{W5z3f#4_!7RvAyFh6!S_*<8qJ%KOIm?#E|L=rJQq=gB5C6WLG5;c?r%V0>EmEH#X z5eSwPRa6WXBMs#$5H%GtW2go-in9p>zW@UYDNNWc^XOXZQ? z1QjEV00I#$3^1wQUJ8&-2UsjB-G|9y(LDhMNN3PM{APL4eYi{(m*ERcUnJa{R+-3^ z34^A6;U^v`8N*O6ji%S@sd{fJqD`XFIUJ5zgTe5^5nj414F(y!G&=H(f)Lgzv?>%+ zAsWD}2qhpH7>|TU`X&W6IxDNuO_vET7|j5oG&&VDr!)hUO8+0KR?nh!m<)a!?|%yG zqOwq!CWCcIhE{<$E|F|@g>nP6FoYr6C<8>D?ID9%&5J(4oSbR1I^byW*g@__U z4QsF&uJSEcFeleM3~ChjEQGbHOjsGDMbyAl(p=Ttv9RaVo8~I#js@@Y9C^_2U})yn zzSHU%6FxuY?d;&65MyR({^lU*3$z$ZllDb(o&<7d;A_`h2U+3~BJ2Hv`{W}KEU801#cv_B|9Cm!ynR{S`AMsSn z;7E=B;mb!wx$L;S>yGXG^6=&WlQn9$s?&L%Y1D8TI^MlKB1DqsEng$>f4=xYWBoPI z_S1p!sJ#d2?YI4kPA{k}Eby?F=f-J9zIc`YDl^pzjVm~9ebE?Hn?t0Nx+la|D0MB; z9)2xv1G>a1|A9kQ>~DV<=X3-4yC&n!m8-3K#P z{X@0zRuQsy$+N ziSCoLJU{Z$nQy4A4Y5UJ07$5FA~qL2%Q+cLaqDU?Lz3?=BC5;Nk6BbTmmceEaM>-Z zi>O&-dSE=%ex;vcvCOk{*JQ5^_4M z4lW7%l9IqY(z7pV(?I@@8=KPFO82)O{VDI18-*d-k$YmI^XiuPs_LuFw<^ZcD}yP5 c*NrbeloN*74g`U%%F6r~k%+>C^#XapzmV0H-2eap literal 0 HcmV?d00001 diff --git a/src/software/microservices/peach-buttons.md b/src/software/microservices/peach-buttons.md index 68be6d5..dc93dd9 100644 --- a/src/software/microservices/peach-buttons.md +++ b/src/software/microservices/peach-buttons.md @@ -1,5 +1,9 @@ # peach-buttons +[![Build Status](https://travis-ci.com/peachcloud/peach-buttons.svg?branch=master)](https://travis-ci.com/peachcloud/peach-buttons) + +[![GitHub logo](/assets/github_logo.png "peach-buttons GitHub repository")](https://github.com/peachcloud/peach-buttons) + GPIO microservice module for handling button presses. `peach-buttons` implements a JSON-RPC server with [Publish-Subscribe extension](https://docs.rs/jsonrpc-pubsub/11.0.0/jsonrpc_pubsub/). Each button press results in a JSON-RPC request being sent over websockets to any subscribers. A button code for the pressed button is sent with the request to subscribers, allowing state-specific actions to be taken by the subscriber. In the case of PeachCloud, the `peach-menu` microservice subscribes to `peach-buttons` in order to update the state of the menu after each button press. diff --git a/src/software/microservices/peach-menu.md b/src/software/microservices/peach-menu.md index 1930459..5e574b7 100644 --- a/src/software/microservices/peach-menu.md +++ b/src/software/microservices/peach-menu.md @@ -2,6 +2,8 @@ [![Build Status](https://travis-ci.com/peachcloud/peach-menu.svg?branch=master)](https://travis-ci.com/peachcloud/peach-menu) +[![GitHub logo](/assets/github_logo.png "peach-menu GitHub repository")](https://github.com/peachcloud/peach-menu) + OLED menu microservice module for PeachCloud. A state machine which listens for GPIO events (button presses) by subscribing to `peach-buttons` over websockets and makes [JSON-RPC](https://www.jsonrpc.org/specification) calls to relevant PeachCloud microservices (`peach-network`, `peach-oled`, `peach-stats`). _Note: This module is a work-in-progress._ diff --git a/src/software/microservices/peach-network.md b/src/software/microservices/peach-network.md index 3a1a0b3..f9a957b 100644 --- a/src/software/microservices/peach-network.md +++ b/src/software/microservices/peach-network.md @@ -2,6 +2,8 @@ [![Build Status](https://travis-ci.com/peachcloud/peach-network.svg?branch=master)](https://travis-ci.com/peachcloud/peach-network) +[![GitHub logo](/assets/github_logo.png "peach-network GitHub repository")](https://github.com/peachcloud/peach-network) + Networking microservice module for PeachCloud. Query and configure device interfaces using [JSON-RPC](https://www.jsonrpc.org/specification) over HTTP. Interaction with wireless interfaces occurs primarily through the [wpactrl crate](https://docs.rs/wpactrl/0.3.1/wpactrl/) which provides "a pure-Rust lowlevel library for controlling wpasupplicant remotely". This approach is akin to using `wpa_cli` (a WPA command line client). @@ -14,18 +16,28 @@ _Note: This module is a work-in-progress._ | --- | --- | --- | | `activate_ap` | | Activate WiFi access point (stop `wpa_supplicant` and start `hostapd` and `dnsmasq`) | | `activate_client` | | Activate WiFi client connection (stop `hostapd` and `dnsmasq` and start `wpa_supplicant`) | -| `add_wifi` | `ssid`, `pass` | Connect to WiFi with given SSID and password | +| `add_wifi` | `ssid`, `pass` | Add WiFi credentials to `wpa_supplicant.conf` | +| `disable_wifi` | `id`, `iface` | Disable connection with AP represented by given id | +| `disconnect_wifi` | `iface` | Disconnect given interface | +| `get_id` | `iface`, `ssid` | Return ID of given SSID | | `get_ip` | `iface` | Return IP of given network interface | -| `get_rssi` | `iface` | Return average signal strength for given interface | +| `get_rssi` | `iface` | Return average signal strength (dBm) for given interface | +| `get_rssi_percent` | `iface` | Return average signal strength (%) for given interface | | `get_ssid` | `iface` | Return SSID of currently-connected network for given interface | | `get_state` | `iface` | Return state of given interface | +| `get_status` | `iface` | Return status parameters for given interface | | `get_traffic` | `iface` | Return network traffic for given interface | | `if_checker` | | Run AP / client-mode configuration script | | `list_networks` | | List all networks saved in wpasupplicant config | +| `new_password` | `id`, `iface`, `password` | Set a new password for given network id and interface | | `ping` | | Respond with `success` if microservice is running | -| `scan_networks` | `iface` | List all networks in range of given interface | -| `reconnect_wifi` | `iface` | Disconnect and reconnect given interface | | `reassociate_wifi` | `iface` | Reassociate with current AP for given interface | +| `reconfigure_wifi` | | Force wpa_supplicant to re-read its configuration file | +| `reconnect_wifi` | `iface` | Disconnect and reconnect given interface | +| `remove_wifi` | `id`, `iface` | Remove WiFi credentials for given network id and interface | +| `save_config` | | Save configuration changes to `wpa_supplicant.conf` | +| `scan_networks` | `iface` | List SSID, flags (security), frequency and signal level for all networks in range of given interface | +| `select_network` | `id`, `iface` | Disable other networks and attempt connection with AP represented by given id | ### Directory Tree diff --git a/src/software/microservices/peach-oled.md b/src/software/microservices/peach-oled.md index b64c041..8bee6d3 100644 --- a/src/software/microservices/peach-oled.md +++ b/src/software/microservices/peach-oled.md @@ -2,6 +2,8 @@ [![Build Status](https://travis-ci.com/peachcloud/peach-oled.svg?branch=master)](https://travis-ci.com/peachcloud/peach-oled) +[![GitHub logo](/assets/github_logo.png "peach-oled GitHub repository")](https://github.com/peachcloud/peach-oled) + OLED microservice module for PeachCloud. Write to a 128x64 OLED display with SDD1306 driver (I2C) using [JSON-RPC](https://www.jsonrpc.org/specification) over HTTP. ### JSON-RPC API diff --git a/src/software/microservices/peach-stats.md b/src/software/microservices/peach-stats.md index f4d9a78..22f3e26 100644 --- a/src/software/microservices/peach-stats.md +++ b/src/software/microservices/peach-stats.md @@ -2,6 +2,8 @@ [![Build Status](https://travis-ci.com/peachcloud/peach-stats.svg?branch=master)](https://travis-ci.com/peachcloud/peach-stats) +[![GitHub logo](/assets/github_logo.png "peach-stats GitHub repository")](https://github.com/peachcloud/peach-stats) + System statistics microservice module for PeachCloud. Provides a JSON-RPC wrapper around the [probes](https://crates.io/crates/probes) and [systemstat](https://crates.io/crates/systemstat) crates. ### JSON-API diff --git a/src/software/pattern_library.md b/src/software/pattern_library.md index 6c85158..5eb32d0 100644 --- a/src/software/pattern_library.md +++ b/src/software/pattern_library.md @@ -1 +1,34 @@ # peach-patterns + +[![GitHub logo](/assets/github_logo.png "peach-patterns GitHub repository")](https://github.com/peachcloud/peach-patterns) + +A pattern library for building and maintaining PeachCloud user interfaces. + +`index.html` currently serves as the primary aggregator and displayer of patterns in the form of atoms and molecules (see [Atomic Design by Brad Frost](http://atomicdesign.bradfrost.com/) for more information on this approach to building design systems). + +`css/css_class_names` contains a simple list of all the custom css class names used in the PeachCloud design system. This list builds on `css/_variables.css`, which contains css variables drawn from the [Tachyons](http://tachyons.io/) library. The content of `css/_variables.css` will be pruned of unneeded code once the design system stabilizes. + +`css/peachcloud.css` contains all the custom css class definitions used in the PeachCloud design system. + +_Note: This is a work-in-progress._ + +### Directory Tree + +``` +. +├── css +│   ├── css_class_names // list of all custom class names +│   ├── peachcloud.css // custom css class definitions and styles +│   └── _variables.css // css variables from Tachyons +├── icons // all icon files (svg & png) +├── index.html // markup of pattern library +├── README.md +``` + +### Setup + +For now you can simply clone the repo and open the `index.html` file in your browser to view the pattern library. + +### Licensing + +AGPL-3.0 diff --git a/src/software/web_interface.md b/src/software/web_interface.md index 061b298..9c6a8e9 100644 --- a/src/software/web_interface.md +++ b/src/software/web_interface.md @@ -1,5 +1,7 @@ # Web Interface +[![GitHub logo](/assets/github_logo.png "peach-buttons GitHub repository")](https://github.com/peachcloud/peach-buttons) + [peach-web](https://github.com/peachcloud/peach-web) provides a web interface for monitoring and interacting with the PeachCloud device. This allows administration of the single-board computer (ie. Raspberry Pi) running PeachCloud, as well as the ssb-server and related plugins. ### Design