Skip to content

Commit 939e2ac

Browse files
fix event dest icons not loading when subpath is configured (#3169)
Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
1 parent a04955d commit 939e2ac

File tree

1 file changed

+14
-11
lines changed
  • portal-ui/src/screens/Console/EventDestinations

1 file changed

+14
-11
lines changed

portal-ui/src/screens/Console/EventDestinations/utils.ts

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export const notifyNats = "notify_nats";
2828
export const notifyElasticsearch = "notify_elasticsearch";
2929
export const notifyWebhooks = "notify_webhook";
3030
export const notifyNsq = "notify_nsq";
31-
3231
export const notificationTransform = (
3332
notificationElements: NotificationEndpointItem[],
3433
) => {
@@ -48,65 +47,69 @@ export class DestType {
4847
static Func: string = "functions";
4948
}
5049

50+
const getImgBaseURL = () => {
51+
return `${document.baseURI}`;
52+
};
53+
5154
export const destinationList = [
5255
{
5356
actionTrigger: notifyPostgres,
5457
targetTitle: "PostgreSQL",
55-
logo: "/postgres-logo.svg",
58+
logo: `${getImgBaseURL()}postgres-logo.svg`,
5659
category: DestType.DB,
5760
},
5861
{
5962
actionTrigger: notifyKafka,
6063
targetTitle: "Kafka",
61-
logo: "/kafka-logo.svg",
64+
logo: `${getImgBaseURL()}kafka-logo.svg`,
6265
category: DestType.Queue,
6366
},
6467
{
6568
actionTrigger: notifyAmqp,
6669
targetTitle: "AMQP",
67-
logo: "/amqp-logo.svg",
70+
logo: `${getImgBaseURL()}amqp-logo.svg`,
6871
category: DestType.Queue,
6972
},
7073
{
7174
actionTrigger: notifyMqtt,
7275
targetTitle: "MQTT",
73-
logo: "/mqtt-logo.svg",
76+
logo: `${getImgBaseURL()}mqtt-logo.svg`,
7477
category: DestType.Queue,
7578
},
7679
{
7780
actionTrigger: notifyRedis,
7881
targetTitle: "Redis",
79-
logo: "/redis-logo.svg",
82+
logo: `${getImgBaseURL()}redis-logo.svg`,
8083
category: DestType.Queue,
8184
},
8285
{
8386
actionTrigger: notifyNats,
8487
targetTitle: "NATS",
85-
logo: "/nats-logo.svg",
88+
logo: `${getImgBaseURL()}nats-logo.svg`,
8689
category: DestType.Queue,
8790
},
8891
{
8992
actionTrigger: notifyMysql,
9093
targetTitle: "Mysql",
91-
logo: "/mysql-logo.svg",
94+
logo: `${getImgBaseURL()}mysql-logo.svg`,
9295
category: DestType.DB,
9396
},
9497
{
9598
actionTrigger: notifyElasticsearch,
9699
targetTitle: "Elastic Search",
97-
logo: "/elasticsearch-logo.svg",
100+
logo: `${getImgBaseURL()}elasticsearch-logo.svg`,
98101
category: DestType.DB,
99102
},
100103
{
101104
actionTrigger: notifyWebhooks,
102105
targetTitle: "Webhook",
103-
logo: "/webhooks-logo.svg",
106+
logo: `${getImgBaseURL()}webhooks-logo.svg`,
104107
category: DestType.Func,
105108
},
106109
{
107110
actionTrigger: notifyNsq,
108111
targetTitle: "NSQ",
109-
logo: "/nsq-logo.svg",
112+
logo: `${getImgBaseURL()}nsq-logo.svg`,
110113
category: DestType.Queue,
111114
},
112115
];

0 commit comments

Comments
 (0)