disable offline instances
This commit is contained in:
parent
fc53c8e5f3
commit
ea03b4234d
2 changed files with 4 additions and 2 deletions
|
@ -421,10 +421,11 @@ if (datalist) {
|
||||||
instancein.value = json[0].name;
|
instancein.value = json[0].name;
|
||||||
}
|
}
|
||||||
for (const instance of json) {
|
for (const instance of json) {
|
||||||
if (instance.display === false || !instance.online) {
|
if (instance.display === false) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const option = document.createElement("option");
|
const option = document.createElement("option");
|
||||||
|
option.disabled = !instance.online;
|
||||||
option.value = instance.name;
|
option.value = instance.name;
|
||||||
if (instance.url) {
|
if (instance.url) {
|
||||||
stringURLMap.set(option.value, instance.url);
|
stringURLMap.set(option.value, instance.url);
|
||||||
|
|
|
@ -411,10 +411,11 @@ if(datalist){
|
||||||
instancein.value=json[0].name;
|
instancein.value=json[0].name;
|
||||||
}
|
}
|
||||||
for(const instance of json){
|
for(const instance of json){
|
||||||
if(instance.display===false||!instance.online){
|
if(instance.display===false){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const option=document.createElement("option");
|
const option=document.createElement("option");
|
||||||
|
option.disabled=!instance.online;
|
||||||
option.value=instance.name;
|
option.value=instance.name;
|
||||||
if(instance.url){
|
if(instance.url){
|
||||||
stringURLMap.set(option.value,instance.url);
|
stringURLMap.set(option.value,instance.url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue