diff --git a/src/frontend/js/app/nginx/proxy/delete.ejs b/src/frontend/js/app/nginx/proxy/delete.ejs index 93037ab0..25d3a2ef 100644 --- a/src/frontend/js/app/nginx/proxy/delete.ejs +++ b/src/frontend/js/app/nginx/proxy/delete.ejs @@ -7,10 +7,11 @@
+ <%= i18n('proxy-hosts', 'delete-confirm', {domains: domain_names.join(', ')}) %> Are you sure you want to delete the Proxy host for: <%- domain_names.join(', ') %>? <% if (ssl_enabled) { %>

- The SSL certificates attached will be removed, this action cannot be recovered. + <%- i18n('proxy-hosts', 'delete-ssl') %> <% } %>
diff --git a/src/frontend/js/app/nginx/proxy/form.ejs b/src/frontend/js/app/nginx/proxy/form.ejs index 05a7fc25..3674a4fe 100644 --- a/src/frontend/js/app/nginx/proxy/form.ejs +++ b/src/frontend/js/app/nginx/proxy/form.ejs @@ -7,7 +7,7 @@
@@ -62,11 +62,11 @@
@@ -75,7 +75,7 @@
- +
@@ -84,7 +84,7 @@ diff --git a/src/frontend/js/app/nginx/proxy/list/item.ejs b/src/frontend/js/app/nginx/proxy/list/item.ejs index 282c1a66..b1aab6e4 100644 --- a/src/frontend/js/app/nginx/proxy/list/item.ejs +++ b/src/frontend/js/app/nginx/proxy/list/item.ejs @@ -13,27 +13,27 @@ %>
- Created: <%- formatDbDate(created_on, 'Do MMMM YYYY') %> + <%- i18n('str', 'created-on', {date: formatDbDate(created_on, 'Do MMMM YYYY')}) %>
<%- forward_ip %>:<%- forward_port %>
-
<%- ssl_enabled && ssl_provider ? ssl_provider : 'HTTP only' %>
+
<%- ssl_enabled && ssl_provider ? i18n('ssl', ssl_provider) : i18n('ssl', 'none') %>
-
<%- access_list_id ? access_list.name : 'Public' %>
+
<%- access_list_id ? access_list.name : i18n('str', 'public') %>
<% if (canManage) { %> diff --git a/src/frontend/js/app/nginx/proxy/list/item.js b/src/frontend/js/app/nginx/proxy/list/item.js index 6ed11d39..52a201e8 100644 --- a/src/frontend/js/app/nginx/proxy/list/item.js +++ b/src/frontend/js/app/nginx/proxy/list/item.js @@ -1,10 +1,8 @@ 'use strict'; -const Mn = require('backbone.marionette'); -const Controller = require('../../../controller'); -const Api = require('../../../api'); -const Cache = require('../../../cache'); -const template = require('./item.ejs'); +const Mn = require('backbone.marionette'); +const App = require('../../../main'); +const template = require('./item.ejs'); module.exports = Mn.View.extend({ template: template, @@ -18,17 +16,17 @@ module.exports = Mn.View.extend({ events: { 'click @ui.edit': function (e) { e.preventDefault(); - Controller.showNginxProxyForm(this.model); + App.Controller.showNginxProxyForm(this.model); }, 'click @ui.delete': function (e) { e.preventDefault(); - Controller.showNginxProxyDeleteConfirm(this.model); + App.Controller.showNginxProxyDeleteConfirm(this.model); } }, templateContext: { - canManage: Cache.User.canManage('proxy_hosts') + canManage: App.Cache.User.canManage('proxy_hosts') }, initialize: function () { diff --git a/src/frontend/js/app/nginx/proxy/list/main.ejs b/src/frontend/js/app/nginx/proxy/list/main.ejs index 16e7b6dc..f2c64ea3 100644 --- a/src/frontend/js/app/nginx/proxy/list/main.ejs +++ b/src/frontend/js/app/nginx/proxy/list/main.ejs @@ -1,9 +1,9 @@   - Source - Destination - SSL - Access + <%- i18n('str', 'source') %> + <%- i18n('str', 'destination') %> + <%- i18n('str', 'ssl') %> + <%- i18n('str', 'access') %> <% if (canManage) { %>   <% } %> diff --git a/src/frontend/js/app/nginx/proxy/list/main.js b/src/frontend/js/app/nginx/proxy/list/main.js index 1557b74f..64896c1f 100644 --- a/src/frontend/js/app/nginx/proxy/list/main.js +++ b/src/frontend/js/app/nginx/proxy/list/main.js @@ -1,9 +1,9 @@ 'use strict'; const Mn = require('backbone.marionette'); +const App = require('../../../main'); const ItemView = require('./item'); const template = require('./main.ejs'); -const Cache = require('../../../cache'); const TableBody = Mn.CollectionView.extend({ tagName: 'tbody', @@ -23,7 +23,7 @@ module.exports = Mn.View.extend({ }, templateContext: { - canManage: Cache.User.canManage('proxy_hosts') + canManage: App.Cache.User.canManage('proxy_hosts') }, onRender: function () { diff --git a/src/frontend/js/i18n/messages.json b/src/frontend/js/i18n/messages.json index 7bf726c1..ef5a0dfa 100644 --- a/src/frontend/js/i18n/messages.json +++ b/src/frontend/js/i18n/messages.json @@ -14,7 +14,15 @@ "cancel": "Cancel", "sure": "Yes I'm Sure", "disabled": "Disabled", - "choose-file": "Choose file" + "choose-file": "Choose file", + "source": "Source", + "destination": "Destination", + "ssl": "SSL", + "access": "Access", + "public": "Public", + "edit": "Edit", + "delete": "Delete", + "logs": "Logs" }, "login": { "title": "Login to your account" @@ -48,18 +56,20 @@ "all-hosts": { "empty-subtitle": "{manage, select, true{Why don't you create one?} other{And you don't have permission to create one.}}", "details": "Details", - "ssl": "SSL", "enable-ssl": "Enable SSL", "force-ssl": "Force SSL", "domain-names": "Domain Names", "cert-provider": "Certificate Provider", - "other-ssl": "Other", - "letsencrypt": "Let's Encrypt", - "letsencrypt-email": "Email Address for Let's Encrypt", - "letsencrypt-agree": "I Agree to the Let's Encrypt Terms of Service", "other-certificate": "Certificate", "other-certificate-key": "Certificate Key" }, + "ssl": { + "letsencrypt": "Let's Encrypt", + "other": "Other", + "none": "HTTP only", + "letsencrypt-email": "Email Address for Let's Encrypt", + "letsencrypt-agree": "I Agree to the Let's Encrypt Terms of Service" + }, "proxy-hosts": { "title": "Proxy Hosts", "empty": "There are no Proxy Hosts", @@ -67,7 +77,9 @@ "form-title": "{id, select, undefined{New} other{Edit}} Proxy Host", "forward-ip": "Forward IP", "forward-port": "Forward Port", - "delete": "Delete Proxy Host" + "delete": "Delete Proxy Host", + "delete-confirm": "Are you sure you want to delete the Proxy host for: {domains}?", + "delete-ssl": "The SSL certificates attached will be removed, this action cannot be recovered." }, "redirection-hosts": { "title": "Redirection Hosts" diff --git a/src/frontend/js/models/dead-host.js b/src/frontend/js/models/dead-host.js index e08c6d66..41b89ee3 100644 --- a/src/frontend/js/models/dead-host.js +++ b/src/frontend/js/models/dead-host.js @@ -7,13 +7,14 @@ const model = Backbone.Model.extend({ defaults: function () { return { - created_on: null, - modified_on: null, - owner: null, - domain_name: '', - ssl_enabled: false, - ssl_provider: false, - meta: [] + id: 0, + created_on: null, + modified_on: null, + owner: null, + domain_name: '', + ssl_enabled: false, + ssl_provider: false, + meta: [] }; } }); diff --git a/src/frontend/js/models/proxy-host.js b/src/frontend/js/models/proxy-host.js index 1dca9c3c..86c99a0b 100644 --- a/src/frontend/js/models/proxy-host.js +++ b/src/frontend/js/models/proxy-host.js @@ -7,6 +7,7 @@ const model = Backbone.Model.extend({ defaults: function () { return { + id: 0, created_on: null, modified_on: null, domain_names: [], diff --git a/src/frontend/js/models/redirection-host.js b/src/frontend/js/models/redirection-host.js index 0496a8bd..131fc949 100644 --- a/src/frontend/js/models/redirection-host.js +++ b/src/frontend/js/models/redirection-host.js @@ -7,6 +7,7 @@ const model = Backbone.Model.extend({ defaults: function () { return { + id: 0, created_on: null, modified_on: null, owner: null, diff --git a/src/frontend/js/models/stream.js b/src/frontend/js/models/stream.js index dac6b2b0..775c37de 100644 --- a/src/frontend/js/models/stream.js +++ b/src/frontend/js/models/stream.js @@ -7,6 +7,7 @@ const model = Backbone.Model.extend({ defaults: function () { return { + id: 0, created_on: null, modified_on: null, owner: null, diff --git a/src/frontend/js/models/user.js b/src/frontend/js/models/user.js index ef383894..00aa0f3f 100644 --- a/src/frontend/js/models/user.js +++ b/src/frontend/js/models/user.js @@ -8,6 +8,7 @@ const model = Backbone.Model.extend({ defaults: function () { return { + id: 0, name: '', nickname: '', email: '',