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

Plugin support to add items to the homepage #674

Merged

Conversation

carbonarok
Copy link
Contributor

Fixes: #

Merge dependancy #647

Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a reasonable start to me, thanks! "Requesting changes" as I just left a number of comments on #647 which is as you noted a pre-requisite for this PR. Also please be sure to update the plugin development docs with information about how a plugin is to use this new feature.

Copy link
Contributor

@glennmatthews glennmatthews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a reference in the plugin development docs; also it would be good to have test coverage to make sure the dummy_plugin provided content appears as expected on the home page.

examples/dummy_plugin/dummy_plugin/homepage.py Outdated Show resolved Hide resolved
@carbonarok carbonarok changed the title [WIP] Plugin support to add items to the homepage Plugin support to add items to the homepage Jul 21, 2021
@carbonarok carbonarok changed the base branch from develop to next July 21, 2021 08:42
@@ -0,0 +1,3 @@
<div class="list-group-item">
<a>Site has been overwritten.</a>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. I'm actually not sure I like allowing plugins to replace home page items. Maybe this is something we should check for and block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay sure, i will block this for now

nautobot/core/apps/__init__.py Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/core/apps/__init__.py Outdated Show resolved Hide resolved

Args:
path (str): Path to the app which defines the homepage layout.
label (str): Label of the app which defines the homepage layout.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

path and label are only relevant when using custom templates, correct? Otherwise they're unused?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, i'll add a coment

nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/core/tests/integration/test_plugin_home.py Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/docs/development/homepage.md Outdated Show resolved Hide resolved
nautobot/core/templates/home.html Outdated Show resolved Hide resolved
mkdocs.yml Outdated Show resolved Hide resolved
nautobot/core/apps/__init__.py Outdated Show resolved Hide resolved
examples/dummy_plugin/dummy_plugin/homepage.py Outdated Show resolved Hide resolved
@glennmatthews glennmatthews merged commit 0642b7b into nautobot:next Jul 30, 2021
glennmatthews added a commit that referenced this pull request Jul 30, 2021
hellerve added a commit to hellerve/nautobot that referenced this pull request Aug 5, 2021
* origin/next:
  Add release-notes for nautobot#479, nautobot#674, nautobot#716
  Plugin support to add items to the homepage (nautobot#674)
  Implement a base template for generic object detail views (nautobot#737)
  Bump version to 1.2.0-alpha.1
  nautobot#647 Software Defined Homepage (nautobot#716)
hellerve added a commit to hellerve/nautobot that referenced this pull request Aug 12, 2021
* origin/next: (104 commits)
  Add release-notes for nautobot#479, nautobot#674, nautobot#716
  Plugin support to add items to the homepage (nautobot#674)
  Implement a base template for generic object detail views (nautobot#737)
  Bump version to 1.2.0-alpha.1
  Add release-note for nautobot#727
  Bump version to 1.1.1-beta.1
  Fix GraphQLQuery run API endpoint. Fixes nautobot#727 (nautobot#730)
  Implement `FileProxy` and `FileAttachment` objects (nautobot#712)
  Update computed field GraphQL schema generator to use correct arg name (nautobot#721)
  Added changelog for nautobot#372
  Add support for custom fields in tables (nautobot#469)
  Bump version for v1.1.0 and prep release notes.
  Added changelog for nautobot#717
  Bump pillow from 8.1.2 to 8.2.0 (nautobot#717)
  Added changelog for nautobot#691
  Celery RQ migration and concurrency (nautobot#691)
  Add release-note for nautobot#702
  Host GraphiQL dependencies statically rather than on CDN. Fixes nautobot#702 (nautobot#714)
  nautobot#647 Software Defined Homepage (nautobot#716)
  Added changelog for nautobot#703
  ...
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.

None yet

2 participants