diff --git a/net/haproxy/src/opnsense/mvc/app/views/OPNsense/HAProxy/export.volt b/net/haproxy/src/opnsense/mvc/app/views/OPNsense/HAProxy/export.volt
index 160d93df9..19c31de7a 100644
--- a/net/haproxy/src/opnsense/mvc/app/views/OPNsense/HAProxy/export.volt
+++ b/net/haproxy/src/opnsense/mvc/app/views/OPNsense/HAProxy/export.volt
@@ -34,7 +34,13 @@ POSSIBILITY OF SUCH DAMAGE.
*/
function update_showconf() {
ajaxCall(url="/api/haproxy/export/config/", sendData={}, callback=function(data,status) {
- $("#showconf").text(data['response']);
+ if (data['response'] && data['response'].trim()) {
+ $("#showconf").text(data['response']);
+ } else {
+ conf_help = "
{{ lang._('Config file not found. Run a syntax check to create it.') }}
";
+ $("#showconfempty").append(conf_help);
+ $("#showconf").hide();
+ }
});
}
update_showconf();
@@ -116,6 +122,7 @@ POSSIBILITY OF SUCH DAMAGE.