Skip to content

Commit b306a26

Browse files
Merge pull request #2973 from bunkerity/dev
Merge branch "dev" into branch "staging"
2 parents c8690d4 + 2f8ae75 commit b306a26

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

src/common/utils/logger.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
_nameToLevel,
1111
addLevelName,
1212
basicConfig,
13-
getLogger,
13+
getLogger as logging_getLogger,
1414
setLoggerClass,
1515
)
1616
from logging.handlers import SysLogHandler
@@ -122,7 +122,7 @@ def __init__(self, name, level=INFO):
122122
"sqlalchemy.engine.Engine",
123123
)
124124
for logger_name in sqlalchemy_loggers:
125-
getLogger(logger_name).setLevel(database_default_level)
125+
logging_getLogger(logger_name).setLevel(database_default_level)
126126

127127
# Customize log level names with emojis
128128
addLevelName(CRITICAL, "🚨")
@@ -135,7 +135,7 @@ def __init__(self, name, level=INFO):
135135
def setup_logger(title: str, level: Optional[Union[str, int]] = None) -> Logger:
136136
"""Set up and return a logger with the specified title and level."""
137137
title = title.upper()
138-
logger = getLogger(title)
138+
logger = logging_getLogger(title)
139139
level = level or default_level
140140

141141
if isinstance(level, str):
@@ -146,6 +146,8 @@ def setup_logger(title: str, level: Optional[Union[str, int]] = None) -> Logger:
146146

147147

148148
if warnings:
149-
logger = getLogger("LOGGER_SETUP")
149+
logger = logging_getLogger("LOGGER_SETUP")
150150
for warn in warnings:
151151
logger.warning(warn)
152+
153+
getLogger = setup_logger # Alias for easier access

src/ui/app/static/js/plugins-settings.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,14 @@ $(document).ready(() => {
904904

905905
$pluginItems.each(function () {
906906
const $item = $(this);
907+
const itemType = $item.data("type");
908+
909+
// Treat external and ui types as the same category
907910
const typeMatches =
908-
currentType === "all" || $item.data("type") === currentType;
911+
currentType === "all" ||
912+
itemType === currentType ||
913+
(currentType === "external" && itemType === "ui") ||
914+
(currentType === "ui" && itemType === "external");
909915

910916
const pluginId = $item.data("plugin");
911917
const pluginName = $item.find(".fw-bold").text().toLowerCase();
@@ -1749,7 +1755,7 @@ $(document).ready(() => {
17491755
var hasProPlugins = false;
17501756
$pluginItems.each(function () {
17511757
const type = $(this).data("type");
1752-
if (type === "external") {
1758+
if (type === "external" || type === "ui") {
17531759
hasExternalPlugins = true;
17541760
} else if (type === "pro") {
17551761
hasProPlugins = true;

0 commit comments

Comments
 (0)