-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: manual users provisioning (#40)
* feat: disable users auto provisioning with migration Signed-off-by: Michal Fiedorowicz <[email protected]> * python fmt Signed-off-by: Michal Fiedorowicz <[email protected]> * rename user category to user type Signed-off-by: Michal Fiedorowicz <[email protected]> * feat: add setup form Signed-off-by: Michal Fiedorowicz <[email protected]> * test for plugin config helpers Signed-off-by: Michal Fiedorowicz <[email protected]> * feat: add setup view Signed-off-by: Michal Fiedorowicz <[email protected]> * disable setup form field if existing or predefined api key is not found Signed-off-by: Michal Fiedorowicz <[email protected]> * update README Signed-off-by: Michal Fiedorowicz <[email protected]> * add setup warning alert Signed-off-by: Michal Fiedorowicz <[email protected]> * update setup warning copy Signed-off-by: Michal Fiedorowicz <[email protected]> * typo Signed-off-by: Michal Fiedorowicz <[email protected]> * refine setup view copy Signed-off-by: Michal Fiedorowicz <[email protected]> --------- Signed-off-by: Michal Fiedorowicz <[email protected]>
- Loading branch information
1 parent
2531c74
commit 962e2d5
Showing
14 changed files
with
631 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,6 @@ | |
|
||
PLUGINS_CONFIG = { | ||
"netbox_diode_plugin": { | ||
"enable_ingestion_logs": True, | ||
"auto_provision_users": True, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% extends 'generic/_base.html' %} | ||
{% load i18n %} | ||
|
||
{% block title %}{% trans "Setup" %}{% endblock %} | ||
|
||
{% block content %} | ||
|
||
<div class="alert alert-warning mt-3" role="alert"> | ||
<h4 class="alert-heading">{% trans "Important" %}</h4> | ||
<p>{% trans "Diode is not currently configured and requires a set of users and API keys to be created before using Diode. If fields in this form are read-only, they have been pre-populated based on application settings that cannot be overwritten." %}</p> | ||
<p>{% trans "Click the \"Create\" button to create the required Diode users and API keys and proceed." %}</p> | ||
</div> | ||
|
||
<div class="tab-pane show active" id="setup-form" role="tabpanel" aria-labelledby="setup-tab"> | ||
<form action="" method="post" enctype="multipart/form-data" class="object-edit mt-5"> | ||
{% csrf_token %} | ||
|
||
<div class="row"> | ||
<h2 class="col-9 offset-3">{% trans "Diode users and API Keys" %}</h2> | ||
</div> | ||
|
||
<div id="form_fields" hx-disinherit="hx-select hx-swap"> | ||
{% block form %} | ||
{% include 'htmx/form.html' %} | ||
{% endblock form %} | ||
</div> | ||
|
||
<div class="text-end my-3"> | ||
{% block buttons %} | ||
<button type="submit" name="_update" class="btn btn-primary"> | ||
{% trans "Create" %} | ||
</button> | ||
{% endblock buttons %} | ||
</div> | ||
</form> | ||
</div> | ||
{% endblock content %} | ||
|
Oops, something went wrong.