From 10e48e6bdc3feb0f8f737d0b9ddaf097d86ac104 Mon Sep 17 00:00:00 2001
From: illya
Date: Fri, 9 Sep 2016 09:09:39 +0300
Subject: [PATCH 01/14] import Apis
---
proxy_backends/collection/permissions.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/proxy_backends/collection/permissions.js b/proxy_backends/collection/permissions.js
index 3fe30a25ed..f2c43dc198 100644
--- a/proxy_backends/collection/permissions.js
+++ b/proxy_backends/collection/permissions.js
@@ -1,5 +1,6 @@
// Apinf import
import { ProxyBackends } from './';
+import { Apis } from '/apis/collection';
ProxyBackends.allow({
insert () {
From ae03bcf6143fea7027de53fb52bb83cabb02174a Mon Sep 17 00:00:00 2001
From: illya
Date: Fri, 9 Sep 2016 09:10:09 +0300
Subject: [PATCH 02/14] added settings object to the apiumbrella schema
---
proxy_backends/collection/apiUmbrellaSchema.js | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/proxy_backends/collection/apiUmbrellaSchema.js b/proxy_backends/collection/apiUmbrellaSchema.js
index f93ef3378b..77187d9f07 100644
--- a/proxy_backends/collection/apiUmbrellaSchema.js
+++ b/proxy_backends/collection/apiUmbrellaSchema.js
@@ -1,6 +1,16 @@
// Utility import
import { proxyBasePathRegEx, apiBasePathRegEx } from './regex';
+
+Schemas.Settings = new SimpleSchema({
+ 'disable_api_key': {
+ type: Boolean,
+ optional: true,
+ label: 'Require API Key',
+ defaultValue: true
+ }
+});
+
const ApiUmbrellaSchema = new SimpleSchema({
'name': {
type: String,
@@ -60,6 +70,10 @@ const ApiUmbrellaSchema = new SimpleSchema({
optional: true,
label: 'API port',
},
+ settings: {
+ type: Schemas.Settings,
+ optional: true,
+ },
});
export { ApiUmbrellaSchema };
From 202073dc773db13308b989251ba2c09a2761ee53 Mon Sep 17 00:00:00 2001
From: illya
Date: Fri, 9 Sep 2016 09:10:30 +0300
Subject: [PATCH 03/14] included field to proxy tab
---
proxy_backends/client/form/form.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/proxy_backends/client/form/form.html b/proxy_backends/client/form/form.html
index 67a8cf09da..5a4241ea04 100644
--- a/proxy_backends/client/form/form.html
+++ b/proxy_backends/client/form/form.html
@@ -121,6 +121,8 @@
+ {{> afQuickField name="apiUmbrella.settings" }}
+
{{/ autoForm }}
From 3581f76a336472431a6bd84cfcdf9fd43b860cf5 Mon Sep 17 00:00:00 2001
From: illya
Date: Thu, 15 Sep 2016 00:32:03 +0300
Subject: [PATCH 04/14] renamed settings schema
---
proxy_backends/collection/apiUmbrellaSchema.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy_backends/collection/apiUmbrellaSchema.js b/proxy_backends/collection/apiUmbrellaSchema.js
index 77187d9f07..25a677f852 100644
--- a/proxy_backends/collection/apiUmbrellaSchema.js
+++ b/proxy_backends/collection/apiUmbrellaSchema.js
@@ -2,7 +2,7 @@
import { proxyBasePathRegEx, apiBasePathRegEx } from './regex';
-Schemas.Settings = new SimpleSchema({
+const Settings = new SimpleSchema({
'disable_api_key': {
type: Boolean,
optional: true,
@@ -71,7 +71,7 @@ const ApiUmbrellaSchema = new SimpleSchema({
label: 'API port',
},
settings: {
- type: Schemas.Settings,
+ type: Settings,
optional: true,
},
});
From 33e00372be31ccbcd1a0689b423d43ece2f53f72 Mon Sep 17 00:00:00 2001
From: illya
Date: Thu, 15 Sep 2016 00:33:51 +0300
Subject: [PATCH 05/14] new UI for disable API key field
---
proxy_backends/client/form/form.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/proxy_backends/client/form/form.html b/proxy_backends/client/form/form.html
index 5a4241ea04..fbbef3acfd 100644
--- a/proxy_backends/client/form/form.html
+++ b/proxy_backends/client/form/form.html
@@ -121,7 +121,13 @@
- {{> afQuickField name="apiUmbrella.settings" }}
+
+ {{> afQuickField name="apiUmbrella.settings.disable_api_key" }}
+
+
+
+ Optionally you can allow users to use your API without API key.
+
From 83aa5bb11a85adc9b052ad61d7e002082989614b Mon Sep 17 00:00:00 2001
From: illya
Date: Thu, 15 Sep 2016 00:34:05 +0300
Subject: [PATCH 06/14] changed default value and label
---
proxy_backends/collection/apiUmbrellaSchema.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/proxy_backends/collection/apiUmbrellaSchema.js b/proxy_backends/collection/apiUmbrellaSchema.js
index 25a677f852..22255310d8 100644
--- a/proxy_backends/collection/apiUmbrellaSchema.js
+++ b/proxy_backends/collection/apiUmbrellaSchema.js
@@ -6,8 +6,8 @@ const Settings = new SimpleSchema({
'disable_api_key': {
type: Boolean,
optional: true,
- label: 'Require API Key',
- defaultValue: true
+ label: 'Disable API Key',
+ defaultValue: false
}
});
From ef78cb543684a87b914a908893fe99618a22dfc3 Mon Sep 17 00:00:00 2001
From: illya
Date: Sat, 17 Sep 2016 23:16:59 +0300
Subject: [PATCH 07/14] organised code
---
proxy_backends/client/form/form.html | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/proxy_backends/client/form/form.html b/proxy_backends/client/form/form.html
index d57ec15a8b..fdea379466 100644
--- a/proxy_backends/client/form/form.html
+++ b/proxy_backends/client/form/form.html
@@ -120,15 +120,27 @@
{{_ "proxyBackendForm_apiPort_helpText" }}
-
-
- {{> afQuickField name="apiUmbrella.settings.disable_api_key" }}
+
+
+
From 00e52c2ec86246ff27119a72622bf35c084353d0 Mon Sep 17 00:00:00 2001
From: illya
Date: Sat, 17 Sep 2016 23:17:09 +0300
Subject: [PATCH 08/14] styles
---
proxy_backends/client/form/form.less | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
create mode 100644 proxy_backends/client/form/form.less
diff --git a/proxy_backends/client/form/form.less b/proxy_backends/client/form/form.less
new file mode 100644
index 0000000000..2ee47390bf
--- /dev/null
+++ b/proxy_backends/client/form/form.less
@@ -0,0 +1,20 @@
+.advanced-settings {
+ margin-bottom: 0;
+
+ .form-group {
+ margin-bottom: 0;
+
+ .checkbox {
+ margin-bottom: 0.3em;
+ }
+ }
+
+ .help-block {
+ margin-bottom: 0;
+ margin-top: 0;
+
+ label {
+ margin-bottom: 0;
+ }
+ }
+}
From da7c2d50e238c747b71276c84d8329c18045d17b Mon Sep 17 00:00:00 2001
From: illya
Date: Sat, 17 Sep 2016 23:17:19 +0300
Subject: [PATCH 09/14] i18n strings
---
core/lib/i18n/en.i18n.json | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/lib/i18n/en.i18n.json b/core/lib/i18n/en.i18n.json
index 2f81936481..113a2cd703 100644
--- a/core/lib/i18n/en.i18n.json
+++ b/core/lib/i18n/en.i18n.json
@@ -268,8 +268,10 @@
"proxies_pageHeader": "Proxies",
"proxies_addProxy": "Add proxy",
"proxies_noProxiesFound": "No proxies found.",
+ "proxyBackendForm_advancedSettings_title": "Advanced settings",
"proxyBackendForm_apiBasePath_helpText": "Base path added to all API requests. Example:",
"proxyBackendForm_apiPort_helpText": "Port number on API server",
+ "proxyBackendForm_disableApiKey_helpText": "Optionally you can allow users to use your API without API key.",
"proxyBackendForm_proxyBasePath_helpText": "Base path added to all Proxy requests. Example:",
"proxyBackendForm_successMessage": "Settings saved.",
"proxyItem_editProxy": "Edit",
From 9a748dcdb2aff655b2e62dc3136a981147e89c10 Mon Sep 17 00:00:00 2001
From: illya
Date: Sat, 17 Sep 2016 23:23:16 +0300
Subject: [PATCH 10/14] moved button; changed style
---
proxy_backends/client/form/form.html | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/proxy_backends/client/form/form.html b/proxy_backends/client/form/form.html
index fdea379466..61c3f5a849 100644
--- a/proxy_backends/client/form/form.html
+++ b/proxy_backends/client/form/form.html
@@ -143,6 +143,8 @@
-
+
{{/ autoForm }}
From e33f03e77fc8972aab6b215aeba437d2713c6dbd Mon Sep 17 00:00:00 2001
From: illya
Date: Sat, 17 Sep 2016 23:23:26 +0300
Subject: [PATCH 11/14] missing i18n string
---
core/lib/i18n/en.i18n.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/lib/i18n/en.i18n.json b/core/lib/i18n/en.i18n.json
index 113a2cd703..46e7e0f64d 100644
--- a/core/lib/i18n/en.i18n.json
+++ b/core/lib/i18n/en.i18n.json
@@ -274,6 +274,7 @@
"proxyBackendForm_disableApiKey_helpText": "Optionally you can allow users to use your API without API key.",
"proxyBackendForm_proxyBasePath_helpText": "Base path added to all Proxy requests. Example:",
"proxyBackendForm_successMessage": "Settings saved.",
+ "proxyBackendForm_saveButton": "Save proxy settings",
"proxyItem_editProxy": "Edit",
"proxyItem_removeProxy": "Remove",
"publishApiBackendOnApiUmbrella_successMessage": "API Backend successfully published.",
From caf7733b26ef5245c268b088430ccef2c8c06bb8 Mon Sep 17 00:00:00 2001
From: illya
Date: Sat, 17 Sep 2016 23:23:33 +0300
Subject: [PATCH 12/14] more style
---
proxy_backends/client/form/form.less | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/proxy_backends/client/form/form.less b/proxy_backends/client/form/form.less
index 2ee47390bf..079ebfccad 100644
--- a/proxy_backends/client/form/form.less
+++ b/proxy_backends/client/form/form.less
@@ -18,3 +18,7 @@
}
}
}
+
+.save-proxy-button {
+ margin-top: 1em;
+}
From 3be04d6eb8bbbb94a2b813e2829ad7b0adf8f6d5 Mon Sep 17 00:00:00 2001
From: illya
Date: Tue, 20 Sep 2016 01:07:15 +0300
Subject: [PATCH 13/14] i18n label
---
core/lib/i18n/en.i18n.json | 9 +++++++++
proxy_backends/collection/apiUmbrellaSchema.js | 1 -
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/core/lib/i18n/en.i18n.json b/core/lib/i18n/en.i18n.json
index 46e7e0f64d..7aa9ddaac1 100644
--- a/core/lib/i18n/en.i18n.json
+++ b/core/lib/i18n/en.i18n.json
@@ -449,6 +449,15 @@
"label": "Host"
}
}
+ },
+ "ProxyBackends": {
+ "apiUmbrella": {
+ "settings": {
+ "disable_api_key": {
+ "label": "Disable API key"
+ }
+ }
+ }
}
},
"sdkCodeGeneratorModal_errorText": "Your file is not supported by the generator. Please upload the correct file",
diff --git a/proxy_backends/collection/apiUmbrellaSchema.js b/proxy_backends/collection/apiUmbrellaSchema.js
index d6135aa2fc..ec6ecd978e 100644
--- a/proxy_backends/collection/apiUmbrellaSchema.js
+++ b/proxy_backends/collection/apiUmbrellaSchema.js
@@ -6,7 +6,6 @@ const Settings = new SimpleSchema({
'disable_api_key': {
type: Boolean,
optional: true,
- label: 'Disable API Key',
defaultValue: false
}
});
From 3e88625963b130d0ba81fd32666b6b071d891b1b Mon Sep 17 00:00:00 2001
From: illya
Date: Tue, 20 Sep 2016 21:15:14 +0300
Subject: [PATCH 14/14] changed to ID
---
proxy_backends/client/form/form.html | 7 +++++--
proxy_backends/client/form/form.less | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/proxy_backends/client/form/form.html b/proxy_backends/client/form/form.html
index 61c3f5a849..38b902a375 100644
--- a/proxy_backends/client/form/form.html
+++ b/proxy_backends/client/form/form.html
@@ -122,7 +122,7 @@
-