Skip to content

Commit

Permalink
Calculate Kafka dev ui RPC path from current window, for custom http …
Browse files Browse the repository at this point in the history
…root path

Fixes quarkusio#30029
  • Loading branch information
ozangunalp committed Dec 22, 2022
1 parent 581cf99 commit 4e648a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export const api = '/q/dev/io.quarkus.quarkus-kafka-client/kafka-admin';
export const api = () => {
let path = window.location.pathname
return path.replace('/kafka-dev-ui', '/kafka-admin')
}
export const ui = 'kafka-ui';
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {api} from "../config.js"

export function doPost(data, successCallback, errorCallback) {
$.ajax({
url: api,
url: api(),
type: 'POST',
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
Expand Down

0 comments on commit 4e648a7

Please sign in to comment.