-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sysutils/smart: fix coloring for themes; "s/\t/ /g"; cleanup php #957
Merged
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a68a53f
sysutils/smart: fix coloring for themes; "s/\t/ /g"; cleanup php
fabianfrz a9109e7
sysutils/smart: remove CSS classes from widget
fabianfrz e63d8ab
remove my (C) entry, add asterisks
fabianfrz 30cb3b1
more asterisk formatting
fabianfrz 3ff344a
more asterisk formatting
fabianfrz File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,31 @@ | ||
<?php | ||
|
||
/* | ||
Copyright (C) 2014 Deciso B.V. | ||
Copyright 2012 mkirbst @ pfSense Forum | ||
All rights reserved. | ||
Copyright (C) 2018 Fabian Franz | ||
Copyright (C) 2014 Deciso B.V. | ||
Copyright 2012 mkirbst @ pfSense Forum | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
fabianfrz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
modification, are permitted provided that the following conditions are met: | ||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
1. Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
2. Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in the | ||
documentation and/or other materials provided with the distribution. | ||
|
||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, | ||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. | ||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, | ||
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
require_once("guiconfig.inc"); | ||
|
@@ -33,11 +34,11 @@ | |
?> | ||
|
||
<table class="table table-striped" style="width:100%; border:0; cellpadding:0; cellspacing:0"> | ||
<tr> | ||
<td class="widgetsubheader" style="text-align:center"><b><?php echo gettext("Drive") ?></b></td> | ||
<td class="widgetsubheader" style="text-align:center"><b><?php echo gettext("Ident") ?></b></td> | ||
<td class="widgetsubheader" style="text-align:center"><b><?php echo gettext("SMART Status") ?></b></td> | ||
</tr> | ||
<tr> | ||
<td class="widgetsubheader" style="text-align:center"><b><?php echo gettext("Drive") ?></b></td> | ||
<td class="widgetsubheader" style="text-align:center"><b><?php echo gettext("Ident") ?></b></td> | ||
<td class="widgetsubheader" style="text-align:center"><b><?php echo gettext("SMART Status") ?></b></td> | ||
</tr> | ||
|
||
<?php | ||
$devs = array(); | ||
|
@@ -55,23 +56,23 @@ | |
case "PASSED": | ||
case "OK": | ||
$dev_state_translated = gettext('OK'); | ||
$color = "#90EE90"; | ||
$color = "success"; | ||
break; | ||
case "": | ||
$dev_state = "Unknown"; | ||
$dev_state_translated = gettext('Unknown'); | ||
$color = "#C0B788"; | ||
$color = "warning"; | ||
break; | ||
default: | ||
$color = "#F08080"; | ||
$color = "danger"; | ||
break; | ||
} | ||
?> | ||
<tr> | ||
<td class="listlr"><?php echo $dev; ?></td> | ||
<td class="listr" style="text-align:center"><?php echo $dev_ident; ?></td> | ||
<td class="listr" style="text-align:center"><span style="background-color:<?php echo $color; ?>"> <?php echo $dev_state_translated ?> </span></td> | ||
</tr> | ||
<tr> | ||
<td class="listlr"><?= $dev ?></td> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. listlr and listr can be removed |
||
<td class="listr" style="text-align:center"><?= $dev_ident ?></td> | ||
<td class="listr" style="text-align:center"><span class="label label-<?= $color ?>"> <?= $dev_state_translated ?> </span></td> | ||
</tr> | ||
<?php | ||
} | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok if you want to reformat, but use " * " indent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I have to reject this: checked file history and reformatting does not warrant copyright even if it is done cleverly. no substantial changes in this particular file of the code implementation.