mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 16:50:46 +08:00
Reverts - DEV: maxmind license checking failing tests #24534 - UX: Show if MaxMind key is missing on IP lookup #18993 These changes are leading to surprising results, our logs are now filling up with warnings on dev environments We need the change to be redone
114 lines
No EOL
3.5 KiB
Handlebars
114 lines
No EOL
3.5 KiB
Handlebars
{{#if this.ip}}
|
|
<DButton
|
|
@action={{this.lookup}}
|
|
@icon="globe"
|
|
@label="admin.user.ip_lookup"
|
|
class="btn-default"
|
|
/>
|
|
{{/if}}
|
|
{{#if this.show}}
|
|
<div class="location-box">
|
|
<a href class="close pull-right" {{on "click" this.hide}}>{{d-icon
|
|
"times"
|
|
}}</a>
|
|
{{#if this.copied}}
|
|
<DButton
|
|
@icon="copy"
|
|
@label="ip_lookup.copied"
|
|
class="btn-hover pull-right"
|
|
/>
|
|
{{else}}
|
|
<DButton @action={{this.copy}} @icon="copy" class="pull-right no-text" />
|
|
{{/if}}
|
|
<h4>{{i18n "ip_lookup.title"}}</h4>
|
|
<p class="powered-by">{{html-safe (i18n "ip_lookup.powered_by")}}</p>
|
|
<dl>
|
|
{{#if this.location}}
|
|
{{#if this.location.hostname}}
|
|
<dt>{{i18n "ip_lookup.hostname"}}</dt>
|
|
<dd>{{this.location.hostname}}</dd>
|
|
{{/if}}
|
|
|
|
<dt>{{i18n "ip_lookup.location"}}</dt>
|
|
<dd>
|
|
{{#if this.location.location}}
|
|
<a
|
|
href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}"
|
|
rel="noopener noreferrer"
|
|
target="_blank"
|
|
>
|
|
{{this.location.location}}
|
|
</a>
|
|
{{else}}
|
|
{{i18n "ip_lookup.location_not_found"}}
|
|
{{/if}}
|
|
</dd>
|
|
|
|
{{#if this.location.organization}}
|
|
<dt>{{i18n "ip_lookup.organisation"}}</dt>
|
|
<dd>{{this.location.organization}}</dd>
|
|
{{/if}}
|
|
{{else}}
|
|
{{loading-spinner size="small"}}
|
|
{{/if}}
|
|
|
|
<dt>
|
|
{{i18n "ip_lookup.other_accounts"}}
|
|
<strong>{{this.totalOthersWithSameIP}}</strong>
|
|
{{#if this.other_accounts.length}}
|
|
<DButton
|
|
@action={{this.deleteOtherAccounts}}
|
|
@icon="exclamation-triangle"
|
|
@translatedLabel={{i18n
|
|
"ip_lookup.delete_other_accounts"
|
|
count=this.otherAccountsToDelete
|
|
}}
|
|
class="btn-danger pull-right"
|
|
/>
|
|
{{/if}}
|
|
</dt>
|
|
|
|
<ConditionalLoadingSpinner
|
|
@size="small"
|
|
@condition={{this.otherAccountsLoading}}
|
|
>
|
|
{{#if this.other_accounts.length}}
|
|
<dd class="other-accounts">
|
|
<table class="table table-condensed table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>{{i18n "ip_lookup.username"}}</th>
|
|
<th>{{i18n "ip_lookup.trust_level"}}</th>
|
|
<th>{{i18n "ip_lookup.read_time"}}</th>
|
|
<th>{{i18n "ip_lookup.topics_entered"}}</th>
|
|
<th>{{i18n "ip_lookup.post_count"}}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{#each this.other_accounts as |a|}}
|
|
<tr>
|
|
<td>
|
|
<LinkTo @route="adminUser" @model={{a}}>
|
|
{{avatar
|
|
a
|
|
usernamePath="user.username"
|
|
imageSize="small"
|
|
}}
|
|
|
|
<span>{{a.username}}</span>
|
|
</LinkTo>
|
|
</td>
|
|
<td>{{a.trustLevel.id}}</td>
|
|
<td>{{a.time_read}}</td>
|
|
<td>{{a.topics_entered}}</td>
|
|
<td>{{a.post_count}}</td>
|
|
</tr>
|
|
{{/each}}
|
|
</tbody>
|
|
</table>
|
|
</dd>
|
|
{{/if}}
|
|
</ConditionalLoadingSpinner>
|
|
</dl>
|
|
</div>
|
|
{{/if}} |