MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getServerColors

Function getServerColors

web/pgadmin/static/js/utils.js:245–255  ·  view source on GitHub ↗
(serverIcon)

Source from the content-addressed store, hash-verified

243 * Ref: web/pgadmin/browser/server_groups/servers/__init__.py:server_icon_and_background()
244 */
245export function getServerColors(serverIcon) {
246 if (!serverIcon) {
247 return { bgcolor: null, fgcolor: null };
248 }
249
250 const parts = serverIcon.split(' ');
251 return {
252 bgcolor: parts[1] || null,
253 fgcolor: parts[2] || null,
254 };
255}
256
257export function titleize(i_str) {
258 if(i_str === '' || i_str === null) return i_str;

Callers 5

startGlobalDebuggerMethod · 0.90
openPsqlToolMethod · 0.90
showErdToolMethod · 0.90
launchMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected