Lish now uses API slug names
This commit is contained in:
parent
ac999c9704
commit
bd9a85a068
@ -44,24 +44,6 @@ import { settings, elements, apiGet, parseParams, setupHeader } from "/global.js
|
|||||||
data.linode = {};
|
data.linode = {};
|
||||||
data.netInfo = {};
|
data.netInfo = {};
|
||||||
|
|
||||||
// LISH uses different DC names than the API uses, so we need to translate them
|
|
||||||
data.lishDCs = {
|
|
||||||
"us-central": "dallas",
|
|
||||||
"us-west": "fremont",
|
|
||||||
"us-southeast": "atlanta",
|
|
||||||
"us-east": "newark",
|
|
||||||
"us-east-1b": "cjj2",
|
|
||||||
"eu-west": "london",
|
|
||||||
"ap-south": "singapore",
|
|
||||||
"eu-central": "frankfurt",
|
|
||||||
"ap-northeast": "shg1",
|
|
||||||
"ap-northeast-1a": "shg1",
|
|
||||||
"ca-central": "tor1",
|
|
||||||
"ap-west": "mum1",
|
|
||||||
"ap-southeast": "syd1",
|
|
||||||
"philadelphia": "phl1"
|
|
||||||
};
|
|
||||||
|
|
||||||
// Static references to UI elements
|
// Static references to UI elements
|
||||||
var ui = {};
|
var ui = {};
|
||||||
ui.ipFailover = {};
|
ui.ipFailover = {};
|
||||||
@ -113,8 +95,8 @@ import { settings, elements, apiGet, parseParams, setupHeader } from "/global.js
|
|||||||
apiGet("/regions/" + data.linode.region, displayResolvers, null);
|
apiGet("/regions/" + data.linode.region, displayResolvers, null);
|
||||||
|
|
||||||
// Update the LISH link
|
// Update the LISH link
|
||||||
ui.lishLink.href = ui.lishLink.href.replace("lish-", "lish-" + data.lishDCs[data.linode.region]);
|
ui.lishLink.href = ui.lishLink.href.replace("lish-", "lish-" + data.linode.region);
|
||||||
ui.lishLink.innerHTML = ui.lishLink.innerHTML.replace("lish-", "lish-" + data.lishDCs[data.linode.region]);
|
ui.lishLink.innerHTML = ui.lishLink.innerHTML.replace("lish-", "lish-" + data.linode.region);
|
||||||
ui.lishLink.innerHTML += " " + data.linode.label;
|
ui.lishLink.innerHTML += " " + data.linode.label;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user