|
|
@ -24,11 +24,12 @@ module.exports = class { |
|
|
|
} else { |
|
|
|
this.state.filter = Object.assign({}, this.state.filter, {search: null}) |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
this.state.filter = Object.assign({}, this.state.filter, {[type]: (this.state.filter[type] || []).filter(f => f !== filter).concat(filter)}) |
|
|
|
} |
|
|
|
|
|
|
|
this.state.filter = Object.assign({}, this.state.filter, {limit: 0}) |
|
|
|
|
|
|
|
this.updateQuery(this.state.filter) |
|
|
|
|
|
|
|
this.refresh() |
|
|
@ -67,6 +68,9 @@ module.exports = class { |
|
|
|
if (filter.search) { |
|
|
|
queries.push("search=" + encodeURIComponent(filter.search)) |
|
|
|
} |
|
|
|
if (filter.limit) { |
|
|
|
queries.push("limit=" + encodeURIComponent(filter.limit.toString())) |
|
|
|
} |
|
|
|
|
|
|
|
if (queries.length > 0) { |
|
|
|
history.replaceState("", "", `/logs/?${queries.join("&")}`) |
|
|
@ -75,6 +79,13 @@ module.exports = class { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
clearLimit() { |
|
|
|
this.state.filter = Object.assign({}, this.state.filter, {limit: 0}) |
|
|
|
|
|
|
|
this.refresh() |
|
|
|
this.updateQuery(this.state.filter) |
|
|
|
} |
|
|
|
|
|
|
|
refresh() { |
|
|
|
logHeaderApi.list(this.state.filter).then(logs => { |
|
|
|
this.state.logs = logs |
|
|
|