Copy to clipboard button to include title

On the Event Log page, copy button previously copied error only.
Updates to also include title of event.

Resolves openbmc/openbmc#3146

Tested: The copy button now copies the title in
        addition to the error to the clipboard.

Change-Id: I9580a620046203cdcb2025d0ea1cf0030e0851cb
Signed-off-by: beccabroek <rebecca.shaw@ibm.com>
diff --git a/app/common/directives/log-event.html b/app/common/directives/log-event.html
index 6d715a1..69f86d3 100644
--- a/app/common/directives/log-event.html
+++ b/app/common/directives/log-event.html
@@ -40,7 +40,7 @@
              </div>
              <div>
                  <div class="event__actions">
-                     <button class="btn-meta-copy" clipboard text="event.additional_data" on-copied="copySuccess(event)" on-error="copyfailed(err)">
+                     <button class="btn-meta-copy" clipboard text="copyText(event)" on-copied="copySuccess(event)" on-error="copyfailed(err)">
                         <img class="event__icon" src="../../assets/images/icon-copy.svg" alt=""/><span ng-if="!event.copied">Copy</span><span ng-if="event.copied">Copied</span>
                      </button>
                      <button
diff --git a/app/common/directives/log-event.js b/app/common/directives/log-event.js
index 29abcb9..cf8c41b 100644
--- a/app/common/directives/log-event.js
+++ b/app/common/directives/log-event.js
@@ -51,6 +51,9 @@
               }
               return data;
             };
+            $scope.copyText = function(event) {
+              return event.description + ' ' + event.additional_data;
+            }
           }
         ]
       };