mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-01-26 01:21:04 +00:00
Add admin-url to the add-peer dialogue (#416)
* Add admin-url to the add-peer dialogue * Missed "let" from defining the variable * Update netbird.ts Fix isNetBirdHosted check --------- Co-authored-by: Eduard Gert <eduard@netbird.io>
This commit is contained in:
committed by
GitHub
parent
76ef50a886
commit
a0c4520f4b
@@ -5,8 +5,16 @@ export const GRPC_API_ORIGIN = config.grpcApiOrigin;
|
|||||||
|
|
||||||
export const getNetBirdUpCommand = () => {
|
export const getNetBirdUpCommand = () => {
|
||||||
let cmd = "netbird up";
|
let cmd = "netbird up";
|
||||||
if (!GRPC_API_ORIGIN) return cmd;
|
if (GRPC_API_ORIGIN) {
|
||||||
cmd += " --management-url " + GRPC_API_ORIGIN;
|
cmd += " --management-url " + GRPC_API_ORIGIN
|
||||||
|
}
|
||||||
|
if (!isNetBirdHosted()) {
|
||||||
|
let admin_url = window.location.protocol + "://" + window.location.hostname
|
||||||
|
if (window.location.port != "") {
|
||||||
|
admin_url += ":" + window.location.port
|
||||||
|
}
|
||||||
|
cmd += " --admin-url " + admin_url
|
||||||
|
};
|
||||||
return cmd;
|
return cmd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user