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

Factor out layout-related code #103

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mnishiguchi
Copy link
Member

@mnishiguchi mnishiguchi commented Nov 30, 2022

Description

This is a refactoring proposal, hoping it will help improve extensibility for the MOTD layout in the near future. Related issue #96

Basically this pull request factors layout-related code out of the top-level NervesMOTD module without changing any functionality.

Inspired by the phoenix/live_dashboard package for naming, I introduce NervesMOTD.LayoutView and NervesMOTD.LayoutView and NervesMOTD.SystemInfo modules.

https://github.com/phoenixframework/phoenix_live_dashboard/tree/d0f776f4bc2ba119e52ec1e0f9f216962b9b6972/lib/phoenix/live_dashboard

Changes

  • rename NervesMOTD.Utils to NervesMOTD.SystemInfo
  • move to NervesMOTD.SystemInfo all the calculations of values
  • create NervesMOTD.LayoutView
  • move to NervesMOTD.LayoutView all the layout and formatters

Notes

@mnishiguchi mnishiguchi marked this pull request as ready for review November 30, 2022 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant