add graphics

This commit is contained in:
wh1te909 2021-04-11 06:50:16 +00:00
parent 298ca31332
commit 3dd2671380
4 changed files with 30 additions and 0 deletions

View File

@ -195,6 +195,21 @@ class Agent(BaseAuditModel):
except: except:
return ["unknown cpu model"] return ["unknown cpu model"]
@property
def graphics(self):
ret = []
try:
graphics = self.wmi_detail["graphics"]
for i in graphics:
caption = [x["Caption"] for x in i if "Caption" in x][0]
if "microsoft remote display adapter" in caption.lower():
continue
ret.append([x["Caption"] for x in i if "Caption" in x][0])
return ", ".join(ret)
except:
return "Graphics info requires agent v1.4.14"
@property @property
def local_ips(self): def local_ips(self):
ret = [] ret = []

View File

@ -16,6 +16,7 @@ class AgentSerializer(serializers.ModelSerializer):
local_ips = serializers.ReadOnlyField() local_ips = serializers.ReadOnlyField()
make_model = serializers.ReadOnlyField() make_model = serializers.ReadOnlyField()
physical_disks = serializers.ReadOnlyField() physical_disks = serializers.ReadOnlyField()
graphics = serializers.ReadOnlyField()
checks = serializers.ReadOnlyField() checks = serializers.ReadOnlyField()
timezone = serializers.ReadOnlyField() timezone = serializers.ReadOnlyField()
all_timezones = serializers.SerializerMethodField() all_timezones = serializers.SerializerMethodField()

View File

@ -23,6 +23,7 @@
<q-tab name="base_board" label="Motherboard" /> <q-tab name="base_board" label="Motherboard" />
<q-tab name="comp_sys_prod" label="Computer System Product" /> <q-tab name="comp_sys_prod" label="Computer System Product" />
<q-tab name="network_config" label="Network Config" /> <q-tab name="network_config" label="Network Config" />
<q-tab name="graphics" label="Graphics" />
<q-tab name="desktop_monitor" label="Monitors" /> <q-tab name="desktop_monitor" label="Monitors" />
<q-tab name="network_adapter" label="Network Adapters" /> <q-tab name="network_adapter" label="Network Adapters" />
</q-tabs> </q-tabs>
@ -63,6 +64,9 @@
<q-tab-panel name="desktop_monitor"> <q-tab-panel name="desktop_monitor">
<WmiDetail :info="desktop_monitor" /> <WmiDetail :info="desktop_monitor" />
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="graphics">
<WmiDetail :info="graphics" />
</q-tab-panel>
<q-tab-panel name="network_adapter"> <q-tab-panel name="network_adapter">
<WmiDetail :info="network_adapter" /> <WmiDetail :info="network_adapter" />
</q-tab-panel> </q-tab-panel>
@ -125,6 +129,9 @@ export default {
network_adapter() { network_adapter() {
return this.assets.network_adapter; return this.assets.network_adapter;
}, },
graphics() {
return this.assets.graphics;
},
}, },
}; };
</script> </script>

View File

@ -39,6 +39,13 @@
</q-item-section> </q-item-section>
<q-item-section>{{ disk }}</q-item-section> <q-item-section>{{ disk }}</q-item-section>
</q-item> </q-item>
<!-- graphics -->
<q-item>
<q-item-section avatar>
<q-icon name="fas fa-tv" />
</q-item-section>
<q-item-section>{{ summary.graphics }}</q-item-section>
</q-item>
<q-item> <q-item>
<q-item-section avatar> <q-item-section avatar>
<q-icon name="fas fa-globe-americas" /> <q-icon name="fas fa-globe-americas" />