Преглед на файлове

HUE-8480 [cluster] Provide a flag when we are in multi cluster mode

Romain Rigaux преди 7 години
родител
ревизия
a6262f2609
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      desktop/core/src/desktop/conf.py

+ 4 - 0
desktop/core/src/desktop/conf.py

@@ -1633,6 +1633,10 @@ def get_clusters(user):
   return OrderedDict(clusters)
   return OrderedDict(clusters)
 
 
 
 
+def has_multi_cluster():
+  return bool(CLUSTERS.get())
+
+
 CLUSTERS = UnspecifiedConfigSection(
 CLUSTERS = UnspecifiedConfigSection(
   "clusters",
   "clusters",
   help="One entry for each additional remote cluster Hue can interact with.",
   help="One entry for each additional remote cluster Hue can interact with.",