You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ga...@apache.org on 2016/09/21 15:19:18 UTC
[27/29] fauxton commit: updated refs/heads/new-replication to b0541e1
fixes
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/af6c9566
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/af6c9566
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/af6c9566
Branch: refs/heads/new-replication
Commit: af6c956657556b8eebc8d9488a1b645cc19d0875
Parents: 14114d5
Author: Garren Smith <ga...@gmail.com>
Authored: Thu Sep 15 12:10:28 2016 +0200
Committer: Garren Smith <ga...@gmail.com>
Committed: Thu Sep 15 12:10:28 2016 +0200
----------------------------------------------------------------------
app/addons/replication/assets/less/replication.less | 5 +++++
app/addons/replication/components/submit.js | 5 ++++-
app/addons/replication/controller.js | 13 +++++++++----
i18n.json.default.json | 4 +++-
4 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/af6c9566/app/addons/replication/assets/less/replication.less
----------------------------------------------------------------------
diff --git a/app/addons/replication/assets/less/replication.less b/app/addons/replication/assets/less/replication.less
index cbaa7f9..4739d7a 100644
--- a/app/addons/replication/assets/less/replication.less
+++ b/app/addons/replication/assets/less/replication.less
@@ -132,3 +132,8 @@ div.replication-page {
.replication-clear-link {
padding: 12px;
}
+
+.replication-clear-link:focus,
+.replication-clear-link:hover {
+ text-decoration: none;
+}
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/af6c9566/app/addons/replication/components/submit.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/components/submit.js b/app/addons/replication/components/submit.js
index d2f0276..11fe68e 100644
--- a/app/addons/replication/components/submit.js
+++ b/app/addons/replication/components/submit.js
@@ -27,7 +27,10 @@ export const ReplicationSubmit = ({onClear, disabled, onClick}) =>
className="replication-clear-link"
href="#"
data-bypass="true"
- onClick={onClear}>
+ onClick={(e) => {
+ e.preventDefault();
+ onClear();
+ }}>
Clear
</a>
</div>;
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/af6c9566/app/addons/replication/controller.js
----------------------------------------------------------------------
diff --git a/app/addons/replication/controller.js b/app/addons/replication/controller.js
index 90919b4..d34bc46 100644
--- a/app/addons/replication/controller.js
+++ b/app/addons/replication/controller.js
@@ -133,6 +133,8 @@ export default class ReplicationController extends React.Component {
validate () {
const {
+ remoteTarget,
+ remoteSource,
replicationTarget,
replicationSource,
targetDatabase,
@@ -169,7 +171,10 @@ export default class ReplicationController extends React.Component {
}
}
- if (replicationTarget === replicationSource || sourceDatabase === targetDatabase) {
+ console.log('rr', replicationTarget, replicationSource, sourceDatabase);
+ //check that source and target are not the same. They can trigger a false positive if they are ""
+ if ((remoteTarget === remoteSource && remoteTarget !== "")
+ || (sourceDatabase === targetDatabase && sourceDatabase !== "")) {
FauxtonAPI.addNotification({
msg: 'Cannot replicate a database to itself',
type: 'error',
@@ -268,9 +273,9 @@ export default class ReplicationController extends React.Component {
/>
<PasswordModal
visible={passwordModalVisible}
- modalMessage={<p>Replication requires authentication on your local account.</p>}
- submitBtnLabel="Start Replication"
- headerTitle="Enter Account Password."
+ modalMessage={<p>{app.i18n.en_US['replication-password-modal-text']}</p>}
+ submitBtnLabel="Start Replication1213"
+ headerTitle={app.i18n.en_US['replication-password-modal-header']}
onSuccess={this.submit} />
</div>
);
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/af6c9566/i18n.json.default.json
----------------------------------------------------------------------
diff --git a/i18n.json.default.json b/i18n.json.default.json
index 2773f3f..d1e4971 100644
--- a/i18n.json.default.json
+++ b/i18n.json.default.json
@@ -10,6 +10,8 @@
"mango-indexeditor-title": "Mango",
"couchdb-productname": "Apache CouchDB",
"cors-disable-cors-prompt": "Are you sure? Disabling CORS will overwrite your specific origin domains.",
- "cors-notice": "Cross-Origin Resource Sharing (CORS) lets you connect to remote servers directly from the browser, so you can host browser-based apps on static pages and talk directly with CouchDB to load your data."
+ "cors-notice": "Cross-Origin Resource Sharing (CORS) lets you connect to remote servers directly from the browser, so you can host browser-based apps on static pages and talk directly with CouchDB to load your data.",
+ "replication-password-modal-header": "Enter Account Password.",
+ "replication-password-modal-text": "Replication requires authentication on your credentials."
}
}