{{ $t('remove-all-following') }}
{{ $t('remove-all-following-info', { host: instance.host }) }}
@@ -64,6 +65,11 @@
+
+ {{ $t('state') }}
+
+
+
@@ -84,6 +90,8 @@
{{ instance.latestStatus }}
+
+ {{ $t('result-is-truncated', { n: limit }) }}
@@ -102,6 +110,7 @@ export default Vue.extend({
instance: null,
target: null,
sort: '+caughtAt',
+ state: 'all',
limit: 50,
instances: [],
faGlobe, faTerminal, faSearch, faMinusCircle
@@ -110,7 +119,10 @@ export default Vue.extend({
watch: {
sort() {
- this.instances = [];
+ this.fetchInstances();
+ },
+
+ state() {
this.fetchInstances();
},
},
@@ -137,9 +149,11 @@ export default Vue.extend({
},
fetchInstances() {
+ this.instances = [];
this.$root.api('federation/instances', {
+ state: this.state,
sort: this.sort,
- limit: 50
+ limit: this.limit
}).then(instances => {
this.instances = instances;
});
@@ -154,7 +168,14 @@ export default Vue.extend({
splash: true
});
});
- }
+ },
+
+ updateInstance() {
+ this.$root.api('admin/federation/update-instance', {
+ host: this.instance.host,
+ isBlocked: this.instance.isBlocked,
+ });
+ },
}
});
diff --git a/src/models/instance.ts b/src/models/instance.ts
index 904ed95dc..242e80f30 100644
--- a/src/models/instance.ts
+++ b/src/models/instance.ts
@@ -57,4 +57,9 @@ export interface IInstance {
* 直近のリクエスト受信日時
*/
latestRequestReceivedAt?: Date;
+
+ /**
+ * このインスタンスをブロックしているか
+ */
+ isBlocked: boolean;
}
diff --git a/src/queue/processors/http/process-inbox.ts b/src/queue/processors/http/process-inbox.ts
index d88f00a09..583e25513 100644
--- a/src/queue/processors/http/process-inbox.ts
+++ b/src/queue/processors/http/process-inbox.ts
@@ -45,6 +45,15 @@ export default async (job: bq.Job, done: any): Promise