浏览代码

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

Romain Rigaux 7 年之前
父节点
当前提交
a6262f2
共有 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)
 
 
+def has_multi_cluster():
+  return bool(CLUSTERS.get())
+
+
 CLUSTERS = UnspecifiedConfigSection(
   "clusters",
   help="One entry for each additional remote cluster Hue can interact with.",