Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
65 lines (59 sloc) 3.49 KB
//
// +----------------------------------------------------------------------+
// | RackMan http://rackman.jasonantman.com |
// +----------------------------------------------------------------------+
// | Copyright (c) 2009 Jason Antman. |
// | |
// | 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. |
// | |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to: |
// | |
// | Free Software Foundation, Inc. |
// | 59 Temple Place - Suite 330 |
// | Boston, MA 02111-1307, USA. |
// +----------------------------------------------------------------------+
// | ADDITIONAL TERMS (pursuant to GPL Section 7): |
// | 1) You may not remove any of the "Author" or "Copyright" attributions|
// | from this file or any others distributed with this software. |
// | 2) If modified, you must make substantial effort to differentiate |
// | your modified version from the original, while retaining all |
// | attribution to the original project and authors. |
// +----------------------------------------------------------------------+
// |Please use the above URL for bug reports and feature/support requests.|
// +----------------------------------------------------------------------+
// | Authors: Jason Antman <jason@jasonantman.com> |
// +----------------------------------------------------------------------+
// | $LastChangedRevision:: $ |
// | $HeadURL:: $ |
// +----------------------------------------------------------------------+
NOTES on non-intuitive stuff:
For devices_rack, the pending_status column holds change information.
Its values essentially determine what is viewed and what will happen on a
commit or rollback.
The three statuses are 0, 1, 2.
0 - nothing has changed
Shown: Always.
Commit: No change.
Rollback: No change.
1 - This device was ADDED (or is the new position if a move).
Shown: Currently.
Commit: pending_status set to 0.
Rollback: device record removed.
2 - This device was REMOVED (or is the old position of a move).
Shown: No.
Commit: device record removed.
Rollback: pending_status set back to 0.
The only exception to this is if a devices_rack entry already has a
dr_pending_status of 1, in which case it will be immediately deleted when the
"remove" link is clicked.
// $LastChangedRevision$
// $HeadURL$