Browse Source

Addition of 'Endpoint' entry on AWS module, and some syntax fixes.

The endpoint input allows the use of other object storage providers
besides AWS.
couchdb
Ruel Tmeizeh - RuhNet 5 months ago
parent
commit
85e4603fde
3 changed files with 14 additions and 5 deletions
  1. +7
    -5
      app.js
  2. +1
    -0
      submodules/s3/i18n/en-US.json
  3. +6
    -0
      submodules/s3/views/formElements.html

+ 7
- 5
app.js View File

@ -19,7 +19,7 @@ define(function(require) {
var storagesList = storagesConfig.storages;
var storagesPaths = [];
for (var i = 0, len = storagesList.length; i < len; i++) {
storagesPaths.push('./submodules/' + storagesList[i] + '/' + storagesList[i])
storagesPaths.push('./submodules/' + storagesList[i] + '/' + storagesList[i]);
}
require(storagesPaths);
@ -93,7 +93,7 @@ define(function(require) {
$.getJSON('/apps/storage/submodules/' + args.submoduleName + '/i18n/' + curLanguage + '.json').done(function (newDict) {
var dict = self.data.i18n[curLanguage];
$.extend(true, dict, newDict);
})
});
}
}
} else {
@ -152,7 +152,8 @@ define(function(require) {
accountId : self.accountId,
data : {
'attachments': {},
'plan': {}
'plan': {},
'connections': {}
},
removeMetadataAPI: true,
generateError: settings.debug
@ -256,6 +257,7 @@ define(function(require) {
storageManagerFormatData: function(data) {
var activeStorageId = null;
try {
//activeStorageId = data.plan.modb.connection; //.handler;
activeStorageId = data.plan.modb.types.call_recording.attachments.handler;
} catch(e) {
log('Active storage not found');
@ -315,7 +317,7 @@ define(function(require) {
$container.slideDown();
self.storageManagerSettingsBind($container);
})
});
});
template.on('click', '.js-remove-storage', function(e) {
@ -379,7 +381,7 @@ define(function(require) {
tabId: keyword + '-new-item-content',
tabLink: '#' + keyword + '-new-item-content',
formElements: self.storages[keyword].getFormElements({})
})
});
}
var template = $(self.getTemplate({


+ 1
- 0
submodules/s3/i18n/en-US.json View File

@ -3,6 +3,7 @@
"submodules": {
"s3": {
"nameLabel": "Name",
"endpointLabel": "Endpoint",
"bucketLabel": "Bucket",
"keyLabel": "Key",
"secretLabel": "Secret"


+ 6
- 0
submodules/s3/views/formElements.html View File

@ -5,6 +5,12 @@
<input type="text" value="{{name}}" name="name">
</div>
</label>
<label class="control-group">
<span class="control-label">{{ @root.i18n.storage.submodules.s3.endpointLabel }}</span>
<div class="controls">
<input type="text" value="{{settings.endpoint}}" name="settings.endpoint">
</div>
</label>
<label class="control-group">
<span class="control-label">{{ @root.i18n.storage.submodules.s3.bucketLabel }}</span>
<div class="controls">


Loading…
Cancel
Save