|
@@ -15,33 +15,29 @@
|
|
|
# See the License for the specific language governing permissions and
|
|
# See the License for the specific language governing permissions and
|
|
|
# limitations under the License.
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
-import sys
|
|
|
|
|
-
|
|
|
|
|
-from desktop.lib.conf import Config
|
|
|
|
|
-
|
|
|
|
|
-if sys.version_info[0] > 2:
|
|
|
|
|
- from django.utils.translation import gettext_lazy as _
|
|
|
|
|
-else:
|
|
|
|
|
- from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
|
|
+from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
|
|
|
|
+from desktop.lib.conf import Config, coerce_bool
|
|
|
|
|
|
|
|
ENABLE_NEW_CREATE_TABLE = Config(
|
|
ENABLE_NEW_CREATE_TABLE = Config(
|
|
|
key="enable_new_create_table",
|
|
key="enable_new_create_table",
|
|
|
help=_("Flag to turn on the new version of the create table wizard."),
|
|
help=_("Flag to turn on the new version of the create table wizard."),
|
|
|
- type=bool,
|
|
|
|
|
|
|
+ type=coerce_bool,
|
|
|
default=True
|
|
default=True
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
FORCE_HS2_METADATA = Config(
|
|
FORCE_HS2_METADATA = Config(
|
|
|
key="force_hs2_metadata",
|
|
key="force_hs2_metadata",
|
|
|
- help=_("Flag to force all metadata calls (e.g. list tables, table or column details...) to happen via HiveServer2 if available instead of Impala."),
|
|
|
|
|
- type=bool,
|
|
|
|
|
|
|
+ help=_(
|
|
|
|
|
+ "Flag to force all metadata calls (e.g. list tables, table or column details...) to happen via HS2 if available instead of Impala."
|
|
|
|
|
+ ),
|
|
|
|
|
+ type=coerce_bool,
|
|
|
default=False
|
|
default=False
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
SHOW_TABLE_ERD = Config(
|
|
SHOW_TABLE_ERD = Config(
|
|
|
key="show_table_erd",
|
|
key="show_table_erd",
|
|
|
default=False,
|
|
default=False,
|
|
|
- type=bool,
|
|
|
|
|
|
|
+ type=coerce_bool,
|
|
|
help=_('Choose whether to show the table ERD component.')
|
|
help=_('Choose whether to show the table ERD component.')
|
|
|
)
|
|
)
|