hide asu feature when not enabled
authorMoritz Warning <moritzwarning@web.de>
Tue, 18 Feb 2020 23:21:16 +0000 (00:21 +0100)
committerMoritz Warning <moritzwarning@web.de>
Tue, 18 Feb 2020 23:21:16 +0000 (00:21 +0100)
but enable by default for this branch for development

config.js
index.html
index.js

index 63bfb0983bb85e585c87793fd4c43d2e5a2e5c47..51cc438d96ffd57ecce9e1fe57fd13afa0020342 100644 (file)
--- a/config.js
+++ b/config.js
@@ -12,5 +12,5 @@ var config = {
     '18.06.7': 'names-18.06.7.json'
   },
   // Build custom images (Attented Sysupgrade server)
-  //asu_url: '/api/build'
+  asu_url: '/api/build'
 };
index a2f1d4aa91c553aefb1620b2aa7c4cc0ce9f72bb..f47332d4fa81b9d9f7f46cfd1be24ad77ce10765 100644 (file)
                        <input id="models" type="text" placeholder="Model">
                </div>
 
-               <div id="custom">
+               <div id="custom" style="display:none">
                        <textarea id="packages">luci</textarea>
                        <a href="javascript:build_request()">request image</a>
-               </div>
-               <div style="display:none" id="loading">
-                       <img src="loading.gif" alt="Logo">
+                       <img src="loading.gif" style="display:none" id="loading" alt="Logo">
                </div>
 
                <br />
index d31ee94d53a115cd7e44d19a5a3a569996ff7507..ef07bfe9d918174faaab8237dbeb02a4212ead90 100644 (file)
--- a/index.js
+++ b/index.js
@@ -385,6 +385,10 @@ function updateImages(version, commit, model, url, mobj) {
 updateImages();
 changeLanguage(config.language);
 
+if (config.asu_url) {
+       $('custom').style.display = 'block';
+}
+
 setupSelectList($("releases"), Object.keys(config.versions), function(version) {
   loadFile(config.versions[version], function(obj) {
     data = obj