Skip to content

Commit

Permalink
Merge pull request #2902 from JamesonFinney/master
Browse files Browse the repository at this point in the history
Removed trailing whitespace in docs
  • Loading branch information
SaaldjorMike committed Jan 31, 2016
2 parents d225c85 + 437d1fc commit 594fc43
Show file tree
Hide file tree
Showing 36 changed files with 198 additions and 198 deletions.
34 changes: 17 additions & 17 deletions doc/API/API-Docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Route: /api/v0/devices/:hostname

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -146,7 +146,7 @@ Route: /api/v0/devices/:hostname

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -179,7 +179,7 @@ Route: /api/v0/devices/:hostname/graphs

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -511,8 +511,8 @@ Route: /api/v0/oxidized

Input (JSON):

-
-

Examples:
```curl
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/oxidized
Expand Down Expand Up @@ -548,7 +548,7 @@ Input (JSON):

Examples:
```curl
curl -X PATCH -d '{"field": "notes", "data": "This server should be kept online"}' -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost
curl -X PATCH -d '{"field": "notes", "data": "This server should be kept online"}' -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost
```

Output:
Expand Down Expand Up @@ -751,7 +751,7 @@ Route: /api/v0/devices/:hostname/vlans

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -787,7 +787,7 @@ Route: /api/v0/alerts/:id

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -824,7 +824,7 @@ Route: /api/v0/alerts/:id

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -913,7 +913,7 @@ Route: /api/v0/rules/:id

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -950,7 +950,7 @@ Route: /api/v0/rules/:id

Input:

-
-

Example:
```curl
Expand All @@ -972,11 +972,11 @@ List the alert rules.

Route: /api/v0/rules

-
-

Input:

-
-

Example:
```curl
Expand Down Expand Up @@ -1008,7 +1008,7 @@ Add a new alert rule.

Route: /api/v0/rules

-
-

Input (JSON):

Expand All @@ -1017,7 +1017,7 @@ Input (JSON):
- severity: The severity level the alert will be raised against, Ok, Warning, Critical.
- disabled: Whether the rule will be disabled or not, 0 = enabled, 1 = disabled
- count: This is how many polling runs before an alert will trigger and the frequency.
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
- mute: If mute is enabled then an alert will never be sent but will show up in the Web UI (true or false).
- invert: This would invert the rules check.
- name: This is the name of the rule and is mandatory.
Expand All @@ -1043,7 +1043,7 @@ Edit an existing alert rule

Route: /api/v0/rules

-
-

Input (JSON):

Expand All @@ -1053,7 +1053,7 @@ Input (JSON):
- severity: The severity level the alert will be raised against, Ok, Warning, Critical.
- disabled: Whether the rule will be disabled or not, 0 = enabled, 1 = disabled
- count: This is how many polling runs before an alert will trigger and the frequency.
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
- delay: Delay is when to start alerting and how frequently. The value is stored in seconds but you can specify minutes, hours or days by doing 5 m, 5 h, 5 d for each one.
- mute: If mute is enabled then an alert will never be sent but will show up in the Web UI (true or false).
- invert: This would invert the rules check.
- name: This is the name of the rule and is mandatory.
Expand Down
2 changes: 1 addition & 1 deletion doc/Developing/Code-Structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This is the main file which all links within LibreNMS are parsed through. It loa
### html/css
All used css files are located here. Apart from legacy files, anything in here is now a symlink.
### html/forms
This folder contains all of the files that are dynamically included from an ajax call to html/ajax_form.php.
This folder contains all of the files that are dynamically included from an ajax call to html/ajax_form.php.
### html/includes
This is where the majority of the website core files are located. These tend to be files that contain functions or often used code segments that can be included where needed rather than duplicating code.
### html/includes/api_functions.inc.php
Expand Down
4 changes: 2 additions & 2 deletions doc/Developing/Dynamic-Config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Adding new config options to WebUI

Adding support for users to update a new config option via the WebUI is now a lot easier for general options. This
Adding support for users to update a new config option via the WebUI is now a lot easier for general options. This
document shows you how to add a new config option and even section to the WebUI.

#### Update DB
Expand All @@ -15,7 +15,7 @@ This will determine the default config option for `$config['alert']['tolerance_w

#### Update WebUI

If the sub-section you want to add the new config option already exists then update the relevant file within
If the sub-section you want to add the new config option already exists then update the relevant file within
`html/pages/settings/` otherwise you will need to create the new sub-section page. Here's an example of this:

[Commit example](https://github.com/librenms/librenms/commit/c5998f9ee27acdac0c0f7d3092fc830c51ff684c)
Expand Down
22 changes: 11 additions & 11 deletions doc/Developing/Style-Guidelines.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Style guidelines

This document is here to help style standards for contributions towards LibreNMS. These aren't strict rules but it is in
This document is here to help style standards for contributions towards LibreNMS. These aren't strict rules but it is in
the users interest that a consistent well thought out Web UI is available.

### Responsiveness

The Web UI is designed to be mobile friendly and for the most part is and works well. It's worth spending sometime to
The Web UI is designed to be mobile friendly and for the most part is and works well. It's worth spending sometime to
read through the [Boostrap website](http://getbootstrap.com/css/#grid) to learn more about how to keep things responsive.

### Navigation bar

- Always pick the best location for new links to go, think about where users would expect the link to be located and name
- Always pick the best location for new links to go, think about where users would expect the link to be located and name
it so that it's obvious what it does.

- Ensure sub sections within the Navigation are separated correctly using `<li role="presentation" class="divider"></li>`.

- Only use [Font Awesome icons](http://fontawesome.io/icons/) within the Navigation. It speeds up page load times quite
- Only use [Font Awesome icons](http://fontawesome.io/icons/) within the Navigation. It speeds up page load times quite
considerably.

### Buttons

Try to keep buttons colored to reflect the action they will take. Buttons are set using Bootstrap classes. The size of
Try to keep buttons colored to reflect the action they will take. Buttons are set using Bootstrap classes. The size of
the buttons will depend on the area of the website being used but btn-sm is probably the most common.

- Delete / Remove buttons: btn btn-danger
Expand All @@ -31,20 +31,20 @@ the buttons will depend on the area of the website being used but btn-sm is prob

### Tables

Unless the table being used will only ever display a handful of items - yeah that's what we all said, then you need to
write your table using [JQuery Bootgrid](http://www.jquery-bootgrid.com/). This shouldn't take that much more code to
do this but provides so much flexibility along with stopping the need for retrieving all the data from SQL in the first
Unless the table being used will only ever display a handful of items - yeah that's what we all said, then you need to
write your table using [JQuery Bootgrid](http://www.jquery-bootgrid.com/). This shouldn't take that much more code to
do this but provides so much flexibility along with stopping the need for retrieving all the data from SQL in the first
place.

As an example pull request, see [PR 706](https://github.com/librenms/librenms/pull/706/files) to get an idea of what
As an example pull request, see [PR 706](https://github.com/librenms/librenms/pull/706/files) to get an idea of what
it's like to convert an existing pure html table to Bootgrid.

### Datetime format

When displaying datetimes, please ensure you use the format YYYY-MM-DD mm:hh:ss where possible, you shouldn't change the
When displaying datetimes, please ensure you use the format YYYY-MM-DD mm:hh:ss where possible, you shouldn't change the
order of this as it will be confusing to users. Cutting it short to just display YYYY-MM-DD mm:hh is fine :).

To keep things consistent we have the following variables which should be used rather than to format dates yourself.
To keep things consistent we have the following variables which should be used rather than to format dates yourself.
This has the added benefit that users can customise the format:

```php
Expand Down
30 changes: 15 additions & 15 deletions doc/Developing/Using-Git.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ Some assumptions:
- LibreNMS is to be installed in /opt/librenms
- You have git installed.
- You have a [GitHub Account](https://github.com/).
- You are using ssh to connect to GitHub (If not, replace git@github.com:/yourusername/librenms.git with
- You are using ssh to connect to GitHub (If not, replace git@github.com:/yourusername/librenms.git with
https://github.com/yourusername/librenms.git.

** Replace yourusername with your GitHub username. **

#### Fork LibreNMS repo
You do this directly within [GitHub](https://github.com/librenms/librenms/fork), click the 'Fork' button near the top right.

If you are associated with multiple organisations within GitHub then you might need to select which account you want to
If you are associated with multiple organisations within GitHub then you might need to select which account you want to
push the fork to.

#### Prepare your git environment
Expand All @@ -29,7 +29,7 @@ git config --global user.email johndoe@example.com
```

#### Clone the repo
Ok so now that you have forked the repo, you now need to clone it to your local install where you can then make the
Ok so now that you have forked the repo, you now need to clone it to your local install where you can then make the
changes you need and submit them back.

```bash
Expand All @@ -50,7 +50,7 @@ Now you have two configured remotes:
- upstream: This is the main LibreNMS repository and you can only pull changes.

#### Workflow guide
As you become more familiar you may find a better workflow that fits your needs, until then this should be a safe
As you become more familiar you may find a better workflow that fits your needs, until then this should be a safe
workflow for you to follow.

Before you start work on a new branch / feature. Make sure you are upto date.
Expand All @@ -61,19 +61,19 @@ git pull upstream master
git push origin master
```

Now, create a new branch to do you work on. It's important that you do this as you are then able to work on more than
one feature at a time and submit them as pull requests individually. If you did all your work in the master branch then
Now, create a new branch to do you work on. It's important that you do this as you are then able to work on more than
one feature at a time and submit them as pull requests individually. If you did all your work in the master branch then
it gets a bit messy!

Ideally you want to create your new branch name based of the issue number. So firstly create an issue on
[GitHub](https://github.com/librenms/librenms/issues) so that others are aware of the work going on. If the issue number
Ideally you want to create your new branch name based of the issue number. So firstly create an issue on
[GitHub](https://github.com/librenms/librenms/issues) so that others are aware of the work going on. If the issue number
you created is 123 then use issue-123 as the branch name.

```bash
git checkout -b issue-123
```

Now, code away. Make the changes you need, test, change and test again :) When you are ready to submit the updates as a
Now, code away. Make the changes you need, test, change and test again :) When you are ready to submit the updates as a
pull request then commit away.

```bash
Expand All @@ -89,20 +89,20 @@ git push origin issue-123

If after do this you get some merge conflicts then you need to resolve these before carrying on.

Now you will be ready to submit a pull request from within GitHub. To do this, go to your GitHub page for the LibreNMS
repo. Now select the branch you have just been working on (issue-123) from the drop down to the left and then click
Now you will be ready to submit a pull request from within GitHub. To do this, go to your GitHub page for the LibreNMS
repo. Now select the branch you have just been working on (issue-123) from the drop down to the left and then click
'Pull Request'. Fill in the details to describe the work you have done and click 'Create pull request'.

Thanks for your first pull request :) Now, that might have been a simple update, if things get a bit more complicated
then you will need to break down your pull request into separate commits (still a single pull request). This is usually
Thanks for your first pull request :) Now, that might have been a simple update, if things get a bit more complicated
then you will need to break down your pull request into separate commits (still a single pull request). This is usually
done when:

- You want to add / update MIBS. Do this in a separate commit including the link to where you got them from.
- You are adding say 3 related features in one go, try and break them down into 3 separate commits.
- Icons for new OS support need to be added as a separate commit including a link to where you got the logo from.

Ok, that should get you started on the contributing path. If you have any other questions then stop by our IRC Channel
on Freenode ##librenms.
Ok, that should get you started on the contributing path. If you have any other questions then stop by our IRC Channel
on Freenode ##librenms.

[1]: http://gitready.com
[2]: http://git-scm.com/book
20 changes: 10 additions & 10 deletions doc/Extensions/Agent-Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ options {
```
Restart your bind9/named after changing the configuration.

Verify that everything works by executing `rndc stats && cat /etc/bind/named.stats`.
Verify that everything works by executing `rndc stats && cat /etc/bind/named.stats`.
In case you get a `Permission Denied` error, make sure you chown'ed correctly.

Note: if you change the path you will need to change the path in `scripts/agent-local/bind`.
Expand All @@ -75,26 +75,26 @@ Note: if you change the path you will need to change the path in `scripts/agent-
__Installation__:

1. Get tinystats sources from http://www.morettoni.net/tinystats.en.html
2. Compile like as advised.
_Note_: In case you get `Makefile:9: *** missing separator. Stop.`, compile manually using:
* With IPv6: `gcc -Wall -O2 -fstack-protector -DWITH_IPV6 -o tinystats tinystats.c`
* Without IPv6: `gcc -Wall -O2 -fstack-protector -o tinystats tinystats.c`
2. Compile like as advised.
_Note_: In case you get `Makefile:9: *** missing separator. Stop.`, compile manually using:
* With IPv6: `gcc -Wall -O2 -fstack-protector -DWITH_IPV6 -o tinystats tinystats.c`
* Without IPv6: `gcc -Wall -O2 -fstack-protector -o tinystats tinystats.c`
3. Install into preferred path, like `/usr/bin/`.

__Configuration__:

_Note_: In this part we assume that you use DJB's [Daemontools](http://cr.yp.to/daemontools.html) to start/stop tinydns.
_Note_: In this part we assume that you use DJB's [Daemontools](http://cr.yp.to/daemontools.html) to start/stop tinydns.
And that your tinydns-instance is located in `/service/dns`, adjust this path if necessary.

1. Replace your _log_'s `run` file, typically located in `/service/dns/log/run` with:
1. Replace your _log_'s `run` file, typically located in `/service/dns/log/run` with:
```
#!/bin/sh
exec setuidgid dnslog tinystats ./main/tinystats/ multilog t n3 s250000 ./main/
```
2. Create tinystats directory and chown:
2. Create tinystats directory and chown:
`mkdir /service/dns/log/main/tinystats && chown dnslog:nofiles /service/dns/log/main/tinystats`
3. Restart TinyDNS and Daemontools: `/etc/init.d/svscan restart`
3. Restart TinyDNS and Daemontools: `/etc/init.d/svscan restart`
_Note_: Some say `svc -t /service/dns` is enough, on my install (Gentoo) it doesn't rehook the logging and I'm forced to restart it entirely.

### MySQL
Expand Down

0 comments on commit 594fc43

Please sign in to comment.