diff --git a/console/cypress/integration/data/permissions/test.js b/console/cypress/integration/data/permissions/test.js index d03b4f0258dcc..ccb6b7ad56147 100644 --- a/console/cypress/integration/data/permissions/test.js +++ b/console/cypress/integration/data/permissions/test.js @@ -32,7 +32,7 @@ export const runPermissionsTests = () => { describe('Permissions', () => { it('Create a table', passPTCreateTable); it('Create a view', passPVCreateView); - it('Check permissiosn route', passPTCheckRoute); + it('Check permission route', passPTCheckRoute); it('Table No-check permissions work as expected', passPTNoChecks); it('Table Custom-check permissions work as expected', passPTCustomChecks); it('Table Permissions removal works as expected', passPTRemovePerms); diff --git a/console/package-lock.json b/console/package-lock.json index f3b89aa340280..f47d342f028b2 100644 --- a/console/package-lock.json +++ b/console/package-lock.json @@ -5674,7 +5674,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5692,11 +5693,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5709,15 +5712,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5820,7 +5826,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5830,6 +5837,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5842,17 +5850,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -5869,6 +5880,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5941,7 +5953,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5951,6 +5964,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -6026,7 +6040,8 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -6056,6 +6071,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -6073,6 +6089,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -6111,11 +6128,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.2", - "bundled": true + "bundled": true, + "optional": true } } }, diff --git a/console/package.json b/console/package.json index c3d8cbe53c16a..7afb28edcd650 100644 --- a/console/package.json +++ b/console/package.json @@ -115,7 +115,7 @@ "clean-webpack-plugin": "^0.1.17", "concurrently": "^3.5.0", "css-loader": "^0.28.11", - "cypress": "^3.0.1", + "cypress": "3.0.2", "dotenv": "^5.0.1", "eslint": "^4.19.1", "eslint-config-airbnb": "16.1.0", diff --git a/console/src/components/Common/Common.scss b/console/src/components/Common/Common.scss index d7bcf548fce61..0581d5dce837b 100644 --- a/console/src/components/Common/Common.scss +++ b/console/src/components/Common/Common.scss @@ -413,6 +413,14 @@ input { { margin-left: 15px; } +.mar_small_left +{ + margin-left: 5px; +} +.mar_small_neg_left +{ + margin-left: -5px; +} .padd_remove { padding-left: 0 !important; diff --git a/console/src/components/Services/Data/DataHeader.js b/console/src/components/Services/Data/DataHeader.js index 34df34f11d52d..c1997b9998e7d 100644 --- a/console/src/components/Services/Data/DataHeader.js +++ b/console/src/components/Services/Data/DataHeader.js @@ -1,12 +1,11 @@ import React from 'react'; import { Link } from 'react-router'; import Helmet from 'react-helmet'; - import PageContainer from './PageContainer/PageContainer'; - -import { appPrefix } from './push'; import globals from '../../../Globals'; +const appPrefix = '/data'; + const DataHeader = ({ schema, currentSchema, diff --git a/console/src/components/Services/Data/DataState.js b/console/src/components/Services/Data/DataState.js index aab786a662356..94979c5a1b73e 100644 --- a/console/src/components/Services/Data/DataState.js +++ b/console/src/components/Services/Data/DataState.js @@ -27,6 +27,7 @@ const defaultPermissionsState = { query: '', custom_checked: false, newRole: '', + limitEnabled: true, }; const defaultQueryPermissions = { @@ -37,6 +38,7 @@ const defaultQueryPermissions = { select: { columns: [], filter: {}, + limit: null, }, update: { columns: [], diff --git a/console/src/components/Services/Data/TableBrowseRows/ViewHeader.js b/console/src/components/Services/Data/TableBrowseRows/ViewHeader.js index 45a8171ad40f4..4cdf1fecec862 100644 --- a/console/src/components/Services/Data/TableBrowseRows/ViewHeader.js +++ b/console/src/components/Services/Data/TableBrowseRows/ViewHeader.js @@ -2,8 +2,6 @@ import React from 'react'; import { Link } from 'react-router'; import Helmet from 'react-helmet'; -import { appPrefix } from '../push'; - const ViewHeader = ({ tableName, tabName, currentSchema, migrationMode }) => { const styles = require('../TableCommon/Table.scss'); let capitalised = tabName; @@ -51,8 +49,7 @@ const ViewHeader = ({ tableName, tabName, currentSchema, migrationMode }) => { > { > { > { > { }, }; + case PERM_TOGGLE_ENABLE_LIMIT: + return { + ...modifyState, + permissionsState: { + ...modifyState.permissionsState, + limitEnabled: action.data, + }, + }; + + case PERM_TOGGLE_MODIFY_LIMIT: + return { + ...modifyState, + permissionsState: { + ...updatePermissionsState( + modifyState.permissionsState, + 'limit', + action.data + ), + }, + }; + case PERM_SET_FILTER_SAME_AS: case PERM_SET_FILTER: return { diff --git a/console/src/components/Services/Data/TableModify/Modify.scss b/console/src/components/Services/Data/TableModify/Modify.scss index 3c14a2dd42f2d..9d99e07706fc2 100644 --- a/console/src/components/Services/Data/TableModify/Modify.scss +++ b/console/src/components/Services/Data/TableModify/Modify.scss @@ -14,6 +14,13 @@ text-align: center; } +.limitInput { + display: inline-block; + width: 100px; + margin-left: 15px; + height: 25px; +} + .colEditor { :global(.form-control):focus { box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 rgba(102, 175, 233, 0.6); diff --git a/console/src/components/Services/Data/TableModify/ModifyTable.js b/console/src/components/Services/Data/TableModify/ModifyTable.js index 23f1e1c2ef34a..fae26aec3e317 100644 --- a/console/src/components/Services/Data/TableModify/ModifyTable.js +++ b/console/src/components/Services/Data/TableModify/ModifyTable.js @@ -1,7 +1,6 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { Link } from 'react-router'; -import { appPrefix } from '../push'; import TableHeader from '../TableCommon/TableHeader'; import { activateCommentEdit, @@ -38,6 +37,8 @@ import { import { showErrorNotification } from '../Notification'; import gqlPattern, { gqlColumnErrorNotif } from '../Common/GraphQLValidation'; +const appPrefix = '/data'; + const alterTypeOptions = dataTypes.map((datatype, index) => (