From 25d2b927e67e57e88ad8d231780ed63f9afd0db7 Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 19 Sep 2017 14:55:24 +0200 Subject: [PATCH] #32 Update attribute description --- .../models/AttachmentAttributeFormat.scala | 10 +++++----- .../elastic4play/models/CustomAttributeFormat.scala | 2 +- .../elastic4play/models/MetricsAttributeFormat.scala | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/org/elastic4play/models/AttachmentAttributeFormat.scala b/app/org/elastic4play/models/AttachmentAttributeFormat.scala index c7c363c..a7a95f3 100644 --- a/app/org/elastic4play/models/AttachmentAttributeFormat.scala +++ b/app/org/elastic4play/models/AttachmentAttributeFormat.scala @@ -61,11 +61,11 @@ object AttachmentAttributeFormat extends AttributeFormat[Attachment]("attachment override def definition(dblists: DBLists, attribute: Attribute[Attachment]): Seq[AttributeDefinition] = Seq( AttributeDefinition( - s"${attribute.name}.name", - "string", - s"file name of ${attribute.description}", - Nil, - Nil), + s"${attribute.name}.name", + "string", + s"file name of ${attribute.description}", + Nil, + Nil), AttributeDefinition( s"${attribute.name}.hash", "hash", diff --git a/app/org/elastic4play/models/CustomAttributeFormat.scala b/app/org/elastic4play/models/CustomAttributeFormat.scala index cbeda7e..d393a53 100644 --- a/app/org/elastic4play/models/CustomAttributeFormat.scala +++ b/app/org/elastic4play/models/CustomAttributeFormat.scala @@ -82,7 +82,7 @@ class CustomAttributeFormat extends AttributeFormat[JsValue]("custom") { } yield AttributeDefinition( s"${attribute.name}.$fieldName", tpe, - s"custom field: $description", + description, options, Nil) } diff --git a/app/org/elastic4play/models/MetricsAttributeFormat.scala b/app/org/elastic4play/models/MetricsAttributeFormat.scala index d65c664..6c934bc 100644 --- a/app/org/elastic4play/models/MetricsAttributeFormat.scala +++ b/app/org/elastic4play/models/MetricsAttributeFormat.scala @@ -40,11 +40,11 @@ class MetricsAttributeFormat extends AttributeFormat[JsValue]("metrics") { val itemObj = item.mapTo[JsObject] for { fieldName ← (itemObj \ "name").asOpt[String] - title ← (itemObj \ "title").asOpt[String] + description ← (itemObj \ "description").asOpt[String] } yield AttributeDefinition( s"${attribute.name}.$fieldName", "number", - s"metric: $title", + description, Nil, Nil) }