Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dinger1986 add ip info #24

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 25 additions & 4 deletions src/components/agents/SummaryTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,25 @@
</q-item>
<q-item>
<q-item-section avatar>
<q-icon name="fas fa-globe-americas" />
<q-icon name="fas fa-globe-americas" />
</q-item-section>
<q-item-section>Public IP: {{ summary.public_ip }}</q-item-section>
</q-item>
<q-item-section>
Public IP: {{ summary.public_ip }}
</q-item-section>
<q-item-section side top>
<q-btn
round
dense
flat
size="sm"
icon="info"
@click="openURL(`https://ipapi.co/${summary.public_ip}/`)"
>
<q-tooltip>Get Info on IP</q-tooltip>
</q-btn>
</q-item-section>
</q-item>

<q-item>
<q-item-section avatar>
<q-icon name="fas fa-network-wired" />
Expand Down Expand Up @@ -305,6 +320,11 @@ export default {
return ret;
});

// Define the openURL method within setup
const openURL = (url) => {
window.open(url, '_blank');
};

const customFields = computed(() => {
if (!summary.value.custom_fields) {
return [];
Expand Down Expand Up @@ -386,7 +406,8 @@ export default {
serial_number,
cpu,
store,

openURL,

// methods
getSummary,
refreshSummary,
Expand Down
Loading