mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-05-22 17:05:00 -07: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
+10
-2
@@ -5,8 +5,16 @@ export const GRPC_API_ORIGIN = config.grpcApiOrigin;
|
||||
|
||||
export const getNetBirdUpCommand = () => {
|
||||
let cmd = "netbird up";
|
||||
if (!GRPC_API_ORIGIN) return cmd;
|
||||
cmd += " --management-url " + GRPC_API_ORIGIN;
|
||||
if (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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user