From 2c4396882e335179248fd05162a4d030cc0f98e8 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Fri, 12 Feb 2016 00:01:25 -0800 Subject: [PATCH] More verbose druid metadata refresh --- panoramix/models.py | 3 +++ panoramix/views.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/panoramix/models.py b/panoramix/models.py index 46da8e732bd47..a2b3a4f6c5ab5 100644 --- a/panoramix/models.py +++ b/panoramix/models.py @@ -867,6 +867,9 @@ def sync_to_db(cls, name, cluster): if not datasource: datasource = cls(datasource_name=name) session.add(datasource) + flash("Adding new datasource [{}]".format(name), "success") + else: + flash("Refreshing datasource [{}]".format(name), "info") datasource.cluster = cluster cols = datasource.latest_metadata() diff --git a/panoramix/views.py b/panoramix/views.py index f39d9f94d86b4..52a5fa43579a8 100644 --- a/panoramix/views.py +++ b/panoramix/views.py @@ -659,7 +659,7 @@ def refresh_datasources(self): except Exception as e: flash( "Error while processing cluster '{}'".format(cluster), - "alert") + "danger") return redirect('/druidclustermodelview/list/') cluster.metadata_last_refreshed = datetime.now() flash(