new icons

This commit is contained in:
wh1te909 2019-12-01 00:17:06 +00:00
parent d4e53cda7c
commit 499ca032c9
2 changed files with 54 additions and 39 deletions

View File

@ -1,7 +1,42 @@
<template> <template>
<div class="q-pa-sm"> <div class="q-pa-sm">
<q-table dense class="agents-tbl-sticky" :data="filter" :columns="columns" <q-table
row-key="id" binary-state-sort :pagination.sync="pagination" hide-bottom> dense
class="agents-tbl-sticky"
:data="filter"
:columns="columns"
row-key="id"
binary-state-sort
:pagination.sync="pagination"
hide-bottom
>
<!-- header slots -->
<template v-slot:header-cell-smsalert="props">
<q-th auto-width :props="props">
<q-icon name="phone_android" size="1.5em"><q-tooltip>SMS Alert</q-tooltip></q-icon>
</q-th>
</template>
<template v-slot:header-cell-emailalert="props">
<q-th auto-width :props="props">
<q-icon name="email" size="1.5em"><q-tooltip>Email Alert</q-tooltip></q-icon>
</q-th>
</template>
<template v-slot:header-cell-patchespending="props">
<q-th auto-width :props="props">
<q-icon name="system_update_alt" size="1.5em" color="warning"><q-tooltip>Patches Pending</q-tooltip></q-icon>
</q-th>
</template>
<template v-slot:header-cell-antivirus="props">
<q-th auto-width :props="props">
<q-icon name="fas fa-shield-alt" size="1.2em" color="primary"><q-tooltip>Anti Virus</q-tooltip></q-icon>
</q-th>
</template>
<template v-slot:header-cell-agentstatus="props">
<q-th auto-width :props="props">
<q-icon name="fas fa-signal" size="1.2em" color="accent"><q-tooltip>Agent Status</q-tooltip></q-icon>
</q-th>
</template>
<!-- body slots -->
<template slot="body" slot-scope="props" :props="props"> <template slot="body" slot-scope="props" :props="props">
<q-tr <q-tr
@contextmenu.native="agentRowSelected(props.row.id, props.row.agent_id)" @contextmenu.native="agentRowSelected(props.row.id, props.row.agent_id)"
@ -123,17 +158,19 @@
<q-td key="hostname" :props="props">{{ props.row.hostname }}</q-td> <q-td key="hostname" :props="props">{{ props.row.hostname }}</q-td>
<q-td key="description" :props="props">{{ props.row.description }}</q-td> <q-td key="description" :props="props">{{ props.row.description }}</q-td>
<q-td key="patches_pending"> <q-td key="patchespending">
<q-icon name="fas fa-power-off" color="blue"> <q-icon name="fas fa-power-off" color="primary" />
<q-tooltip>Patches Pending</q-tooltip>
</q-icon>
</q-td> </q-td>
<q-td key="take_control"> <q-td :props="props" key="antivirus">
<q-icon name="fas fa-check" color="green"> <q-icon v-if="props.row.antivirus !== 'n/a' && props.row.antivirus === 'windowsdefender'" name="fas fa-exclamation" color="warning">
<q-tooltip>Take Control</q-tooltip> <q-tooltip>{{ props.row.antivirus }}</q-tooltip>
</q-icon> </q-icon>
<q-icon v-else-if="props.row.antivirus !== 'n/a'" name="fas fa-check" color="positive">
<q-tooltip>{{ props.row.antivirus }}</q-tooltip>
</q-icon>
<q-icon v-else name="fas fa-times-circle" color="negative" />
</q-td> </q-td>
<q-td key="agent_status"> <q-td key="agentstatus">
<q-icon v-if="props.row.status ==='overdue'" name="fas fa-exclamation-triangle" color="negative"> <q-icon v-if="props.row.status ==='overdue'" name="fas fa-exclamation-triangle" color="negative">
<q-tooltip>Agent overdue</q-tooltip> <q-tooltip>Agent overdue</q-tooltip>
</q-icon> </q-icon>

View File

@ -110,17 +110,16 @@ export default {
columns: [ columns: [
{ {
name: "smsalert", name: "smsalert",
classes: "sms-alert",
style: "opacity: 1",
align: "left" align: "left"
}, },
{ {
name: "emailalert", name: "emailalert",
classes: "email-alert",
style: "opacity: 1",
align: "left" align: "left"
}, },
{ name: "platform", align: "left" }, {
name: "platform",
align: "left"
},
{ {
name: "client", name: "client",
label: "Client", label: "Client",
@ -150,19 +149,15 @@ export default {
align: "left" align: "left"
}, },
{ {
name: "patches_pending", name: "patchespending",
classes: "patches-pending",
style: "opacity: 1",
align: "left" align: "left"
}, },
{ {
name: "take_control", name: "antivirus",
classes: "take-control",
style: "opacity: 1",
align: "left" align: "left"
}, },
{ {
name: "agent_status", name: "agentstatus",
field: "status", field: "status",
align: "left" align: "left"
}, },
@ -273,21 +268,4 @@ export default {
color: white; color: white;
background: lightgray; background: lightgray;
} }
.email-alert {
background: url("../assets/email-alert.png") no-repeat center;
width: 16px;
}
.sms-alert {
background: url("../assets/sms-alert.png") no-repeat center;
width: 16px;
}
.patches-pending {
background: url("../assets/patches-pending.png") no-repeat center;
width: 16px;
}
.take-control {
background: url("../assets/take-control.png") no-repeat center;
width: 16px;
}
</style> </style>