mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-06 04:40:09 +00:00
Add dead_hosts and redirection_hosts
This commit is contained in:
@@ -48,20 +48,21 @@ module.exports = Mn.View.extend({
|
||||
return {
|
||||
canManage: App.Cache.User.canManage('certificates'),
|
||||
isExpired: function () {
|
||||
console.log(this);
|
||||
return moment(this.expires_on).isBefore(moment());
|
||||
},
|
||||
dns_providers: dns_providers,
|
||||
proxy_hosts: this.getProxyHosts()
|
||||
active_domain_names: function () {
|
||||
const { proxy_hosts = [], redirect_hosts = [], dead_hosts = [] } = this;
|
||||
console.log(proxy_hosts)
|
||||
return [...proxy_hosts, ...redirect_hosts, ...dead_hosts].reduce((acc, host) => {
|
||||
acc.push(...(host.domain_names || []));
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
getProxyHosts: function () {
|
||||
const hosts = this.model.attributes.proxy_hosts || [];
|
||||
return hosts.reduce((acc, host) => {
|
||||
acc.push(...(host.domain_names || []));
|
||||
return acc;
|
||||
}, []);
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
this.listenTo(this.model, 'change', this.render);
|
||||
|
Reference in New Issue
Block a user