mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-08 03:37:12 -04:00
Match Kiwix JS coding for API panel
Former-commit-id: 77d4b0aac60bae01e768d6df4fdfa3c5f798c08b
This commit is contained in:
parent
3f7c059774
commit
a2bc2a7516
@ -837,7 +837,7 @@ define(rqDef, function(util) {
|
||||
params.decompressorAPI.assemblerMachineType = assemblerMachineType;
|
||||
params.decompressorAPI.errorStatus = 'Error loading ' + decoderType + ' decompressor!';
|
||||
var decompAPI = document.getElementById('decompressorAPIStatus');
|
||||
decompAPI.innerHTML = 'Decompressor API: ' + params.decompressorAPI.errorStatus;
|
||||
decompAPI.textContent = 'Decompressor API: ' + params.decompressorAPI.errorStatus;
|
||||
decompAPI.className = 'apiBroken';
|
||||
document.getElementById('apiStatusDiv').className = 'panel panel-danger';
|
||||
}
|
||||
@ -845,9 +845,11 @@ define(rqDef, function(util) {
|
||||
// Reports the search provider to the API Status Panel
|
||||
function reportSearchProviderToAPIStatusPanel(provider) {
|
||||
var providerAPI = document.getElementById('searchProviderStatus');
|
||||
providerAPI.innerHTML = 'Search Provider: ' + (/^fulltext/.test(provider) ? 'Title + Xapian [' + provider + ']' :
|
||||
/^title/.test(provider) ? 'Title only [' + provider + ']' : 'Not initialized');
|
||||
providerAPI.className = /^fulltext/.test(provider) ? 'apiAvailable' : !/ERROR/.test(provider) ? 'apiUnavailable' : 'apiBroken';
|
||||
if (providerAPI) { // NB we need this so that tests don't fail
|
||||
providerAPI.textContent = 'Search Provider: ' + (/^fulltext/.test(provider) ? 'Title + Xapian [' + provider + ']' :
|
||||
/^title/.test(provider) ? 'Title only [' + provider + ']' : 'Not initialized');
|
||||
providerAPI.className = /^fulltext/.test(provider) ? 'apiAvailable' : !/ERROR/.test(provider) ? 'apiUnavailable' : 'apiBroken';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user