Skip to content

Commit 071bbb2

Browse files
NAYANAR0502kevalmahajan
authored andcommitted
String quotes converted from single to double quotes as required
Signed-off-by: NAYANAR <nayana.r5@ibm.com>
1 parent 4028875 commit 071bbb2

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

mcpgateway/static/admin.js

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23127,7 +23127,7 @@ const SEARCH_FIELD_CONFIG = {
2312723127
const SearchState = {
2312823128
debounceTimers: {},
2312923129
activeFilters: {},
23130-
23130+
2313123131
reset(entityType) {
2313223132
if (this.debounceTimers[entityType]) {
2313323133
clearTimeout(this.debounceTimers[entityType]);
@@ -23138,37 +23138,43 @@ const SearchState = {
2313823138
tags: [],
2313923139
};
2314023140
},
23141-
23141+
2314223142
setSearch(entityType, value) {
2314323143
if (!this.activeFilters[entityType]) {
2314423144
this.activeFilters[entityType] = { search: "", tags: [] };
2314523145
}
2314623146
this.activeFilters[entityType].search = value;
2314723147
this.updateFilterCount(entityType);
2314823148
},
23149-
23149+
2315023150
setTags(entityType, tags) {
2315123151
if (!this.activeFilters[entityType]) {
2315223152
this.activeFilters[entityType] = { search: "", tags: [] };
2315323153
}
2315423154
this.activeFilters[entityType].tags = tags;
2315523155
this.updateFilterCount(entityType);
2315623156
},
23157-
23157+
2315823158
getActiveFilterCount(entityType) {
23159-
if (!this.activeFilters[entityType]) return 0;
23159+
if (!this.activeFilters[entityType]) {
23160+
return 0;
23161+
}
2316023162
const state = this.activeFilters[entityType];
2316123163
let count = 0;
23162-
if (state.search.trim()) count++;
23163-
if (state.tags.length > 0) count += state.tags.length;
23164+
if (state.search.trim()) {
23165+
count++;
23166+
}
23167+
if (state.tags.length > 0) {
23168+
count += state.tags.length;
23169+
}
2316423170
return count;
2316523171
},
23166-
23172+
2316723173
updateFilterCount(entityType) {
2316823174
const count = this.getActiveFilterCount(entityType);
2316923175
const badge = safeGetElement(`${entityType}-filter-count-badge`);
2317023176
const clearAllBtn = safeGetElement(`${entityType}-clear-all-filters`);
23171-
23177+
2317223178
if (badge) {
2317323179
if (count > 0) {
2317423180
badge.textContent = `${count} filter${count > 1 ? "s" : ""} active`;
@@ -23185,7 +23191,7 @@ const SearchState = {
2318523191
clearAllBtn.classList.add("hidden");
2318623192
}
2318723193
}
23188-
}
23194+
},
2318923195
};
2319023196

2319123197
/**
@@ -23317,25 +23323,25 @@ function extractRowSearchText(row, searchFields) {
2331723323

2331823324
/**
2331923325
* Extract tags from a table row
23320-
* @param {HTMLElement} row - Table row element
23326+
* @param {HTMLElement} row - Table row element
2332123327
* @return {string[]} Array of tag strings
2332223328
*/
2332323329
function extractRowTags(row) {
2332423330
const tags = [];
23325-
23331+
2332623332
// Look for various tag element patterns
2332723333
const tagSelectors = [
23328-
'span.inline-flex.items-center.px-2.py-0\\.5.rounded.text-xs.font-medium.bg-blue-100.text-blue-800',
23329-
'span.inline-block.bg-blue-100.text-blue-800.text-xs.px-2.py-1.rounded-full',
23330-
'span.inline-flex.items-center.px-2.py-1.rounded.text-xs.bg-gray-100.text-gray-700',
23331-
'span.inline-flex.items-center.px-2\\.5.py-0\\.5.rounded-full.text-xs.font-medium.bg-gray-100.text-gray-700',
23332-
'.bg-blue-100.text-blue-800', // Broader fallback
23334+
"span.inline-flex.items-center.px-2.py-0\\.5.rounded.text-xs.font-medium.bg-blue-100.text-blue-800",
23335+
"span.inline-block.bg-blue-100.text-blue-800.text-xs.px-2.py-1.rounded-full",
23336+
"span.inline-flex.items-center.px-2.py-1.rounded.text-xs.bg-gray-100.text-gray-700",
23337+
"span.inline-flex.items-center.px-2\\.5.py-0\\.5.rounded-full.text-xs.font-medium.bg-gray-100.text-gray-700",
23338+
".bg-blue-100.text-blue-800", // Broader fallback
2333323339
];
23334-
23335-
tagSelectors.forEach(selector => {
23340+
23341+
tagSelectors.forEach((selector) => {
2333623342
try {
2333723343
const elements = row.querySelectorAll(selector);
23338-
elements.forEach(el => {
23344+
elements.forEach((el) => {
2333923345
const tagText = el.textContent?.trim();
2334023346
if (tagText && !isStatusBadge(tagText)) {
2334123347
tags.push(tagText);
@@ -23345,7 +23351,7 @@ function extractRowTags(row) {
2334523351
// Ignore selector errors
2334623352
}
2334723353
});
23348-
23354+
2334923355
return [...new Set(tags)]; // Remove duplicates
2335023356
}
2335123357

0 commit comments

Comments
 (0)