";
5 | },
6 | };
7 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | # node_modules ignored by default
2 |
3 | dist/
4 | test/
5 | assets/
6 |
7 | app/**/*.react.js
8 | app/addons/.module-cache
9 | app/addons/**/assets/*
10 | app/addons/**/dependencies/*
11 | app/load_addons.js
12 |
--------------------------------------------------------------------------------
/docker/couchdb.yml:
--------------------------------------------------------------------------------
1 | services:
2 | couchdb:
3 | container_name: couchdb
4 | image: ${COUCHDB_IMAGE}
5 | environment:
6 | COUCHDB_USER: tester
7 | COUCHDB_PASSWORD: testerpass
8 | ports:
9 | - "5984:5984"
10 |
--------------------------------------------------------------------------------
/assets/icons/columns.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/minus.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/filter.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icons/up-open.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/version-check.js:
--------------------------------------------------------------------------------
1 | var semver = require('semver');
2 |
3 | var version = process.version.replace(/^v/, '');
4 |
5 | if (!semver.satisfies(version, '>=4')) {
6 | console.error('Error:');
7 | console.error('Fauxton needs Node 4 or greater to work');
8 | process.exit(1);
9 | }
10 |
--------------------------------------------------------------------------------
/assets/icons/arrow-box-up.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/assets/icons/drop-down-dots.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/down-open.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/ok.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/arrow-box-down.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/burger.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/menu.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/assets/icons/right-open.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/react",
4 | "@babel/env"
5 | ],
6 | "plugins": ["@babel/plugin-transform-object-assign", "@babel/plugin-proposal-object-rest-spread",
7 | "@babel/plugin-proposal-class-properties", "babel-plugin-array-includes","@babel/plugin-transform-async-to-generator"]
8 | }
9 |
--------------------------------------------------------------------------------
/assets/icons/plus.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/right-1.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/up-1.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/down-1.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/left-1.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/left-open.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/document.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/bookmark-ribbon-wplus.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/collapse.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/expand.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/arrow_right.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/assets/icons/resize-full-reverse.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/left-dir.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/right-dir.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/up-dir.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/arrow_left.svg:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/assets/icons/down-dir.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/resize-small-reverse.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/cancel.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/play.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/minus-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/resize-full.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/resize-small.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/jest-shim.js:
--------------------------------------------------------------------------------
1 | // This file is imported by Jest to avoid a React Warning:
2 | // Warning: React depends on requestAnimationFrame. Make sure that you load a
3 | // polyfill in older browsers. http://fb.me/react-polyfills
4 | // See https://github.com/facebook/jest/issues/4545#issuecomment-332762365 for details
5 |
6 | global.requestAnimationFrame = (callback) => {
7 | setTimeout(callback, 0);
8 | };
9 |
--------------------------------------------------------------------------------
/assets/_variable_overrides.scss.underscore:
--------------------------------------------------------------------------------
1 | //
2 | // WARNING: THIS IS A GENERATED FILE. DO NOT EDIT.
3 | //
4 |
5 | <% if (largeLogoPath) { %>$largeLogoPath: "<%= largeLogoPath %>";<% } %>
6 | <% if (smallLogoPath) { %>$smallLogoPath: "<%= smallLogoPath %>";<% } %>
7 |
8 | <% if (scss_overrides) { scss_overrides.forEach(function (scss_file, i) { %>
9 | <%= '@import "' + scss_file + '";' %>
10 | <% }); } %>
11 |
--------------------------------------------------------------------------------
/assets/icons/documents.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/pencil.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/menu_close.svg:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/assets/icons/ok-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/plus-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/left.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/cancel-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/up.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/right.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/stats.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/down.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/popin.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/reply.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/paste.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/icons/popout.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/codemods/amd-to-es6-import.md:
--------------------------------------------------------------------------------
1 | #From `define` to `import`
2 |
3 | To run the ast to change a file from using amd to es6 import follow these steps:
4 |
5 | * npm i -g jscodeshift
6 | * npm install 5to6-codemod
7 | * Replace `./node_modules/5to6-codemod/transforms/amd.js` with https://gist.github.com/robertkowalski/9167d45c0af6b9abdd4b51a09ef4e039
8 | * run `jscodeshift --extensions=js,jsx -t node_modules/5to6-codemod/transforms/amd.js app/file/name`
9 | * run git diff to check
10 |
--------------------------------------------------------------------------------
/assets/icons/files-o.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icons/article.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/cw.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/documents/mango/mango.constants.js:
--------------------------------------------------------------------------------
1 | export default {
2 | INDEX_TEMPLATES: [{
3 | label: 'Single field (json)',
4 | code: {
5 | "index": {
6 | "fields": ["foo"]
7 | },
8 | "name": "foo-json-index",
9 | "type" : "json"
10 | }
11 | }, {
12 | label: 'Multiple fields (json)',
13 | code: {
14 | "index": {
15 | "fields": ["foo", "bar"]
16 | },
17 | "name": "foo-bar-json-index",
18 | "type" : "json"
19 | }
20 | }]
21 | };
22 |
--------------------------------------------------------------------------------
/assets/icons/wrench2.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icons/arrows-cw.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/attention-alt.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/extensions.md:
--------------------------------------------------------------------------------
1 | # Extensions
2 |
3 | Extensions allow Fauxton views to be have extra functionality.
4 |
5 | A module registers an extension by
6 |
7 | FauxtonAPI.registerExtension('extensionName', myObjectToRegister);
8 |
9 | Any other module wanting to use that extension can then get
10 | all objects registered for an extension by:
11 |
12 | var extensions = FauxtonAPI.getExtensions('extensionName');
13 | // extensions will always be an array
14 |
15 | The module can then use those extensions to extend its functionality.
16 |
--------------------------------------------------------------------------------
/assets/icons/minus-squared.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/ok-circled-2.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/circle-empty.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/lock.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/reply-all.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/fauxton/notifications/components/PermanentNotificationContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import PermanentNotification from './PermanentNotification';
3 |
4 | const mapStateToProps = ({ notifications }) => {
5 | return {
6 | visible: notifications.permanentNotificationVisible,
7 | message: notifications.permanentNotificationMessage
8 | };
9 | };
10 |
11 | const PermanentNotificationContainer = connect(
12 | mapStateToProps
13 | )(PermanentNotification);
14 |
15 | export default PermanentNotificationContainer;
16 |
--------------------------------------------------------------------------------
/assets/icons/map2.svg:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/assets/icons/trash.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/wrench.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/profile.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/copy.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icons/vertical-ellipsis.svg:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/assets/icons/cancel-circled2.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/accordion.scss:
--------------------------------------------------------------------------------
1 | .faux--accordion {
2 | list-style: none;
3 | margin: 0px;
4 | width: 100%;
5 | }
6 |
7 | .faux--accordion__item {
8 | background-color: transparent;
9 | transition: all 0.5s linear;
10 | }
11 |
12 | .faux--accordion__item-header {
13 | border: 0;
14 | background-color: transparent;
15 | color: inherit;
16 | font-size: inherit;
17 | padding-left: 0px;
18 | span {
19 | padding-left: 0.5rem;
20 | }
21 | }
22 |
23 | .faux--accordion__item-content {
24 | padding-left: 1.35rem;
25 | padding-top: 0.75rem;
26 | font-size: inherit;
27 | }
28 |
--------------------------------------------------------------------------------
/assets/icons/minus-circled2.svg:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/assets/icons/replicate.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/trophy.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/assets/icons/block.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/dot-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/plus-circled2.svg:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/assets/icons/eye.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/map.svg:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/app/addons/news/assets/scss/news.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | .news-page {
14 | width: 100%;
15 | height: 100%;
16 | }
17 |
--------------------------------------------------------------------------------
/app/addons/permissions/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 |
14 | export const PERMISSIONS_UPDATE = 'PERMISSIONS_UPDATE';
15 |
--------------------------------------------------------------------------------
/app/addons/cluster/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | CLUSTER_FETCH_NODES: 'CLUSTER_FETCH_NODES'
15 | };
16 |
--------------------------------------------------------------------------------
/assets/icons/plus-squared.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/.asf.yaml:
--------------------------------------------------------------------------------
1 | github:
2 | description: "Fauxton is the new Web UI for CouchDB"
3 | homepage: https://github.com/apache/couchdb-fauxton
4 | labels:
5 | - apache
6 | - couchdb
7 | - fauxton
8 | - erlang
9 | - network-client
10 | - http
11 | - big-data
12 | - cloud
13 | - database
14 | - javascript
15 | protected_branches:
16 | main:
17 | required_status_checks:
18 | strict: true
19 | # contexts are the names of checks that must pass.
20 | "contexts":
21 | - "Run unit tests"
22 | - "Run e2e tests (couchdb:2.3.1, search,partitioned)"
23 | - "Run e2e tests (couchdb:3, search,nonpartitioned,couchdb-v2-only)"
24 |
--------------------------------------------------------------------------------
/assets/icons/dashboard.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/auth/routes/index.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import Auth from './auth';
14 | import User from './user';
15 |
16 | export default [Auth, User];
17 |
--------------------------------------------------------------------------------
/app/addons/components/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import "./assets/scss/components.scss";
14 |
15 | export default {
16 | initialize() {},
17 | };
18 |
--------------------------------------------------------------------------------
/assets/icons/clock.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/picture.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/components/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | CMPNTS_DATABASES_SHOWDELETE_MODAL: 'CMPNTS_DATABASES_SHOWDELETE_MODAL'
15 | };
16 |
--------------------------------------------------------------------------------
/assets/icons/attention-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/minus-squared-alt.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/sidenav-filter-function.svg:
--------------------------------------------------------------------------------
1 |
2 |
9 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/modals.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | @import "../../../../../assets/scss/variables";
14 |
15 | .modal .cancel-link {
16 | margin: 0 0.5rem;
17 | }
18 |
--------------------------------------------------------------------------------
/assets/icons/key.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/exchange.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/file-code-o.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/assets/icons/sidenav-list-function.svg:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/assets/icons/sidenav-update-function.svg:
--------------------------------------------------------------------------------
1 |
2 |
11 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/tab-window-wrapper.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | #dashboard-content > .tab__wrapper {
14 | padding: 0;
15 | }
16 |
17 | .tab__container > div {
18 | padding: 20px;
19 | }
20 |
--------------------------------------------------------------------------------
/app/addons/documents/changes/components/ChangesTabContentContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import ChangesTabContent from './ChangesTabContent';
3 | import Actions from '../actions';
4 |
5 | const mapStateToProps = ({ changes }) => {
6 | return {
7 | filters: changes.filters
8 | };
9 | };
10 |
11 | const mapDispatchToProps = (dispatch) => {
12 | return {
13 | addFilter: (filter) => {
14 | dispatch(Actions.addFilter(filter));
15 | },
16 |
17 | removeFilter: (filter) => {
18 | dispatch(Actions.removeFilter(filter));
19 | }
20 | };
21 | };
22 |
23 | const ChangesTabContentContainer = connect(
24 | mapStateToProps,
25 | mapDispatchToProps
26 | )(ChangesTabContent);
27 |
28 | export default ChangesTabContentContainer;
29 |
--------------------------------------------------------------------------------
/assets/icons/user.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/activetasks.svg:
--------------------------------------------------------------------------------
1 |
6 |
--------------------------------------------------------------------------------
/app/addons/documents/partition-key/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | export default {
13 | PARTITON_KEY_SHOW_SELECTOR: 'PARTITON_KEY_SHOW_SELECTOR',
14 | PARTITON_KEY_HIDE_SELECTOR: 'PARTITON_KEY_HIDE_SELECTOR'
15 | };
16 |
--------------------------------------------------------------------------------
/app/addons/documents/changes/components/ChangesContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import ChangesScreen from './ChangesScreen';
3 | import Actions from '../actions';
4 |
5 | const mapStateToProps = ({ changes }, ownProps) => {
6 | return {
7 | changes: changes.filteredChanges,
8 | loaded: changes.isLoaded,
9 | databaseName: ownProps.databaseName,
10 | isShowingSubset: changes.showingSubset
11 | };
12 | };
13 |
14 | const mapDispatchToProps = (dispatch) => {
15 | return {
16 | loadChanges: (databaseName) => {
17 | dispatch(Actions.loadChanges(databaseName));
18 | }
19 | };
20 | };
21 |
22 | const ChangesContainer = connect(
23 | mapStateToProps,
24 | mapDispatchToProps
25 | )(ChangesScreen);
26 |
27 | export default ChangesContainer;
28 |
--------------------------------------------------------------------------------
/app/addons/fauxton/assets/scss/_components.scss:
--------------------------------------------------------------------------------
1 |
2 | .clipboard-copy-element {
3 | i:before {
4 | margin-right: 0px;
5 | }
6 | }
7 |
8 | button.clipboard-copy-element {
9 | background: transparent;
10 | border: 0;
11 | color: $cf-text-fonticon01;
12 |
13 | &:hover {
14 | color: $cf-link-color-hover;
15 | }
16 | }
17 |
18 | #perma-warning {
19 | background-color: $cf-white;
20 | height: 3.5rem;
21 | border-bottom-style: solid;
22 | border-width: 2px;
23 | border-top-style: solid;
24 | border-color: $cf-brand-highlight;
25 | overflow-y: auto;
26 | }
27 |
28 | .perma-warning__content {
29 | margin: 0rem;
30 | padding: 0.5rem 1rem 0.5rem 1rem;
31 | color: $cf-brand-highlight;
32 | top: 50%;
33 | transform: translateY(-50%);
34 | position: relative;
35 | }
36 |
--------------------------------------------------------------------------------
/assets/icons/down-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/right-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/left-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/megaphone.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/sidenav-info.svg:
--------------------------------------------------------------------------------
1 |
2 |
14 |
--------------------------------------------------------------------------------
/assets/icons/up-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/test/mocha/testUtils.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import _ from 'lodash';
14 |
15 | var restore = function (fn) {
16 | if (fn.restore) {
17 | fn.restore();
18 | }
19 | };
20 |
21 | export default {
22 | restore: restore
23 | };
24 |
--------------------------------------------------------------------------------
/assets/icons/sidenav-show-function.svg:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/menudropdown.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | .fonticon-placeholder:before {
14 | padding-left: 17px;
15 | content: "";
16 | }
17 | .dropdown-toggle > .fonticon-mixer {
18 | margin-right: 0 !important;
19 | }
20 |
--------------------------------------------------------------------------------
/assets/icons/select-all.svg:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/assets/icons/info-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/database.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/documents/designdocinfo/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | DESIGN_DOC_MONITOR: 'DESIGN_DOC_MONITOR',
15 | DESIGN_FETCHING: 'DESIGN_FETCHING',
16 | DESIGN_FETCHING_FAILED: 'DESIGN_FETCHING_FAILED',
17 | DESIGN_REFRESH: 'DESIGN_REFRESH'
18 | };
19 |
--------------------------------------------------------------------------------
/assets/icons/mail-alt.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/auth/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | AUTH_CREDS_VALID: 'AUTH_CREDS_VALID',
15 | AUTH_CREDS_INVALID: 'AUTH_CREDS_INVALID',
16 | AUTH_SHOW_PASSWORD_MODAL: 'AUTH_SHOW_PASSWORD_MODAL',
17 | AUTH_HIDE_PASSWORD_MODAL: 'AUTH_HIDE_PASSWORD_MODAL'
18 | };
19 |
--------------------------------------------------------------------------------
/app/addons/verifyinstall/components/VerifyInstallContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import VerifyInstallScreen from './VerifyInstallScreen';
3 | import { resetTests, startVerification } from '../actions';
4 |
5 | const mapStateToProps = ({ verifyinstall }) => {
6 | return {
7 | isVerifying: verifyinstall.isVerifying,
8 | testResults: verifyinstall.tests
9 | };
10 | };
11 |
12 | const mapDispatchToProps = (dispatch) => {
13 | return {
14 | resetTests: () => {
15 | dispatch(resetTests());
16 | },
17 |
18 | startVerification: () => {
19 | dispatch(resetTests());
20 | dispatch(startVerification());
21 | }
22 | };
23 | };
24 |
25 | const VerifyInstallContainer = connect(
26 | mapStateToProps,
27 | mapDispatchToProps
28 | )(VerifyInstallScreen);
29 |
30 | export default VerifyInstallContainer;
31 |
--------------------------------------------------------------------------------
/assets/icons/sidenav-map-reduce.svg:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/app/addons/cors/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | EDIT_CORS: 'EDIT_CORS',
15 | CORS_SET_IS_LOADING: 'CORS_SET_IS_LOADING',
16 | CORS_SHOW_DELETE_DOMAIN_MODAL: 'CORS_SHOW_DELETE_DOMAIN_MODAL',
17 | CORS_HIDE_DELETE_DOMAIN_MODAL: 'CORS_HIDE_DELETE_DOMAIN_MODAL'
18 | };
19 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/badges.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | ul.component-badgelist {
14 | margin-top:15px;
15 | display: inline-block;
16 | padding-left:0;
17 |
18 | li {
19 | margin: 0;
20 | margin-left: 5px;
21 | list-style-type: none;
22 | float: left;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/addons/databases/api.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from '../../core/api';
14 | import { get } from '../../core/ajax';
15 |
16 | export const fetchDatabaseInfo = (databaseName) => {
17 | const url = FauxtonAPI.urls('databaseBaseURL', 'server', databaseName);
18 | return get(url);
19 | };
20 |
--------------------------------------------------------------------------------
/assets/icons/help.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/cluster/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import Cluster from "./routes";
14 | import FauxtonAPI from "../../core/api";
15 | import reducers from './reducers';
16 |
17 | Cluster.initialize = function () {};
18 |
19 | FauxtonAPI.addReducers({
20 | clusters: reducers
21 | });
22 |
23 | export default Cluster;
24 |
--------------------------------------------------------------------------------
/assets/icons/code-branch.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/assets/icons/plus-squared-alt.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/save.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/documents/sidebar/sidebar.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import CloneIndexModal from './components/CloneIndexModal';
14 | import DesignDoc from './components/DesignDoc';
15 | import SidebarController from './components/SidebarController';
16 |
17 | export default {
18 | SidebarController,
19 | DesignDoc,
20 | CloneIndexModal
21 | };
22 |
--------------------------------------------------------------------------------
/app/addons/components/components/loadlines.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import React from "react";
13 | import ReactDOM from "react-dom";
14 |
15 | export const LoadLines = () =>
16 |
17 |
18 |
19 |
20 |
21 |
;
22 |
--------------------------------------------------------------------------------
/app/addons/cors/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import "./assets/scss/cors.scss";
15 | import reducers from "./reducers";
16 |
17 | const CORS = FauxtonAPI.addon();
18 |
19 | CORS.initialize = function () {};
20 |
21 | FauxtonAPI.addReducers({
22 | cors: reducers,
23 | });
24 |
25 | export default CORS;
26 |
--------------------------------------------------------------------------------
/app/addons/verifyinstall/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | VERIFY_INSTALL_START: 'VERIFY_INSTALL_START',
15 | VERIFY_INSTALL_RESET: 'VERIFY_INSTALL_RESET',
16 | VERIFY_INSTALL_SINGLE_TEST_COMPLETE: 'VERIFY_INSTALL_SINGLE_TEST_COMPLETE',
17 | VERIFY_INSTALL_ALL_TESTS_COMPLETE: 'VERIFY_INSTALL_ALL_TESTS_COMPLETE'
18 | };
19 |
--------------------------------------------------------------------------------
/app/addons/auth/assets/scss/auth.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | @import "../../../../../assets/scss/variables";
14 |
15 | .sidenav header {
16 | padding-left: 24px !important;
17 | h3 {
18 | margin: 8px 0 4px;
19 | }
20 | }
21 |
22 | .faux__auth-page {
23 | padding: 20px !important;
24 | h3 {
25 | margin-bottom: 1rem;
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/addons/replication/helpers.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import _ from 'lodash';
14 |
15 | const getDatabaseLabel = db => {
16 | const dbString = (_.isString(db)) ? db.trim().replace(/\/$/, '') : db.url;
17 | const pathName = (new URL(dbString)).pathname.slice(1);
18 | return pathName.split("/").pop();
19 | };
20 |
21 | export default {
22 | getDatabaseLabel,
23 | };
24 |
--------------------------------------------------------------------------------
/app/addons/documents/changes/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | UPDATE_CHANGES: 'UPDATE_CHANGES',
15 | ADD_CHANGES_FILTER_ITEM: 'ADD_CHANGES_FILTER_ITEM',
16 | REMOVE_CHANGES_FILTER_ITEM: 'REMOVE_CHANGES_FILTER_ITEM',
17 | UPDATE_CHANGES_FILTER: 'UPDATE_CHANGES_FILTER',
18 | TOGGLE_CHANGES_CODE_VISIBILITY: 'TOGGLE_CHANGES_CODE_VISIBILITY'
19 | };
20 |
--------------------------------------------------------------------------------
/app/addons/activetasks/api.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import Helpers from "../../helpers";
14 | import { get } from '../../core/ajax';
15 |
16 | export default () => {
17 | return get(Helpers.getServerUrl('/_active_tasks'))
18 | .then(tasks => {
19 | if (tasks.error) {
20 | throw new Error(tasks.reason);
21 | }
22 | return tasks;
23 | });
24 | };
25 |
26 |
--------------------------------------------------------------------------------
/app/addons/permissions/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import Permissions from "./routes";
15 | import reducers from './reducers';
16 | import "./assets/scss/permissions.scss";
17 |
18 | Permissions.initialize = function () {};
19 |
20 | FauxtonAPI.addReducers({
21 | permissions: reducers,
22 | });
23 |
24 | export default Permissions;
25 |
--------------------------------------------------------------------------------
/bin/build-couchdb-dev.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 | # use this file except in compliance with the License. You may obtain a copy of
5 | # the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | # License for the specific language governing permissions and limitations under
13 | # the License.
14 | set -xe
15 |
16 | if [[ $COUCHDB_IMAGE == "couchdb:dev" ]]; then
17 | git clone https://github.com/apache/couchdb-docker.git
18 | cd couchdb-docker
19 | docker build dev --build-arg configure_options='--disable-fauxton --disable-docs --spidermonkey-version 60' -t couchdb:dev
20 | cd ..
21 | rm -rf couchdb-docker
22 | fi
23 |
--------------------------------------------------------------------------------
/bin/create-animal-db:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 | // use this file except in compliance with the License. You may obtain a copy of
5 | // the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | // License for the specific language governing permissions and limitations under
13 | // the License.
14 |
15 | // deletes the old animaldb, creates a new, fresh one,
16 | // with conflicts for the zebra doc
17 |
18 |
19 | const url = 'http://tester:testerpass@localhost:5984/';
20 |
21 | createAnimalDb = require('../test/create-animal-db.js');
22 |
23 | createAnimalDb(url, () => {
24 | console.log('created :)');
25 | });
26 |
--------------------------------------------------------------------------------
/app/addons/auth/components/index.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import LoginForm from './loginform.js';
14 | import PasswordModal from './passwordmodal.js';
15 | import CreateAdminForm from './createadminform.js';
16 | import ChangePasswordForm from './changepasswordform.js';
17 |
18 | export default {
19 | LoginForm,
20 | PasswordModal,
21 | CreateAdminForm,
22 | ChangePasswordForm
23 | };
24 |
--------------------------------------------------------------------------------
/app/addons/verifyinstall/assets/scss/verifyinstall.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | @import '../../../../../assets/scss/variables';
14 |
15 | #start {
16 | margin-bottom: 20px;
17 | }
18 |
19 | th.verify-test-col {
20 | width: 250px;
21 | }
22 |
23 | .install-result-success {
24 | color: $cf-alert-success-color;
25 | }
26 |
27 | .install-result-failure {
28 | color: $cf-alert-error-color;
29 | }
30 |
--------------------------------------------------------------------------------
/app/addons/documents/designdocinfo/components/DesignDocInfoContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import DesignDocInfo from './DesignDocInfo';
3 | import Actions from '../actions';
4 |
5 | const mapStateToProps = ({ designDocInfo }, ownProps) => {
6 | return {
7 | isLoading: designDocInfo.isLoading,
8 | showLoadError: designDocInfo.showLoadError,
9 | viewIndex: designDocInfo.viewIndex,
10 | designDocInfo: ownProps.designDocInfo,
11 | designDocName: ownProps.designDocName
12 | };
13 | };
14 |
15 | const mapDispatchToProps = (dispatch) => {
16 | return {
17 | fetchDesignDocInfo: (options) => {
18 | dispatch(Actions.fetchDesignDocInfo(options));
19 | },
20 |
21 | stopRefresh: () => {
22 | Actions.stopRefresh();
23 | }
24 | };
25 | };
26 |
27 | const DesignDocInfoContainer = connect(
28 | mapStateToProps,
29 | mapDispatchToProps
30 | )(DesignDocInfo);
31 |
32 | export default DesignDocInfoContainer;
33 |
--------------------------------------------------------------------------------
/app/load_addons.js.underscore:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 |
14 | /*
15 | * ::WARNING::
16 | * THIS IS A GENERATED FILE. DO NOT EDIT.
17 | */
18 |
19 | <% deps.forEach(function (dep, i) { %>
20 | <%= 'import { default as addon_' + i + ' } from "' + dep + '";' %>
21 | <% }); %>
22 |
23 | export default [
24 | <% deps.forEach(function (dep, i) { %>
25 | <%= 'addon_' + i + ',' %>
26 | <% }); %>
27 | ];
28 |
--------------------------------------------------------------------------------
/app/addons/components/components/paddedborderbox.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import React from "react";
13 | import ReactDOM from "react-dom";
14 |
15 | export class PaddedBorderedBox extends React.Component {
16 | render() {
17 | return (
18 |
19 |
20 | {this.props.children}
21 |
22 |
23 | );
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/addons/cluster/reducers.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import ActionTypes from "./actiontypes";
14 |
15 | const initialState = {
16 | nodes: []
17 | };
18 |
19 | export default (state = initialState, {type, options}) => {
20 | switch (type) {
21 | case ActionTypes.CLUSTER_FETCH_NODES:
22 | return {
23 | ...state,
24 | nodes: options.nodes
25 | };
26 | }
27 |
28 | return state;
29 | };
30 |
--------------------------------------------------------------------------------
/app/addons/verifyinstall/constants.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | var CONSTANTS = {
14 | TESTS: {
15 | CREATE_DATABASE: 'TEST_CREATE_DATABASE',
16 | CREATE_DOCUMENT: 'TEST_CREATE_DOCUMENT',
17 | UPDATE_DOCUMENT: 'TEST_UPDATE_DOCUMENT',
18 | DELETE_DOCUMENT: 'TEST_DELETE_DOCUMENT',
19 | CREATE_VIEW: 'TEST_CREATE_VIEW',
20 | REPLICATION: 'TEST_REPLICATION'
21 | }
22 | };
23 |
24 | export default CONSTANTS;
25 |
--------------------------------------------------------------------------------
/assets/icons/help-circled.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/assets/icons/sitemap.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/documents/mango/mango.components.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import MangoQueryEditorContainer from "./components/MangoQueryEditorContainer";
14 | import MangoIndexEditorContainer from "./components/MangoIndexEditorContainer";
15 | import ExplainPageContainer from "./components/ExplainPageContainer";
16 |
17 | export default {
18 | MangoIndexEditorContainer,
19 | MangoQueryEditorContainer,
20 | ExplainPageContainer
21 | };
22 |
--------------------------------------------------------------------------------
/app/addons/news/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import News from "./routes";
15 | import "./assets/scss/news.scss";
16 |
17 | News.initialize = function () {
18 | FauxtonAPI.addHeaderLink({
19 | id: 'News',
20 | title: 'News',
21 | icon: 'fonticon-clipboard',
22 | href: '#/news',
23 | bottomNav: true,
24 | top: true
25 | });
26 | };
27 |
28 | export default News;
29 |
--------------------------------------------------------------------------------
/app/addons/setup/container/ConfiguredSceenContainer.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import {connect} from 'react-redux';
13 | import ConfiguredScreen from '../components/ConfiguredScreen';
14 | import {getClusterState} from '../reducers';
15 |
16 | const mapStateToProps = ({setup}) => {
17 | return {
18 | clusterState: getClusterState(setup),
19 | };
20 | };
21 |
22 | export default connect(
23 | mapStateToProps
24 | )(ConfiguredScreen);
25 |
--------------------------------------------------------------------------------
/app/addons/documents/index-editor/components.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import DesignDocSelector from './components/DesignDocSelector';
14 | import IndexEditor from './components/IndexEditor';
15 | import IndexEditorContainer from './components/IndexEditorContainer';
16 | import ReduceEditor from './components/ReduceEditor';
17 |
18 | export default {
19 | IndexEditorContainer,
20 | IndexEditor,
21 | ReduceEditor,
22 | DesignDocSelector
23 | };
24 |
--------------------------------------------------------------------------------
/assets/icons/mail.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/core/store.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import Backbone from "backbone";
14 | import _ from "lodash";
15 |
16 | var Store = function () {
17 | this.initialize.apply(this, arguments);
18 | _.bindAll(this);
19 | };
20 |
21 | Store.extend = Backbone.Model.extend;
22 | _.extend(Store.prototype, Backbone.Events, {
23 | triggerChange: function () {
24 | this.trigger('change');
25 | },
26 |
27 | initialize: function () {}
28 | });
29 |
30 | export default Store;
31 |
--------------------------------------------------------------------------------
/app/addons/documents/tests/document-test-helper.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import Documents from "../resources";
13 |
14 | const opts = {
15 | params: {},
16 | database: {
17 | safeID: function () { return '1';}
18 | }
19 | };
20 |
21 | function createDocColumn (docs) {
22 | docs = docs.map(function (doc) {
23 | return Documents.Doc.prototype.parse(doc);
24 | });
25 |
26 | return new Documents.AllDocs(docs, opts);
27 | }
28 |
29 | export default {
30 | createDocColumn
31 | };
32 |
--------------------------------------------------------------------------------
/app/initialize.js.underscore:
--------------------------------------------------------------------------------
1 | /* eslint-disable */
2 |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 | // use this file except in compliance with the License. You may obtain a copy of
5 | // the License at
6 | //
7 | // http://www.apache.org/licenses/LICENSE-2.0
8 | //
9 | // Unless required by applicable law or agreed to in writing, software
10 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | // License for the specific language governing permissions and limitations under
13 | // the License.
14 |
15 | /*
16 | * ::WARNING::
17 | * THIS IS A GENERATED FILE. DO NOT EDIT.
18 | */
19 |
20 | // Provide a global location to place configuration settings and module
21 | // creation.
22 | export default {
23 | // The root path to run the application.
24 | root: "<%= root %>",
25 | version: "<%= version %>",
26 | // Host is used as prefix for urls
27 | host: "<%= host %>",
28 | i18n: <%= i18n %>
29 | };
30 |
--------------------------------------------------------------------------------
/app/addons/activetasks/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import Activetasks from "./routes";
15 | import "./assets/scss/activetasks.scss";
16 | import reducers from './reducers';
17 |
18 | Activetasks.initialize = function () {
19 | FauxtonAPI.addHeaderLink({title: 'Active Tasks', icon: 'fonticon-activetasks', href: '#/activetasks'});
20 | };
21 |
22 | FauxtonAPI.addReducers({
23 | activetasks: reducers
24 | });
25 |
26 | export default Activetasks;
27 |
--------------------------------------------------------------------------------
/app/addons/documentation/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import Documentation from "./routes";
15 | import "./assets/scss/documentation.scss";
16 |
17 | Documentation.initialize = function () {
18 | FauxtonAPI.addHeaderLink({
19 | id: 'Documentation',
20 | title: 'Documentation',
21 | icon: 'fonticon-bookmark',
22 | href: '#/documentation',
23 | bottomNav: true,
24 | top: true
25 | });
26 | };
27 |
28 | export default Documentation;
29 |
--------------------------------------------------------------------------------
/test/nightwatch_tests/custom-commands/closeNotification.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | var helpers = require('../helpers/helpers.js');
14 |
15 | exports.command = function () {
16 | var client = this,
17 | dismissSelector = '.Toastify__toast-container .Toastify__toast-body';
18 |
19 | client
20 | .waitForElementVisible(dismissSelector, helpers.maxWaitTime, false)
21 | .click(dismissSelector)
22 | .waitForElementNotPresent(dismissSelector, helpers.maxWaitTime, false);
23 |
24 | return this;
25 | };
26 |
--------------------------------------------------------------------------------
/app/addons/config/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from '../../core/api';
14 | import Config from './routes';
15 | import reducers from './reducers';
16 | import './assets/scss/config.scss';
17 |
18 | Config.initialize = function () {
19 | FauxtonAPI.addHeaderLink({
20 | title: 'Configuration',
21 | href: '#/_config',
22 | icon: 'fonticon-cog',
23 | className: 'config'
24 | });
25 | };
26 |
27 | FauxtonAPI.addReducers({
28 | config: reducers
29 | });
30 |
31 | export default Config;
32 |
--------------------------------------------------------------------------------
/test/nightwatch_tests/custom-commands/closeNotifications.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | var helpers = require('../helpers/helpers.js');
14 |
15 | exports.command = function () {
16 | var client = this,
17 | dismissSelector = '.Toastify__toast-container .Toastify__toast-body';
18 |
19 | client
20 | .waitForElementVisible(dismissSelector, helpers.maxWaitTime, false)
21 | .keys(client.Keys.ESCAPE)
22 | .waitForElementNotPresent(dismissSelector, helpers.maxWaitTime, false);
23 |
24 | return this;
25 | };
26 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/components.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | @import "../../../../../assets/scss/variables";
14 |
15 | @import "accordion";
16 | @import "header-togglebutton";
17 | @import "docs";
18 | @import "loading-lines";
19 | @import "code-editor";
20 | @import "bulk-selector";
21 | @import "badges";
22 | @import "modals";
23 | @import "tab-element";
24 | @import "header-breadcrumbs";
25 | @import "layouts";
26 | @import "polling";
27 | @import "jsonlink";
28 | @import "menudropdown";
29 | @import "toolbarbutton";
30 |
--------------------------------------------------------------------------------
/app/addons/documents/routes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import Documents from './shared-resources';
14 | import DocumentsRouteObject from "./routes-documents";
15 | import docEditor from "./routes-doc-editor";
16 | import IndexEditorRouteObject from "./routes-index-editor";
17 | import Mango from "./routes-mango";
18 |
19 | Documents.RouteObjects = [
20 | docEditor.DocEditorRouteObject,
21 | DocumentsRouteObject,
22 | IndexEditorRouteObject,
23 | Mango.MangoIndexEditorAndQueryEditor
24 | ];
25 |
26 | export default Documents;
27 |
--------------------------------------------------------------------------------
/app/addons/documents/tests/nightwatch/designConflicts.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 |
14 | module.exports = {
15 |
16 | 'Shows the editor for conflicting docs': function (client) {
17 |
18 | const waitTime = client.globals.maxWaitTime;
19 | const baseUrl = client.options.launch_url;
20 |
21 | client
22 | .createAnimalDb()
23 | .loginToGUI()
24 | .url(baseUrl + '/#/database/animaldb/_design/conflicts')
25 | .waitForElementPresent('#editor-container', waitTime, false)
26 | .end();
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/assets/scss/_animations.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | @mixin animation($options) {
14 | -webkit-animation: $options;
15 | -moz-animation: $options;
16 | animation: $options;
17 | }
18 |
19 | @keyframes slideDown {
20 | from {
21 | opacity: 0;
22 | max-height: 0;
23 | }
24 | to {
25 | opacity: 1;
26 | max-height: 1000px;
27 | }
28 | }
29 |
30 | @keyframes slideUp {
31 | from {
32 | max-height: 1000px;
33 | opacity: 1;
34 | }
35 | to {
36 | max-height: 0;
37 | opacity: 0;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/assets/icons/bookmark.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/documents/rev-browser/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export const REV_BROWSER_REV_TREE_LOADED = 'REV_TREE_LOADED';
14 | export const REV_BROWSER_DIFF_DOCS_READY = 'REV_BROWSER_DIFF_DOCS_READY';
15 | export const REV_BROWSER_DIFF_ENABLE_DIFF_VIEW = 'REV_BROWSER_DIFF_ENABLE_DIFF_VIEW';
16 | export const REV_BROWSER_SHOW_CONFIRM_MODAL = 'REV_BROWSER_SHOW_CONFIRM_MODAL';
17 |
18 | export default {
19 | REV_BROWSER_REV_TREE_LOADED,
20 | REV_BROWSER_DIFF_DOCS_READY,
21 | REV_BROWSER_DIFF_ENABLE_DIFF_VIEW,
22 | REV_BROWSER_SHOW_CONFIRM_MODAL
23 | };
24 |
--------------------------------------------------------------------------------
/app/addons/verifyinstall/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import VerifyInstall from "./routes";
15 | import reducers from './reducers';
16 | import "./assets/scss/verifyinstall.scss";
17 |
18 | VerifyInstall.initialize = function () {
19 | FauxtonAPI.addHeaderLink({
20 | title: 'Verify',
21 | href: '#/verifyinstall',
22 | icon: 'fonticon-ok-circled',
23 | bottomNav: true
24 | });
25 | };
26 |
27 | FauxtonAPI.addReducers({
28 | verifyinstall: reducers
29 | });
30 |
31 | export default VerifyInstall;
32 |
--------------------------------------------------------------------------------
/assets/icons/mixer.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/components/__tests__/paddedBorderedBox.test.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import ReactComponents from "../react-components";
13 | import React from "react";
14 | import {mount} from 'enzyme';
15 |
16 | describe('PaddedBorderedBox', function () {
17 | let el;
18 |
19 | it('hosts child elements', function () {
20 | el = mount(
21 |
22 |
23 |
24 | );
25 | expect(el.find('.foo-children').length).toBeGreaterThan(0);
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/app/addons/fauxton/notifications/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | ADD_NOTIFICATION: 'ADD_NOTIFICATION',
15 | SHOW_NOTIFICATION_CENTER: 'SHOW_NOTIFICATION_CENTER',
16 | HIDE_NOTIFICATION_CENTER: 'HIDE_NOTIFICATION_CENTER',
17 | CLEAR_SINGLE_NOTIFICATION: 'CLEAR_SINGLE_NOTIFICATION',
18 | CLEAR_ALL_NOTIFICATIONS: 'CLEAR_ALL_NOTIFICATIONS',
19 | SELECT_NOTIFICATION_FILTER: 'SELECT_NOTIFICATION_FILTER',
20 | SHOW_PERMANENT_NOTIFICATION: 'SHOW_PERMANENT_NOTIFICATION',
21 | HIDE_PERMANENT_NOTIFICATION: 'HIDE_PERMANENT_NOTIFICATION'
22 | };
23 |
--------------------------------------------------------------------------------
/app/addons/cors/components.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import CORSContainer from "./components/CORSContainer";
14 | import CORSScreen from "./components/CORSScreen";
15 | import OriginInput from "./components/OriginInput";
16 | import Origins from "./components/Origins";
17 | import OriginTable from "./components/OriginTable";
18 | import OriginRow from "./components/OriginRow";
19 |
20 | export default {
21 | CORSContainer,
22 | CORSScreen,
23 | OriginInput,
24 | Origins,
25 | OriginTable,
26 | OriginRow
27 | };
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/app/addons/documents/tests/nightwatch/previousButton.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | module.exports = {
14 | 'Mango: Navigate back to _all_docs': function (client) {
15 | const newDatabaseName = client.globals.testDatabaseName;
16 | const baseUrl = client.options.launch_url;
17 |
18 | client
19 | .populateDatabase(newDatabaseName, 3)
20 | .loginToGUI()
21 | .url(baseUrl + '/#/database/' + newDatabaseName + '/_index')
22 | .clickWhenVisible('.faux-header__breadcrumbs-link')
23 | .assert.urlContains('_all_docs')
24 | .end();
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/app/addons/documents/assets/scss/header.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | #react-headerbar {
14 | .control-toggle-include-docs {
15 | border-right: 1px solid $cf-border-color01;
16 | .icon-check {
17 | &:before {
18 | margin: 6px 6px 0 0;
19 | }
20 | }
21 | .icon-check-empty {
22 | &:before {
23 | margin: 6px 9px 0 0;
24 | }
25 | }
26 | }
27 | }
28 |
29 | .right-header-wrapper {
30 | justify-content: flex-end;
31 | }
32 |
33 | .alternative-header {
34 | .two-sides-toggle-button {
35 | margin-right: 1rem;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/assets/icons/new-database.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/activetasks/routes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import React from 'react';
14 | import FauxtonAPI from "../../core/api";
15 | import Layout from './container';
16 |
17 | var ActiveTasksRouteObject = FauxtonAPI.RouteObject.extend({
18 | selectedHeader: 'Active Tasks',
19 |
20 | routes: {
21 | 'activetasks/:id': 'showActiveTasks',
22 | 'activetasks': 'showActiveTasks'
23 | },
24 |
25 | roles: ['_admin'],
26 |
27 | showActiveTasks: function () {
28 | return ;
29 | }
30 | });
31 |
32 | export default {
33 | RouteObjects: [ActiveTasksRouteObject]
34 | };
35 |
--------------------------------------------------------------------------------
/app/addons/documents/__tests__/query-buttons.test.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import React from 'react';
14 | import ReactDOM from 'react-dom';
15 | import { mount } from 'enzyme';
16 | import QueryButtons from '../index-results/components/queryoptions/QueryButtons';
17 | import sinon from 'sinon';
18 |
19 | describe('QueryButtons', () => {
20 | it('calls onCancel after click', () => {
21 | const spy = sinon.spy();
22 | const wrapper = mount();
23 |
24 | wrapper.find('a').simulate('click');
25 | expect(spy.calledOnce).toBe(true);
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/jest-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "roots": ["app"],
3 | "testPathIgnorePatterns": ["/node_modules/", "stub", "fakeActiveTaskResponse", "fixtures", "sampleexplainplan"],
4 |
5 | "setupFiles": ["./jest-shim.js"],
6 | "setupFilesAfterEnv": ["./jest-setup.js"],
7 |
8 | "moduleNameMapper": {
9 | "underscore": "lodash",
10 | "ace-builds": "/node_modules/ace-builds",
11 | "fetch-mock": "/node_modules/fetch-mock/dist/cjs/index.js",
12 | "./ace-mode-mango.js": "/app/addons/components/components/ace-mode-mango.js",
13 | "./ace-worker-mango.js": "/app/addons/components/components/ace-worker-mango.js",
14 |
15 | "\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|swf|wav|mp3|m4a|aac|oga)$": "/__mocks__/fileMock.js",
16 | "\\.(css|less|scss)$": "/__mocks__/styleMock.js",
17 |
18 | "jsondiffpatch": "/__mocks__/jsondiffpatchMock.js",
19 | "jsondiffpatch/formatters/html": "/__mocks__/jsondiffpatch_HtmlFormatterMock.js"
20 | },
21 |
22 | "testEnvironmentOptions": {
23 | "url": "http://localhost:8000"
24 | },
25 |
26 | "testEnvironment": "jsdom"
27 | }
28 |
--------------------------------------------------------------------------------
/assets/icons/clipboard.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/test/nightwatch_tests/custom-commands/clickWhenVisible.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | const helpers = require('../helpers/helpers.js');
14 |
15 | exports.command = function(element, waitTime, scrollIntoView = true) {
16 |
17 | if (waitTime === undefined) {
18 | waitTime = helpers.maxWaitTime;
19 | }
20 |
21 | this.waitForElementVisible(element);
22 |
23 | if (scrollIntoView) {
24 | this.execute(function(selector) {
25 | document.querySelector(selector).scrollIntoView();
26 | }, [element]);
27 | }
28 |
29 | this.pause(200).click(element);
30 |
31 | return this;
32 | };
33 |
--------------------------------------------------------------------------------
/app/addons/permissions/helpers.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export function isValueAlreadySet (p, section, type, value) {
14 |
15 | if (!p[section]) {
16 | return false;
17 | }
18 |
19 | if (!p[section][type]) {
20 | return false;
21 | }
22 |
23 | return p[section][type].indexOf(value) !== -1;
24 | }
25 |
26 | export function addValueToPermissions (p, section, type, value) {
27 |
28 | if (!p[section]) {
29 | p[section] = {};
30 | }
31 |
32 | if (!p[section][type]) {
33 | p[section][type] = [];
34 | }
35 |
36 | p[section][type].push(value);
37 |
38 | return p;
39 | }
40 |
--------------------------------------------------------------------------------
/app/addons/search/components/SearchFormContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import SearchForm from './SearchForm';
3 | import Actions from '../actions';
4 |
5 | const mapStateToProps = ({ search }) => {
6 | return {
7 | databaseName: search.databaseName,
8 | partitionKey: search.partitionKey,
9 | ddocName: search.ddocName,
10 | indexName: search.indexName,
11 | hasActiveQuery: search.hasActiveQuery,
12 | searchQuery: search.searchQuery,
13 | searchPerformed: search.searchPerformed,
14 | searchResults: search.searchResults,
15 | noResultsWarning: search.noResultsWarning
16 | };
17 | };
18 |
19 | const mapDispatchToProps = (dispatch) => {
20 | return {
21 | querySearch: (databaseName, partitionKey, ddocName, indexName, searchQuery) => {
22 | Actions.querySearch(databaseName, partitionKey, ddocName, indexName, searchQuery);
23 | },
24 |
25 | setSearchQuery: (query) => {
26 | dispatch(Actions.setSearchQuery(query));
27 | }
28 | };
29 | };
30 |
31 | const SearchFormContainer = connect(
32 | mapStateToProps,
33 | mapDispatchToProps
34 | )(SearchForm);
35 |
36 | export default SearchFormContainer;
37 |
--------------------------------------------------------------------------------
/assets/scss/_prettyprint.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | pre.prettyprint {
14 | background: $cf-code-bg;
15 | border: none;
16 | line-height: 1.4;
17 | margin: 0;
18 | padding: 16px;
19 | }
20 | .prettyprint {
21 | .pln,
22 | .pun,
23 | .typ {
24 | color: $cf-code-token-muted;
25 | }
26 | .kwd {
27 | color: $cf-code-token-boolean-color;
28 | }
29 | .str,
30 | .lit {
31 | color: $cf-code-token-variable-color;
32 | }
33 | .com {
34 | color: $cf-code-token-muted;
35 | }
36 | }
37 |
38 | div#explain-plan-wrapper .prettyprint {
39 | box-shadow: $cf-box-shadow;
40 | }
41 |
--------------------------------------------------------------------------------
/bin/install-npm-chromedriver.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 | # use this file except in compliance with the License. You may obtain a copy of
7 | # the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 | # License for the specific language governing permissions and limitations under
15 | # the License.
16 |
17 | # Path is hardcoded because this script is intended for use by CI (GH Actions)
18 | # so there's really no need to auto find the chrome binary
19 | CHROME_PATH=/usr/bin/google-chrome
20 | CHROME_VERSION=$("$CHROME_PATH" --version | sed -E 's/Google Chrome //' | sed -E 's/Chromium //' | awk -F. '{print $1}')
21 |
22 | if [[ $CHROME_VERSION == "" ]]; then echo "Failed to find chrome version from '$CHROME_PATH'" && exit 1; fi
23 |
24 | echo "Installing chromedriver@$CHROME_VERSION"
25 |
26 | npm install chromedriver@$CHROME_VERSION
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.log
2 | node_modules
3 | dist
4 | build
5 | app/load_addons.js
6 | !app/addons/
7 | app/addons/*
8 | !app/addons/activetasks
9 | !app/addons/config
10 | !app/addons/cluster
11 | !app/addons/components
12 | !app/addons/replication
13 | !app/addons/auth
14 | !app/addons/permissions
15 | !app/addons/verifyinstall
16 | !app/addons/compaction
17 | !app/addons/fauxton
18 | !app/addons/databases
19 | !app/addons/documents
20 | !app/addons/documentation
21 | !app/addons/styletests
22 | !app/addons/cors
23 | !app/addons/setup
24 | !app/addons/search
25 | !app/addons/news
26 | settings.json*
27 | i18n.json
28 | !settings.json.default
29 | !settings.json.default.json
30 | !i18n.json.default.json
31 | test/test.config.js
32 | app/initialize.js
33 | assets/scss/_variable_overrides.scss
34 | .module-cache
35 | test/nightwatch_tests/nightwatch.json
36 | test/nightwatch_tests/reports/*
37 | test/nightwatch_tests/selenium/*
38 | !test/nightwatch_tests/selenium/.gitkeep
39 | .DS_Store
40 | selenium-debug.log
41 | npm-debug.log
42 | test/bundle.js
43 | test/bundle.dev.js
44 | test/templates.js
45 | test/dashboard.assets
46 | # test coverage dir
47 | coverage
48 |
49 | # IDEs
50 | .idea/
51 | .vscode
52 |
--------------------------------------------------------------------------------
/app/addons/documents/partition-key/actions.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import * as DatabasesAPI from '../../databases/api';
14 | import ActionTypes from './actiontypes';
15 |
16 | export const checkDbPartitioned = (databaseName) => (dispatch) => {
17 | //Reset visibility to false
18 | dispatch({
19 | type: ActionTypes.PARTITON_KEY_HIDE_SELECTOR
20 | });
21 |
22 | DatabasesAPI.fetchDatabaseInfo(databaseName).then(dbInfo => {
23 | if (dbInfo.props && dbInfo.props.partitioned === true) {
24 | dispatch({
25 | type: ActionTypes.PARTITON_KEY_SHOW_SELECTOR
26 | });
27 | }
28 | });
29 | };
30 |
--------------------------------------------------------------------------------
/app/addons/documents/tests/nightwatch/designDocInfoPresent.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 |
14 |
15 | module.exports = {
16 | 'Design Doc Metadata present' : function (client) {
17 | var waitTime = client.globals.maxWaitTime,
18 | newDatabaseName = client.globals.testDatabaseName,
19 | baseUrl = client.options.launch_url;
20 |
21 | client
22 | .populateDatabase(newDatabaseName)
23 | .loginToGUI()
24 | .url(baseUrl + '/#/database/' + newDatabaseName + '/_design/testdesigndoc/_info')
25 | .waitForElementVisible('.metadata-page', waitTime, false)
26 | .end();
27 | }
28 | };
29 |
--------------------------------------------------------------------------------
/app/addons/activetasks/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | export default {
13 | ACTIVE_TASKS_SWITCH_TAB: 'ACTIVE_TASKS_SWITCH_TAB',
14 | ACTIVE_TASKS_SET_COLLECTION: 'ACTIVE_TASKS_SET_COLLECTION',
15 | ACTIVE_TASKS_SET_SEARCH_TERM: 'ACTIVE_TASKS_SET_SEARCH_TERM',
16 | ACTIVE_TASKS_SORT_BY_COLUMN_HEADER: 'ACTIVE_TASKS_SORT_BY_COLUMN_HEADER',
17 | ACTIVE_TASKS_FETCH_AND_SET: 'ACTIVE_TASKS_FETCH_AND_SET',
18 | ACTIVE_TASKS_SET_IS_LOADING: 'ACTIVE_TASKS_SET_IS_LOADING',
19 | ACTIVE_TASKS_POLLING_COLLECTION: 'ACTIVE_TASKS_POLLING_COLLECTION',
20 | ACTIVE_TASKS_SET_HIDDEN_COLUMNS: 'ACTIVE_TASKS_SET_HIDDEN_COLUMNS'
21 | };
22 |
--------------------------------------------------------------------------------
/app/addons/documents/changes/components/ChangeID.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import React from 'react';
14 | import FauxtonAPI from '../../../../core/api';
15 |
16 | export default class ChangeID extends React.Component {
17 | render () {
18 | const { deleted, id, databaseName } = this.props;
19 | if (deleted) {
20 | return (
21 | {id}
22 | );
23 | }
24 | const link = '#' + FauxtonAPI.urls('document', 'app', encodeURIComponent(databaseName), encodeURIComponent(id));
25 | return (
26 | {id}
27 | );
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/addons/documents/doc-editor/components/PreferencesButton.js:
--------------------------------------------------------------------------------
1 |
2 | import React from 'react';
3 | import PropTypes from 'prop-types';
4 | import Components from '../../../components/react-components';
5 |
6 | const { MenuDropDown } = Components;
7 |
8 | export default class PreferencesButton extends React.Component {
9 | static defaultProps = {
10 | wordWrapEnabled: false,
11 | };
12 | static propTypes = {
13 | wordWrapEnabled: PropTypes.bool,
14 | toggleWordWrap: PropTypes.func.isRequired,
15 | };
16 |
17 | constructor(props) {
18 | super(props);
19 | this.toggleWordWrap = this.toggleWordWrap.bind(this);
20 | }
21 |
22 | toggleWordWrap() {
23 | this.props.toggleWordWrap();
24 | }
25 |
26 | render() {
27 | const links = [
28 | {
29 | title: 'Word Wrap',
30 | onClick: () => { this.toggleWordWrap(); },
31 | icon: this.props.wordWrapEnabled ? 'fonticon-ok' : '',
32 | }
33 | ];
34 |
35 | return (
36 |
37 |
38 |
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/app/addons/components/assets/scss/layouts.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | .template {
13 | height: 100%;
14 | }
15 |
16 | .right-header-flex {
17 | display: flex;
18 | align-items: center;
19 | flex-direction: row;
20 | height: 100%;
21 |
22 | &--ie1X {
23 | align-items: stretch;
24 | }
25 | }
26 |
27 | //yes !important!!! We have to overridde some styles I can't override any other way for now
28 | div.faux__breadcrumbs-mango-header {
29 | height: 64px !important;
30 | -ms-flex: 0 0 440px !important;
31 | flex: 0 0 440px !important;
32 | overflow: hidden !important;
33 | }
34 |
35 | div.faux__jsondoc-wrapper {
36 | display: flex;
37 | }
38 |
--------------------------------------------------------------------------------
/app/addons/config/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | EDIT_CONFIG: 'EDIT_CONFIG',
15 | LOADING_CONFIG: 'LOADING_CONFIG',
16 | EDIT_OPTION: 'EDIT_OPTION',
17 | CANCEL_EDIT: 'CANCEL_EDIT',
18 | SAVING_OPTION: 'SAVING_OPTION',
19 | OPTION_SAVE_SUCCESS: 'OPTION_SAVE_SUCCESS',
20 | OPTION_SAVE_FAILURE: 'OPTION_SAVE_FAILURE',
21 | DELETING_OPTION: 'DELETING_OPTION',
22 | OPTION_DELETE_SUCCESS: 'OPTION_DELETE_SUCCESS',
23 | OPTION_DELETE_FAILURE: 'OPTION_DELETE_FAILURE',
24 | ADDING_OPTION: 'ADDING_OPTION',
25 | OPTION_ADD_SUCCESS: 'OPTION_ADD_SUCCESS',
26 | OPTION_ADD_FAILURE: 'OPTION_ADD_FAILURE'
27 | };
28 |
--------------------------------------------------------------------------------
/app/addons/documents/__tests__/perpage-selector.test.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import React from 'react';
14 | import ReactDOM from 'react-dom';
15 | import { mount } from 'enzyme';
16 | import PerPageSelector from '../index-results/components/pagination/PerPageSelector';
17 | import sinon from 'sinon';
18 |
19 | describe('PerPageSelector', () => {
20 | it('calls perPageChange when value changes', () => {
21 | const spy = sinon.spy();
22 | const wrapper = mount();
23 |
24 | wrapper.find('#select-per-page').simulate('change');
25 | expect(spy.calledOnce).toBe(true);
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/app/addons/documents/partition-key/reducers.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import ActionTypes from './actiontypes';
14 |
15 | const initialState = {
16 | selectorVisible: false
17 | };
18 |
19 | export default function partitionKey(state = initialState, action) {
20 | switch (action.type) {
21 |
22 | case ActionTypes.PARTITON_KEY_SHOW_SELECTOR:
23 | return {
24 | ...state,
25 | selectorVisible: true
26 | };
27 |
28 | case ActionTypes.PARTITON_KEY_HIDE_SELECTOR:
29 | return {
30 | ...state,
31 | selectorVisible: false
32 | };
33 |
34 | default:
35 | return state;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/addons/fauxton/navigation/__tests__/burger-test.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import Burger from "../components/Burger";
13 | import React from "react";
14 | import ReactDOM from "react-dom";
15 | import sinon from "sinon";
16 | import {mount} from 'enzyme';
17 |
18 | describe('Navigation Bar', () => {
19 |
20 | describe('Burger', () => {
21 | it('dispatch TOGGLE_NAVBAR_MENU on click', () => {
22 | const toggleMenu = sinon.spy();
23 | const burgerEl = mount();
24 | burgerEl.simulate('click');
25 | expect(toggleMenu.calledOnce).toBeTruthy();
26 | });
27 |
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/app/addons/databases/actiontypes.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | export default {
13 | DATABASES_SETPAGE: 'DATABASES_SETPAGE',
14 | DATABASES_SETLIMIT: 'DATABASES_SETLIMIT',
15 | DATABASES_SET_PROMPT_VISIBLE: 'DATABASES_SET_PROMPT_VISIBLE',
16 | DATABASES_STARTLOADING: 'DATABASES_STARTLOADING',
17 | DATABASES_LOADCOMPLETE: 'DATABASES_LOADCOMPLETE',
18 | DATABASES_UPDATE: 'DATABASES_UPDATE',
19 | DATABASES_PARTITIONED_DB_AVAILABLE: 'DATABASES_PARTITIONED_DB_AVAILABLE',
20 | DATABASES_FETCH_SELECTED_DB_METADATA: 'DATABASES_FETCH_SELECTED_DB_METADATA',
21 | DATABASES_FETCH_SELECTED_DB_METADATA_SUCCESS: 'DATABASES_FETCH_SELECTED_DB_METADATA_SUCCESS'
22 | };
23 |
--------------------------------------------------------------------------------
/app/addons/fauxton/notifications/components/NotificationPanelContainer.js:
--------------------------------------------------------------------------------
1 | import { connect } from 'react-redux';
2 | import * as Actions from '../actions';
3 | import NotificationPanelWithTransition from './NotificationPanelWithTransition';
4 |
5 | const mapStateToProps = ({ notifications }) => {
6 | return {
7 | isVisible: notifications.notificationCenterVisible,
8 | filter: notifications.selectedNotificationFilter,
9 | notifications: notifications.notifications
10 | };
11 | };
12 |
13 | const mapDispatchToProps = (dispatch) => {
14 | return {
15 | hideNotificationCenter: () => {
16 | dispatch(Actions.hideNotificationCenter());
17 | },
18 | selectNotificationFilter: (filter) => {
19 | dispatch(Actions.selectNotificationFilter(filter));
20 | },
21 | clearAllNotifications: () => {
22 | dispatch(Actions.clearAllNotifications());
23 | },
24 | clearSingleNotification: (toastId) => {
25 | dispatch(Actions.clearSingleNotification(toastId));
26 | }
27 | };
28 | };
29 |
30 |
31 | const NotificationPanelContainer = connect(
32 | mapStateToProps,
33 | mapDispatchToProps
34 | )(NotificationPanelWithTransition);
35 |
36 | export default NotificationPanelContainer;
37 |
--------------------------------------------------------------------------------
/app/addons/fauxton/tests/nightwatch/highlightsidebar.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 |
14 |
15 | module.exports = {
16 | 'Highlight Sidebar' : function (client) {
17 | var waitTime = client.globals.maxWaitTime,
18 | baseUrl = client.options.launch_url;
19 |
20 | client
21 | .loginToGUI()
22 | .url(baseUrl)
23 | .waitForElementPresent('.add-new-database-btn', waitTime, false)
24 | .click('a[href="#/replication"]')
25 | .pause(1000)
26 | .waitForElementVisible('#new-replication-btn', waitTime, false)
27 | .assert.hasClass('a[href="#/replication"]', 'faux-navbar__link--active')
28 | .end();
29 | }
30 | };
31 |
--------------------------------------------------------------------------------
/assets/scss/_react-animations.scss:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | .fade-enter {
14 | opacity: 0;
15 | transition: opacity 0.25s;
16 |
17 | &.fade-enter-active {
18 | opacity: 1;
19 | }
20 | }
21 |
22 | .fade-leave {
23 | opacity: 1;
24 | transition: opacity 0.25s;
25 |
26 | &.fade-leave-active {
27 | opacity: 0;
28 | }
29 | }
30 |
31 | .slow-fade-enter {
32 | opacity: 0;
33 | transition: opacity 0.75s;
34 |
35 | &.slow-fade-enter-active {
36 | opacity: 1;
37 | }
38 | }
39 |
40 | .slow-fade-leave {
41 | opacity: 1;
42 | transition: opacity 0.75s;
43 |
44 | &.slow-fade-leave-active {
45 | opacity: 0;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/app/addons/documents/constants.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | export default {
14 | LAYOUT_ORIENTATION: {
15 | TABLE: 'LAYOUT_TABLE',
16 | METADATA: 'LAYOUT_METADATA',
17 | JSON: 'LAYOUT_JSON'
18 | },
19 | // Document types that can be displayed by Index Results components
20 | INDEX_RESULTS_DOC_TYPE: {
21 | MANGO_INDEX: 'MangoIndex',
22 | MANGO_QUERY: 'MangoQueryResult',
23 | VIEW: 'view'
24 | },
25 | INDEX_RESULTS_STYLE: {
26 | TEXT_OVERFLOW_TRUNCATED: 'truncated',
27 | TEXT_OVERFLOW_FULL: 'full',
28 | FONT_SIZE_SMALL: 'small-font',
29 | FONT_SIZE_LARGE: 'large-font',
30 | FONT_SIZE_MEDIUM: 'medium-font'
31 | }
32 | };
33 |
--------------------------------------------------------------------------------
/assets/iconfontgenerator/README.md:
--------------------------------------------------------------------------------
1 | ### How to regenerate Fauxton's icon fonts
2 |
3 | The steps below describe how to use [svgtofont](https://github.com/jaywcjlove/svgtofont) to generate a new set of
4 | CSS and font files based on an input set of SVG icons.
5 |
6 | **IMPORTANT**: The source SVG files can not contain any comments or metatags (e.g. `` , `` or ``) otherwise the `svgtofont` tool will fail.
7 |
8 |
9 | 1. Add, remove or replace SVG icons in the [assets/icons](assets/icons) folder.
10 |
11 | 2. Run `npm install svgtofont --no-save` to install the tool.
12 |
13 | 3. Then run
14 | ```
15 | cd assets/iconfontgenerator
16 | node createfonts.js
17 | ```
18 |
19 | Specifiying `fauxtonicon[INTEGER]` will update the value of `fauxtonFontname` in `assets/iconfontgenerator/createfonts.js` which is the name of the new font files. This is needed because the font files are bundled as-is by Webpack, so in order to burst the browser's cache, you need to specify a different name. Take note of the current value and increment by 1 for consistency (e.g., `fauxtonicon5` --> `fauxtonicon6`)
20 |
21 | The new CSS and font files are generated and copied to the appropriate Fauxton folders.
22 |
--------------------------------------------------------------------------------
/app/addons/config/components/AddOptionButtonContainer.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import { connect } from 'react-redux';
14 | import * as Actions from '../actions';
15 | import AddOptionButton from './AddOptionButton';
16 |
17 |
18 | const mapStateToProps = () => {
19 | return {};
20 | };
21 |
22 | const mapDispatchToProps = (dispatch, ownProps) => {
23 | return {
24 | onAdd: (options) => {
25 | dispatch(Actions.addOption(ownProps.node, options));
26 | }
27 | };
28 | };
29 |
30 | const AddOptionButtonContainer = connect(
31 | mapStateToProps,
32 | mapDispatchToProps
33 | )(AddOptionButton);
34 |
35 | export default AddOptionButtonContainer;
36 |
--------------------------------------------------------------------------------
/app/addons/permissions/components/PermissionsItem.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import PropTypes from 'prop-types';
14 |
15 | import React from 'react';
16 | import CloseButton from 'react-bootstrap/CloseButton';
17 |
18 | const PermissionsItem = ({removeItem, section, type, value}) => {
19 |
20 | return (
21 |
25 | );
26 | };
27 |
28 | PermissionsItem.propTypes = {
29 | value: PropTypes.string.isRequired,
30 | removeItem: PropTypes.func.isRequired,
31 | };
32 |
33 | export default PermissionsItem;
34 |
--------------------------------------------------------------------------------
/assets/icons/deselect-all.svg:
--------------------------------------------------------------------------------
1 |
2 |
14 |
--------------------------------------------------------------------------------
/app/addons/replication/__tests__/helpers.tests.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import helpers from '../helpers';
14 |
15 | describe('Replication Helpers - getDatabaseLabel', () => {
16 |
17 | it('returns database name for string', () => {
18 | const db = 'http://tester:testerpass@127.0.0.1/db/fancy%2Fdb%2Fname';
19 |
20 | const res = helpers.getDatabaseLabel(db);
21 |
22 | expect(res).toBe('fancy%2Fdb%2Fname');
23 | });
24 |
25 | it('returns database name for object', () => {
26 | const db = {
27 | url: 'http://tester:testerpass@127.0.0.1/fancy'
28 | };
29 |
30 | const res = helpers.getDatabaseLabel(db);
31 | expect(res).toBe('fancy');
32 | });
33 |
34 | });
35 |
--------------------------------------------------------------------------------
/app/addons/components/__tests__/headerTogglebutton.test.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import ReactComponents from "../react-components";
13 | import React from "react";
14 | import {mount} from 'enzyme';
15 | import sinon from "sinon";
16 |
17 | describe('Header Togglebutton', () => {
18 | let toggleEl, toggleCallback;
19 | beforeEach(() => {
20 | toggleCallback = sinon.spy();
21 | toggleEl = mount();
23 | });
24 |
25 |
26 | it('should call the passed callback', () => {
27 | toggleEl.simulate('click');
28 | expect(toggleCallback.calledOnce).toBeTruthy();
29 | });
30 | });
31 |
--------------------------------------------------------------------------------
/app/addons/setup/container/FirstStepContainer.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 | import {connect} from 'react-redux';
13 | import FirstStepController from '../components/FirstStepController';
14 | import {getClusterState} from '../reducers';
15 | import {getClusterStateFromCouch} from '../actions';
16 |
17 | const mapStateToProps = ({setup}) => {
18 | return {
19 | clusterState: getClusterState(setup),
20 | };
21 | };
22 |
23 |
24 | const mapDispatchToProps = (dispatch) => {
25 | return {
26 | getClusterState() {
27 | dispatch(getClusterStateFromCouch());
28 | }
29 | };
30 | };
31 |
32 | export default connect(
33 | mapStateToProps,
34 | mapDispatchToProps
35 | )(FirstStepController);
36 |
--------------------------------------------------------------------------------
/app/addons/documents/tests/nightwatch/jsonView.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 |
3 | 'Doc results: check ?include_docs=true returns doc content': function (client) {
4 | var newDatabaseName = client.globals.testDatabaseName,
5 | newDocumentName = 'bitterns',
6 | waitTime = client.globals.maxWaitTime,
7 | baseUrl = client.options.launch_url;
8 |
9 | var docContent = {
10 | "species": "American Bittern",
11 | "seen_general": "not as often as I'd like",
12 | "seen_this_year": "*sigh*, no."
13 | };
14 |
15 | client
16 | .createDocument(newDocumentName, newDatabaseName, docContent)
17 | .loginToGUI()
18 | .checkForDocumentCreated(newDocumentName)
19 |
20 | .url(baseUrl + '#/database/' + newDatabaseName + '/_all_docs')
21 | .waitForElementPresent('.tableview-checkbox-cell', waitTime, false)
22 | .clickWhenVisible('.fonticon-json')
23 | .waitForElementPresent('.doc-item', client.globals.maxWaitTime, false)
24 | // by default include_docs is on, so check "American Bittern" does exist in the DOM
25 | .waitForElementPresent('.prettyprint', client.globals.maxWaitTime, false)
26 | .assert.textContains('.prettyprint', 'American Bittern')
27 | .end();
28 | }
29 | };
30 |
31 |
--------------------------------------------------------------------------------
/app/addons/fauxton/navigation/components/Brand.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import PropTypes from 'prop-types';
14 |
15 | import React from 'react';
16 |
17 | import classNames from 'classnames';
18 |
19 | const Brand = ({isMinimized}) => {
20 |
21 | const burgerClasses = classNames(
22 | 'faux-navbar__brand-logo',
23 | {'faux-navbar__brand-logo--wide': !isMinimized},
24 | {'faux-navbar__brand-logo--narrow': isMinimized}
25 | );
26 |
27 | return (
28 |
29 |
30 |
31 | );
32 | };
33 |
34 | Brand.propTypes = {
35 | isMinimized: PropTypes.bool.isRequired
36 | };
37 |
38 | export default Brand;
39 |
--------------------------------------------------------------------------------
/app/addons/fauxton/navigation/components/Footer.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import PropTypes from 'prop-types';
14 |
15 | import React from 'react';
16 |
17 | const Footer = ({version}) => {
18 |
19 | if (!version) { return null; }
20 |
21 | return (
22 |
28 | );
29 |
30 | };
31 |
32 | Footer.propTypes = {
33 | version: PropTypes.string
34 | };
35 |
36 | export default Footer;
37 |
--------------------------------------------------------------------------------
/app/addons/setup/base.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import FauxtonAPI from "../../core/api";
14 | import app from '../../app';
15 | import Setup from "./route";
16 | import reducers from './reducers';
17 | import './assets/scss/setup.scss';
18 | Setup.initialize = function () {
19 | FauxtonAPI.addHeaderLink({
20 | title: 'Setup',
21 | href: "#/setup",
22 | icon: 'fonticon-wrench'
23 | });
24 | };
25 |
26 | FauxtonAPI.addReducers({
27 | setup: reducers
28 | });
29 |
30 | FauxtonAPI.registerUrls('cluster_setup', {
31 | server: () => app.host + '/_cluster_setup',
32 | app: () => '/_cluster_setup',
33 | apiurl: () => window.location.origin + "/_cluster_setup"
34 | });
35 |
36 | export default Setup;
37 |
--------------------------------------------------------------------------------
/assets/icons/users.svg:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/app/addons/cors/components/OriginTable.js:
--------------------------------------------------------------------------------
1 | import PropTypes from 'prop-types';
2 | import React, { Component } from "react";
3 | import OriginRow from "./OriginRow";
4 |
5 | export default class OriginTable extends Component {
6 |
7 | constructor (props) {
8 | super(props);
9 | }
10 |
11 | createRows () {
12 | return this.props.origins.map((origin, i) => {
13 | return ;
17 | });
18 | }
19 |
20 | render () {
21 | const {origins, isVisible} = this.props;
22 |
23 | if (!origins) {
24 | return null;
25 | }
26 |
27 | if (!isVisible || origins.length === 0) {
28 | return null;
29 | }
30 |
31 | const originRows = this.createRows();
32 |
33 | return (
34 |
35 |
36 | {originRows}
37 |
38 |
39 | );
40 | }
41 |
42 | }
43 |
44 | OriginTable.propTypes = {
45 | isVisible: PropTypes.bool.isRequired,
46 | origins: PropTypes.arrayOf(PropTypes.string),
47 | updateOrigin: PropTypes.func.isRequired,
48 | deleteOrigin: PropTypes.func.isRequired
49 | };
50 |
--------------------------------------------------------------------------------
/bin/install-docker-travis.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 | # use this file except in compliance with the License. You may obtain a copy of
5 | # the License at
6 | #
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | #
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 | # License for the specific language governing permissions and limitations under
13 | # the License.
14 |
15 | sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-precise main" > /etc/apt/sources.list.d/docker.list'
16 | sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
17 | sudo apt-get update
18 | sudo apt-key update
19 | sudo apt-get -qqy -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install docker-engine=1.11.1-0~precise
20 | sudo rm /usr/local/bin/docker-compose
21 | curl -L https://github.com/docker/compose/releases/download/1.8.0-rc1/docker-compose-`uname -s`-`uname -m` > docker-compose
22 | chmod +x docker-compose
23 | sudo mv docker-compose /usr/local/bin
24 |
--------------------------------------------------------------------------------
/app/addons/verifyinstall/components/VerifyInstallScreen.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import React from 'react';
14 | import VerifyInstallButton from './VerifyInstallButton';
15 | import VerifyInstallResults from './VerifyInstallResults';
16 |
17 | export default class VerifyInstallScreen extends React.Component {
18 |
19 | constructor(props) {
20 | super(props);
21 | this.props.resetTests();
22 | }
23 |
24 | render() {
25 | return (
26 |
27 |
28 |
29 |
30 | );
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/addons/documents/index-results/components/results/NoResultsScreen.js:
--------------------------------------------------------------------------------
1 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not
2 | // use this file except in compliance with the License. You may obtain a copy of
3 | // the License at
4 | //
5 | // http://www.apache.org/licenses/LICENSE-2.0
6 | //
7 | // Unless required by applicable law or agreed to in writing, software
8 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10 | // License for the specific language governing permissions and limitations under
11 | // the License.
12 |
13 | import PropTypes from 'prop-types';
14 |
15 | import React from 'react';
16 |
17 | export default function NoResultsScreen ({ text, isWarning }) {
18 | const warningMsg = (
19 |