Skip to content

Commit

Permalink
Updated styling
Browse files Browse the repository at this point in the history
We have updated the styling of the settings page.
  • Loading branch information
2blane committed May 2, 2020
1 parent 72ed021 commit 26979f6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion octoprint_webhooks/static/css/webhooks.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.control-description {
margin:20px 0px 5px 180px;
margin:2px 0px 20px 180px;
}
.control-description2 {
vertical-align: -webkit-baseline-middle;
Expand Down
46 changes: 23 additions & 23 deletions octoprint_webhooks/templates/webhooks_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -85,31 +85,31 @@
<div class="control-header-description">
Every time an event occurs, an API request (webhook) will be sent to the URL you provide.
</div>
<div class="control-description">
This URL will be called whenever one of the enabled events below is triggered.
</div>
<label class="control-label">{{ _('URL') }}</label>
<div class="controls">
<input type="text" class="input-block-level" data-bind="value: settings.settings.plugins.webhooks.url">
</div>

<div class="control-description">
This secret will be passed along with every webhook. You can use this to verify that the webhook is
coming from the OctoPrint server. 15-20 random characters should do it.
This URL will be called whenever one of the enabled events below is triggered.
</div>

<label class="control-label">{{ _('API SECRET') }}</label>
<div class="controls">
<input type="text" class="input-block-level" data-bind="value: settings.settings.plugins.webhooks.apiSecret">
</div>

<div class="control-description">
If you have multiple printers sending webhooks to the same server, this device identifier will
help you distinguish between them. Something like 'Printer1' should work.
This secret will be passed along with every webhook. You can use this to verify that the webhook is
coming from the OctoPrint server. 15-20 random characters should do it.
</div>

<label class="control-label">{{ _('DEVICE IDENTIFIER') }}</label>
<div class="controls">
<input type="text" class="input-block-level" data-bind="value: settings.settings.plugins.webhooks.deviceIdentifier">
</div>
<div class="control-description">
If you have multiple printers sending webhooks to the same server, this device identifier will
help you distinguish between them. Something like 'Printer1' should work.
</div>

<!-- -------- -->
<!-- -------- -->
Expand All @@ -125,17 +125,14 @@
For a list of all possible parameters, see the
<a target="_blank" href="https://github.com/2blane/OctoPrint-Webhooks#advanced-configuration">README</a>.
</div>
<div class="control-description">
Provide a JSON dictionary of headers that will be passed along with each request.
</div>
<label class="control-label">{{ _('HEADERS') }}</label>
<div class="controls">
<button type="button" class="input-button" data-bind="click: resetHeadersToDefaults">Reset to Defaults</button>
<textarea class="input-block-level" rows="3" data-bind="value: settings.settings.plugins.webhooks.headers">
</textarea>
</div>
<div class="control-description">
Provide a JSON dictionary of parameters that will be passed along with each request.
Provide a JSON dictionary of headers that will be passed along with each request.
</div>

<label class="control-label">{{ _('DATA') }}</label>
Expand All @@ -144,6 +141,9 @@
<textarea class="input-block-level" rows="7" data-bind="value: settings.settings.plugins.webhooks.data">
</textarea>
</div>
<div class="control-description">
Provide a JSON dictionary of parameters that will be passed along with each request.
</div>

<!-- ----- -->
<!-- ----- -->
Expand All @@ -169,37 +169,37 @@

<div id="oauth-container" data-bind="css: { 'oAuthContainerBlock': settings.settings.plugins.webhooks.oauth(), 'oAuthContainer': !settings.settings.plugins.webhooks.oauth()}">
<!-- OAuth URL -->
<div class="control-description">
The URL to your OAuth Endpoint. This will be called first to trade credentials for an access token.
</div>
<label class="control-label">{{ _('OAUTH URL') }}</label>
<div class="controls">
<input type="text" class="input-block-level" data-bind="value: settings.settings.plugins.webhooks.oauth_url">
</div>

<!-- OAuth Headers -->
<div class="control-description">
Provide a JSON dictionary of headers that will be passed along with each request.
NOTE: @param doesn't work here.
The URL to your OAuth Endpoint. This will be called first to trade credentials for an access token.
</div>

<!-- OAuth Headers -->
<label class="control-label">{{ _('OAUTH HEADERS') }}</label>
<div class="controls">
<button type="button" class="input-button" data-bind="click: resetOAuthHeadersToDefaults">Reset to Defaults</button>
<textarea class="input-block-level" rows="3" data-bind="value: settings.settings.plugins.webhooks.oauth_headers">
</textarea>
</div>

<!-- OAuth Data -->
<div class="control-description">
Provide a JSON dictionary of parameters that will be passed along with each request.
Provide a JSON dictionary of headers that will be passed along with each request.
NOTE: @param doesn't work here.
</div>

<!-- OAuth Data -->
<label class="control-label">{{ _('OAUTH DATA') }}</label>
<div class="controls">
<button type="button" class="input-button" data-bind="click: resetOAuthDataToDefaults">Reset to Defaults</button>
<textarea class="input-block-level" rows="7" data-bind="value: settings.settings.plugins.webhooks.oauth_data">
</textarea>
</div>
<div class="control-description">
Provide a JSON dictionary of parameters that will be passed along with each request.
NOTE: @param doesn't work here.
</div>
</div>

<!-- ------------ -->
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-Webhooks"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "2.1.0"
plugin_version = "2.2.0"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 26979f6

Please sign in to comment.