Skip to content
Snippets Groups Projects
Commit 08da3057 authored by Allen Gilliland's avatar Allen Gilliland
Browse files

capture name/description/engine from databases at event time and use that for...

capture name/description/engine from databases at event time and use that for our activity feed rendering.
parent 6ae9b5d0
No related branches found
No related tags found
No related merge requests found
......@@ -137,8 +137,12 @@ export default class Activity extends Component {
description.bodyLink = Urls.card(item.details.dashcards[0].card_id);
break;
case "database-sync":
// NOTE: this is a relic from the very early days of the activity feed when we accidentally didn't
// capture the name/description/engine of a Database properly in the details and so it was
// possible for a database to be deleted and we'd lose any way of knowing what it's name was :(
const oldName = (item.database && 'name' in item.database) ? item.database.name : "Unknown";
description.subject = "received the latest data from";
description.subjectRefName = item.database.name;
description.subjectRefName = (item.details.name) ? item.details.name : oldName;
break;
case "install":
description.userName = "Hello World!";
......
......@@ -81,6 +81,7 @@
(defn- process-database-activity [topic object]
(let [database (db/sel :one Database :id (events/object->model-id topic object))
object (merge object (select-keys database [:name :description :engine]))
database-details-fn (fn [obj] (-> obj
(assoc :status "started")
(dissoc :database_id :custom_id)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment