Update name of sensors export file

- Now the name of exported sensors file will be combination of date
  and sensors as prefix.

Signed-off-by: Suren Neware <sneware9@in.ibm.com>
Change-Id: Ie30a1b5e61ad47bc2e78f173945b54ed73a873a5
diff --git a/src/views/Health/Sensors/Sensors.vue b/src/views/Health/Sensors/Sensors.vue
index 20a3229..7f25025 100644
--- a/src/views/Health/Sensors/Sensors.vue
+++ b/src/views/Health/Sensors/Sensors.vue
@@ -29,7 +29,7 @@
           <template v-slot:export>
             <table-toolbar-export
               :data="selectedRows"
-              :file-name="$t('appPageTitle.sensors')"
+              :file-name="exportFileNameByDate()"
             />
           </template>
         </table-toolbar>
@@ -219,6 +219,22 @@
     },
     onFiltered(filteredItems) {
       this.searchTotalFilteredRows = filteredItems.length;
+    },
+    onChangeSearchInput(event) {
+      this.searchFilter = event;
+    },
+    exportFileNameByDate() {
+      // Create export file name based on date
+      let date = new Date();
+      date =
+        date.toISOString().slice(0, 10) +
+        '_' +
+        date
+          .toString()
+          .split(':')
+          .join('-')
+          .split(' ')[4];
+      return this.$t('pageSensors.exportFilePrefix') + date;
     }
   }
 };