Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/undo-ransomware/ransomware_detection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/Recover.vue')
-rw-r--r--src/views/Recover.vue64
1 files changed, 56 insertions, 8 deletions
diff --git a/src/views/Recover.vue b/src/views/Recover.vue
index 75b0599..776a6eb 100644
--- a/src/views/Recover.vue
+++ b/src/views/Recover.vue
@@ -14,7 +14,38 @@
<Header :header="'Detection ' + detection.id">
<RecoverAction id="recover" label="Recover detected files" v-on:recover="onRecover(detection.id)" primary></RecoverAction>
</Header>
- <FileOperationsTable :selectable="false" :ref="'detection' + detection.id" class="ransomware-table" :data="detection.fileOperations" v-on:table-state-changed="tableStateChanged"></FileOperationsTable>
+ <v-data-table
+ :ref="'detection' + detection.id"
+ class="ransomware-table"
+ :headers="headers"
+ :items="detection.fileOperations"
+ hide-default-footer
+ >
+ <template v-slot:item.timestamp = "{ item }">
+ <local-time>{{ moment(item.timestamp) }}</local-time>
+ </template>
+ <template v-slot:item.suspicionClass = "{ item }">
+ <iron-icon v-if="item.suspicionClass > 1" style="color: #ED0012;" icon="ransomware:locked"></iron-icon>
+ <iron-icon v-if="item.suspicionClass == 1 && item.type == 'folder'" style="color: #7ED221;" icon="folder"></iron-icon>
+ <iron-icon v-if="item.suspicionClass == 1 && item.type == 'file'" style="color: #7ED221;" icon="editor:insert-drive-file"></iron-icon>
+ <iron-icon v-if="item.suspicionClass < 1 && item.type == 'folder'" style="color: #9B9A9B;" icon="folder"></iron-icon>
+ <iron-icon v-if="item.suspicionClass < 1 && item.type == 'file'" style="color: #9B9A9B;" icon="editor:insert-drive-file"></iron-icon>
+ </template>
+ <template v-slot:item.command = "{ item }">
+ <span v-if="item.command == 1 && item.type == 'file'">File deleted</span>
+ <span v-if="item.command == 1 && item.type == 'folder'">Folder deleted</span>
+ <span v-if="item.command == 2 && item.type == 'file'">File renamed</span>
+ <span v-if="item.command == 2 && item.type == 'folder'">Folder renamed</span>
+ <span v-if="item.command == 3 && item.type == 'file'">File written</span>
+ <span v-if="item.command == 3 && item.type == 'folder'">Folder written</span>
+ <span v-if="item.command == 4 && item.type == 'file'">File read</span>
+ <span v-if="item.command == 4 && item.type == 'folder'">Folder read</span>
+ <span v-if="item.command == 5 && item.type == 'file'">File created</span>
+ <span v-if="item.command == 5 && item.type == 'folder'">Folder created</span>
+ <span v-if="item.command > 5 && item.command < 1 && item.type == 'file'">No information</span>
+ <span v-if="item.command > 5 && item.command < 1 && item.type == 'folder'">No information</span>
+ </template>
+ </v-data-table>
</div>
</div>
<span id="message" v-if="!detected">
@@ -31,7 +62,10 @@ import '@polymer/paper-spinner/paper-spinner.js';
import '@polymer/iron-pages/iron-pages.js';
import '@polymer/iron-icon/iron-icon.js';
import '@polymer/iron-icons/iron-icons.js';
-import FileOperationsTable from '../components/FileOperationsTable'
+import '@polymer/iron-icons/editor-icons.js';
+import '../webcomponents/ransomware-icons'
+import 'time-elements/dist/time-elements';
+import moment from 'moment'
import Notification from '../components/Notification'
import Header from '../components/Header'
import RecoverAction from '../components/RecoverAction'
@@ -41,7 +75,6 @@ export default {
name: 'Recover',
components: {
AppContent,
- FileOperationsTable,
Header,
RecoverAction,
Notification
@@ -52,7 +85,18 @@ export default {
detections: [],
page: 0,
visible: false,
- notificationText: ""
+ notificationText: "",
+ headers: [
+ {
+ text: 'Status',
+ align: 'start',
+ sortable: false,
+ value: 'suspicionClass',
+ },
+ { text: 'Operation', value: 'command' },
+ { text: 'Name', value: 'originalName' },
+ { text: 'File Changed', value: 'timestamp' },
+ ],
};
},
mounted() {
@@ -99,9 +143,6 @@ export default {
})
.catch( error => { console.error(error); });
},
- tableStateChanged() {
- this.page = 1;
- },
fetchDetections() {
this.$axios({
method: 'GET',
@@ -109,6 +150,7 @@ export default {
})
.then(json => {
this.detections = json.data;
+ this.page = 1;
})
.catch( error => { console.error(error); });
},
@@ -153,6 +195,12 @@ export default {
.catch(error => {
console.error(error);
});
+ },
+ moment: function (date) {
+ return moment.unix(date).format('dddd, MMMM Do YYYY, HH:mm:ss')
+ },
+ datetime: function(date) {
+ return moment.unix(rowData.item.timestamp).format("YYYY-MM-DDTHH:mm:ss.SSS")
}
},
computed: {
@@ -169,7 +217,7 @@ export default {
}
</script>
-<style lang="scss" scoped>
+<style lang="scss">
#tables {
height: calc(100% - 50px);
}