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

Sorting IP adresses and uptime in tables #435

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions puppetboard/templates/_macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"search": {"regex": true},
// Default sort
"order": [[ 0, "desc" ]],
//Sort ipadresses
Copy link
Contributor

@kirkins kirkins Dec 21, 2017

Choose a reason for hiding this comment

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

NIT: Typo in address and add space to match with line 57. // Sort ip addresses

columnDefs: [{ type: 'ip-address', targets: 1 }],

// Custom options
{% if extra_options %}{% call extra_options() %}Callback to parent defined options{% endcall %}{% endif %}
});
Expand Down
1 change: 1 addition & 0 deletions puppetboard/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/datatables/1.10.13/js/dataTables.semanticui.min.js"></script>
<script src="//cdn.datatables.net/plug-ins/1.10.16/sorting/ip-address.js"></script>
{% if config.LOCALISE_TIMESTAMP %}
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.7.0/moment.min.js"></script>
{% endif %}
Expand Down