(serverIcon)
| 243 | * Ref: web/pgadmin/browser/server_groups/servers/__init__.py:server_icon_and_background() |
| 244 | */ |
| 245 | export 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 | |
| 257 | export function titleize(i_str) { |
| 258 | if(i_str === '' || i_str === null) return i_str; |
no outgoing calls
no test coverage detected