Skip to content

Commit

Permalink
Update package versions (#33)
Browse files Browse the repository at this point in the history
* Mqtt debug (#29)

* mqtt handler log info instead of debug

* add plugfest image

* add plugfest image to assets

* put in plugfest logo, clean up later

* add dashboard to production

* logo

* image

* hopefully fixing mqtt host ip

* Update elixir version, npm and mix packages (#30)

* update elixir version to 1.11.2

* changed elixir version image

* removed no-cache option

* updated mix dependancies

* updated elixir version

* update npm packages

* returned no-cache option

* fix failing CI test checks by changing elixir version to 1.11.2

Co-authored-by: Sigu Magwa <sigu@users.noreply.github.com>
Co-authored-by: Duncan Sparrell <sparrell@users.noreply.github.com>

Co-authored-by: Duncan Sparrell <sparrell@users.noreply.github.com>
Co-authored-by: Tracey Onim <43263401+TraceyOnim@users.noreply.github.com>
  • Loading branch information
3 people committed Nov 17, 2020
1 parent 72690e1 commit 9bbd843
Show file tree
Hide file tree
Showing 14 changed files with 419 additions and 416 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/elixir-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Set up Elixir
uses: actions/setup-elixir@v1
with:
elixir-version: '1.10.4' # Define the elixir version [required]
elixir-version: '1.11.2' # Define the elixir version [required]
otp-version: '22.3' # Define the OTP version [required]
- name: Restore dependencies cache
uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
elixir 1.10.4-otp-22
elixir 1.11.2-otp-22
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# heavily borrowed from https://elixirforum.com/t/cannot-find-libtinfo-so-6-when-launching-elixir-app/24101/11?u=sigu
FROM elixir:1.10.4 AS app_builder
FROM elixir:1.11.2 AS app_builder

ARG env=prod

Expand Down Expand Up @@ -37,7 +37,7 @@ RUN mix phx.digest && mix release
FROM debian:buster-slim AS app

ARG CLIENT_ID=:sfractal2020
ARG MQTT_HOST=35.184.192.117
ARG MQTT_HOST=34.86.117.113
ARG MQTT_PORT=1883
ARG USER_NAME=plug
ARG PASSWORD=fest
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ APP_VERSION := $(shell grep 'version:' mix.exs | cut -d '"' -f2)
DOCKER_IMAGE_TAG ?= $(APP_VERSION)
GIT_REVISION ?= `git rev-parse HEAD`
CLIENT_ID=:sfractal2020
MQTT_HOST=35.184.192.117
MQTT_HOST=34.86.117.113
MQTT_PORT=1883
USER_NAME=plug
PASSWORD=fest
Expand Down
3 changes: 1 addition & 2 deletions assets/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

.logo {
img {
height: 100px;
max-width: 300px;
max-width: 375px;
}
li {
font-size: 10em;
Expand Down
740 changes: 373 additions & 367 deletions assets/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"nprogress": "^0.2.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"babel-loader": "^8.0.0",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"babel-loader": "^8.2.1",
"copy-webpack-plugin": "^5.1.2",
"css-loader": "^3.4.2",
"mini-css-extract-plugin": "^0.9.0",
Expand Down
Binary file added assets/static/images/Plugfest.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/Plugfest.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions lib/mqtt/handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule Mqtt.Handler do

@impl true
def connection(:up, state) do
Logger.debug("Connection has been established")
Logger.info("MQTT Connection has been established")
{:ok, state}
end

Expand All @@ -32,7 +32,7 @@ defmodule Mqtt.Handler do

@impl true
def subscription(:up, topic, state) do
Logger.debug("Subscribed to #{topic}")
Logger.info("Subscribed to #{topic}")
{:ok, state}
end

Expand All @@ -47,15 +47,15 @@ defmodule Mqtt.Handler do
end

def subscription(:down, topic, state) do
Logger.debug("Unsubscribed from #{topic}")
Logger.info("Unsubscribed from #{topic}")
{:ok, state}
end

@impl true
def handle_message(["sfractal", "command"], msg, state) do
Logger.debug("id: #{state.name}")
Logger.debug("topic: sfractal/command")
Logger.debug("msg: #{inspect(msg)}")
Logger.info("id: #{state.name}")
Logger.info("topic: sfractal/command")
Logger.info("msg: #{inspect(msg)}")

{status, result} =
msg
Expand All @@ -66,9 +66,9 @@ defmodule Mqtt.Handler do
# reply
|> Mqtt.Command.return_result()

Logger.debug("handle_msg: status #{inspect(status)}")
Logger.debug("handle_msg: command #{inspect(result)}")
Logger.debug("state: #{inspect(state)}")
Logger.info("handle_msg: status #{inspect(status)}")
Logger.info("handle_msg: command #{inspect(result)}")
Logger.info("state: #{inspect(state)}")
{:ok, state}
end

Expand Down
2 changes: 1 addition & 1 deletion lib/twinkly_maha_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule TwinklyMahaWeb.Router do
# If your application does not have an admins-only section yet,
# you can use Plug.BasicAuth to set up some basic authentication
# as long as you are also using SSL (which you should anyway).
if Mix.env() in [:dev, :test] do
if Mix.env() in [:dev, :test, :prod] do
import Phoenix.LiveDashboard.Router

scope "/" do
Expand Down
7 changes: 2 additions & 5 deletions lib/twinkly_maha_web/templates/layout/root.html.leex
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,11 @@
<section class="container">
<nav role="navigation">
<ul>
<li>PoC/Plugfest/Hackathon </li>
<li>TwinklyMaha </li>
</ul>
</nav>
<a href="/" class="logo">
<img src="<%= Routes.static_path(@conn, "/images/openc2-logo.png") %>" alt="OpenC2 logo"/>
</a>
<a href="/" class="logo">
<img src="<%= Routes.static_path(@conn, "/images/sbomLogo.png") %>" alt="SBOM logo"/>
<img src="<%= Routes.static_path(@conn, "/images/Plugfest.png") %>" alt="Plugfest logo"/>
</a>
</section>
</header>
Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule TwinklyMaha.MixProject do
[
app: :twinkly_maha,
version: "0.5.1-dev",
elixir: "~> 1.10",
elixir: "~> 1.11.2",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
Expand Down Expand Up @@ -50,10 +50,10 @@ defmodule TwinklyMaha.MixProject do
{:phoenix, "~> 1.5.3"},
{:phoenix_ecto, "~> 4.1"},
{:postgrex, ">= 0.0.0"},
{:phoenix_live_view, "~> 0.13.0"},
{:phoenix_live_view, "~> 0.14.8"},
{:phoenix_html, "~> 2.11"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_dashboard, "~> 0.2.0"},
{:phoenix_live_dashboard, "~> 0.3.6"},
{:telemetry_metrics, "~> 0.4"},
{:telemetry_poller, "~> 0.4"},
{:tortoise, "~> 0.9"},
Expand Down

0 comments on commit 9bbd843

Please sign in to comment.