Merge branch 'master' of github.com:laf/librenms into issue-803

This commit is contained in:
laf
2015-04-22 10:52:58 +01:00
81 changed files with 22897 additions and 1907 deletions
+1
View File
@@ -19,6 +19,7 @@ Contributors to LibreNMS:
- Alan Gregory <alan@opcaonet.com.br> (alangregory)
- Joubert RedRat <me+github@redrat.com.br> (joubertredrat)
- Len Lin <Ultra2D@users.noreply.github.com> (Ultra2D)
- Christopher Freas <code@packetbusters.net> (nwautomator)
[1]: http://observium.org/ "Observium web site"
+1 -1
View File
@@ -27,7 +27,7 @@ push-dev:
push-personal pp:
$(GIT) push personal
push-testing:
push-testing pt:
$(GIT) push testing
update-subtrees: datetime-subtree moment-subtree font-awesome vis
+4
View File
@@ -163,6 +163,10 @@ function RunAlerts() {
$updet = false;
$noacc = false;
}
if( IsMaintenance($alert['device_id']) > 0 ) {
$noiss = true;
$noacc = true;
}
if( $updet ) {
dbUpdate(array('details' => gzcompress(json_encode($alert['details']),9)),'alert_log','id = ?',array($alert['id']));
}
+1
View File
@@ -487,6 +487,7 @@ Output:
"count": 7,
"alerts": [
{
"hostname": "localhost",
"id": "1",
"device_id": "1",
"rule_id": "1",
+25 -1
View File
@@ -8,6 +8,17 @@
- Fixed alerts path issue (PR756, PR760)
- Supress further port alerts when interface goes down (PR745)
- Fixed login so redirects via 303 when POST data sent (PR775)
- Fixed missing link to errored or ignored ports (PR787)
- Updated alert log query for performance improvements (PR783)
- Honour alert_rules.disabled field (PR784)
- Stop page debug if user not logged in (PR785)
- Added text filtering for new tables (PR797)
- Fixed VMWare VM detection + hardware / serial support (PR799)
- Fix links from /health/processor (PR810)
- Hide divider if no plugins installed (PR811)
- Added Nginx fix for using debug option (PR823)
- Bug fixes for device groups SQL (PR840)
- Fixed path issue when using rrdcached (PR839)
####Improvements
- New theme support added (light,dark and mono) (PR682,PR683,PR701)
@@ -23,10 +34,23 @@
- Shorten interface names on map (PR752)
- Added PowerCode support (PR762)
- Added Autodiscovery via OSPF (PR772)
- Added visual graph of alert log (PR777)
- Added visual graph of alert log (PR777, PR809)
- Added Callback system to send anonymous stats (PR768)
- More tables converted to use bootgrid (PR729, PR761)
- New Global Cache to store common queries added (PR780)
- Added proxy support for submitting stats (PR791)
- Minor APC Polling change (PR800)
- Updated to HP switch detection (PR802)
- Added Datacom basic detection (PR816)
- Updated Cisco detection (PR815)
- Added CSV export system + ability to export ports (PR818)
- Added basic detection for PacketLogic devices (PR773)
- Added fallback support for IBM switches for Serial / Version (PR822)
- Added Juniper Inventory support (PR825)
- Sharpen graphs produced (PR826)
- Updated map to show device overview graphs and port graphs (PR826)
- Added hostname to API call for list_alerts (PR834)
- Added ability to schedule maintenance (PR835,PR841)
### Mar 2015
+11 -5
View File
@@ -10,14 +10,17 @@ IT professionals. See [README.md][2] and the references there for more
information about the kind of community we're trying to promote.
LibreNMS was forked from [the last GPL-licensed version of Observium][3].
This means you won't be able to take an existing Observium installation
<del>This means you won't be able to take an existing Observium installation
later than r3250 and just change it to LibreNMS. This would probably break
(although if you were on a version between r3250 and the next database
schema change, it might be feasible). Upgrades from versions earlier than
r3251 might work. Please try it on an unimportant system and tell us your
experiences!
experiences!</del>
Thanks to one of our users Dan Brown who has written a migration script to be able move your Observium install over to LibreNMS [Dan Brown][10]. This also takes care of moving from one cpu architect to another. Give it a try :)
How LibreNMS will be different from Observium:
- We will have an inclusive community, where it's OK to ask stupid
questions, and OK to ask for things that aren't on the roadmap. If you'd
like to see something added, add or comment on the relevant issue in our
@@ -25,7 +28,7 @@ How LibreNMS will be different from Observium:
- Development decisions will be community-driven. We want to make software
that fulfills its users' needs. See the [ROADMAP][4] for more thoughts
on our current plans.
- ~~Development will probably proceed at a slower pace, at least initially.~~
- <del>Development will probably proceed at a slower pace, at least initially.</del>
- There are no plans for a paid version, and we don't anticipate this ever
changing.
- There are no current plans for paid support, but this may be added later
@@ -34,13 +37,15 @@ How LibreNMS will be different from Observium:
and painless as possible to create forked or private versions.
Reasons why you might want to use Observium instead of LibreNMS:
- You have a financial investment in Observium and aren't concerned about
community contributions.
- ~~You need functionality that has been added to Observium since r3250.~~ The beauty of LibreNMS is that you can contribute missing features.
- <del>You need functionality that has been added to Observium since r3250.</del> The beauty of LibreNMS is that you can contribute missing features.
- You don't like the [GNU General Public License, version 3][5] or the
[philosophy of Free Software/copyleft][6] in general.
Reasons why you might want to use LibreNMS instead of Observium:
- You want to work with others on the project, knowing that [your
investment of time and effort will not be wasted][7].
- You want to add and experiment with features that are not a priority for
@@ -65,5 +70,6 @@ Reasons why you might want to use LibreNMS instead of Observium:
"Contribution guidelines"
[9]: https://github.com/librenms/librenms/issues
"LibreNMS issue database at GitHub"
[10]: https://vlan50.com/2015/04/17/migrating-from-observium-to-librenms/
"Migrating from Observium to LibreNMS"
@@ -182,6 +182,8 @@ so that it looks like this:
That's it! You now should be able to log in to http://librenms.example.com/. Please note that we have not covered HTTPS setup in this example, so your LibreNMS install is not secure by default. Please do not expose it to the public Internet unless you have configured HTTPS and taken appropriate web server hardening steps.
It would be great if you would consider opting into the stats system we have, please see [this page](http://docs.librenms.org/General/Callback-Stats-and-Privacy/) on what it is and how to enable it.
[1]: https://github.com/Atrato/observium-poller-wrapper
[2]: http://git-scm.com/book
[3]: http://gitready.com/
@@ -216,3 +216,5 @@ so that it looks like this:
### Install complete ###
That's it! You now should be able to log in to http://librenms.example.com/. Please note that we have not covered HTTPS setup in this example, so your LibreNMS install is not secure by default. Please do not expose it to the public Internet unless you have configured HTTPS and taken appropriate web server hardening steps.
It would be great if you would consider opting into the stats system we have, please see [this page](http://docs.librenms.org/General/Callback-Stats-and-Privacy/) on what it is and how to enable it.
@@ -158,3 +158,5 @@ so that it looks like this:
### Install complete ###
That's it! You now should be able to log in to http://librenms.example.com/. Please note that we have not covered HTTPS setup in this example, so your LibreNMS install is not secure by default. Please do not expose it to the public Internet unless you have configured HTTPS and taken appropriate web server hardening steps.
It would be great if you would consider opting into the stats system we have, please see [this page](http://docs.librenms.org/General/Callback-Stats-and-Privacy/) on what it is and how to enable it.
+3 -2
View File
@@ -31,9 +31,9 @@ if (isset($_REQUEST['search']))
if( $_REQUEST['type'] == 'group' ) {
include_once('../includes/device-groups.inc.php');
foreach( dbFetchRows("SELECT name FROM device_groups WHERE name LIKE '%".$search."%'") as $group ) {
foreach( dbFetchRows("SELECT id,name FROM device_groups WHERE name LIKE '%".$search."%'") as $group ) {
if( $_REQUEST['map'] ) {
$results[] = array('name'=>'g:'.$group['name']);
$results[] = array('name'=>'g:'.$group['name'],'group_id'=>$group['id']);
} else {
$results[] = array('name'=>$group['name']);
}
@@ -74,6 +74,7 @@ if (isset($_REQUEST['search']))
}
$num_ports = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ?", array($result['device_id']));
$device[]=array('name'=>$name,
'device_id'=>$result['device_id'],
'url'=> generate_device_url($result),
'colours'=>$highlight_colour,
'device_ports'=>$num_ports,
+52
View File
@@ -0,0 +1,52 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (strpos($_SERVER['PATH_INFO'], "debug"))
{
$debug = "1";
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('log_errors', 1);
ini_set('error_reporting', E_ALL);
} else {
$debug = FALSE;
ini_set('display_errors', 0);
ini_set('display_startup_errors', 0);
ini_set('log_errors', 0);
ini_set('error_reporting', 0);
}
include "../includes/defaults.inc.php";
include "../config.php";
include_once "../includes/definitions.inc.php";
include "../includes/functions.php";
include "includes/functions.inc.php";
include "includes/vars.inc.php";
include "includes/authenticate.inc.php";
$report = mres($vars['report']);
if( !empty($report) && file_exists("includes/reports/$report.csv.inc.php")) {
if( $debug == false ) {
header("Content-Type: text/csv");
header('Content-Disposition: attachment; filename="'.$report.'-'.date('Ymd').'.csv"');
}
$csv = array();
include_once "includes/reports/$report.csv.inc.php";
foreach( $csv as $line ) {
echo implode(',',$line)."\n";
}
} else {
echo "Report not found.\n";
}
?>
+109
View File
@@ -0,0 +1,109 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if(is_admin() === false) {
die('ERROR: You need to be admin');
}
$sub_type = $_POST['sub_type'];
if ($sub_type == 'new-maintenance') {
// Defaults
$status = 'error';
$update = 0;
$schedule_id = mres($_POST['schedule_id']);
if ($schedule_id > 0) {
$update = 1;
}
$title = mres($_POST['title']);
$notes = mres($_POST['notes']);
$start = mres($_POST['start']);
$end = mres($_POST['end']);
$maps = mres($_POST['maps']);
if (empty($title)) {
$message = "Missing title<br />";
}
if (empty($start)) {
$message .= "Missing start date<br />";
}
if (empty($end)) {
$message .= "Missing end date<br />";
}
if( !is_array($_POST['maps']) ) {
$message .= "Not mapped to any groups or devices<br />";
}
if (empty($message)) {
if (empty($schedule_id)) {
$schedule_id = dbInsert(array('start'=>$start,'end'=>$end,'title'=>$title,'notes'=>$notes),'alert_schedule');
} else {
dbUpdate(array('start'=>$start,'end'=>$end,'title'=>$title,'notes'=>$notes),'alert_schedule','`schedule_id`=?',array($schedule_id));
}
if ($schedule_id > 0) {
$items = array();
$fail = 0;
if ($update == 1) {
dbDelete('alert_schedule_items', '`schedule_id`=?', array($schedule_id));
}
foreach( $_POST['maps'] as $target ) {
$target = target_to_id($target);
$item = dbInsert(array('schedule_id'=>$schedule_id,'target'=>$target),'alert_schedule_items');
if ($item > 0) {
array_push($items,$item);
} else {
$fail = 1;
}
}
if ($fail == 1 && $update == 0) {
foreach ($items as $item) {
dbDelete('alert_schedule_items', '`item_id`=?', array($item));
}
dbDelete('alert_schedule', '`schedule_id`=?', array($schedule_id));
$message = 'Issue scheduling maintenance';
} else {
$status = 'ok';
$message = 'Scheduling maintenance ok';
}
} else {
$message = "Issue scheduling maintenance";
}
}
$response = array('status'=>$status,'message'=>$message);
} elseif ($sub_type == 'parse-maintenance') {
$schedule_id = mres($_POST['schedule_id']);
$schedule = dbFetchRow("SELECT * FROM `alert_schedule` WHERE `schedule_id`=?",array($schedule_id));
$items = array();
foreach (dbFetchRows("SELECT `target` FROM `alert_schedule_items` WHERE `schedule_id`=?",array($schedule_id)) as $targets) {
$targets = id_to_target($targets['target']);
array_push($items,$targets);
}
$response = array('start'=>$schedule['start'],'end'=>$schedule['end'],'title'=>$schedule['title'],'notes'=>$schedule['notes'],'targets'=>$items);
} elseif ($sub_type == 'del-maintenance') {
$schedule_id = mres($_POST['del_schedule_id']);
dbDelete('alert_schedule_items','`schedule_id`=?',array($schedule_id));
dbDelete('alert_schedule','`schedule_id`=?', array($schedule_id));
$status = 'ok';
$message = 'Maintenance schedule has been removed';
$response = array('status'=>$status,'message'=>$message);
}
echo _json_encode($response);
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

+1 -1
View File
@@ -536,7 +536,7 @@ function list_alerts() {
$sql = "AND id=?";
array_push($param,$alert_id);
}
$alerts = dbFetchRows("SELECT * FROM `alerts` WHERE `state` IN (?) $sql",$param);
$alerts = dbFetchRows("SELECT `D`.`hostname`, `A`.* FROM `alerts` AS `A`, `devices` AS `D` WHERE `D`.`device_id` = `A`.`device_id` AND `A`.`state` IN (?) $sql",$param);
$total_alerts = count($alerts);
$output = array("status" => "ok", "err-msg" => '', "count" => $total_alerts, "alerts" => $alerts);
$app->response->setStatus('200');
+18 -10
View File
@@ -122,7 +122,7 @@ function generate_device_url($device, $vars=array())
return generate_url(array('page' => 'device', 'device' => $device['device_id']), $vars);
}
function generate_device_link($device, $text=NULL, $vars=array(), $start=0, $end=0, $escape_text=1)
function generate_device_link($device, $text=NULL, $vars=array(), $start=0, $end=0, $escape_text=1, $overlib=1)
{
global $config;
@@ -168,7 +168,11 @@ function generate_device_link($device, $text=NULL, $vars=array(), $start=0, $end
}
if ($escape_text) { $text = htmlentities($text); }
$link = overlib_link($url, $text, escape_quotes($contents), $class);
if ($overlib == 0) {
$link = $contents;
} else {
$link = overlib_link($url, $text, escape_quotes($contents), $class);
}
if (device_permitted($device['device_id']))
{
@@ -404,7 +408,7 @@ function generate_entity_link($type, $entity, $text = NULL, $graph_type=NULL)
}
function generate_port_link($port, $text = NULL, $type = NULL)
function generate_port_link($port, $text = NULL, $type = NULL, $overlib = 1, $single_graph = 0)
{
global $config;
@@ -429,17 +433,21 @@ function generate_port_link($port, $text = NULL, $type = NULL)
$graph_array['from'] = $config['time']['day'];
$graph_array['id'] = $port['port_id'];
$content .= generate_graph_tag($graph_array);
$graph_array['from'] = $config['time']['week'];
$content .= generate_graph_tag($graph_array);
$graph_array['from'] = $config['time']['month'];
$content .= generate_graph_tag($graph_array);
$graph_array['from'] = $config['time']['year'];
$content .= generate_graph_tag($graph_array);
if ($single_graph == 0) {
$graph_array['from'] = $config['time']['week'];
$content .= generate_graph_tag($graph_array);
$graph_array['from'] = $config['time']['month'];
$content .= generate_graph_tag($graph_array);
$graph_array['from'] = $config['time']['year'];
$content .= generate_graph_tag($graph_array);
}
$content .= "</div>";
$url = generate_port_url($port);
if (port_permitted($port['port_id'], $port['device_id'])) {
if ($overlib == 0) {
return $content;
} elseif (port_permitted($port['port_id'], $port['device_id'])) {
return overlib_link($url, $text, $content, $class);
} else {
return fixifName($text);
+1 -1
View File
@@ -25,7 +25,7 @@ $rrd_options .= " AREA:system_perc#ea8f00:system:STACK";
$rrd_options .= " GPRINT:system_perc:LAST:' %5.2lf%%'";
$rrd_options .= " GPRINT:system_perc:AVERAGE:' %5.2lf%%'";
$rrd_options .= " GPRINT:system_perc:MAX:' %5.2lf%%\\n'";
$rrd_options .= " AREA:idle_perc#f5f5e5:idle:STACK";
$rrd_options .= " AREA:idle_perc#f8f8f3:idle:STACK";
$rrd_options .= " GPRINT:idle_perc:LAST:' %5.2lf%%'";
$rrd_options .= " GPRINT:idle_perc:AVERAGE:' %5.2lf%%'";
$rrd_options .= " GPRINT:idle_perc:MAX:' %5.2lf%%\\n'";
+6 -4
View File
@@ -93,16 +93,18 @@ if($format == "octets" || $format == "bytes")
$rrd_options .= " COMMENT:'bps Now Ave Max 95th %\\n'";
$rrd_options .= " AREA:in".$format."_max#aDEB7B:";
$rrd_options .= " AREA:in".$format."#91B13C:'In '";
$rrd_options .= " AREA:in".$format."_max#D7FFC7:";
$rrd_options .= " AREA:in".$format."#90B040:";
$rrd_options .= " LINE:in".$format."#608720:'In '";
#$rrd_options .= " LINE1.25:in".$format."#006600:'In '";
$rrd_options .= " GPRINT:in".$format.":LAST:%6.2lf%s";
$rrd_options .= " GPRINT:in".$format.":AVERAGE:%6.2lf%s";
$rrd_options .= " GPRINT:in".$format."_max:MAX:%6.2lf%s";
$rrd_options .= " GPRINT:95thin:%6.2lf%s\\\\n";
$rrd_options .= " AREA:dout".$format."_max#a3b9FF:";
$rrd_options .= " AREA:dout".$format."#8080BD:'Out'";
$rrd_options .= " AREA:dout".$format."_max#E0E0FF:";
$rrd_options .= " AREA:dout".$format."#8080C0:";
$rrd_options .= " LINE:dout".$format."#606090:'Out'";
#$rrd_options .= " LINE1.25:dout".$format."#000099:Out";
$rrd_options .= " GPRINT:out".$format.":LAST:%6.2lf%s";
$rrd_options .= " GPRINT:out".$format.":AVERAGE:%6.2lf%s";
+187
View File
@@ -0,0 +1,187 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if(is_admin() !== false) {
?>
<div class="modal fade bs-example-modal-sm" id="schedule-maintenance" tabindex="-1" role="dialog" aria-labelledby="Create" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h5 class="modal-title" id="Create">Create maintenance</h5>
</div>
<div class="modal-body">
<form method="post" role="form" id="sched-form" class="form-horizontal schedule-maintenance-form">
<input type="hidden" name="schedule_id" id="schedule_id">
<input type="hidden" name="type" id="type" value="schedule-maintenance">
<input type="hidden" name="sub_type" id="sub_type" value="new-maintenance">
<div class="row">
<div class="col-md-12">
<span id="response"></span>
</div>
</div>
<div class="form-group">
<label for="title" class="col-sm-4 control-label">Title: </label>
<div class="col-sm-8">
<input type="text" class="form-control" id="title" name="title" placeholder="Maintenance title">
</div>
</div>
<div class="form-group">
<label for="notes" class="col-sm-4 control-label">Notes: </label>
<div class="col-sm-8">
<textarea class="form-control" id="notes" name="notes" placeholder="Maintenance notes"></textarea>
</div>
</div>
<div class="form-group">
<label for="start" class="col-sm-4 control-label">Start: </label>
<div class="col-sm-8">
<input type="text" class="form-control date" id="start" name="start" value="<?php echo date('Y-m-d H:i'); ?>" data-date-format="YYYY-MM-DD HH:mm">
</div>
</div>
<div class="form-group">
<label for="end" class="col-sm-4 control-label">End: </label>
<div class="col-sm-8">
<input type="text" class="form-control date" id="end" name="end" value="<?php echo date('Y-m-d H:i',strtotime('+1 hour')); ?>" data-date-format="YYYY-MM-DD HH:mm">
</div>
</div>
<div class="form-group">
<label for='map-stub' class='col-sm-4 control-label'>Map To: </label>
<div class="col-sm-5">
<input type='text' id='map-stub' name='map-stub' class='form-control'/>
</div>
<div class="col-sm-3">
<button class="btn btn-primary btn-sm" type="button" name="add-map" id="add-map" value="Add">Add</button>
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<span id="map-tags"></span>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-3">
<button class="btn btn-success" type="submit" name="sched-submit" id="sched-submit" value="save">Schedule maintenance</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script>
$('#schedule-maintenance').on('hide.bs.modal', function (event) {
$('#map-tags').data('tagmanager').empty();
$('#schedule_id').val('');
$('#title').val('');
$('#notes').val('');
$('#start').val('');
$('#end').val('');
});
$('#schedule-maintenance').on('show.bs.modal', function (event) {
$('#tagmanager').tagmanager();
var schedule_id = $('#schedule_id').val();
$('#map-tags').tagmanager({
strategy: 'array',
tagFieldName: 'maps[]',
initialCap: false
});
if (schedule_id > 0) {
$.ajax({
type: "POST",
url: "/ajax_form.php",
data: { type: "schedule-maintenance", sub_type: "parse-maintenance", schedule_id: schedule_id },
dataType: "json",
success: function(output) {
var arr = [];
$.each ( output['targets'], function( key, value ) {
arr.push(value);
});
$('#map-tags').data('tagmanager').populate(arr);
$('#title').val(output['title']);
$('#notes').val(output['notes']);
$('#start').val(output['start']);
$('#end').val(output['end']);
}
});
}
});
$('#sched-submit').click('', function(e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "/ajax_form.php",
data: $('form.schedule-maintenance-form').serialize(),
dataType: "json",
success: function(data){
if(data.status == 'ok') {
$("#message").html('<div class="alert alert-info">'+data.message+'</div>');
$("#schedule-maintenance").modal('hide');
$("#alert-schedule").bootgrid('reload');
} else {
$("#response").html('<div class="alert alert-info">'+data.message+'</div>');
}
},
error: function(){
$("#response").html('<div class="alert alert-info">An error occurred.</div>');
}
});
});
$('#add-map').click('',function (event) {
$('#map-tags').data('tagmanager').populate([ $('#map-stub').val() ]);
$('#map-stub').val('');
});
$('#map-stub').typeahead([
{
name: 'map_devices',
remote : '/ajax_search.php?search=%QUERY&type=device&map=1',
header : '<h5><strong>&nbsp;Devices</strong></h5>',
template: '{{name}}',
valueKey:"name",
engine: Hogan
},
{
name: 'map_groups',
remote : '/ajax_search.php?search=%QUERY&type=group&map=1',
header : '<h5><strong>&nbsp;Groups</strong></h5>',
template: '{{name}}',
valueKey:"name",
engine: Hogan
}
]);
$(function () {
$("#start").datetimepicker({
minDate: '<?php echo date('Y-m-d H:i'); ?>'
});
$("#end").datetimepicker();
$("#start").on("dp.change", function (e) {
$("#end").data("DateTimePicker").minDate(e.date);
});
$("#end").on("dp.change", function (e) {
$("#start").data("DateTimePicker").maxDate(e.date);
});
});
</script>
<?php
}
?>
+1 -2
View File
@@ -41,8 +41,7 @@ if(is_admin() === false) {
<script>
$('#confirm-delete').on('show.bs.modal', function(event) {
event.preventDefault();
map_id = $(e.relatedTarget).data('map_id');
map_id = $(event.relatedTarget).data('map_id');
$("#map_id").val(map_id);
});
@@ -0,0 +1,78 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if(is_admin() !== false) {
?>
<div class="modal fade bs-example-modal-sm" id="delete-maintenance" tabindex="-1" role="dialog" aria-labelledby="delete" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h5 class="modal-title" id="Create">Delete maintenance</h5>
</div>
<div class="modal-body">
<p>If you would like to remove this maintenance then please click Delete.</p>
</div>
<div class="modal-footer">
<form method="post" role="form" id="sched-del" class="form-horizontal schedule-maintenance-del">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-danger danger" id="sched-maintenance-removal" data-target="sched-maintenance-removal">Delete</button>
<input type="hidden" name="del_schedule_id" id="del_schedule_id">
<input type="hidden" name="type" id="type" value="schedule-maintenance">
<input type="hidden" name="sub_type" id="sub_type" value="del-maintenance">
</form>
</div>
</div>
</div>
</div>
<script>
$('#schedule-maintenance').on('hide.bs.modal', function (event) {
$('#map-tags').data('tagmanager').empty();
$('#schedule_id').val('');
$('#title').val('');
$('#notes').val('');
$('#start').val('');
$('#end').val('');
});
$('#sched-maintenance-removal').click('', function(e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "/ajax_form.php",
data: $('form.schedule-maintenance-del').serialize(),
dataType: "json",
success: function(data){
if(data.status == 'ok') {
$("#message").html('<div class="alert alert-info">'+data.message+'</div>');
$("#delete-maintenance").modal('hide');
$("#alert-schedule").bootgrid('reload');
} else {
$("#response").html('<div class="alert alert-info">'+data.message+'</div>');
}
},
error: function(){
$("#response").html('<div class="alert alert-info">An error occurred.</div>');
}
});
});
</script>
<?php
}
?>
+4 -4
View File
@@ -19,11 +19,11 @@ if (isset($device['device_id']) && $device['device_id'] > 0) {
}
if ($_SESSION['userlevel'] >= '5') {
$query = "SELECT DATE(time_logged) Date, COUNT(alert_log.device_id) totalCount, alert_rules.severity Severity FROM alert_log,alert_rules WHERE alert_log.rule_id=alert_rules.id $sql GROUP BY DATE(time_logged),alert_rules.severity";
$query = "SELECT DATE_FORMAT(time_logged, '".$config['alert_graph_date_format']."') Date, COUNT(alert_log.rule_id) totalCount, alert_rules.severity Severity FROM alert_log,alert_rules WHERE alert_log.rule_id=alert_rules.id AND `alert_log`.`state` != 0 $sql GROUP BY DATE_FORMAT(time_logged, '".$config['alert_graph_date_format']."'),alert_rules.severity";
}
if ($_SESSION['userlevel'] < '5') {
$query = "SELECT DATE(time_logged) Date, COUNT(alert_log.device_id) totalCount, alert_rules.severity Severity FROM alert_log,alert_rules,devices_perms WHERE alert_log.rule_id=alert_rules.id $sql AND alert_log.device_id = devices_perms.device_id AND devices_perms.user_id = " . $_SESSION['user_id'] . " GROUP BY DATE(time_logged),alert_rules.severity";
$query = "SELECT DATE_FORMAT(time_logged, '".$config['alert_graph_date_format']."') Date, COUNT(alert_log.device_id) totalCount, alert_rules.severity Severity FROM alert_log,alert_rules,devices_perms WHERE alert_log.rule_id=alert_rules.id AND `alert_log`.`state` != 0 $sql AND alert_log.device_id = devices_perms.device_id AND devices_perms.user_id = " . $_SESSION['user_id'] . " GROUP BY DATE_FORMAT(time_logged, '".$config['alert_graph_date_format']."'),alert_rules.severity";
}
?>
@@ -86,7 +86,7 @@ echo $max_count; ?>
}
}
},
zoomMin: 2073600000, //24hrs
zoomMin: 86400, //24hrs
zoomMax: <?php
$first_date = reset($data);
$last_date = end($data);
@@ -97,4 +97,4 @@ echo $milisec_diff;
};
var graph2d = new vis.Graph2d(container, items, groups, options);
</script>
</script>
+40 -9
View File
@@ -25,12 +25,12 @@ $sql .= ' AND `local_device_id` != 0 AND `remote_device_id` != 0';
$tmp_ids = array();
foreach (dbFetchRows("SELECT DISTINCT least(`devices`.`device_id`, `remote_device_id`) AS `remote_device_id`, GREATEST(`remote_device_id`,`devices`.`device_id`) AS `local_device_id` FROM `links` LEFT JOIN `ports` ON `local_port_id`=`ports`.`port_id` LEFT JOIN `devices` ON `ports`.`device_id`=`devices`.`device_id` $sql", $sql_array) as $link_devices) {
if (!in_array($link_devices['local_device_id'], $tmp_ids) && device_permitted($link_devices['local_device_id'])) {
$link_dev = dbFetchRow("SELECT `hostname`,`location` FROM `devices` WHERE `device_id`=?",array($link_devices['local_device_id']));
$tmp_devices[] = array('id'=>$link_devices['local_device_id'],'label'=>$link_dev['hostname'],'title'=>$link_dev['hostname'],'group'=>$link_dev['location']);
$link_dev = dbFetchRow("SELECT * FROM `devices` WHERE `device_id`=?",array($link_devices['local_device_id']));
$tmp_devices[] = array('id'=>$link_devices['local_device_id'],'label'=>$link_dev['hostname'],'title'=>generate_device_link($link_dev,'',array(),'','','',0),'group'=>$link_dev['location'],'shape'=>'box');
}
if (!in_array($link_devices['remote_device_id'], $tmp_ids) && device_permitted($link_devices['remote_device_id'])) {
$link_dev = dbFetchRow("SELECT `hostname`,`location` FROM `devices` WHERE `device_id`=?",array($link_devices['remote_device_id']));
$tmp_devices[] = array('id'=>$link_devices['remote_device_id'],'label'=>$link_dev['hostname'],'title'=>$link_dev['hostname'],'group'=>$link_dev['location']);
$link_dev = dbFetchRow("SELECT * FROM `devices` WHERE `device_id`=?",array($link_devices['remote_device_id']));
$tmp_devices[] = array('id'=>$link_devices['remote_device_id'],'label'=>$link_dev['hostname'],'title'=>generate_device_link($link_dev,'',array(),'','','',0),'group'=>$link_dev['location'],'shape'=>'box');
}
array_push($tmp_ids,$link_devices['local_device_id']);
array_push($tmp_ids,$link_devices['remote_device_id']);
@@ -42,11 +42,12 @@ $nodes = json_encode($tmp_devices);
if (is_array($tmp_devices[0])) {
$tmp_links = array();
foreach (dbFetchRows("SELECT local_device_id, remote_device_id, `remote_hostname`,`ports`.`ifName` AS `local_port`, `remote_port`,`ports`.`ifSpeed` AS ifSpeed FROM `links` LEFT JOIN `ports` ON `local_port_id`=`ports`.`port_id` LEFT JOIN `devices` ON `ports`.`device_id`=`devices`.`device_id` WHERE (`local_device_id` IN ($tmp_ids) AND `remote_device_id` IN ($tmp_ids))") as $link_devices) {
foreach (dbFetchRows("SELECT local_device_id, remote_device_id, `remote_hostname`,`ports`.*, `remote_port` FROM `links` LEFT JOIN `ports` ON `local_port_id`=`ports`.`port_id` LEFT JOIN `devices` ON `ports`.`device_id`=`devices`.`device_id` WHERE (`local_device_id` IN ($tmp_ids) AND `remote_device_id` IN ($tmp_ids))") as $link_devices) {
foreach ($tmp_devices as $k=>$v) {
if ($v['id'] == $link_devices['local_device_id']) {
$from = $v['id'];
$port = shorten_interface_type($link_devices['local_port']);
$port = shorten_interface_type($link_devices['ifName']);
$port_data = $link_devices;
}
if ($v['id'] == $link_devices['remote_device_id']) {
$to = $v['id'];
@@ -67,7 +68,20 @@ if (is_array($tmp_devices[0])) {
} else {
$width = 1;
}
$tmp_links[] = array('from'=>$from,'to'=>$to,'label'=>$port,'title'=>$port,'width'=>$width);
$link_in_used = ($link_devices['ifInOctets_rate'] * 8) / $link_devices['ifSpeed'] * 100;
$link_out_used = ($link_devices['ifOutOctets_rate'] * 8) / $link_devices['ifSpeed'] * 100;
if ($link_in_used > $link_out_used) {
$link_used = $link_in_used;
} else {
$link_used = $link_out_used;
}
$link_used = round($link_used, -1);
if ($link_used > 100) {
$link_used = 100;
}
$link_color = $config['map_legend'][$link_used];
$tmp_links[] = array('from'=>$from,'to'=>$to,'label'=>$port,'title'=>generate_port_link($port_data, "<img src='graph.php?type=port_bits&amp;id=".$port['port_id']."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=100&amp;height=20&amp;legend=no&amp;bg=".str_replace("#","", $row_colour)."'>",'',0,1),'width'=>$width,'color'=>$link_color);
}
$edges = json_encode($tmp_links);
@@ -97,9 +111,26 @@ echo $edges;
var data = {
nodes: nodes,
edges: edges,
stabilize: true
stabilize: false
};
var options = {
physics: {
barnesHut: {
gravitationalConstant: -80000, springConstant: 0.001, springLength: 200
}
},
tooltip: {
color: {
background: '#ffffff'
}
},
smoothCurves: {dynamic:false, type: "continuous"},
edges: {
color: {
color: '#000000'
}
}
};
var options = {physics: {barnesHut: {gravitationalConstant: -11900, centralGravity: 1.4, springLength: 203, springConstant: 0.05, damping: 0.3}}, smoothCurves: false};
var network = new vis.Network(container, data, options);
network.on("resize", function(params) {console.log(params.width,params.height)});
network.on('click', function (properties) {
+6 -1
View File
@@ -62,6 +62,7 @@ if (isset($config['site_style']) && ($config['site_style'] == 'dark' || $config[
if ($_SESSION['userlevel'] >= '10') {
?>
<li><a href="<?php echo(generate_url(array('page'=>'alert-rules'))); ?>"><i class="fa fa-tasks fa-fw fa-lg"></i> Alert Rules</a></li>
<li><a href="<?php echo(generate_url(array('page'=>'alert-schedule'))); ?>"><i class="fa fa-calendar fa-fw fa-lg"></i> Maintenance Windows</a></li>
<li><a href="<?php echo(generate_url(array('page'=>'alert-map'))); ?>"><i class="fa fa-link fa-fw fa-lg"></i> Alert Map</a></li>
<li><a href="<?php echo(generate_url(array('page'=>'templates'))); ?>"><i class="fa fa-sitemap fa-fw fa-lg"></i> Alert Templates</a></li>
<?php
@@ -433,8 +434,12 @@ Plugins::call('menu');
if ($_SESSION['userlevel'] >= '10')
{
echo('
if (dbFetchCell("SELECT COUNT(*) from `plugins` WHERE plugin_active = '1'") > 0) {
echo('
<li role="presentation" class="divider"></li>
');
}
echo('
<li><a href="plugin/view=admin"> <i class="fa fa-lock fa-fw fa-lg"></i>Plugin Admin</a></li>
');
}
+137
View File
@@ -0,0 +1,137 @@
<?php
$param = array();
if(!isset($vars['ignore'])) { $vars['ignore'] = "0"; }
if(!isset($vars['disabled'])) { $vars['disabled'] = "0"; }
if(!isset($vars['deleted'])) { $vars['deleted'] = "0"; }
$where = '';
foreach ($vars as $var => $value)
{
if ($value != "")
{
switch ($var)
{
case 'hostname':
$where .= " AND D.hostname LIKE ?";
$param[] = "%".$value."%";
break;
case 'location':
$where .= " AND D.location LIKE ?";
$param[] = "%".$value."%";
break;
case 'device_id':
$where .= " AND D.device_id = ?";
$param[] = $value;
break;
case 'deleted':
case 'ignore':
if ($value == 1)
{
$where .= " AND (I.ignore = 1 OR D.ignore = 1) AND I.deleted = 0";
}
break;
case 'disable':
case 'ifSpeed':
if (is_numeric($value))
{
$where .= " AND I.$var = ?";
$param[] = $value;
}
break;
case 'ifType':
$where .= " AND I.$var = ?";
$param[] = $value;
break;
case 'ifAlias':
case 'port_descr_type':
$where .= " AND I.$var LIKE ?";
$param[] = "%".$value."%";
break;
case 'errors':
if ($value == 1)
{
$where .= " AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')";
}
break;
case 'state':
if ($value == "down")
{
$where .= "AND I.ifAdminStatus = ? AND I.ifOperStatus = ?";
$param[] = "up";
$param[] = "down";
} elseif($value == "up") {
$where .= "AND I.ifAdminStatus = ? AND I.ifOperStatus = ? AND I.ignore = '0' AND D.ignore='0' AND I.deleted='0'";
$param[] = "up";
$param[] = "up";
} elseif($value == "admindown") {
$where .= "AND I.ifAdminStatus = ? AND D.ignore = 0";
$param[] = "down";
}
break;
}
}
}
$query = "SELECT * FROM `ports` AS I, `devices` AS D WHERE I.device_id = D.device_id ".$where." ".$query_sort;
$row = 1;
list($format, $subformat) = explode("_", $vars['format']);
$ports = dbFetchRows($query, $param);
switch ($vars['sort'])
{
case 'traffic':
$ports = array_sort($ports, 'ifOctets_rate', SORT_DESC);
break;
case 'traffic_in':
$ports = array_sort($ports, 'ifInOctets_rate', SORT_DESC);
break;
case 'traffic_out':
$ports = array_sort($ports, 'ifOutOctets_rate', SORT_DESC);
break;
case 'packets':
$ports = array_sort($ports, 'ifUcastPkts_rate', SORT_DESC);
break;
case 'packets_in':
$ports = array_sort($ports, 'ifInUcastOctets_rate', SORT_DESC);
break;
case 'packets_out':
$ports = array_sort($ports, 'ifOutUcastOctets_rate', SORT_DESC);
break;
case 'errors':
$ports = array_sort($ports, 'ifErrors_rate', SORT_DESC);
break;
case 'speed':
$ports = array_sort($ports, 'ifSpeed', SORT_DESC);
break;
case 'port':
$ports = array_sort($ports, 'ifDescr', SORT_ASC);
break;
case 'media':
$ports = array_sort($ports, 'ifType', SORT_ASC);
break;
case 'descr':
$ports = array_sort($ports, 'ifAlias', SORT_ASC);
break;
case 'device':
default:
$ports = array_sort($ports, 'hostname', SORT_ASC);
}
$csv[] = array('Device','Port','Speed','Down','Up','Media','Description');
foreach( $ports as $port ) {
if( port_permitted($port['port_id'], $port['device_id']) ) {
$speed = humanspeed($port['ifSpeed']);
$type = humanmedia($port['ifType']);
$port['in_rate'] = formatRates($port['ifInOctets_rate'] * 8);
$port['out_rate'] = formatRates($port['ifOutOctets_rate'] * 8);
$port = ifLabel($port, $device);
$csv[] = array($port['hostname'],fixIfName($port['label']),$speed,$port['in_rate'],$port['out_rate'],$type,$port['ifAlias']);
}
}
?>
@@ -0,0 +1,67 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$where = 1;
if ($_SESSION['userlevel'] >= '5') {
$sql = " FROM `alert_schedule` AS S WHERE $where";
} else {
$sql = " FROM `alert_schedule` AS S WHERE $where";
$param[] = $_SESSION['user_id'];
}
if (isset($searchPhrase) && !empty($searchPhrase)) {
$sql .= " AND (`S`.`title` LIKE '%$searchPhrase%' OR `S`.`start` LIKE '%$searchPhrase%' OR `S`.`end` LIKE '%$searchPhrase%')";
}
$count_sql = "SELECT COUNT(`id`) $sql";
$total = dbFetchCell($count_sql,$param);
if (empty($total)) {
$total = 0;
}
if (!isset($sort) || empty($sort)) {
$sort = '`S`.`start` DESC ';
}
$sql .= " ORDER BY $sort";
if (isset($current)) {
$limit_low = ($current * $rowCount) - ($rowCount);
$limit_high = $rowCount;
}
if ($rowCount != -1) {
$sql .= " LIMIT $limit_low,$limit_high";
}
$sql = "SELECT `S`.`schedule_id`, DATE_FORMAT(`S`.`start`, '%D %b %Y %T') AS `start`, DATE_FORMAT(`S`.`end`, '%D %b %Y %T') AS `end`, `S`.`title` $sql";
foreach (dbFetchRows($sql,$param) as $schedule) {
$status = 0;
if ($schedule['end'] < date('dS M Y H:i::s')) {
$status = 1;
}
if (date('dS M Y H:i::s') >= $schedule['start'] && date('dS M Y H:i::s') < $schedule['end']) {
$status = 2;
}
$response[] = array('title'=>$schedule['title'],
'start'=>$schedule['start'],
'end'=>$schedule['end'],
'id'=>$schedule['schedule_id'],
'status'=>$status);
}
$output = array('current'=>$current,'rowCount'=>$rowCount,'rows'=>$response,'total'=>$total);
echo _json_encode($output);
+40
View File
@@ -0,0 +1,40 @@
<?php
foreach ($_GET as $key=>$get_var)
{
if (strstr($key, "opt"))
{
list($name, $value) = explode("|", $get_var);
if (!isset($value)) { $value = "yes"; }
$vars[$name] = $value;
}
}
$segments = explode('/', trim($_SERVER['REQUEST_URI'], '/'));
foreach ($segments as $pos => $segment)
{
$segment = urldecode($segment);
if ($pos == "0")
{
$vars['page'] = $segment;
} else {
list($name, $value) = explode("=", $segment);
if ($value == "" || !isset($value))
{
$vars[$name] = yes;
} else {
$vars[$name] = $value;
}
}
}
foreach ($_GET as $name => $value)
{
$vars[$name] = $value;
}
foreach ($_POST as $name => $value)
{
$vars[$name] = $value;
}
+6 -40
View File
@@ -12,7 +12,11 @@
*
*/
$_SERVER['PATH_INFO'] = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (!empty($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : '');
if( strstr($_SERVER['SERVER_SOFTWARE'],"nginx") ) {
$_SERVER['PATH_INFO'] = str_replace($_SERVER['PATH_TRANSLATED'].$_SERVER['PHP_SELF'],"",$_SERVER['ORIG_SCRIPT_FILENAME']);
} else {
$_SERVER['PATH_INFO'] = !empty($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : (!empty($_SERVER['ORIG_PATH_INFO']) ? $_SERVER['ORIG_PATH_INFO'] : '');
}
function logErrors($errno, $errstr, $errfile, $errline) {
global $php_debug;
@@ -52,6 +56,7 @@ include("../config.php");
include_once("../includes/definitions.inc.php");
include("../includes/functions.php");
include("includes/functions.inc.php");
include("includes/vars.inc.php");
include('includes/plugins.inc.php');
Plugins::start();
@@ -70,45 +75,6 @@ ob_start();
ini_set('allow_url_fopen', 0);
ini_set('display_errors', 0);
foreach ($_GET as $key=>$get_var)
{
if (strstr($key, "opt"))
{
list($name, $value) = explode("|", $get_var);
if (!isset($value)) { $value = "yes"; }
$vars[$name] = $value;
}
}
$segments = explode('/', trim($_SERVER['REQUEST_URI'], '/'));
foreach ($segments as $pos => $segment)
{
$segment = urldecode($segment);
if ($pos == "0")
{
$vars['page'] = $segment;
} else {
list($name, $value) = explode("=", $segment);
if ($value == "" || !isset($value))
{
$vars[$name] = yes;
} else {
$vars[$name] = $value;
}
}
}
foreach ($_GET as $name => $value)
{
$vars[$name] = $value;
}
foreach ($_POST as $name => $value)
{
$vars[$name] = $value;
}
include("includes/authenticate.inc.php");
if (strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; }
-1
View File
@@ -54,7 +54,6 @@
"requireCamelCaseOrUpperCaseIdentifiers": "ignoreProperties",
"disallowKeywords": ["with"],
"disallowMultipleLineStrings": true,
"validateLineBreaks": "LF",
"validateIndentation": 4,
"disallowTrailingWhitespace": true,
"disallowTrailingComma": true,
+7 -1
View File
@@ -1,7 +1,9 @@
Submitting Issues
=================
If you are submitting a bug, please test and/or fork [this jsfiddle](http://jsfiddle.net/kmbo576p/) demonstrating the issue. Code issues and fringe case bugs that do not include a jsfiddle (or similar) will be closed.
If you are submitting a bug, please test and/or fork [this jsfiddle](http://jsfiddle.net/Eonasdan/0Ltv25o8/) demonstrating the issue. Code issues and fringe case bugs that do not include a jsfiddle (or similar) will be closed.
Issues that are submitted without a description (title only) will be closed with no further explanation.
Contributing code
=================
@@ -22,6 +24,9 @@ Very important notes
* **Pull requests to the `master` branch will be closed.** Please submit all pull requests to the `development` branch.
* **Do not include the minified files in your pull request.** Don't worry, we'll build them when we cut a release.
* Pull requests that do not include a description (title only) and the following will be closed:
* What the change does
* A use case (for new features or enhancements)
Grunt tasks
===========
@@ -30,3 +35,4 @@ We use Grunt for managing the build. Here are some useful Grunt tasks:
* `grunt` The default task lints the code and runs the tests. You should make sure you do this before submitting a PR.
* `grunt build` Compiles the less stylesheet and minifies the javascript source in build directory.
* `grunt build:travis` Compliles and runs the jasmine/travis tests. **All PR's MUST pass tests in place**
+46 -7
View File
@@ -24,11 +24,12 @@ module.exports = function (grunt) {
jshint: {
all: [
'Gruntfile.js', 'src/js/*.js'
'Gruntfile.js', 'src/js/*.js', 'test/*.js'
],
options: {
'browser' : true,
'node' : true,
'jquery' : true,
'boss' : false,
'curly' : true,
'debug' : false,
@@ -57,15 +58,24 @@ module.exports = function (grunt) {
'quotmark' : 'single',
'globals': {
'define': false,
'jQuery': false,
'moment': false
'moment': false,
// Jasmine
'jasmine': false,
'describe': false,
'xdescribe': false,
'expect': false,
'it': false,
'xit': false,
'spyOn': false,
'beforeEach': false,
'afterEach': false
}
}
},
jscs: {
all: [
'Gruntfile.js', 'src/js/*.js'
'Gruntfile.js', 'src/js/*.js', 'test/*.js'
],
options: {
config: '.jscs.json'
@@ -86,22 +96,49 @@ module.exports = function (grunt) {
'build/css/bootstrap-datetimepicker.css': 'src/less/bootstrap-datetimepicker-build.less'
}
}
},
jasmine: {
customTemplate: {
src: 'src/js/*.js',
options: {
specs: 'test/*Spec.js',
helpers: 'test/*Helper.js',
styles: [
'node_modules/bootstrap/dist/css/bootstrap.min.css',
'build/css/bootstrap-datetimepicker.min.css'
],
vendor: [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/moment/min/moment-with-locales.min.js',
'node_modules/bootstrap/dist/js/bootstrap.min.js'
],
display: 'none',
summary: 'true'
}
}
}
});
grunt.loadTasks('tasks');
grunt.loadNpmTasks('grunt-contrib-jasmine');
// These plugins provide necessary tasks.
require('load-grunt-tasks')(grunt);
// Default task.
grunt.registerTask('default', ['jshint', 'jscs']);
grunt.registerTask('default', ['jshint', 'jscs', 'less', 'jasmine']);
// travis build task
grunt.registerTask('build:travis', [
// code style
'jshint', 'jscs'
'jshint', 'jscs',
// build
'uglify', 'less',
// tests
'jasmine'
]);
// Task to be run when building
@@ -131,7 +168,7 @@ module.exports = function (grunt) {
done();
});
}
else {
else { //--target=css
grunt.util.spawn({
cmd: 'src/nuget/nuget.exe',
args: [
@@ -152,4 +189,6 @@ module.exports = function (grunt) {
});
}
});
grunt.registerTask('test', ['jshint', 'jscs', 'uglify', 'less', 'jasmine']);
};
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2014 Eonasdan, nikoskalogridis
Copyright (c) 2015 Jonathan Peterson (@Eonasdan)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+15 -7
View File
@@ -1,17 +1,25 @@
# Bootstrap v3 datetimepicker widget ![GitHub version](https://badge.fury.io/gh/Eonasdan%2Fbootstrap-datetimepicker.png)&nbsp;&nbsp;&nbsp;![Travis](https://travis-ci.org/Eonasdan/bootstrap-datetimepicker.svg?branch=development)
# Bootstrap 3 Date/Time Picker
![GitHub version](https://badge.fury.io/gh/Eonasdan%2Fbootstrap-datetimepicker.png)&nbsp;&nbsp;&nbsp;![Travis](https://travis-ci.org/Eonasdan/bootstrap-datetimepicker.svg?branch=development)
![DateTimePicker](http://i.imgur.com/nfnvh5g.png)
## [View the manual and demos](http://eonasdan.github.io/bootstrap-datetimepicker/)
#v4
v4 is out now! For v4 related bugs and issues see: /Eonasdan/bootstrap-datetimepicker/labels/v4.
v3 is going into an archive state. Please be sure to check the documents. v4 has breaking changes and is a major rewrite.
## Submitting Issues
Please test and/or fork [this jsfiddle](http://jsfiddle.net/kmbo576p/) with an example of your issue before you post an issue here.
If you have issues, please check the following first:
* Have you read the docs?
* Do you have the latest version of momentjs?
* Do you have the latest version of jQuery?
* Please test and/or fork [this jsfiddle](http://jsfiddle.net/Eonasdan/0Ltv25o8/) with an example of your issue before you post an issue here.
## Where do you use this?
I'd love to know if your public site is using this plugin and list your logo on the documentation site. Please email me `eonasdan at outlook dot com`. Do not submit issue/feature request to this email, they will be ignored.
I'd love to know if your public site is using this plugin and list your logo on the documentation site. Please email me `eonasdan at outlook dot com`. Do not submit issue/feature request to this email, they will be **ignored**.
## [Installation instructions](https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Installation)
Installation instructions has been moved to the wiki
## [Installation instructions](http://eonasdan.github.io/bootstrap-datetimepicker/Installing/)
## [Change Log](https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Change-Log)
The change log has moved to the wiki
## [Change Log](http://eonasdan.github.io/bootstrap-datetimepicker/Version%204%20Changelog/)
+5 -3
View File
@@ -1,13 +1,15 @@
{
"name": "eonasdan-bootstrap-datetimepicker",
"version": "3.1.3",
"version": "4.7.14",
"main": [
"build/css/bootstrap-datetimepicker.min.css",
"build/js/bootstrap-datetimepicker.min.js"
"build/js/bootstrap-datetimepicker.min.js",
"src/less/_bootstrap-datetimepicker.less",
"src/less/bootstrap-datetimepicker-build.less",
"src/js/bootstrap-datetimepicker.js"
],
"dependencies": {
"jquery": ">=1.8.3",
"bootstrap": ">= 3.0",
"moment": ">=2.8.0"
},
"homepage": "https://github.com/Eonasdan/bootstrap-datetimepicker",
+245 -117
View File
@@ -1,75 +1,76 @@
/*!
* Datetimepicker for Bootstrap v3
//! version : 3.1.3
* Datetimepicker for Bootstrap 3
* ! version : 4.7.14
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
top: 0;
left: 0;
width: 250px;
list-style: none;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
margin: 2px 0;
padding: 4px;
margin-top: 1px;
z-index: 99999 !important;
border-radius: 4px;
width: 19em;
}
.bootstrap-datetimepicker-widget.timepicker-sbs {
width: 600px;
@media (min-width: 768px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
.bootstrap-datetimepicker-widget.bottom:before {
@media (min-width: 992px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
@media (min-width: 1200px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
.bootstrap-datetimepicker-widget.dropdown-menu:before,
.bootstrap-datetimepicker-widget.dropdown-menu:after {
content: '';
display: inline-block;
position: absolute;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom: 7px solid #cccccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 7px;
}
.bootstrap-datetimepicker-widget.bottom:after {
content: '';
display: inline-block;
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid white;
position: absolute;
top: -6px;
left: 8px;
}
.bootstrap-datetimepicker-widget.top:before {
content: '';
display: inline-block;
.bootstrap-datetimepicker-widget.dropdown-menu.top:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #ccc;
border-top: 7px solid #cccccc;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: -7px;
left: 6px;
}
.bootstrap-datetimepicker-widget.top:after {
content: '';
display: inline-block;
.bootstrap-datetimepicker-widget.dropdown-menu.top:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid white;
position: absolute;
bottom: -6px;
left: 7px;
}
.bootstrap-datetimepicker-widget .dow {
width: 14.2857%;
}
.bootstrap-datetimepicker-widget.pull-right:before {
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before {
left: auto;
right: 6px;
}
.bootstrap-datetimepicker-widget.pull-right:after {
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after {
left: auto;
right: 7px;
}
.bootstrap-datetimepicker-widget > ul {
list-style-type: none;
.bootstrap-datetimepicker-widget .list-unstyled {
margin: 0;
}
.bootstrap-datetimepicker-widget a[data-action] {
@@ -89,82 +90,238 @@
.bootstrap-datetimepicker-widget button[data-action] {
padding: 6px;
}
.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator {
width: 4px;
.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
margin: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Increment Hours";
}
.bootstrap-datetimepicker-widget .datepicker > div {
display: none;
.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Increment Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Decrement Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Decrement Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Show Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Show Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Toggle AM/PM";
}
.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Clear the picker";
}
.bootstrap-datetimepicker-widget .btn[data-action="today"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Set the date to today";
}
.bootstrap-datetimepicker-widget .picker-switch {
text-align: center;
}
.bootstrap-datetimepicker-widget .picker-switch::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Toggle Date and Time Screens";
}
.bootstrap-datetimepicker-widget .picker-switch td {
padding: 0;
margin: 0;
height: auto;
width: auto;
line-height: inherit;
}
.bootstrap-datetimepicker-widget .picker-switch td span {
line-height: 2.5;
height: 2.5em;
width: 100%;
}
.bootstrap-datetimepicker-widget table {
width: 100%;
margin: 0;
}
.bootstrap-datetimepicker-widget td,
.bootstrap-datetimepicker-widget th {
.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th {
text-align: center;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget td {
height: 54px;
line-height: 54px;
width: 54px;
}
.bootstrap-datetimepicker-widget td.cw {
font-size: 10px;
height: 20px;
line-height: 20px;
color: #777777;
}
.bootstrap-datetimepicker-widget td.day {
.bootstrap-datetimepicker-widget table th {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget td.day:hover,
.bootstrap-datetimepicker-widget td.hour:hover,
.bootstrap-datetimepicker-widget td.minute:hover,
.bootstrap-datetimepicker-widget td.second:hover {
.bootstrap-datetimepicker-widget table th.picker-switch {
width: 145px;
}
.bootstrap-datetimepicker-widget table th.disabled,
.bootstrap-datetimepicker-widget table th.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table th.prev::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Previous Month";
}
.bootstrap-datetimepicker-widget table th.next::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Next Month";
}
.bootstrap-datetimepicker-widget table thead tr:first-child th {
cursor: pointer;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
background: #eeeeee;
}
.bootstrap-datetimepicker-widget table td {
height: 54px;
line-height: 54px;
width: 54px;
}
.bootstrap-datetimepicker-widget table td.cw {
font-size: .8em;
height: 20px;
line-height: 20px;
color: #777777;
}
.bootstrap-datetimepicker-widget table td.day {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td.second:hover {
background: #eeeeee;
cursor: pointer;
}
.bootstrap-datetimepicker-widget td.old,
.bootstrap-datetimepicker-widget td.new {
.bootstrap-datetimepicker-widget table td.old,
.bootstrap-datetimepicker-widget table td.new {
color: #777777;
}
.bootstrap-datetimepicker-widget td.today {
.bootstrap-datetimepicker-widget table td.today {
position: relative;
}
.bootstrap-datetimepicker-widget td.today:before {
.bootstrap-datetimepicker-widget table td.today:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-bottom: 7px solid #428bca;
border: 0 0 7px 7px solid transparent;
border-bottom-color: #337ab7;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: 4px;
right: 4px;
}
.bootstrap-datetimepicker-widget td.active,
.bootstrap-datetimepicker-widget td.active:hover {
background-color: #428bca;
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
background-color: #337ab7;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget td.active.today:before {
.bootstrap-datetimepicker-widget table td.active.today:before {
border-bottom-color: #fff;
}
.bootstrap-datetimepicker-widget td.disabled,
.bootstrap-datetimepicker-widget td.disabled:hover {
.bootstrap-datetimepicker-widget table td.disabled,
.bootstrap-datetimepicker-widget table td.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget td span {
.bootstrap-datetimepicker-widget table td span {
display: inline-block;
width: 54px;
height: 54px;
@@ -173,66 +330,37 @@
cursor: pointer;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget td span:hover {
.bootstrap-datetimepicker-widget table td span:hover {
background: #eeeeee;
}
.bootstrap-datetimepicker-widget td span.active {
background-color: #428bca;
.bootstrap-datetimepicker-widget table td span.active {
background-color: #337ab7;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget td span.old {
.bootstrap-datetimepicker-widget table td span.old {
color: #777777;
}
.bootstrap-datetimepicker-widget td span.disabled,
.bootstrap-datetimepicker-widget td span.disabled:hover {
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget th {
height: 20px;
line-height: 20px;
width: 20px;
.bootstrap-datetimepicker-widget.usetwentyfour td.hour {
height: 27px;
line-height: 27px;
}
.bootstrap-datetimepicker-widget th.picker-switch {
width: 145px;
}
.bootstrap-datetimepicker-widget th.next,
.bootstrap-datetimepicker-widget th.prev {
font-size: 21px;
}
.bootstrap-datetimepicker-widget th.disabled,
.bootstrap-datetimepicker-widget th.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget thead tr:first-child th {
.input-group.date .input-group-addon {
cursor: pointer;
}
.bootstrap-datetimepicker-widget thead tr:first-child th:hover {
background: #eeeeee;
}
.input-group.date .input-group-addon span {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
.bootstrap-datetimepicker-widget.left-oriented:before {
left: auto;
right: 6px;
}
.bootstrap-datetimepicker-widget.left-oriented:after {
left: auto;
right: 7px;
}
.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td {
padding: 0px !important;
}
@media screen and (max-width: 767px) {
.bootstrap-datetimepicker-widget.timepicker-sbs {
width: 283px;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
+364 -3
View File
@@ -1,5 +1,366 @@
/*!
* Datetimepicker for Bootstrap v3
//! version : 3.1.3
* Datetimepicker for Bootstrap 3
* ! version : 4.7.14
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/.bootstrap-datetimepicker-widget{top:0;left:0;width:250px;padding:4px;margin-top:1px;z-index:99999!important;border-radius:4px}.bootstrap-datetimepicker-widget.timepicker-sbs{width:600px}.bootstrap-datetimepicker-widget.bottom:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:7px}.bootstrap-datetimepicker-widget.bottom:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:8px}.bootstrap-datetimepicker-widget.top:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.top:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;position:absolute;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget .dow{width:14.2857%}.bootstrap-datetimepicker-widget.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget>ul{list-style-type:none;margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:700;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget table[data-hour-format="12"] .separator{width:4px;padding:0;margin:0}.bootstrap-datetimepicker-widget .datepicker>div{display:none}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget td,.bootstrap-datetimepicker-widget th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget td.cw{font-size:10px;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget td.day:hover,.bootstrap-datetimepicker-widget td.hour:hover,.bootstrap-datetimepicker-widget td.minute:hover,.bootstrap-datetimepicker-widget td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget td.old,.bootstrap-datetimepicker-widget td.new{color:#777}.bootstrap-datetimepicker-widget td.today{position:relative}.bootstrap-datetimepicker-widget td.today:before{content:'';display:inline-block;border-left:7px solid transparent;border-bottom:7px solid #428bca;border-top-color:rgba(0,0,0,.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget td.active,.bootstrap-datetimepicker-widget td.active:hover{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget td.disabled,.bootstrap-datetimepicker-widget td.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget td span:hover{background:#eee}.bootstrap-datetimepicker-widget td span.active{background-color:#428bca;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.25)}.bootstrap-datetimepicker-widget td span.old{color:#777}.bootstrap-datetimepicker-widget td span.disabled,.bootstrap-datetimepicker-widget td span.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget th.picker-switch{width:145px}.bootstrap-datetimepicker-widget th.next,.bootstrap-datetimepicker-widget th.prev{font-size:21px}.bootstrap-datetimepicker-widget th.disabled,.bootstrap-datetimepicker-widget th.disabled:hover{background:0 0;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget thead tr:first-child th:hover{background:#eee}.input-group.date .input-group-addon span{display:block;cursor:pointer;width:16px;height:16px}.bootstrap-datetimepicker-widget.left-oriented:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.left-oriented:after{left:auto;right:7px}.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody>tr>td{padding:0!important}@media screen and (max-width:767px){.bootstrap-datetimepicker-widget.timepicker-sbs{width:283px}}
*/
.bootstrap-datetimepicker-widget {
list-style: none;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
margin: 2px 0;
padding: 4px;
width: 19em;
}
@media (min-width: 768px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
@media (min-width: 992px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
@media (min-width: 1200px) {
.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
width: 38em;
}
}
.bootstrap-datetimepicker-widget.dropdown-menu:before,
.bootstrap-datetimepicker-widget.dropdown-menu:after {
content: '';
display: inline-block;
position: absolute;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #cccccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
top: -7px;
left: 7px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid white;
top: -6px;
left: 8px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.top:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #cccccc;
border-top-color: rgba(0, 0, 0, 0.2);
bottom: -7px;
left: 6px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.top:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid white;
bottom: -6px;
left: 7px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before {
left: auto;
right: 6px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after {
left: auto;
right: 7px;
}
.bootstrap-datetimepicker-widget .list-unstyled {
margin: 0;
}
.bootstrap-datetimepicker-widget a[data-action] {
padding: 6px 0;
}
.bootstrap-datetimepicker-widget a[data-action]:active {
box-shadow: none;
}
.bootstrap-datetimepicker-widget .timepicker-hour,
.bootstrap-datetimepicker-widget .timepicker-minute,
.bootstrap-datetimepicker-widget .timepicker-second {
width: 54px;
font-weight: bold;
font-size: 1.2em;
margin: 0;
}
.bootstrap-datetimepicker-widget button[data-action] {
padding: 6px;
}
.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Increment Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Increment Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Decrement Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Decrement Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Show Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Show Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Toggle AM/PM";
}
.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Clear the picker";
}
.bootstrap-datetimepicker-widget .btn[data-action="today"]::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Set the date to today";
}
.bootstrap-datetimepicker-widget .picker-switch {
text-align: center;
}
.bootstrap-datetimepicker-widget .picker-switch::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Toggle Date and Time Screens";
}
.bootstrap-datetimepicker-widget .picker-switch td {
padding: 0;
margin: 0;
height: auto;
width: auto;
line-height: inherit;
}
.bootstrap-datetimepicker-widget .picker-switch td span {
line-height: 2.5;
height: 2.5em;
width: 100%;
}
.bootstrap-datetimepicker-widget table {
width: 100%;
margin: 0;
}
.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th {
text-align: center;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget table th {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget table th.picker-switch {
width: 145px;
}
.bootstrap-datetimepicker-widget table th.disabled,
.bootstrap-datetimepicker-widget table th.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table th.prev::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Previous Month";
}
.bootstrap-datetimepicker-widget table th.next::after {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
content: "Next Month";
}
.bootstrap-datetimepicker-widget table thead tr:first-child th {
cursor: pointer;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
background: #eeeeee;
}
.bootstrap-datetimepicker-widget table td {
height: 54px;
line-height: 54px;
width: 54px;
}
.bootstrap-datetimepicker-widget table td.cw {
font-size: .8em;
height: 20px;
line-height: 20px;
color: #777777;
}
.bootstrap-datetimepicker-widget table td.day {
height: 20px;
line-height: 20px;
width: 20px;
}
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td.second:hover {
background: #eeeeee;
cursor: pointer;
}
.bootstrap-datetimepicker-widget table td.old,
.bootstrap-datetimepicker-widget table td.new {
color: #777777;
}
.bootstrap-datetimepicker-widget table td.today {
position: relative;
}
.bootstrap-datetimepicker-widget table td.today:before {
content: '';
display: inline-block;
border: 0 0 7px 7px solid transparent;
border-bottom-color: #337ab7;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: 4px;
right: 4px;
}
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
background-color: #337ab7;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td.active.today:before {
border-bottom-color: #fff;
}
.bootstrap-datetimepicker-widget table td.disabled,
.bootstrap-datetimepicker-widget table td.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table td span {
display: inline-block;
width: 54px;
height: 54px;
line-height: 54px;
margin: 2px 1.5px;
cursor: pointer;
border-radius: 4px;
}
.bootstrap-datetimepicker-widget table td span:hover {
background: #eeeeee;
}
.bootstrap-datetimepicker-widget table td span.active {
background-color: #337ab7;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td span.old {
color: #777777;
}
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget.usetwentyfour td.hour {
height: 27px;
line-height: 27px;
}
.input-group.date .input-group-addon {
cursor: pointer;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
File diff suppressed because one or more lines are too long
+2 -3
View File
@@ -1,10 +1,9 @@
{
"name": "bootstrap-datetimepicker",
"version": "3.1.3",
"main": ["build/css/bootstrap-datetimepicker.min.css","build/js/bootstrap-datetimepicker.min.js"],
"version": "4.7.14",
"main": ["build/css/bootstrap-datetimepicker.min.css","build/js/bootstrap-datetimepicker.min.js","src/less/_bootstrap-datetimepicker.less","src/less/bootstrap-datetimepicker-build.less","src/js/bootstrap-datetimepicker.js"],
"dependencies": {
"jquery" : ">=1.8.3",
"bootstrap" : ">=3.0",
"moment": ">=2.8.0"
}
}
+4 -3
View File
@@ -1,7 +1,7 @@
{
"name": "eonasdan/bootstrap-datetimepicker",
"type": "component",
"version": "3.1.3",
"version": "4.7.14",
"description": "Date/time picker widget based on twitter bootstrap",
"keywords": [
"bootstrap",
@@ -12,7 +12,6 @@
"require": {
"robloach/component-installer": "*",
"components/jquery": ">=1.9.1",
"components/bootstrap": "3.*",
"moment/moment": ">=2.8"
},
"extra": {
@@ -23,7 +22,9 @@
"files": [
"build/js/bootstrap-datetimepicker.min.js",
"build/css/bootstrap-datetimepicker.css",
"build/css/bootstrap-datetimepicker.min.css"
"build/css/bootstrap-datetimepicker.min.css",
"src/less/_bootstrap-datetimepicker.less",
"src/less/bootstrap-datetimepicker-build.less"
]
}
}
+8 -8
View File
@@ -1,7 +1,7 @@
{
"name": "bootstrap-datetimepicker",
"main": "src/js/bootstrap-datetimepicker.js",
"version": "3.1.3",
"version": "4.7.14",
"repository": {
"type": "git",
"url": "https://github.com/eonasdan/bootstrap-datetimepicker.git"
@@ -15,21 +15,21 @@
"datepicker",
"datetimepicker",
"timepicker",
"moment"
"moment"
],
"dependencies": {
"moment": "~2.8.1",
"bootstrap": "^3.0",
"jquery": "^1.8.3"
"moment": "~2.8.2",
"bootstrap": "^3.0",
"jquery": "latest"
},
"devDependencies": {
"grunt": "latest",
"grunt-contrib-jasmine": "^0.7.0",
"grunt-contrib-jshint": "latest",
"grunt-contrib-less": "latest",
"grunt-contrib-uglify": "latest",
"grunt-jscs": "latest",
"load-grunt-tasks": "latest",
"grunt-string-replace": "latest",
"grunt-contrib-less": "latest",
"bootstrap": "latest"
"load-grunt-tasks": "latest"
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,343 @@
/*!
* Datetimepicker for Bootstrap 3
* ! version : 4.7.14
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
@bs-datetimepicker-timepicker-font-size: 1.2em;
@bs-datetimepicker-active-bg: @btn-primary-bg;
@bs-datetimepicker-active-color: @btn-primary-color;
@bs-datetimepicker-border-radius: @border-radius-base;
@bs-datetimepicker-btn-hover-bg: @gray-lighter;
@bs-datetimepicker-disabled-color: @gray-light;
@bs-datetimepicker-alternate-color: @gray-light;
@bs-datetimepicker-secondary-border-color: #ccc;
@bs-datetimepicker-secondary-border-color-rgba: rgba(0, 0, 0, 0.2);
@bs-datetimepicker-primary-border-color: white;
@bs-datetimepicker-text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
.bootstrap-datetimepicker-widget {
list-style: none;
&.dropdown-menu {
margin: 2px 0;
padding: 4px;
width: 19em;
&.timepicker-sbs {
@media (min-width: @screen-sm-min) {
width: 38em;
}
@media (min-width: @screen-md-min) {
width: 38em;
}
@media (min-width: @screen-lg-min) {
width: 38em;
}
}
&:before, &:after {
content: '';
display: inline-block;
position: absolute;
}
&.bottom {
&:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid @bs-datetimepicker-secondary-border-color;
border-bottom-color: @bs-datetimepicker-secondary-border-color-rgba;
top: -7px;
left: 7px;
}
&:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid @bs-datetimepicker-primary-border-color;
top: -6px;
left: 8px;
}
}
&.top {
&:before {
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid @bs-datetimepicker-secondary-border-color;
border-top-color: @bs-datetimepicker-secondary-border-color-rgba;
bottom: -7px;
left: 6px;
}
&:after {
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid @bs-datetimepicker-primary-border-color;
bottom: -6px;
left: 7px;
}
}
&.pull-right {
&:before {
left: auto;
right: 6px;
}
&:after {
left: auto;
right: 7px;
}
}
}
.list-unstyled {
margin: 0;
}
a[data-action] {
padding: 6px 0;
}
a[data-action]:active {
box-shadow: none;
}
.timepicker-hour, .timepicker-minute, .timepicker-second {
width: 54px;
font-weight: bold;
font-size: @bs-datetimepicker-timepicker-font-size;
margin: 0;
}
button[data-action] {
padding: 6px;
}
.btn[data-action="incrementHours"]::after {
.sr-only();
content: "Increment Hours";
}
.btn[data-action="incrementMinutes"]::after {
.sr-only();
content: "Increment Minutes";
}
.btn[data-action="decrementHours"]::after {
.sr-only();
content: "Decrement Hours";
}
.btn[data-action="decrementMinutes"]::after {
.sr-only();
content: "Decrement Minutes";
}
.btn[data-action="showHours"]::after {
.sr-only();
content: "Show Hours";
}
.btn[data-action="showMinutes"]::after {
.sr-only();
content: "Show Minutes";
}
.btn[data-action="togglePeriod"]::after {
.sr-only();
content: "Toggle AM/PM";
}
.btn[data-action="clear"]::after {
.sr-only();
content: "Clear the picker";
}
.btn[data-action="today"]::after {
.sr-only();
content: "Set the date to today";
}
.picker-switch {
text-align: center;
&::after {
.sr-only();
content: "Toggle Date and Time Screens";
}
td {
padding: 0;
margin: 0;
height: auto;
width: auto;
line-height: inherit;
span {
line-height: 2.5;
height: 2.5em;
width: 100%;
}
}
}
table {
width: 100%;
margin: 0;
& td,
& th {
text-align: center;
border-radius: @bs-datetimepicker-border-radius;
}
& th {
height: 20px;
line-height: 20px;
width: 20px;
&.picker-switch {
width: 145px;
}
&.disabled,
&.disabled:hover {
background: none;
color: @bs-datetimepicker-disabled-color;
cursor: not-allowed;
}
&.prev::after {
.sr-only();
content: "Previous Month";
}
&.next::after {
.sr-only();
content: "Next Month";
}
}
& thead tr:first-child th {
cursor: pointer;
&:hover {
background: @bs-datetimepicker-btn-hover-bg;
}
}
& td {
height: 54px;
line-height: 54px;
width: 54px;
&.cw {
font-size: .8em;
height: 20px;
line-height: 20px;
color: @bs-datetimepicker-alternate-color;
}
&.day {
height: 20px;
line-height: 20px;
width: 20px;
}
&.day:hover,
&.hour:hover,
&.minute:hover,
&.second:hover {
background: @bs-datetimepicker-btn-hover-bg;
cursor: pointer;
}
&.old,
&.new {
color: @bs-datetimepicker-alternate-color;
}
&.today {
position: relative;
&:before {
content: '';
display: inline-block;
border: 0 0 7px 7px solid transparent;
border-bottom-color: @bs-datetimepicker-active-bg;
border-top-color: @bs-datetimepicker-secondary-border-color-rgba;
position: absolute;
bottom: 4px;
right: 4px;
}
}
&.active,
&.active:hover {
background-color: @bs-datetimepicker-active-bg;
color: @bs-datetimepicker-active-color;
text-shadow: @bs-datetimepicker-text-shadow;
}
&.active.today:before {
border-bottom-color: #fff;
}
&.disabled,
&.disabled:hover {
background: none;
color: @bs-datetimepicker-disabled-color;
cursor: not-allowed;
}
span {
display: inline-block;
width: 54px;
height: 54px;
line-height: 54px;
margin: 2px 1.5px;
cursor: pointer;
border-radius: @bs-datetimepicker-border-radius;
&:hover {
background: @bs-datetimepicker-btn-hover-bg;
}
&.active {
background-color: @bs-datetimepicker-active-bg;
color: @bs-datetimepicker-active-color;
text-shadow: @bs-datetimepicker-text-shadow;
}
&.old {
color: @bs-datetimepicker-alternate-color;
}
&.disabled,
&.disabled:hover {
background: none;
color: @bs-datetimepicker-disabled-color;
cursor: not-allowed;
}
}
}
}
&.usetwentyfour {
td.hour {
height: 27px;
line-height: 27px;
}
}
}
.input-group.date {
& .input-group-addon {
cursor: pointer;
}
}
@@ -1,5 +1,17 @@
// Import boostrap variables including default color palette and fonts
// Import bootstrap variables including default color palette and fonts
@import "../../node_modules/bootstrap/less/variables.less";
// Import datepicker component
@import "bootstrap-datetimepicker.less";
@import "_bootstrap-datetimepicker.less";
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0,0,0,0);
border: 0;
}
-294
View File
@@ -1,294 +0,0 @@
/*!
* Datetimepicker for Bootstrap v3
//! version : 3.1.3
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
top: 0;
left: 0;
width: 250px;
padding: 4px;
margin-top: 1px;
z-index: 99999 !important;
border-radius: @border-radius-base;
&.timepicker-sbs {
width: 600px;
}
&.bottom {
&:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0,0,0,.2);
position: absolute;
top: -7px;
left: 7px;
}
&:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid white;
position: absolute;
top: -6px;
left: 8px;
}
}
&.top {
&:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-top: 7px solid #ccc;
border-top-color: rgba(0,0,0,.2);
position: absolute;
bottom: -7px;
left: 6px;
}
&:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid white;
position: absolute;
bottom: -6px;
left: 7px;
}
}
& .dow {
width: 14.2857%;
}
&.pull-right {
&:before {
left: auto;
right: 6px;
}
&:after {
left: auto;
right: 7px;
}
}
>ul {
list-style-type: none;
margin: 0;
}
a[data-action] {
padding: 6px 0;
}
a[data-action]:active {
box-shadow: none;
}
.timepicker-hour, .timepicker-minute, .timepicker-second {
width: 54px;
font-weight: bold;
font-size: 1.2em;
margin: 0;
}
button[data-action] {
padding: 6px;
}
table[data-hour-format="12"] .separator {
width: 4px;
padding: 0;
margin: 0;
}
.datepicker > div {
display: none;
}
.picker-switch {
text-align: center;
}
table {
width: 100%;
margin: 0;
}
td,
th {
text-align: center;
border-radius: @border-radius-base;
}
td {
height: 54px;
line-height: 54px;
width: 54px;
&.cw
{
font-size: 10px;
height: 20px;
line-height: 20px;
color: @gray-light;
}
&.day
{
height: 20px;
line-height: 20px;
width: 20px;
}
&.day:hover,
&.hour:hover,
&.minute:hover,
&.second:hover {
background: @gray-lighter;
cursor: pointer;
}
&.old,
&.new {
color: @gray-light;
}
&.today {
position: relative;
&:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-bottom: 7px solid @btn-primary-bg;
border-top-color: rgba(0, 0, 0, 0.2);
position: absolute;
bottom: 4px;
right: 4px;
}
}
&.active,
&.active:hover {
background-color: @btn-primary-bg;
color: @btn-primary-color;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
&.active.today:before {
border-bottom-color: #fff;
}
&.disabled,
&.disabled:hover {
background: none;
color: @gray-light;
cursor: not-allowed;
}
span {
display: inline-block;
width: 54px;
height: 54px;
line-height: 54px;
margin: 2px 1.5px;
cursor: pointer;
border-radius: @border-radius-base;
&:hover {
background: @gray-lighter;
}
&.active {
background-color: @btn-primary-bg;
color: @btn-primary-color;
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
&.old {
color: @gray-light;
}
&.disabled,
&.disabled:hover {
background: none;
color: @gray-light;
cursor: not-allowed;
}
}
}
th {
height: 20px;
line-height: 20px;
width: 20px;
&.picker-switch {
width: 145px;
}
&.next,
&.prev {
font-size: @font-size-base * 1.5;
}
&.disabled,
&.disabled:hover {
background: none;
color: @gray-light;
cursor: not-allowed;
}
}
thead tr:first-child th {
cursor: pointer;
&:hover {
background: @gray-lighter;
}
}
}
.input-group {
&.date {
.input-group-addon span {
display: block;
cursor: pointer;
width: 16px;
height: 16px;
}
}
}
.bootstrap-datetimepicker-widget.left-oriented {
&:before {
left: auto;
right: 6px;
}
&:after {
left: auto;
right: 7px;
}
}
.bootstrap-datetimepicker-widget ul.list-unstyled li div.timepicker div.timepicker-picker table.table-condensed tbody > tr > td {
padding: 0px !important;
}
@media screen and (max-width: 767px) {
.bootstrap-datetimepicker-widget.timepicker-sbs {
width: 283px;
}
}
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Bootstrap.v3.Datetimepicker.CSS</id>
<version>3.1.2</version>
<version>4.0.0</version>
<title>Bootstrap 3 Datetimepicker CSS</title>
<authors>Eonasdan</authors>
<owners>Eonasdan</owners>
@@ -12,12 +12,12 @@
For usage, installation and demos see Project Site on GitHub
For CSS version install Bootstrap.v3.Datetimepicker.CSS</description>
For LESS version install Bootstrap.v3.Datetimepicker</description>
<releaseNotes>Check the change log on Github at https://github.com/Eonasdan/bootstrap-datetimepicker/wiki/Change-Log</releaseNotes>
<tags>bootstrap date time picker datetimepicker datepicker jquery</tags>
<dependencies>
<dependency id="Twitter.Bootstrap.Less" version="3.0.0" />
<dependency id="Moment.js" version="2.8.1" />
<dependency id="Moment.js" version="2.8.4" />
</dependencies>
</metadata>
<files>
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>Bootstrap.v3.Datetimepicker</id>
<version>3.1.2</version>
<version>4.0.0</version>
<title>Bootstrap 3 Datetimepicker</title>
<authors>Eonasdan</authors>
<owners>Eonasdan</owners>
@@ -17,13 +17,13 @@ For CSS version install Bootstrap.v3.Datetimepicker.CSS</description>
<tags>bootstrap date time picker datetimepicker datepicker jquery</tags>
<dependencies>
<dependency id="Twitter.Bootstrap.Less" version="3.0.0" />
<dependency id="Moment.js" version="2.8.1" />
<dependency id="Moment.js" version="2.8.4" />
</dependencies>
</metadata>
<files>
<file src="..\..\src\js\bootstrap-datetimepicker.js" target="content\Scripts" />
<file src="..\..\build\js\bootstrap-datetimepicker.min.js" target="content\Scripts" />
<file src="..\..\src\less\bootstrap-datetimepicker.less" target="content\Content\less" />
<file src="..\..\src\less\_bootstrap-datetimepicker.less" target="content\Content\less" />
<file src="..\..\src\less\bootstrap-datetimepicker-build.less" target="content\Content\less" />
<file src="install.ps1" target="tools\" />
</files>
+1 -1
View File
@@ -1,2 +1,2 @@
# install.ps1
$DTE.ItemOperations.Navigate("https://github.com/Eonasdan/bootstrap-datetimepicker#change-log", $DTE.vsNavigateOptions.vsNavigateOptionsNewWindow)
$DTE.ItemOperations.Navigate("http://eonasdan.github.io/bootstrap-datetimepicker/", $DTE.vsNavigateOptions.vsNavigateOptionsNewWindow)
+700
View File
@@ -0,0 +1,700 @@
describe('Plugin initialization and component basic construction', function () {
'use strict';
it('loads jquery plugin properly', function () {
expect($('<div>').datetimepicker).toBeDefined();
expect(typeof $('<div>').datetimepicker).toEqual('function');
expect($('<div>').datetimepicker.defaults).toBeDefined();
});
it('creates the component with default options on an input element', function () {
var dtp = $('<input>');
$(document).find('body').append(dtp);
expect(function () {
dtp = dtp.datetimepicker();
}).not.toThrow();
expect(dtp).not.toBe(null);
});
xit('calls destroy when Element that the component is attached is removed', function () {
var dtpElement = $('<div>').attr('class', 'row').append($('<div>').attr('class', 'col-md-12').append($('<input>'))),
dtp;
$(document).find('body').append(dtpElement);
dtpElement.datetimepicker();
dtp = dtpElement.data('DateTimePicker');
spyOn(dtp, 'destroy').and.callThrough();
dtpElement.remove();
expect(dtp.destroy).toHaveBeenCalled();
});
});
describe('Public API method tests', function () {
'use strict';
var dtp,
dtpElement,
dpChangeSpy,
dpShowSpy,
dpHideSpy,
dpErrorSpy;
beforeEach(function () {
dpChangeSpy = jasmine.createSpy('dp.change event Spy');
dpShowSpy = jasmine.createSpy('dp.show event Spy');
dpHideSpy = jasmine.createSpy('dp.hide event Spy');
dpErrorSpy = jasmine.createSpy('dp.error event Spy');
dtpElement = $('<input>').attr('id', 'dtp');
$(document).find('body').append($('<div>').attr('class', 'row').append($('<div>').attr('class', 'col-md-12').append(dtpElement)));
$(document).find('body').on('dp.change', dpChangeSpy);
$(document).find('body').on('dp.show', dpShowSpy);
$(document).find('body').on('dp.hide', dpHideSpy);
$(document).find('body').on('dp.error', dpErrorSpy);
dtpElement.datetimepicker();
dtp = dtpElement.data('DateTimePicker');
});
afterEach(function () {
dtp.destroy();
dtpElement.remove();
});
describe('configuration option name match to public api function', function () {
Object.getOwnPropertyNames($.fn.datetimepicker.defaults).forEach(function (key) {
it('has function ' + key + '()', function () {
expect(dtp[key]).toBeDefined();
});
});
});
describe('date() function', function () {
describe('typechecking', function () {
it('accepts a null', function () {
expect(function () {
dtp.date(null);
}).not.toThrow();
});
it('accepts a string', function () {
expect(function () {
dtp.date('2013/05/24');
}).not.toThrow();
});
it('accepts a Date object', function () {
expect(function () {
dtp.date(new Date());
}).not.toThrow();
});
it('accepts a Moment object', function () {
expect(function () {
dtp.date(moment());
}).not.toThrow();
});
it('does not accept undefined', function () {
expect(function () {
dtp.date(undefined);
}).toThrow();
});
it('does not accept a number', function () {
expect(function () {
dtp.date(0);
}).toThrow();
});
it('does not accept a generic Object', function () {
expect(function () {
dtp.date({});
}).toThrow();
});
it('does not accept a boolean', function () {
expect(function () {
dtp.date(false);
}).toThrow();
});
});
describe('functionality', function () {
it('has no date set upon construction', function () {
expect(dtp.date()).toBe(null);
});
it('sets the date correctly', function () {
var timestamp = moment();
dtp.date(timestamp);
expect(dtp.date().isSame(timestamp)).toBe(true);
});
});
});
describe('format() function', function () {
describe('typechecking', function () {
it('accepts a false value', function () {
expect(function () {
dtp.format(false);
}).not.toThrow();
});
it('accepts a string', function () {
expect(function () {
dtp.format('YYYY-MM-DD');
}).not.toThrow();
});
it('does not accept undefined', function () {
expect(function () {
dtp.format(undefined);
}).toThrow();
});
it('does not accept true', function () {
expect(function () {
dtp.format(true);
}).toThrow();
});
it('does not accept a generic Object', function () {
expect(function () {
dtp.format({});
}).toThrow();
});
});
describe('functionality', function () {
it('returns no format before format is set', function () {
expect(dtp.format()).toBe(false);
});
it('sets the format correctly', function () {
dtp.format('YYYY-MM-DD');
expect(dtp.format()).toBe('YYYY-MM-DD');
});
});
});
describe('destroy() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.destroy).toBeDefined();
});
});
});
describe('toggle() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.toggle).toBeDefined();
});
});
// describe('functionality', function () {
// it('')
// });
});
describe('show() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.show).toBeDefined();
});
});
describe('functionality', function () {
it('emits a show event when called while widget is hidden', function () {
dtp.show();
expect(dpShowSpy).toHaveBeenCalled();
});
it('does not emit a show event when called and widget is already showing', function () {
dtp.hide();
dtp.show();
dpShowSpy.calls.reset();
dtp.show();
expect(dpShowSpy).not.toHaveBeenCalled();
});
it('actually shows the widget', function () {
dtp.show();
expect($(document).find('body').find('.bootstrap-datetimepicker-widget').length).toEqual(1);
});
});
});
describe('hide() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.hide).toBeDefined();
});
});
describe('functionality', function () {
it('emits a hide event when called while widget is shown', function () {
dtp.show();
dtp.hide();
expect(dpHideSpy).toHaveBeenCalled();
});
it('does not emit a hide event when called while widget is hidden', function () {
dtp.hide();
expect(dpHideSpy).not.toHaveBeenCalled();
});
it('actually hides the widget', function () {
dtp.show();
dtp.hide();
expect($(document).find('body').find('.bootstrap-datetimepicker-widget').length).toEqual(0);
});
});
});
describe('disable() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.disable).toBeDefined();
});
});
});
describe('enable() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.enable).toBeDefined();
});
});
});
describe('options() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.options).toBeDefined();
});
});
});
describe('disabledDates() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.disabledDates).toBeDefined();
});
});
});
describe('enabledDates() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.enabledDates).toBeDefined();
});
});
});
describe('daysOfWeekDisabled() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.daysOfWeekDisabled).toBeDefined();
});
});
});
describe('maxDate() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.maxDate).toBeDefined();
});
});
});
describe('minDate() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.minDate).toBeDefined();
});
});
});
describe('defaultDate() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.defaultDate).toBeDefined();
});
});
describe('functionality', function () {
it('returns no defaultDate before defaultDate is set', function () {
expect(dtp.defaultDate()).toBe(false);
});
it('sets the defaultDate correctly', function () {
var timestamp = moment();
dtp.defaultDate(timestamp);
expect(dtp.defaultDate().isSame(timestamp)).toBe(true);
expect(dtp.date().isSame(timestamp)).toBe(true);
});
it('triggers a change event upon setting a default date and input field is empty', function () {
dtp.date(null);
dtp.defaultDate(moment());
expect(dpChangeSpy).toHaveBeenCalled();
});
it('does not override input value if it already has one', function () {
var timestamp = moment();
dtp.date(timestamp);
dtp.defaultDate(moment().year(2000));
expect(dtp.date().isSame(timestamp)).toBe(true);
});
});
});
describe('locale() function', function () {
describe('functionality', function () {
it('it has the same locale as the global moment locale with default options', function () {
expect(dtp.locale()).toBe(moment.locale());
});
it('it switches to a selected locale without affecting global moment locale', function () {
dtp.locale('el');
dtp.date(moment());
expect(dtp.locale()).toBe('el');
expect(dtp.date().locale()).toBe('el');
expect(moment.locale()).toBe('en');
});
});
});
describe('useCurrent() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.useCurrent).toBeDefined();
});
});
describe('check type and parameter validity', function () {
it('accepts either a boolean value or string', function () {
var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];
expect(function () {
dtp.useCurrent(false);
}).not.toThrow();
expect(function () {
dtp.useCurrent(true);
}).not.toThrow();
useCurrentOptions.forEach(function (value) {
expect(function () {
dtp.useCurrent(value);
}).not.toThrow();
});
expect(function () {
dtp.useCurrent('test');
}).toThrow();
expect(function () {
dtp.useCurrent({});
}).toThrow();
});
});
describe('functionality', function () {
it('triggers a change event upon show() and input field is empty', function () {
dtp.useCurrent(true);
dtp.show();
expect(dpChangeSpy).toHaveBeenCalled();
});
});
});
describe('ignoreReadonly() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.ignoreReadonly).toBeDefined();
});
});
});
describe('stepping() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.stepping).toBeDefined();
});
});
});
describe('collapse() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.collapse).toBeDefined();
});
});
});
describe('icons() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.icons).toBeDefined();
});
});
});
describe('useStrict() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.useStrict).toBeDefined();
});
});
});
describe('sideBySide() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.sideBySide).toBeDefined();
});
});
});
describe('viewMode() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.viewMode).toBeDefined();
});
});
});
describe('widgetPositioning() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.widgetPositioning).toBeDefined();
});
});
});
describe('calendarWeeks() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.calendarWeeks).toBeDefined();
});
});
});
describe('showTodayButton() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.showTodayButton).toBeDefined();
});
});
});
describe('showClear() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.showClear).toBeDefined();
});
});
});
describe('dayViewHeaderFormat() function', function () {
describe('typechecking', function () {
it('does not accept a false value', function () {
expect(function () {
dtp.dayViewHeaderFormat(false);
}).toThrow();
});
it('accepts a string', function () {
expect(function () {
dtp.dayViewHeaderFormat('YYYY-MM-DD');
}).not.toThrow();
});
it('does not accept undefined', function () {
expect(function () {
dtp.dayViewHeaderFormat(undefined);
}).toThrow();
});
it('does not accept true', function () {
expect(function () {
dtp.dayViewHeaderFormat(true);
}).toThrow();
});
it('does not accept a generic Object', function () {
expect(function () {
dtp.dayViewHeaderFormat({});
}).toThrow();
});
});
describe('functionality', function () {
it('expects dayViewHeaderFormat to be default of MMMM YYYY', function () {
expect(dtp.dayViewHeaderFormat()).toBe('MMMM YYYY');
});
it('sets the dayViewHeaderFormat correctly', function () {
dtp.dayViewHeaderFormat('MM YY');
expect(dtp.dayViewHeaderFormat()).toBe('MM YY');
});
});
});
describe('extraFormats() function', function () {
describe('typechecking', function () {
it('accepts a false value', function () {
expect(function () {
dtp.extraFormats(false);
}).not.toThrow();
});
it('does not accept a string', function () {
expect(function () {
dtp.extraFormats('YYYY-MM-DD');
}).toThrow();
});
it('does not accept undefined', function () {
expect(function () {
dtp.extraFormats(undefined);
}).toThrow();
});
it('does not accept true', function () {
expect(function () {
dtp.extraFormats(true);
}).toThrow();
});
it('accepts an Array', function () {
expect(function () {
dtp.extraFormats(['YYYY-MM-DD']);
}).not.toThrow();
});
});
describe('functionality', function () {
it('returns no extraFormats before extraFormats is set', function () {
expect(dtp.extraFormats()).toBe(false);
});
it('sets the extraFormats correctly', function () {
dtp.extraFormats(['YYYY-MM-DD']);
expect(dtp.extraFormats()[0]).toBe('YYYY-MM-DD');
});
});
});
describe('toolbarPlacement() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.toolbarPlacement).toBeDefined();
});
});
describe('check type and parameter validity', function () {
it('does not accept a false value', function () {
expect(function () {
dtp.dayViewHeaderFormat(false);
}).toThrow();
});
it('does not accept a false value', function () {
expect(function () {
dtp.dayViewHeaderFormat(false);
}).toThrow();
});
it('accepts a string', function () {
var toolbarPlacementOptions = ['default', 'top', 'bottom'];
toolbarPlacementOptions.forEach(function (value) {
expect(function () {
dtp.toolbarPlacement(value);
}).not.toThrow();
});
expect(function () {
dtp.toolbarPlacement('test');
}).toThrow();
expect(function () {
dtp.toolbarPlacement({});
}).toThrow();
});
});
});
describe('widgetParent() function', function () {
describe('typechecking', function () {
it('accepts a null', function () {
expect(function () {
dtp.widgetParent(null);
}).not.toThrow();
});
it('accepts a string', function () {
expect(function () {
dtp.widgetParent('testDiv');
}).not.toThrow();
});
it('accepts a jquery object', function () {
expect(function () {
dtp.widgetParent($('#testDiv'));
}).not.toThrow();
});
it('does not accept undefined', function () {
expect(function () {
dtp.widgetParent(undefined);
}).toThrow();
});
it('does not accept a number', function () {
expect(function () {
dtp.widgetParent(0);
}).toThrow();
});
it('does not accept a generic Object', function () {
expect(function () {
dtp.widgetParent({});
}).toThrow();
});
it('does not accept a boolean', function () {
expect(function () {
dtp.widgetParent(false);
}).toThrow();
});
});
});
describe('keepOpen() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.keepOpen).toBeDefined();
});
});
});
describe('inline() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.inline).toBeDefined();
});
});
});
describe('clear() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.clear).toBeDefined();
});
});
});
describe('keyBinds() function', function () {
describe('existence', function () {
it('is defined', function () {
expect(dtp.keyBinds).toBeDefined();
});
});
});
});
+98
View File
@@ -0,0 +1,98 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
$pagetitle[] = "Alert Schedule";
$no_refresh = TRUE;
if(is_admin() !== false) {
require_once("includes/modal/alert_schedule.inc.php");
require_once("includes/modal/remove_alert_schedule.inc.php");
?>
<div class="row">
<div class="col-sm-12">
<span id="message"></span>
</div>
</div>
<div class="panel panel-default panel-condensed">
<div class="table-responsive">
<table id="alert-schedule" class="table table-condensed">
<thead>
<tr>
<th data-column-id="title">Title</th>
<th data-column-id="start" data-order="desc">Start</th>
<th data-column-id="end">End</th>
<th data-column-id="actions" data-sortable="false" data-searchable="false" data-formatter="commands">Actions</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
var grid = $("#alert-schedule").bootgrid({
ajax: true,
formatters: {
"commands": function(column, row)
{
if (row.status == 1) {
return '<button type="button" class="btn btn-xs btn-danger" disabled>Lapsed</button>';
} else {
var response = "<button type=\"button\" class=\"btn btn-xs btn-primary command-edit\" data-toggle='modal' data-target='#schedule-maintenance' data-schedule_id=\"" + row.id + "\"><span class=\"fa fa-pencil\"></span></button> " +
"<button type=\"button\" class=\"btn btn-xs btn-danger command-delete\" data-schedule_id=\"" + row.id + "\"><span class=\"fa fa-trash-o\"></span></button>";
if (row.status == 2) {
response = response + ' <button type="button" class="btn btn-xs btn-success" disabled>Current</button>';
}
return response;
}
}
},
templates: {
header: "<div id=\"{{ctx.id}}\" class=\"{{css.header}}\"><div class=\"row\">"+
"<div class=\"col-sm-8 actionBar\"><span class=\"pull-left\">"+
"<button type=\"button\" class=\"btn btn-primary btn-sm\" data-toggle=\"modal\" data-target=\"#schedule-maintenance\">Schedule maintenance</button>"+
"</span></div>"+
"<div class=\"col-sm-4 actionBar\"><p class=\"{{css.search}}\"></p><p class=\"{{css.actions}}\"></p></div></div></div>"
},
rowCount: [50,100,250,-1],
post: function ()
{
return {
id: "alert-schedule",
};
},
url: "/ajax_table.php"
}).on("loaded.rs.jquery.bootgrid", function()
{
/* Executes after data is loaded and rendered */
grid.find(".command-edit").on("click", function(e)
{
$('#schedule_id').val($(this).data("schedule_id"));
$("#schedule-maintenance").modal('show');
}).end().find(".command-delete").on("click", function(e)
{
$('#del_schedule_id').val($(this).data("schedule_id"));
$('#delete-maintenance').modal('show');
});
});
</script>
<?php
}
?>
+2 -2
View File
@@ -156,8 +156,8 @@ if (!$auth)
</form>
<script type="text/javascript">
$(function () {
$("#dtpickerfrom").datetimepicker({useSeconds: false, useCurrent: true, sideBySide: true, useStrict: false, showToday: true});
$("#dtpickerto").datetimepicker({useSeconds: false, useCurrent: true, sideBySide: true, useStrict: false, showToday: true});
$("#dtpickerfrom").datetimepicker({useCurrent: true, sideBySide: true, useStrict: false});
$("#dtpickerto").datetimepicker({useCurrent: true, sideBySide: true, useStrict: false});
});
</script>
+1 -1
View File
@@ -25,7 +25,7 @@ foreach (dbFetchRows("SELECT * FROM `processors` AS P, `devices` AS D WHERE D.de
$text_descr = str_replace("Sub-Module", "Module ", $text_descr);
$text_descr = str_replace("DFC Card", "DFC", $text_descr);
$proc_url = "device/".$device['device_id']."/health/processor/";
$proc_url = "device/device=".$device['device_id']."/tab=health/metric=processor/";
$mini_url = "graph.php?id=".$proc['processor_id']."&amp;type=".$graph_type."&amp;from=".$config['time']['day']."&amp;to=".$config['time']['now']."&amp;width=80&amp;height=20&amp;bg=f4f4f400";
+2 -3
View File
@@ -60,14 +60,13 @@ foreach (dbFetchRows("SELECT * FROM `storage` AS S, `devices` AS D WHERE S.devic
$graph_array_zoom['width'] = "400";
$link = "graphs/id=" . $graph_array['id'] . "/type=" . $graph_array['type'] . "/from=" . $graph_array['from'] . "/to=" . $graph_array['to'] . "/";
$mini_graph = overlib_link($link, generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL);
$bar_link = overlib_link($link, print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right']), generate_graph_tag($graph_array_zoom), NULL);
$background = get_percentage_colours($perc);
echo("<tr class='health'><td>" . generate_device_link($drive) . "</td><td class=tablehead>" . $drive['storage_descr'] . "</td>
<td>$mini_graph</td>
<td>
<a href='#' $store_popup>".print_percentage_bar (400, 20, $perc, "$used / $total", "ffffff", $background['left'], $free, "ffffff", $background['right'])."</a>
</td><td>$perc"."%</td></tr>");
<td>$bar_link</td><td>$perc"."%</td></tr>");
if ($vars['view'] == "graphs")
{
+1
View File
@@ -60,6 +60,7 @@ foreach ($menu_options as $option => $text)
echo('<div style="float: right;">');
?>
<a href="/csv.php/report=<?php echo generate_url($vars,array('format'=>'')); ?>" title="Export as CSV" target="_blank">Export CSV</a> |
<a href="<?php echo(generate_url($vars)); ?>" title="Update the browser URL to reflect the search criteria." >Update URL</a> |
<?php
+1 -1
View File
@@ -55,7 +55,7 @@ $pdf->setTextShadow(array('enabled'=>false, 'depth_w'=>0.2, 'depth_h'=>0.2, 'col
if (isset($_GET['report']) && !empty($_GET['report'])) {
$report = mres($_GET['report']);
$pdf->SetHeaderData('../../' . $config['title_image'], 40, ucfirst($report), $config['project_name'], array(0,0,0), array(0,64,128));
include_once "includes/reports/$report.inc.php";
include_once "includes/reports/$report.pdf.inc.php";
} else {
$report = 'report';
}
+18 -2
View File
@@ -71,6 +71,22 @@ function GetRules($device) {
return dbFetchRows('SELECT alert_rules.* FROM alert_rules LEFT JOIN alert_map ON alert_rules.id=alert_map.rule WHERE alert_rules.disabled = 0 && ( (alert_rules.device_id = -1 || alert_rules.device_id = ? ) || alert_map.target = ? '.$where.' )',$params);
}
/**
* Check if device is under maintenance
* @param int $device Device-ID
* @return int
*/
function IsMaintenance( $device ) {
$groups = GetGroupsFromDevice($device);
$params = array($device);
$where = "";
foreach( $groups as $group ) {
$where .= " || alert_schedule_items.target = ?";
$params[] = 'g'.$group;
}
return dbFetchCell('SELECT DISTINCT(alert_schedule.schedule_id) FROM alert_schedule LEFT JOIN alert_schedule_items ON alert_schedule.schedule_id=alert_schedule_items.schedule_id WHERE ( alert_schedule_items.target = ?'.$where.' ) && NOW() BETWEEN alert_schedule.start AND alert_schedule.end LIMIT 1',$params);
}
/**
* Run all rules for a device
* @param int $device Device-ID
@@ -78,8 +94,8 @@ function GetRules($device) {
*/
function RunRules($device) {
global $debug;
$chk = dbFetchRow("SELECT id FROM alert_schedule WHERE alert_schedule.device_id = ? AND NOW() BETWEEN alert_schedule.start AND alert_schedule.end", array($device));
if( $chk['id'] > 0 ) {
if( IsMaintenance($device) > 0 ) {
echo "Under Maintenance, Skipping alerts.\r\n";
return false;
}
foreach( GetRules($device) as $rule ) {
+6
View File
@@ -252,6 +252,9 @@ $config['graph_colours']['blues'] = array('A0A0E5','8080BD','606096','40406F',
$config['graph_colours']['purples'] = array('CC7CCC','AF63AF','934A93','773177','5B185B','3F003F');
$config['graph_colours']['default'] = $config['graph_colours']['blues'];
// Map colors
$config['map_legend'] = array('0'=> '#aeaeae', '10' => '#79847e', '20' => '#97ffca', '30' => '#a800ff', '40' => '#6c00ff', '50' => '#00d2ff', '60' => '#0090ff', '70' => '#ffe400', '80' => '#ffa200', '90' => '#ff6600', '100' => '#ff0000');
// Device page options
$config['show_overview_tab'] = TRUE;
@@ -603,4 +606,7 @@ $config['distributed_poller_memcached_port'] = '11211';
$config['callback_post'] = 'https://stats.librenms.org/log.php';
$config['callback_clear'] = 'https://stats.librenms.org/clear.php';
// Stat graphs
$config['alert_graph_date_format'] = '%Y-%m-%d %H:%i';
?>
+17
View File
@@ -140,6 +140,18 @@ $config['os'][$os]['over'][1]['text'] = "Processor Usage";
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
$os = "procera";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['group'] = "unix";
$config['os'][$os]['text'] = "Procera Networks";
$config['os'][$os]['icon'] = "linux";
$config['os'][$os]['over'][0]['graph'] = "device_bits";
$config['os'][$os]['over'][0]['text'] = "Device Traffic";
$config['os'][$os]['over'][1]['graph'] = "device_processor";
$config['os'][$os]['over'][1]['text'] = "Processor Usage";
$config['os'][$os]['over'][2]['graph'] = "device_mempool";
$config['os'][$os]['over'][2]['text'] = "Memory Usage";
// Other Unix-based OSes here please.
$os = "freebsd";
@@ -1054,6 +1066,11 @@ $config['os'][$os]['text'] = "Cambium";
$config['os'][$os]['type'] = "wireless";
$config['os'][$os]['icon'] = "cambium";
$os = "datacom";
$config['os'][$os]['text'] = "Datacom";
$config['os'][$os]['type'] = "network";
$config['os'][$os]['icon'] = "datacom";
foreach ($config['os'] as $this_os => $blah)
{
if (isset($config['os'][$this_os]['group']))
+8 -9
View File
@@ -25,9 +25,10 @@
/**
* Generate SQL from Group-Pattern
* @param string $pattern Pattern to generate SQL for
* @param string $search What to searchid for
* @return string
*/
function GenGroupSQL($pattern) {
function GenGroupSQL($pattern,$search='') {
$tmp = explode(" ",$pattern);
$tables = array();
foreach( $tmp as $opt ) {
@@ -48,7 +49,10 @@ function GenGroupSQL($pattern) {
}
$i++;
}
$sql = "SELECT ".str_replace("(","",$tables[0]).".device_id FROM ".implode(",",$tables)." WHERE (".str_replace(array("%","@","!~","~"),array("","%","NOT LIKE","LIKE"),$pattern).")";
if( !empty($search) ) {
$search .= " &&";
}
$sql = "SELECT DISTINCT(".str_replace("(","",$tables[0]).".device_id) FROM ".implode(",",$tables)." WHERE ".$search." (".str_replace(array("%","@","!~","~"),array("","%","NOT LIKE","LIKE"),$pattern).")";
return $sql;
}
@@ -81,13 +85,8 @@ function GetDeviceGroups() {
function GetGroupsFromDevice($device) {
$ret = array();
foreach( GetDeviceGroups() as $group ) {
foreach( GetDevicesFromGroup($group['id']) as $dev ) {
if( $dev['device_id'] == $device ) {
if( !in_array($group['id'],$ret) ) {
$ret[] = $group['id'];
}
continue 2;
}
if( dbFetchCell(GenGroupSQL($group['pattern'],'device_id=?').' LIMIT 1',array($device)) == $device ){
$ret[] = $group['id'];
}
}
return $ret;
+139 -102
View File
@@ -1,123 +1,160 @@
<?php
echo("Physical Inventory : ");
if ($config['enable_inventory']) {
if ($config['enable_inventory']) {
echo("Physical Inventory : ");
echo("\nCaching OIDs:");
echo("\nCaching OIDs:");
$entity_array = array();
echo(" entPhysicalEntry");
$entity_array = snmpwalk_cache_oid($device, "entPhysicalEntry", $entity_array, "ENTITY-MIB:CISCO-ENTITY-VENDORTYPE-OID-MIB");
echo(" entAliasMappingIdentifier");
$entity_array = snmpwalk_cache_twopart_oid($device, "entAliasMappingIdentifier", $entity_array, "ENTITY-MIB:IF-MIB");
if ($device['os'] == 'junos') {
foreach ($entity_array as $entPhysicalIndex => $entry) {
$entPhysicalDescr = $entry['entPhysicalDescr'];
$entPhysicalContainedIn = $entry['entPhysicalContainedIn'];
$entPhysicalClass = $entry['entPhysicalClass'];
$entPhysicalName = $entry['entPhysicalName'];
$entPhysicalSerialNum = $entry['entPhysicalSerialNum'];
$entPhysicalModelName = $entry['entPhysicalModelName'];
$entPhysicalMfgName = $entry['entPhysicalMfgName'];
$entPhysicalVendorType = $entry['entPhysicalVendorType'];
$entPhysicalParentRelPos = $entry['entPhysicalParentRelPos'];
$entPhysicalHardwareRev = $entry['entPhysicalHardwareRev'];
$entPhysicalFirmwareRev = $entry['entPhysicalFirmwareRev'];
$entPhysicalSoftwareRev = $entry['entPhysicalSoftwareRev'];
$entPhysicalIsFRU = $entry['entPhysicalIsFRU'];
$entPhysicalAlias = $entry['entPhysicalAlias'];
$entPhysicalAssetID = $entry['entPhysicalAssetID'];
if (isset($entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'])) {
$ifIndex = $entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'];
}
if (!strpos($ifIndex, "fIndex") || $ifIndex == "") {
unset($ifIndex);
$entity_array = array();
echo(" jnxBoxAnatomy");
$entity_array = snmpwalk_cache_oid($device, "jnxBoxAnatomy", $entity_array, "JUNIPER-MIB");
} else {
$ifIndex_array = explode(".", $ifIndex);
$ifIndex = $ifIndex_array[1];
$entity_array = array();
echo(" entPhysicalEntry");
$entity_array = snmpwalk_cache_oid($device, "entPhysicalEntry", $entity_array, "ENTITY-MIB:CISCO-ENTITY-VENDORTYPE-OID-MIB");
echo(" entAliasMappingIdentifier");
$entity_array = snmpwalk_cache_twopart_oid($device, "entAliasMappingIdentifier", $entity_array, "ENTITY-MIB:IF-MIB");
}
if ($entPhysicalVendorTypes[$entPhysicalVendorType] && !$entPhysicalModelName)
{
$entPhysicalModelName = $entPhysicalVendorTypes[$entPhysicalVendorType];
}
foreach ($entity_array as $entPhysicalIndex => $entry) {
// FIXME - dbFacile
if ($device['os'] == 'junos') {
if ($entPhysicalDescr || $entPhysicalName)
{
$entPhysical_id = dbFetchCell("SELECT entPhysical_id FROM `entPhysical` WHERE device_id = ? AND entPhysicalIndex = ?",array($device['device_id'], $entPhysicalIndex));
// Juniper's MIB doesn't have the same objects as the Entity MIB, so some values
// are made up here.
$entPhysicalDescr = $entry['jnxContentsDescr'];
$entPhysicalContainedIn = $entry['jnxContainersWithin'];
$entPhysicalClass = $entry['jnxBoxClass'];
$entPhysicalName = $entry['jnxOperatingDescr'];
$entPhysicalSerialNum = $entry['jnxContentsSerialNo'];
$entPhysicalModelName = $entry['jnxContentsPartNo'];
$entPhysicalMfgName = 'Juniper';
$entPhysicalVendorType = 'Juniper';
$entPhysicalParentRelPos = -1;
$entPhysicalHardwareRev = $entry['jnxContentsRevision'];
$entPhysicalFirmwareRev = $entry['entPhysicalFirmwareRev'];
$entPhysicalSoftwareRev = $entry['entPhysicalSoftwareRev'];
$entPhysicalIsFRU = $entry['jnxFruType'];
$entPhysicalAlias = $entry['entPhysicalAlias'];
$entPhysicalAssetID = $entry['entPhysicalAssetID'];
} else {
if ($entPhysical_id) {
$update_data = array(
'entPhysicalIndex' => $entPhysicalIndex,
'entPhysicalDescr' => $entPhysicalDescr,
'entPhysicalClass' => $entPhysicalClass,
'entPhysicalName' => $entPhysicalName,
'entPhysicalModelName' => $entPhysicalModelName,
'entPhysicalSerialNum' => $entPhysicalSerialNum,
'entPhysicalContainedIn' => $entPhysicalContainedIn,
'entPhysicalMfgName' => $entPhysicalMfgName,
'entPhysicalParentRelPos' => $entPhysicalParentRelPos,
'entPhysicalVendorType' => $entPhysicalVendorType,
'entPhysicalHardwareRev' => $entPhysicalHardwareRev,
'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev,
'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev,
'entPhysicalIsFRU' => $entPhysicalIsFRU,
'entPhysicalAlias' => $entPhysicalAlias,
'entPhysicalAssetID' => $entPhysicalAssetID
);
dbUpdate($update_data, 'entPhysical', 'device_id=? AND entPhysicalIndex=?',array($device['device_id'],$entPhysicalIndex));
echo(".");
} else {
$insert_data = array(
'device_id' => $device['device_id'],
'entPhysicalIndex' => $entPhysicalIndex,
'entPhysicalDescr' => $entPhysicalDescr,
'entPhysicalClass' => $entPhysicalClass,
'entPhysicalName' => $entPhysicalName,
'entPhysicalModelName' => $entPhysicalModelName,
'entPhysicalSerialNum' => $entPhysicalSerialNum,
'entPhysicalContainedIn' => $entPhysicalContainedIn,
'entPhysicalMfgName' => $entPhysicalMfgName,
'entPhysicalParentRelPos' => $entPhysicalParentRelPos,
'entPhysicalVendorType' => $entPhysicalVendorType,
'entPhysicalHardwareRev' => $entPhysicalHardwareRev,
'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev,
'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev,
'entPhysicalIsFRU' => $entPhysicalIsFRU,
'entPhysicalAlias' => $entPhysicalAlias,
'entPhysicalAssetID' => $entPhysicalAssetID
);
$entPhysicalDescr = $entry['entPhysicalDescr'];
$entPhysicalContainedIn = $entry['entPhysicalContainedIn'];
$entPhysicalClass = $entry['entPhysicalClass'];
$entPhysicalName = $entry['entPhysicalName'];
$entPhysicalSerialNum = $entry['entPhysicalSerialNum'];
$entPhysicalModelName = $entry['entPhysicalModelName'];
$entPhysicalMfgName = $entry['entPhysicalMfgName'];
$entPhysicalVendorType = $entry['entPhysicalVendorType'];
$entPhysicalParentRelPos = $entry['entPhysicalParentRelPos'];
$entPhysicalHardwareRev = $entry['entPhysicalHardwareRev'];
$entPhysicalFirmwareRev = $entry['entPhysicalFirmwareRev'];
$entPhysicalSoftwareRev = $entry['entPhysicalSoftwareRev'];
$entPhysicalIsFRU = $entry['entPhysicalIsFRU'];
$entPhysicalAlias = $entry['entPhysicalAlias'];
$entPhysicalAssetID = $entry['entPhysicalAssetID'];
}
if (!empty($ifIndex)) {
$insert_data['ifIndex'] = $ifIndex;
if (isset($entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'])) {
$ifIndex = $entity_array[$entPhysicalIndex]['0']['entAliasMappingIdentifier'];
}
if (!strpos($ifIndex, "fIndex") || $ifIndex == "") {
unset($ifIndex);
} else {
$ifIndex_array = explode(".", $ifIndex);
$ifIndex = $ifIndex_array[1];
}
if ($entPhysicalVendorTypes[$entPhysicalVendorType] && !$entPhysicalModelName) {
$entPhysicalModelName = $entPhysicalVendorTypes[$entPhysicalVendorType];
}
// FIXME - dbFacile
if ($entPhysicalDescr || $entPhysicalName) {
$entPhysical_id = dbFetchCell("SELECT entPhysical_id FROM `entPhysical` WHERE device_id = ? AND entPhysicalIndex = ?",array($device['device_id'], $entPhysicalIndex));
if ($entPhysical_id) {
$update_data = array(
'entPhysicalIndex' => $entPhysicalIndex,
'entPhysicalDescr' => $entPhysicalDescr,
'entPhysicalClass' => $entPhysicalClass,
'entPhysicalName' => $entPhysicalName,
'entPhysicalModelName' => $entPhysicalModelName,
'entPhysicalSerialNum' => $entPhysicalSerialNum,
'entPhysicalContainedIn' => $entPhysicalContainedIn,
'entPhysicalMfgName' => $entPhysicalMfgName,
'entPhysicalParentRelPos' => $entPhysicalParentRelPos,
'entPhysicalVendorType' => $entPhysicalVendorType,
'entPhysicalHardwareRev' => $entPhysicalHardwareRev,
'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev,
'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev,
'entPhysicalIsFRU' => $entPhysicalIsFRU,
'entPhysicalAlias' => $entPhysicalAlias,
'entPhysicalAssetID' => $entPhysicalAssetID
);
dbUpdate($update_data, 'entPhysical', 'device_id=? AND entPhysicalIndex=?',array($device['device_id'],$entPhysicalIndex));
echo(".");
} else {
$insert_data = array(
'device_id' => $device['device_id'],
'entPhysicalIndex' => $entPhysicalIndex,
'entPhysicalDescr' => $entPhysicalDescr,
'entPhysicalClass' => $entPhysicalClass,
'entPhysicalName' => $entPhysicalName,
'entPhysicalModelName' => $entPhysicalModelName,
'entPhysicalSerialNum' => $entPhysicalSerialNum,
'entPhysicalContainedIn' => $entPhysicalContainedIn,
'entPhysicalMfgName' => $entPhysicalMfgName,
'entPhysicalParentRelPos' => $entPhysicalParentRelPos,
'entPhysicalVendorType' => $entPhysicalVendorType,
'entPhysicalHardwareRev' => $entPhysicalHardwareRev,
'entPhysicalFirmwareRev' => $entPhysicalFirmwareRev,
'entPhysicalSoftwareRev' => $entPhysicalSoftwareRev,
'entPhysicalIsFRU' => $entPhysicalIsFRU,
'entPhysicalAlias' => $entPhysicalAlias,
'entPhysicalAssetID' => $entPhysicalAssetID
);
if (!empty($ifIndex)) {
$insert_data['ifIndex'] = $ifIndex;
}
dbInsert($insert_data, 'entPhysical');
echo("+");
}
if ($device['os'] == 'junos') {
// $entPhysicalIndex appears as a numeric OID fragment
// (string), so convert it to an "integer" for the
// validation step below since it is stored in the DB as
// an integer. This should be fixed.
list($first,$second) = explode(".",$entPhysicalIndex);
$entPhysicalIndexNoDots = $first . $second;
$valid[$entPhysicalIndexNoDots] = 1;
} else {
$valid[$entPhysicalIndex] = 1;
}
}
}
dbInsert($insert_data, 'entPhysical');
echo("+");
}
} else { echo("Disabled!"); }
$valid[$entPhysicalIndex] = 1;
}
}
} else { echo("Disabled!"); }
$sql = "SELECT * FROM `entPhysical` WHERE `device_id` = '".$device['device_id']."'";
foreach (dbFetchRows($sql) as $test)
{
$sql = "SELECT * FROM `entPhysical` WHERE `device_id` = '".$device['device_id']."'";
foreach (dbFetchRows($sql) as $test) {
$id = $test['entPhysicalIndex'];
if (!$valid[$id]) {
echo("-");
dbDelete('entPhysical', 'entPhysical_id = ?', array($test['entPhysical_id']));
echo("-");
dbDelete('entPhysical', 'entPhysical_id = ?', array($test['entPhysical_id']));
}
}
echo("\n");
}
echo("\n");
?>
+1 -1
View File
@@ -3,7 +3,7 @@
if (!$os)
{
if (strstr($sysDescr, "Comware")) { $os = "comware"; }
else if(preg_match('/HP [a-zA-Z0-9-]+ Switch Software Version/',$sysDescr)) { $os = "comware"; }
else if(preg_match('/HP [a-zA-Z0-9- ]+ Switch Software Version/',$sysDescr)) { $os = "comware"; }
}
?>
+6
View File
@@ -0,0 +1,6 @@
<?php
if (!$os)
{
if (strstr($sysObjectId, ".1.3.6.1.4.1.3709")) { $os = "datacom"; }
}
?>
+1
View File
@@ -15,6 +15,7 @@ if (!$os)
elseif (strstr($sysDescr, "endian")) { $os = "endian"; }
elseif (preg_match("/Cisco Small Business/", $sysDescr)) { $os = "ciscosmblinux"; }
elseif (strpos($entPhysicalMfgName, "QNAP") !== FALSE) { $os = "qnap"; }
elseif (stristr($sysObjectId, "packetlogic") || strstr($sysObjectId, ".1.3.6.1.4.1.15397.2")) { $os = "procera"; }
elseif (strstr($sysObjectId, ".1.3.6.1.4.1.10002.1") || strstr($sysObjectId, ".1.3.6.1.4.1.41112.1.4") || strpos(trim(snmp_get($device, "dot11manufacturerName.5", "-Osqnv", "IEEE802dot11-MIB")), "Ubiquiti") !== FALSE)
{
$os = "airos";
@@ -0,0 +1,11 @@
<?php
if ($device['os'] == "datacom") {
echo("Datacom Switch : ");
$descr = "Processor";
$usage = snmp_get($device, "swCpuUsage.0", "-Ovq", "DMswitch-MIB");
echo $usage."\n";
if (is_numeric($usage)) {
discover_processor($valid['processor'], $device, "swCpuUsage", "0", "datacom", $descr, "1", $usage, NULL, NULL);
}
}
?>
+18
View File
@@ -1154,3 +1154,21 @@ function set_curl_proxy($post)
curl_setopt($post, CURLOPT_PROXY, $config['callback_proxy']);
}
}
function target_to_id($target) {
if( $target[0].$target[1] == "g:" ) {
$target = "g".dbFetchCell('SELECT id FROM device_groups WHERE name = ?',array(substr($target,2)));
} else {
$target = dbFetchCell('SELECT device_id FROM devices WHERE hostname = ?',array($target));
}
return $target;
}
function id_to_target($id) {
if( $id[0] == "g" ) {
$id = 'g:'.dbFetchCell("SELECT name FROM device_groups WHERE id = ?",array(substr($id,1)));
} else {
$id = dbFetchCell("SELECT hostname FROM devices WHERE device_id = ?",array($id));
}
return $id;
}
+48 -17
View File
@@ -1,58 +1,77 @@
<?php
# PDU
$serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.12.1.6.0", "-OQv", "", ""),'"');
$serial = trim(snmp_get($device, "PowerNet-MIB::rPDUIdentSerialNumber.0", "-OQv", "", ""),'"');
if ($serial == "")
{
# ATS
$serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.6.0", "-OQv", "", ""),'"');
$serial = trim(snmp_get($device, "PowerNet-MIB::atsIdentSerialNumber.0", "-OQv", "", ""),'"');
}
if ($serial == "")
{
# UPS
$serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.1.1.2.3.0", "-OQv", "", ""),'"');
$serial = trim(snmp_get($device, "PowerNet-MIB::upsAdvIdentSerialNumber.0", "-OQv", "", ""),'"');
}
if ($serial == "")
{
# Masterswitch/AP9606
$serial = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.5.0", "-OQv", "", ""),'"');
$serial = trim(snmp_get($device, "PowerNet-MIB::sPDUIdentSerialNumber.0", "-OQv", "", ""),'"');
}
if ($serial == "")
{
# InRow chiller
$serial = trim(snmp_get($device, "PowerNet-MIB::airIRRCUnitIdentSerialNumber.0", "-OQv", "", ""),'"');
}
if ($serial == "")
{
# InfraStruxure
$serial = trim(snmp_get($device, "PowerNet-MIB::isxModularPduIdentSerialNumber.0", "-OQv", "", ""),'"');
}
/////////////////////
# PDU
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.12.1.5.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.12.1.2.0", "-OQv", "", ""),'"');
$hardware = trim(snmp_get($device, "PowerNet-MIB::rPDUIdentModelNumber.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "PowerNet-MIB::rPDUIdentHardwareRev.0", "-OQv", "", ""),'"');
if ($hardware == " ")
{
# ATS
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.5.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.1.0", "-OQv", "", ""),'"');
$hardware = trim(snmp_get($device, "PowerNet-MIB::atsIdentModelNumber.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "PowerNet-MIB::atsIdentHardwareRev.0", "-OQv", "", ""),'"');
}
if ($hardware == " ")
{
# UPS
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.1.1.1.1.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.1.1.2.1.0", "-OQv", "", ""),'"');
$hardware = trim(snmp_get($device, "PowerNet-MIB::upsBasicIdentModel.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "PowerNet-MIB::upsAdvIdentFirmwareRevision.0", "-OQv", "", ""),'"');
}
if ($hardware == " ")
{
# Masterswitch/AP9606
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.4.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.1.0", "-OQv", "", ""),'"');
$hardware = trim(snmp_get($device, "PowerNet-MIB::sPDUIdentModelNumber.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "PowerNet-MIB::sPDUIdentHardwareRev.0", "-OQv", "", ""),'"');
}
if ($hardware == " ")
{
# InRow chiller
$hardware = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.13.3.2.2.1.4.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, ".1.3.6.1.4.1.318.1.1.13.3.2.2.1.7.0", "-OQv", "", ""),'"');
$hardware = trim(snmp_get($device, "PowerNet-MIB::airIRRCUnitIdentModelNumber.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "PowerNet-MIB::airIRRCUnitIdentHardwareRevision.0", "-OQv", "", ""),'"');
}
if ($hardware == " ")
{
# InfraStruxure
$hardware = trim(snmp_get($device, "PowerNet-MIB::isxModularPduIdentModelNumber.0", "-OQv", "", ""),'"');
$hardware .= ' ' . trim(snmp_get($device, "PowerNet-MIB::isxModularPduIdentMonitorCardHardwareRev.0", "-OQv", "", ""),'"');
}
/////////////////////
@@ -63,18 +82,30 @@ $APPrev = trim(snmp_get($device, "1.3.6.1.4.1.318.1.4.2.4.1.4.2", "-OQv", "", ""
if ($AOSrev == '')
{
# PDU
$version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.12.1.3.0", "-OQv", "", ""),'"');
$version = trim(snmp_get($device, "PowerNet-MIB::rPDUIdentFirmwareRev.0", "-OQv", "", ""),'"');
if ($version == "")
{
# ATS
$version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.8.1.2.0", "-OQv", "", ""),'"');
$version = trim(snmp_get($device, "PowerNet-MIB::atsIdentFirmwareRev.0", "-OQv", "", ""),'"');
}
if ($version == "")
{
# Masterswitch/AP9606
$version = trim(snmp_get($device, "1.3.6.1.4.1.318.1.1.4.1.2.0", "-OQv", "", ""),'"');
$version = trim(snmp_get($device, "PowerNet-MIB::sPDUIdentFirmwareRev.0", "-OQv", "", ""),'"');
}
if ($version == "")
{
# InRow chiller
$version = trim(snmp_get($device, "PowerNet-MIB::airIRRCUnitIdentFirmwareRevision.0", "-OQv", "", ""),'"');
}
if ($version == "")
{
# InfraStruxure
$version = trim(snmp_get($device, "PowerNet-MIB::isxModularPduIdentMonitorCardFirmwareAppRev.0", "-OQv", "", ""),'"');
}
}
else
+9 -9
View File
@@ -1,14 +1,14 @@
<?php
if (preg_match('/^Cisco IOS Software, .+? Software \([^\-]+-([\w\d]+)-\w\), Version ([^,]+)/', $poll_device['sysDescr'], $regexp_result))
if (preg_match('/^Cisco IOS Software, .+? Software(\, )?([\s\w\d]+)? \([^\-]+-([\w\d]+)-\w\), Version ([^,]+)/', $poll_device['sysDescr'], $regexp_result))
{
$features = $regexp_result[1];
$version = $regexp_result[2];
}
elseif( false )
{
# Placeholder
# Other regexp for other type of string
$features = $regexp_result[3];
$version = $regexp_result[4];
$hardware = $regexp_result[2];
$tmp = preg_split("/\\r\\n|\\r|\\n/",$version);
if (!empty($tmp[0])) {
$version = $tmp[0];
}
}
echo("\n".$poll_device['sysDescr']."\n");
@@ -24,7 +24,7 @@ if ($data[1]['entPhysicalContainedIn'] == "0")
$version = $data[1]['entPhysicalSoftwareRev'];
}
if (!empty($data[1]['entPhysicalName']))
if (!empty($data[1]['entPhysicalName']) && $data[1]['entPhysicalName'] != 'Switch System')
{
$hardware = $data[1]['entPhysicalName'];
}
+6
View File
@@ -0,0 +1,6 @@
<?php
$hardware = "Datacom ".str_replace("dmSwitch","DM",snmp_get($device, "swChassisModel.0", "-Ovq", "DMswitch-MIB"));
$version = snmp_get($device, "swFirmwareVer.1", "-Ovq", "DMswitch-MIB");
$features = snmp_get($device, "sysDescr.0", "-Oqv", "SNMPv2-MIB");
$serial = snmp_get($device, "DMswitch-MIB::swSerialNumber.1", "-Ovq","DMswitch-MIB");
?>
+6
View File
@@ -28,6 +28,12 @@ if (strpos($sysdescr_value, 'IBM Networking Operating System') !== false) {
$version = trim(snmp_get($device, ".1.3.6.1.4.1.20301.2.7.13.1.1.1.10.0", "-Ovq") , '" ');
$serial = trim(snmp_get($device, ".1.3.6.1.4.1.20301.100.100.14.9.0", "-Ovq") , '" ');
}
if (empty($version)) {
$version = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.10.1", "-Ovq") , '" ');
}
if (empty($serial)) {
$serial = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.11.1", "-Ovq") , '" ');
}
} elseif (strpos($sysdescr_value, 'IBM Flex System Fabric') !== false) {
$hardware = str_replace("IBM Flex System Fabric", "", $sysdescr_value);
$version = trim(snmp_get($device, ".1.3.6.1.2.1.47.1.1.1.1.10.1", "-Ovq") , '" ');
+18
View File
@@ -0,0 +1,18 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa>
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if (stristr($poll_device['sysObjectID'], "packetlogic") || strstr($poll_device['sysObjectID'], "enterprises.15397.2") || strstr($poll_device['sysObjectID'], ".1.3.6.1.4.1.15397.2")) {
$version = "PacketLogic";
$hardware = "PacketLogic";
}
@@ -0,0 +1,3 @@
<?php
$proc = snmp_get($device, "swCpuUsage.0", "-Ovq", "DMswitch-MIB");
?>
+9 -2
View File
@@ -150,10 +150,17 @@ function rrdtool($command, $filename, $options)
{
global $config, $debug, $rrd_pipes, $console_color;
$cmd = "$command $filename $options";
if ($command != "create" && $config['rrdcached'])
{
$cmd .= " --daemon " . $config['rrdcached'];
$filename = str_replace($config['install_dir'],"",$filename);
//Some people tend to end paths with '/', let's tolerate that
if( $filename[0] == "/" ) {
$filename = substr($filename,1);
}
$filename = str_replace("rrd/","",$filename); //Make sure you use -b /opt/librenms/rrd on your rrdcached!
$cmd = "$command $filename $options --daemon " . $config['rrdcached'];
} else {
$cmd = "$command $filename $options";
}
if ($config['norrd'])
+73 -9
View File
@@ -3,7 +3,7 @@
--
-- January 1995, Jeffrey T. Johnson
--
-- Copyright (c) 1995-2014 by cisco Systems, Inc.
-- Copyright (c) 1995-2015 by cisco Systems, Inc.
-- All rights reserved.
--
-- *****************************************************************
@@ -18,7 +18,7 @@ IMPORTS
FROM CISCO-SMI;
ciscoProductsMIB MODULE-IDENTITY
LAST-UPDATED "201411060000Z"
LAST-UPDATED "201503260000Z"
ORGANIZATION "Cisco Systems, Inc."
CONTACT-INFO
" Cisco Systems
@@ -35,7 +35,7 @@ ciscoProductsMIB MODULE-IDENTITY
"This module defines the object identifiers that are
assigned to various hardware platforms, and hence are
returned as values for sysObjectID"
REVISION "201305280000Z"
REVISION "201503250000Z"
DESCRIPTION
"Added following OIDs:
ciscoMPX, ciscoNMCUEEC, ciscoWLSE1132,
@@ -1551,7 +1551,7 @@ ciscoNam2320 OBJECT IDENTIFIER ::= { ciscoProducts 1528 } --
ciscoNam3 OBJECT IDENTIFIER ::= { ciscoProducts 1529 } -- Cisco NAM-3 for Catalyst 6500
cisco819HG4GAK9 OBJECT IDENTIFIER ::= { ciscoProducts 1530 } -- C819HG-4G-A-K9 Hardened Router with 1 Gigabit Ethernet WAN, 4 Fast Ethernet LAN, 1 AT&T LTE modem, 1 Serial, 1 Console/Aux ports, 256MB flash memory, 512MB DRAM
ciscoECDS50IVB OBJECT IDENTIFIER ::= { ciscoProducts 1536 } -- Cisco Enterprise Content Delivery System Model MDE50IVB
ciscoVSR1000 OBJECT IDENTIFIER ::= { ciscoProducts 1537 } -- Cisco Virtual Services Router 1000
ciscoCSR1000v OBJECT IDENTIFIER ::= { ciscoProducts 1537 } -- Cisco Cloud Services Router 1000v
ciscoASR5000 OBJECT IDENTIFIER ::= { ciscoProducts 1538 } -- Cisco Systems ASR5000 Intelligent Mobile Gateway
ciscoflowAgent3000 OBJECT IDENTIFIER ::= { ciscoProducts 1539 } -- Cisco Integrated NetFlow Generation Agent
ciscoTelePresenceMCU5310 OBJECT IDENTIFIER ::= { ciscoProducts 1540 } -- Cisco TelePresence MCU 5310
@@ -1640,6 +1640,7 @@ ciscoAIRAP3602 OBJECT IDENTIFIER ::= { ciscoProducts 1661 } --
ciscoAIRAP3601 OBJECT IDENTIFIER ::= { ciscoProducts 1662 } -- Cisco Aironet 3600 Series WLAN Access Point with one 10/100/1000TX port and single IEEE 802.11n radio port
ciscoAIRAP1552 OBJECT IDENTIFIER ::= { ciscoProducts 1664 } -- Cisco Aironet 1550 Series Outdoor Mesh Access Points with dual radio
ciscoAIRAP1553 OBJECT IDENTIFIER ::= { ciscoProducts 1665 } -- Cisco Aironet 1550 Series outdoor Mesh Access Points with three radio ports
ciscoNgsm3k16gepoeplus OBJECT IDENTIFIER ::= { ciscoProducts 1666 } -- EtherSwitch Next Generation Service Module Layer3 + PoEPlus + 16 10/100/1000
ciscoNexus1010X OBJECT IDENTIFIER ::= { ciscoProducts 1667 } -- Large Virtual service Appliance
ciscoNexus1110S OBJECT IDENTIFIER ::= { ciscoProducts 1668 } -- Gen-2 Base Virtual service Appliance
ciscoNexus1110X OBJECT IDENTIFIER ::= { ciscoProducts 1669 } -- Gen-2 Large Virtual service Appliance
@@ -1649,6 +1650,8 @@ cisco866VAEWEK9 OBJECT IDENTIFIER ::= { ciscoProducts 1675 } --
cisco867VAEWAK9 OBJECT IDENTIFIER ::= { ciscoProducts 1676 } -- CISCO867VAE-W-A-K9 with 2 GE switch ports, 3 FE switch ports, 1 GE WAN port, 1 multi-mode VDSL2/ ADSL2/ADSL2+ Annex A WAN port, and FCC compliant Wireless LAN
cisco867VAEWEK9 OBJECT IDENTIFIER ::= { ciscoProducts 1677 } -- CISCO867VAE-W-E-K9 with 2 GE switch ports, 3 FE switch ports, 1 GE WAN port, 1 multi-mode VDSL2/ ADSL2/ADSL2+ Annex A WAN port, and ETSI compliant Wireless LAN
cisco867VAEPOEWAK9 OBJECT IDENTIFIER ::= { ciscoProducts 1678 } -- CISCO867VAE-POE-W-A-K9 with 2 GE switch ports, 3 FE switch ports with one port POE, 1 GE WAN port, 1 multi-mode VDSL2/ADSL2/ADSL2+ Annex A WAN port, and FCC compliant Wireless LAN
ciscoSmES3x24P OBJECT IDENTIFIER ::= { ciscoProducts 1679 } -- EtherSwitch Service Module Layer3 24 Gigabit Ethernet port,POE+, MACSec PHY
ciscoSmDES3x48P OBJECT IDENTIFIER ::= { ciscoProducts 1680 } -- EtherSwitch Double Wide Service Module Layer3 48 Gigabit Ethernet port, 2 SFP port, POE+, MACSec PHY
ciscoOeKWaas OBJECT IDENTIFIER ::= { ciscoProducts 1681 } -- Wide Area Application Engine Virtualized Wide Area Application Services instance running on the KVM hypervisor container (KWAAS)
ciscoUcsC220 OBJECT IDENTIFIER ::= { ciscoProducts 1682 } -- This one-rack unit (1RU) server offers superior performance and density over a wide range of business workloads, from web serving to distributed database
ciscoUcsC240 OBJECT IDENTIFIER ::= { ciscoProducts 1683 } -- This 2RU server is designed for both performance and expandability over a wide range of storage-intensive infrastructure workloads, from big data to collaboration
@@ -1656,6 +1659,7 @@ ciscoUcsC22 OBJECT IDENTIFIER ::= { ciscoProducts 1684 } --
ciscoUcsC24 OBJECT IDENTIFIER ::= { ciscoProducts 1685 } -- This 2RU, 2-socket rack server is designed for both outstanding economics and internal expandability over a range of storage-intensive infrastructure workloads, from IT and web infrastructure to big data
ciscoCDScde2202s4 OBJECT IDENTIFIER ::= { ciscoProducts 1686 } -- Cisco Content Delivery System Model CDE-220-2S4
ciscoCDScde4604r1 OBJECT IDENTIFIER ::= { ciscoProducts 1687 } -- Cisco Content Delivery System Model CDE-460-4R1
ciscoASR1002XC OBJECT IDENTIFIER ::= { ciscoProducts 1688 } -- Cisco Aggregation Services Router 1000 Series, ASR1002-XC Chassis
catWsC2960x48fpdL OBJECT IDENTIFIER ::= { ciscoProducts 1690 } -- Catalyst 2960X 48 Gig Downlinks, 2 SFP+ uplink, 2 x 10G stacking module, POE+ support for 740W
catWsC2960x48lpdL OBJECT IDENTIFIER ::= { ciscoProducts 1691 } -- Catalyst 2960X 48 Gig Downlinks, 2 SFP+ uplink, 2 x 10G stacking module, POE+ support for 370W
catWsC2960x48tdL OBJECT IDENTIFIER ::= { ciscoProducts 1692 } -- Catalyst 2960X 48 Gig Downlinks, 2 SFP+ uplink, 2 x 10G stacking module
@@ -1733,13 +1737,13 @@ ciscoWsC2960XR48LpsI OBJECT IDENTIFIER ::= { ciscoProducts 1803 } --
ciscoWsC2960XR48TsI OBJECT IDENTIFIER ::= { ciscoProducts 1804 } -- Catalyst 2960XR 48 Gig Downlinks and 4 SFP uplinks IP Lite Stackable
ciscoWsC2960XR24PsI OBJECT IDENTIFIER ::= { ciscoProducts 1805 } -- Catalyst 2960XR 24 Gig Downlinks and 4 SFP uplinks IP Lite Stackable with POE support for 370W
ciscoWsC2960XR24TsI OBJECT IDENTIFIER ::= { ciscoProducts 1806 } -- Catalyst 2960XR 24 Gig Downlinks and 4 SFP uplinks IP Lite Stackable
ciscoUCSC460M4Rackserver OBJECT IDENTIFIER ::= { ciscoProducts 1817 } -- 4-Socket 4-RU Cisco UCS Rack Server
ciscoA901S4SGFD OBJECT IDENTIFIER ::= { ciscoProducts 1818 } -- Agora platform - 4 external Ports (4 SFP) + 1 Gland Interface, DC PSU
ciscoA901S3SGFD OBJECT IDENTIFIER ::= { ciscoProducts 1819 } -- Agora platform - 3 external Ports (3 SFP+1Cu) + 1 Gland Interface, DC PSU
ciscoA901S2SGFD OBJECT IDENTIFIER ::= { ciscoProducts 1820 } -- Agora platform - 3 external Ports (2 SFP+2Cu) + 1 Gland Interface, DC PSU
ciscoA901S3SGFAH OBJECT IDENTIFIER ::= { ciscoProducts 1821 } -- Agora platform - AC, 3 External Ports (3SFP) + 1 Gland Interface, AC PSU, 1sec holdover for 1 PoE+
ciscoA901S2SGFAH OBJECT IDENTIFIER ::= { ciscoProducts 1822 } -- Agora platform - AC, 3 External Ports (2 SFP+1 Cu) + 1 Gland Interface, AC PSU, 1sec holdover for 1 PoE+
ciscoIE2000U4STSG OBJECT IDENTIFIER ::= { ciscoProducts 1839 } -- Cisco Industrial Ethernet 2000U Switch, 4 10/100 SFP + 2 1000 SFP
ciscoIE2000U16TCGP OBJECT IDENTIFIER ::= { ciscoProducts 1840 } -- Cisco Industrial Ethernet 2000U Switch, 16 10/100 T (4 PoE) + 2 1000 T/SFP until Jun 2013, contact kavenkat
ciscoIE20008T67B OBJECT IDENTIFIER ::= { ciscoProducts 1841 } -- Cisco IE2000 IP67 Variant Switch with 8 port 10/100 downlink, LAN Base Image
ciscoIE200016T67B OBJECT IDENTIFIER ::= { ciscoProducts 1842 } -- Cisco IE2000 IP67 Variant Switch with 16 port 10/100 downlink, LAN Base Image
ciscoIE200024T67B OBJECT IDENTIFIER ::= { ciscoProducts 1843 } -- Cisco IE2000 IP67 Variant Switch with 24 port 10/100 downlink, LAN Base Image
@@ -1760,6 +1764,7 @@ ciscoC888K9 OBJECT IDENTIFIER ::= { ciscoProducts 1857 } --
ciscoC891FK9 OBJECT IDENTIFIER ::= { ciscoProducts 1858 } -- C891F-K9 router with 1 Giga Ethernet Primary WAN, 1 SFP (Small Form-factor Pluggable) Giga Ethernet Primary WAN, 1 Fast Ethernet WAN, 1 V.92, 1 ISDN BRI S/T interface, 8 Giga Ethernet LAN, 4 PoE Optional, 1 USB 2.0 port, 1 Console/Aux port, 256MB flash memory and 1GB DRAM
ciscoC891FwAK9 OBJECT IDENTIFIER ::= { ciscoProducts 1859 } -- C891FW-A-K9 router with 1 Giga Ethernet Primary WAN, 1 SFP (Small Form-factor Pluggable) Giga Ethernet Primary WAN, 1 Fast Ethernet WAN, 1 V.92, 1 ISDN BRI S/T interface, 1 Dual 2.4/5GHz with FCC compliant Wireless LAN, 8 Giga Ethernet LAN, 4 PoE Optional, 1 USB 2.0 port, 1 Console/Aux port, 256MB flash memory and 1GB DRAM
ciscoC891FwEK9 OBJECT IDENTIFIER ::= { ciscoProducts 1860 } -- C891FW-E-K9 router with 1 Giga Ethernet Primary WAN, 1 SFP (Small Form-factor Pluggable) Giga Ethernet Primary WAN, 1 Fast Ethernet WAN, 1 V.92, 1 ISDN BRI S/T interface, 1 Dual 2.4/5GHz with EU or ETSI compliant Wireless LAN, 8 Giga Ethernet LAN, 4 PoE Optional, 1 USB 2.0 port, 1 Console/Aux port, 256MB flash memory and 1GB DRAM
ciscoASR1001X OBJECT IDENTIFIER ::= { ciscoProducts 1861 } -- Cisco Aggregation Services Router 1000 Series, ASR1001-X Chassis
cisco1783WAP5100xK9 OBJECT IDENTIFIER ::= { ciscoProducts 1862 } -- Cisco Rockwell Industrial Automation Wireless AP 5100, one 10/100/1000 BASE-T, Dual-band autonomous 802.11a/g/n
ciscoCDScde2502s5 OBJECT IDENTIFIER ::= { ciscoProducts 1863 } -- Cisco Content Delivery System Model CDE-250-2S5
ciscoUcsE140S OBJECT IDENTIFIER ::= { ciscoProducts 1864 } -- UCS E-Series Server 4-Core Ivy Bridge Single wide Service module (UCS-E140S-M2/K9)
@@ -1771,6 +1776,7 @@ ciscoIE2000U4TSG OBJECT IDENTIFIER ::= { ciscoProducts 1869 } --
ciscoIE2000U8TCG OBJECT IDENTIFIER ::= { ciscoProducts 1870 } -- Cisco Industrial Ethernet 2000U Switch, 8 10/100 T + 2 1000 T/SFP
ciscoIE2000U16TCG OBJECT IDENTIFIER ::= { ciscoProducts 1871 } -- Cisco Industrial Ethernet 2000U Switch, 16 10/100 T + 2 100 T + 2 1000 T/SFP
ciscoIE2000U16TCGX OBJECT IDENTIFIER ::= { ciscoProducts 1872 } -- Cisco Conformal coating Industrial Ethernet 2000U Switch, 16 10/100 T + 2 100 T + 2 1000 T/SFP
ciscoAIRAP3702 OBJECT IDENTIFIER ::= { ciscoProducts 1873 } -- Cisco Aironet 3700 Series (IEEE 802.11ac) Access Point
ciscoAIRAP702 OBJECT IDENTIFIER ::= { ciscoProducts 1874 } -- Cisco Aironet 702 Series (IEEE 802.11n) Access Point
ciscoAIRAP1532 OBJECT IDENTIFIER ::= { ciscoProducts 1875 } -- Cisco Aironet 1530 Series (IEEE 802.11n) Access Point
ciscoEsxNAM OBJECT IDENTIFIER ::= { ciscoProducts 1876 } -- Network Analysis Module running on ESX Hypervisor
@@ -1782,14 +1788,19 @@ ciscoC365048PQ OBJECT IDENTIFIER ::= { ciscoProducts 1881 } --
ciscoC365048TQ OBJECT IDENTIFIER ::= { ciscoProducts 1882 } -- Cisco Catalyst 3650 48 Port Data 4x10G Uplink
ciscoASR902 OBJECT IDENTIFIER ::= { ciscoProducts 1897 } -- Cisco Aggregation Services Router 900 Series with 2RU Chassis
ciscoME1200 OBJECT IDENTIFIER ::= { ciscoProducts 1899 } -- Cisco ME 1200 Carrier Ethernet Access Demarcation Device
ciscoVASA OBJECT IDENTIFIER ::= { ciscoProducts 1902 } -- Cisco Virtual Adaptive Security Appliance
ciscoVASASy OBJECT IDENTIFIER ::= { ciscoProducts 1903 } -- Cisco Virtual Adaptive Security Appliance System Context
ciscoVASASc OBJECT IDENTIFIER ::= { ciscoProducts 1904 } -- Cisco Virtual Adaptive Security Appliance Security Context
ciscoN9Kc9508 OBJECT IDENTIFIER ::= { ciscoProducts 1915 } -- Nexus 9500 series chassis with 8 slots
ciscoWapAP702 OBJECT IDENTIFIER ::= { ciscoProducts 1916 } -- Wireless Access Point 700
ciscoWapAP2602 OBJECT IDENTIFIER ::= { ciscoProducts 1917 } -- Wireless Access Point 2600
ciscoWapAP1602 OBJECT IDENTIFIER ::= { ciscoProducts 1918 } -- Wireless Access Point 1600
ciscoN9KC93128TX OBJECT IDENTIFIER ::= { ciscoProducts 1923 } -- 3RU TOR, 96x10GT+8x40G QSFP
ciscoN9KC9396TX OBJECT IDENTIFIER ::= { ciscoProducts 1924 } -- 2RU TOR, 48x10GT+12x40G QSFP
ciscoN9KC9396PX OBJECT IDENTIFIER ::= { ciscoProducts 1925 } -- 2RU TOR, 48x10GF+12x40G QSFP
ciscoUcsEN120S OBJECT IDENTIFIER ::= { ciscoProducts 1931 } -- UCS E-Series Network compute engine 2-Core Service module (UCS-EN120S-M2/K9)
ciscoC68xxVirtualSwitch OBJECT IDENTIFIER ::= { ciscoProducts 1934 } -- 68xx Virtual Switch
ciscoISR4431 OBJECT IDENTIFIER ::= { ciscoProducts 1935 } -- Cisco ISR 4431 Router Chassis
ciscoC6880x OBJECT IDENTIFIER ::= { ciscoProducts 1936 } -- Catalyst 6880 chassis
ciscoCPT50 OBJECT IDENTIFIER ::= { ciscoProducts 1937 } -- Cisco Carrier Packet Transport (CPT) 50
ciscoCSE340WG32K9 OBJECT IDENTIFIER ::= { ciscoProducts 1940 } -- Cisco Edge 340 Digital Media Player general model,equipped with 32G SSD, WiFi chip, support 2.4G
@@ -1827,6 +1838,7 @@ ciscoitpAxpSmSre910 OBJECT IDENTIFIER ::= { ciscoProducts 19
ciscoN9Kc9516 OBJECT IDENTIFIER ::= { ciscoProducts 1996 } -- Nexus 9500 series chassis with 16 slots
ciscoN9Kc9504 OBJECT IDENTIFIER ::= { ciscoProducts 1997 } -- Nexus 9500 series chassis with 4 slots
ciscoDoorCGR1240 OBJECT IDENTIFIER ::= { ciscoProducts 1998 } -- Cisco Connected Grid Router CGR1240 physical door entity
ciscoISR4351 OBJECT IDENTIFIER ::= { ciscoProducts 1999 } -- Cisco ISR 4351 Router
ciscoWRP500 OBJECT IDENTIFIER ::= { ciscoProducts 2000 } -- WRP500 is targeted for small business network environments from a Hosted Service Provider
cisco897VABK9 OBJECT IDENTIFIER ::= { ciscoProducts 2008 } -- C897VAB-K9 router with 1 VDSL2 withbonding/ADSL2+ WAN , 1 Giga Ethernet WAN, 1 SFP (Small Form-factor Pluggable) Giga Ethernet Primary WAN, 8 Giga Ethernet LAN,4 PoE Optional, 1 USB 2.0 port, 1 Console/Aux port, 256MB flash memory and 1GB DRAM
cisco819HWDCK9 OBJECT IDENTIFIER ::= { ciscoProducts 2023 } -- C819HWD-C-K9 Hardened Router with 1 Gigabit Ethernet WAN, 4 Fast Ethernet LAN, 1 Serial, CCC Mark compliant Wireless LAN, 1 Console/Aux ports, 1GB flash memory and 1GB DRAM
@@ -1837,6 +1849,32 @@ ciscoIOG910GK9 OBJECT IDENTIFIER ::= { ciscoProducts 2064 }
ciscoIOG910K9 OBJECT IDENTIFIER ::= { ciscoProducts 2065 } -- Programmable IoT Sensor Gateway, 1 Combo (GE/SFP), 1 open slot for 802.15.4 module, 1 slot for external storage
cat36xxstack OBJECT IDENTIFIER ::= { ciscoProducts 2066 } -- A stack of any catalyst36xx stack-able ethernet switches with unified identity (as a single unified switch), control and management
cat57xxstack OBJECT IDENTIFIER ::= { ciscoProducts 2067 } -- A stack of any Wireless LAN 57xx stack-able controllers with unified identity (as a single unified switch), control and management
ciscoISR4331 OBJECT IDENTIFIER ::= { ciscoProducts 2068 } -- Cisco ISR 4331 Router
ciscoIE40004TC4GE OBJECT IDENTIFIER ::= { ciscoProducts 2069 } -- CISCO IE4000 with 4 FE Combo DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40008T4GE OBJECT IDENTIFIER ::= { ciscoProducts 2070 } -- CISCO IE4000 with 8 FE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40008S4GE OBJECT IDENTIFIER ::= { ciscoProducts 2071 } -- CISCO IE4000 with 8 FE Fiber DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40004T4P4GE OBJECT IDENTIFIER ::= { ciscoProducts 2072 } -- CISCO IE4000 with 4 FE Copper DL ports + 4 FE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoIE400016T4GE OBJECT IDENTIFIER ::= { ciscoProducts 2073 } -- CISCO IE4000 with 16 FE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40004S8P4GE OBJECT IDENTIFIER ::= { ciscoProducts 2074 } -- CISCO IE4000 with 4 FE Fiber DL ports + 8 FE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoIE40008GT4GE OBJECT IDENTIFIER ::= { ciscoProducts 2075 } -- CISCO IE4000 with 8 GE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40008GS4GE OBJECT IDENTIFIER ::= { ciscoProducts 2076 } -- CISCO IE4000 with 8 GE Fiber DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40004GC4GP4GE OBJECT IDENTIFIER ::= { ciscoProducts 2077 } -- CISCO IE4000 with 4 GE Combo DL ports + 4 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoIE400016GT4GE OBJECT IDENTIFIER ::= { ciscoProducts 2078 } -- CISCO IE4000 with 16 GE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoIE40008GT8GP4GE OBJECT IDENTIFIER ::= { ciscoProducts 2079 } -- CISCO IE4000 with 8 GE Copper DL ports + 8 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoIE40004GS8GP4GE OBJECT IDENTIFIER ::= { ciscoProducts 2080 } -- CISCO IE4000 with 4 GE Fiber DL ports + 8 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4C4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2081 } -- CISCO IE4000 with 4 FE Combo DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8T4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2082 } -- CISCO IE4000 with 8 FE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8S4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2083 } -- CISCO IE4000 with 8 FE Fiber DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4T4E4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2084 } -- CISCO IE4000 with 4 FE Copper DL ports + 4 FE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS16T4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2085 } -- CISCO IE4000 with 16 FE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4S8E4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2086 } -- CISCO IE4000 with 4 FE Fiber DL ports + 8 FE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8TG4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2087 } -- CISCO IE4000 with 8 GE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8SG4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2088 } -- CISCO IE4000 with 8 GE Fiber DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4EG8CGN OBJECT IDENTIFIER ::= { ciscoProducts 2089 } -- CISCO IE4000 with 4 GE Combo DL ports + 4 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS16TG4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2090 } -- CISCO IE4000 with 16 GE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8TG8EG4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2091 } -- CISCO IE4000 with 8 GE Copper DL ports + 8 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4SG8EG4CGN OBJECT IDENTIFIER ::= { ciscoProducts 2092 } -- CISCO IE4000 with 4 GE Fiber DL ports + 8 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoISR4321 OBJECT IDENTIFIER ::= { ciscoProducts 2093 } -- Cisco ISR 4321 Router
ciscoCSE340G32K9 OBJECT IDENTIFIER ::= { ciscoProducts 2094 } -- Cisco Edge 340 Digital Media Player none wifi, general model, equipped with 32G SSD
ciscoCSE340M32K9 OBJECT IDENTIFIER ::= { ciscoProducts 2095 } -- Cisco Edge 340 Digital Media Player none wifi, DMP model, equipped with 32G SSD
ciscoSCE10000 OBJECT IDENTIFIER ::= { ciscoProducts 2096 } -- Cisco service control engine 10000
@@ -1848,19 +1886,42 @@ ciscoASR92024TZM OBJECT IDENTIFIER ::= { ciscoProducts 2101 }
ciscoASR92024SZM OBJECT IDENTIFIER ::= { ciscoProducts 2102 } -- Cisco ASR920 Series - 24GE Fiber and 4-10GE - Modular PSU
ciscoWallander1x1GESKU OBJECT IDENTIFIER ::= { ciscoProducts 2112 } -- This is a giga-bit ethernet card which can be plugged into host such like ISR4451, this will provide one giga-bit eth interface (both RJ45 and SFP are supported).
ciscoWallander2x1GESKU OBJECT IDENTIFIER ::= { ciscoProducts 2113 } -- This is a giga-bit ethernet card which can be plugged into host such like ISR4451, this will provide two giga-bit eth interface (both RJ45 and SFP are supported).
ciscoASA5506 OBJECT IDENTIFIER ::= { ciscoProducts 2114 } -- ASA 5506 Adaptive Security Appliance
ciscoASA5506sc OBJECT IDENTIFIER ::= { ciscoProducts 2115 } -- ASA 5506 Adaptive Security Appliance Security Context
ciscoASA5506sy OBJECT IDENTIFIER ::= { ciscoProducts 2116 } -- ASA 5506 Adaptive Security Appliance System Context
ciscoASA5506K7 OBJECT IDENTIFIER ::= { ciscoProducts 2123 } -- ASA 5506 Adaptive Security Appliance with No Payload Encryption
ciscoASA5506K7sc OBJECT IDENTIFIER ::= { ciscoProducts 2124 } -- ASA 5506 Adaptive Security Appliance Security Context with No Payload Encryption
ciscoASA5506K7sy OBJECT IDENTIFIER ::= { ciscoProducts 2125 } -- ASA 5506 Adaptive Security Appliance System Context with No Payload Encryption
ciscoAIRAP1702 OBJECT IDENTIFIER ::= { ciscoProducts 2129 } -- Cisco Aironet 1700 Series (IEEE 802.11ac) Access Point
catwsC3560CX12pdS OBJECT IDENTIFIER ::= { ciscoProducts 2132 } -- Smirnoff catalyst 3560CX 12x GE downlink, PoE+, 2x CU + 2x 10G SFP+ uplinks
catwsC3560CX12tcS OBJECT IDENTIFIER ::= { ciscoProducts 2133 } -- Smirnoff catalyst 3560CX 12x GE downlink, 2x Copper + 2x SFP uplinks
catwsC3560CX12pcS OBJECT IDENTIFIER ::= { ciscoProducts 2134 } -- Smirnoff catalyst 3560CX 12x GE downlink, PoE+, 2x copper + 2x SFP uplink
catwsC3560CX8tcS OBJECT IDENTIFIER ::= { ciscoProducts 2135 } -- Smirnoff Catalyst 3560CX 8x GE downlink, 2x Copper + 2x SFP uplink
catwsC3560CX8pcS OBJECT IDENTIFIER ::= { ciscoProducts 2136 } -- Smirnoff Catalyst 3560CX 8x GE downlink, PoE+, 2x Copper + 2x SFP uplink
catwsC2960CX8tcL OBJECT IDENTIFIER ::= { ciscoProducts 2137 } -- Smirnoff catalyst 2960CX 8 Gig Downlinks, 2 Copper, 2 SFP uplink
cisco2911TK9 OBJECT IDENTIFIER ::= { ciscoProducts 2138 } -- CISCO2911-T/K9 with 3 GE, 4 EHWIC, 1 SM , 256 MB CF, 512 MB DRAM, IPB, extended temperature range from -5 to 60 C
ciscoSNS3495K9 OBJECT IDENTIFIER ::= { ciscoProducts 2139 } -- Cisco Secure Network Server platform SNS-3495 appliance
ciscoSNS3415K9 OBJECT IDENTIFIER ::= { ciscoProducts 2140 } -- Cisco Secure Network Server platform SNS-3415 appliance
ciscoAIRAP702w OBJECT IDENTIFIER ::= { ciscoProducts 2146 } -- Cisco Aironet 702w (IEEE 802.11n) Series Access Points
cisco891x24XK9 OBJECT IDENTIFIER ::= { ciscoProducts 2148 } -- C891-24X Router series with 2 Giga Ethernet WAN Xor'ed with SFP (Small Form-factor Pluggable), 24 Giga Ethernet LAN with 8 PoE 1 USB 2.0 port, 1 Console/Aux port, 256MB flash memory and 512MB/1GB DRAM
ciscoASR9204SZD OBJECT IDENTIFIER ::= { ciscoProducts 2155 } -- Cisco ASR920 Series - 2GE and 4-10GE -DC model
ciscoASR9208SZ0A OBJECT IDENTIFIER ::= { ciscoProducts 2156 } -- Cisco ASR920 Series - 8GE and 4-10GE - Outdoor AC model
ciscoASR92012CZA OBJECT IDENTIFIER ::= { ciscoProducts 2157 } -- Cisco ASR920 Series - 12GE and 2-10GE - AC model
ciscoASR92012CZD OBJECT IDENTIFIER ::= { ciscoProducts 2158 } -- Cisco ASR920 Series - 12GE and 2-10GE - DC model
ciscoASR9204SZA OBJECT IDENTIFIER ::= { ciscoProducts 2159 } -- Cisco ASR920 Series - 2GE and 4-10GE -AC model
ciscoASR9208SZ0D OBJECT IDENTIFIER ::= { ciscoProducts 2160 } -- Cisco ASR920 Series - 8GE and 4-10GE - Outdoor DC model
ciscoC3850E12XS OBJECT IDENTIFIER ::= { ciscoProducts 2162 } -- Cisco Catalyst 3850E 12 Port 10G Fiber Switch
ciscoC3850E24XS OBJECT IDENTIFIER ::= { ciscoProducts 2163 } -- Cisco Catalyst 3850E 24 Port 10G Fiber Switch
ciscoC3850E48XS OBJECT IDENTIFIER ::= { ciscoProducts 2164 } -- Cisco Catalyst 3850E 48 Port 10G Fiber Switch
ciscoTSCodecG3 OBJECT IDENTIFIER ::= { ciscoProducts 2161 } -- Cisco Telepresence Generation 3 Codec
ciscoC385012XS OBJECT IDENTIFIER ::= { ciscoProducts 2162 } -- Cisco Catalyst 3850 12 Port 10G Fiber Switch
ciscoC385024XS OBJECT IDENTIFIER ::= { ciscoProducts 2163 } -- Cisco Catalyst 3850 24 Port 10G Fiber Switch
ciscoC385048XS OBJECT IDENTIFIER ::= { ciscoProducts 2164 } -- Cisco Catalyst 3850 48 Port 10G Fiber Switch
ciscoRAIE1783ZMS4T4E2TGN OBJECT IDENTIFIER ::= { ciscoProducts 2168 } -- Cisco IE2000 IP67 Variant with 4 port 10/100 downlink, 4 port POE/POE+ downlink, 2 10/100/1000 uplink, w/FPGA, LAN Base Image, PTP and NAT Support
ciscoRAIE1783ZMS8T8E2TGN OBJECT IDENTIFIER ::= { ciscoProducts 2169 } -- Cisco IE2000 IP67 Variant with 8 port 10/100 downlink, 8 port POE/POE+ downlink, 2 10/100/1000 uplink, w/FPGA, LAN Base Image, PTP and NAT Support
ciscoRAIE1783HMS8TG4CGR OBJECT IDENTIFIER ::= { ciscoProducts 2172 } -- CISCO IE4000 with 8 GE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8SG4CGR OBJECT IDENTIFIER ::= { ciscoProducts 2173 } -- CISCO IE4000 with 8 GE Fiber DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4EG8CGR OBJECT IDENTIFIER ::= { ciscoProducts 2174 } -- CISCO IE4000 with 4 GE Combo DL ports + 4 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS16TG4CGR OBJECT IDENTIFIER ::= { ciscoProducts 2175 } -- CISCO IE4000 with 16 GE Copper DL ports, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS8TG8EG4CGR OBJECT IDENTIFIER ::= { ciscoProducts 2176 } -- CISCO IE4000 with 8 GE Copper DL ports + 8 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoRAIE1783HMS4SG8EG4CGR OBJECT IDENTIFIER ::= { ciscoProducts 2177 } -- CISCO IE4000 with 4 GE Fiber DL ports + 8 GE Copper DL ports with POE, 4 GE combo UL ports, w/FPGA
ciscoUCSC220M4 OBJECT IDENTIFIER ::= { ciscoProducts 2178 } -- Cisco UCS C220 M4 Rack server
ciscoUCSC240M4 OBJECT IDENTIFIER ::= { ciscoProducts 2179 } -- Cisco UCS C240 M4 Rack server
ciscoUCSC3160 OBJECT IDENTIFIER ::= { ciscoProducts 2180 } -- Cisco UCS C3160 Rack server
@@ -1908,7 +1969,10 @@ ciscoFpSsl2000K9 OBJECT IDENTIFIER ::= { ciscoProducts 2225 } -- Ci
ciscoFpSsl8200K9 OBJECT IDENTIFIER ::= { ciscoProducts 2226 } -- Cisco FirePOWER SSL8200 Appliance, 2U
ciscoFp7010K9 OBJECT IDENTIFIER ::= { ciscoProducts 2227 } -- Cisco FirePOWER 7010 Appliance, 1U
ciscoFp7020K9 OBJECT IDENTIFIER ::= { ciscoProducts 2228 } -- Cisco FirePOWER 7020 Appliance, 1U
cisco841Mx4XK9 OBJECT IDENTIFIER ::= { ciscoProducts 2229 } -- C841M-4X/K9 router with 4GE LAN, 2GE WAN, 2 WIM slots
cisco841Mx8XK9 OBJECT IDENTIFIER ::= { ciscoProducts 2230 } -- C841M-8X/K9 router with 8GE LAN, 2GE WAN, 2 WIM slots
ciscoIR829GWLTEMAAK9 OBJECT IDENTIFIER ::= { ciscoProducts 2248 } -- IR829 Hardened WAN GE 4G LTE secure platform multi-mode Sprint LTE/DoRa with 802.11n, PoE, FCC compliant
ciscoPwsX474812X48uE OBJECT IDENTIFIER ::= { ciscoProducts 2249 } -- Switch 4500E 100/1000/2500/5000/10GBaseT (RJ45)+V E Series with 48 10GbaseT
END
File diff suppressed because it is too large Load Diff
+1209
View File
File diff suppressed because it is too large Load Diff
+112
View File
@@ -0,0 +1,112 @@
--
-- DATACOM Telematica
-- Copyright 1999-2006 by Datacom Telematica (Teracom Telematica Ltda). All Rights Reserved.
-- This DATACOM SNMP MIB Specification is Datacom proprietary intellectual property.
--
-- This module will be extend, as required. The specification and other information
-- contained in this document can be modified without prior notice. The user should
-- consult Datacom to determine whether any such changes have been done.
--
DATACOM-SMI DEFINITIONS ::= BEGIN
IMPORTS
enterprises
FROM RFC1155-SMI;
datacom OBJECT IDENTIFIER ::={ enterprises 3709 }
-- MODULE-IDENTITY
-- LAST-UPDATED "9912150000Z"
-- ORGANIZATION "Datacom Telemática"
-- CONTACT-INFO
-- "Datacom Telemática
--
-- Postal: Datacom Telematica
-- Av. França, 735
-- Navegantes, POA, RS
-- CEP 90230-220
-- BRAZIL
--
-- Tel: +55(051)3358-0100
-- Fax: +55(051)3358-0101
--
-- E-mail: datacom@datacom-telematica.com.br"
-- DESCRIPTION
-- " The Structure of Management Information for
-- Datacom Telematica enterprise. "
--
datacomRegistrations OBJECT IDENTIFIER ::={ datacom 1 }
datacomGenericMIBs OBJECT IDENTIFIER ::={ datacom 2 }
datacomProductsMIBs OBJECT IDENTIFIER ::={ datacom 3 }
datacomExperimental OBJECT IDENTIFIER ::={ datacom 4 }
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomRegistration
-- Register the modules identification of MIBs
datacomModules OBJECT IDENTIFIER ::={ datacomRegistrations 1 }
--
-- Products registration
-- Register the management cards
datacomManagementCards OBJECT IDENTIFIER ::={ datacomRegistrations 2 }
-- Register the modems
datacomModems OBJECT IDENTIFIER ::={ datacomRegistrations 3 }
-- Register the data converters.
datacomAccessDevices OBJECT IDENTIFIER ::={ datacomRegistrations 5 }
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomProductsMIBs
-- Modem MIBs
datacomModemsMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 3 }
-- Access Devices MIBs
datacomAccessDevicesMIBs OBJECT IDENTIFIER ::={ datacomProductsMIBs 5 }
-- -- -- -- -- -- -- -- -- -- -- -- -- --
--
-- datacomExperimental
datacomExpGenericMIBs OBJECT IDENTIFIER ::={ datacomExperimental 2 }
datacomExpProductsMIBs OBJECT IDENTIFIER ::={ datacomExperimental 3 }
--
-- datacomExpProductsMIBs
datacomExpModemsMIBs OBJECT IDENTIFIER ::={ datacomExpProductsMIBs 3 }
-- Access Devices MIBs
datacomExpAccessDevicesMIBs OBJECT IDENTIFIER ::={ datacomExpProductsMIBs 5 }
END
+47 -3
View File
@@ -1,4 +1,4 @@
-- MIB file created 11-Nov-2009 11:09:10, by
-- MIB file created 04-May-2010 14:00:22, by
-- SMICng version 2.2.11-beta(PRO)(Solaris), January 20, 2001. Enterprise key cisco.com
OLD-CISCO-CHASSIS-MIB DEFINITIONS ::= BEGIN
@@ -587,6 +587,8 @@ chassisType OBJECT-TYPE
csrp546(779),
csrp547(780),
cvs510-fxo(781),
c887-gvdsl2(782),
c887-srstvdsl2(783),
c59xx(786),
cat2960-24-lcs(787),
cat2960-24-pcs(788),
@@ -596,9 +598,18 @@ chassisType OBJECT-TYPE
cn4kibmeth(793),
craie1783-rms06t(796),
craie1783-rms10t(797),
cesw-540-8p-k9(798),
cesw-520-8p-k9(799),
cn7kc7009(815),
cn4kibm-cisco-eth(816),
cmwr-2941-dca(817)
cmwr-2941-dca(817),
c1841ck9(832),
c2801ck9(833),
c2811ck9(834),
c2821ck9(835),
c3825ck9(837),
c3845ck9(838),
c1906ck9(859)
}
ACCESS read-only
STATUS deprecated
@@ -1327,6 +1338,8 @@ cardType OBJECT-TYPE
ubr-mc16u-e(1041),
ubr-mc28u-e(1042),
ubr-dtcc(1043),
ubr-mc88v(1045),
ubr-mc2020(1046),
gsr-8fe-tx(1050),
gsr-8fe-fx(1051),
ssrp-oc48-sm-sr(1052),
@@ -1471,6 +1484,15 @@ cardType OBJECT-TYPE
cpu-1941w-2ge(1260),
cpu-3825nv-2ge(1261),
cpu-3845nv-2ge(1262),
cpu-3900SPE200-4ge(1269),
cpu-3900spe250-4ge(1274),
cpu-c1841c-2fe-k9(1277),
cpu-c2801c-2fe-k9(1278),
cpu-c2811c-2fe-k9(1279),
cpu-c2821c-2ge-k9(1280),
cpu-c3825c-2ge-k9(1282),
cpu-c3845c-2ge-k9(1283),
cpu-1906c-k9(1287),
pos-1oc12(1300),
p6-ct3(1301),
ge(1302),
@@ -1482,6 +1504,8 @@ cardType OBJECT-TYPE
srp-oc48-sr(1310),
srp-oc48-ir(1311),
atm-4oc3(1313),
srp-pos-1oc48-sm-sr(1315),
srp-pos-1oc48-sm-lr(1316),
flashcard-48mb(1317),
flashcard-128mb(1318),
p24-ct1e1(1319),
@@ -2038,6 +2062,11 @@ cardType OBJECT-TYPE
pvdm3-256(4374),
nm-2838(4375),
pano-2838(4376),
vwic3-mft4-t1e1(4379),
vwic3-mft1-t1e1(4380),
vwic3-mft1-g703(4381),
vwic3-mft2-t1e1(4382),
vwic3-mft2-g703(4383),
rsp720Base(4400),
rsp32GEBase(4401),
rsp3210GEBase(4402),
@@ -2112,6 +2141,7 @@ cardType OBJECT-TYPE
hwic-1ser(4559),
hwic-2ser(4560),
internal-service-module-aim(4561),
sm-1nm(4563),
hwic-4ce1t1-pri(4576),
dwdm-3268-sfp(4600),
dwdm-3425-sfp(4601),
@@ -2221,8 +2251,22 @@ cardType OBJECT-TYPE
pwr-cat-2960ac-235w-12v(4779),
pwr-cat-2960ac-525w-12v(4780),
pwr-c1941pwr-ac(4781),
pwr-c7225-ac(4787),
mds-ds-x9232x256-k9(4800),
mds-ds13-slot-fabric-evia3(4801)
mds-ds13-slot-fabric-evia3(4801),
mds-ds-x9530-sf2a-k9(4819),
hwic-2t-c(4826),
hwic-1t-c(4827),
hwic-9fes-c(4828),
hwic-4fes-c(4829),
vwic2-mft1-g703-c(4830),
vwic2-mft2-g703-c(4831),
nm-16eswitch-c(4832),
harddisk-idc(4835),
vmss-sm-sre700K9(4840),
vmss-sm-sre900K9(4841),
iss-sm-sre700K9(4842),
iss-sm-sre900K9(4843)
}
ACCESS read-only
STATUS deprecated
+11904
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -0,0 +1,4 @@
ALTER TABLE `alert_schedule` DROP `device_id`;
ALTER TABLE `alert_schedule` CHANGE `id` `schedule_id` INT( 11 ) NOT NULL AUTO_INCREMENT;
ALTER TABLE `alert_schedule` ADD `title` VARCHAR( 255 ) NOT NULL ,ADD `notes` TEXT NOT NULL ;
CREATE TABLE `librenms`.`alert_schedule_items` (`item_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`schedule_id` INT NOT NULL ,`target` VARCHAR( 255 ) NOT NULL ,INDEX ( `schedule_id` )) ENGINE = INNODB;