fix: Rest of the audit logs potential auto-merge errors. (#17192)
* fix: EE-CE parity due to audit-logs * fix: rest of the audit-logs potential failures * fix: future conflict with RBAC
This commit is contained in:
parent
a92b680462
commit
32ed0da447
|
|
@ -3,30 +3,30 @@ import history from "utils/history";
|
|||
import AppHeader from "pages/common/AppHeader";
|
||||
import { Redirect, Route, Router, Switch } from "react-router-dom";
|
||||
import {
|
||||
ADMIN_SETTINGS_CATEGORY_DEFAULT_PATH,
|
||||
ADMIN_SETTINGS_CATEGORY_PATH,
|
||||
ADMIN_SETTINGS_PATH,
|
||||
APPLICATIONS_URL,
|
||||
AUTH_LOGIN_URL,
|
||||
BASE_LOGIN_URL,
|
||||
BASE_SIGNUP_URL,
|
||||
BASE_URL,
|
||||
BUILDER_PATH,
|
||||
BUILDER_CUSTOM_PATH,
|
||||
WORKSPACE_URL,
|
||||
SIGN_UP_URL,
|
||||
SIGNUP_SUCCESS_URL,
|
||||
USER_AUTH_URL,
|
||||
USERS_URL,
|
||||
BUILDER_PATCH_PATH,
|
||||
BUILDER_PATH,
|
||||
BUILDER_PATH_DEPRECATED,
|
||||
PROFILE,
|
||||
SETUP,
|
||||
VIEWER_PATH,
|
||||
VIEWER_CUSTOM_PATH,
|
||||
ADMIN_SETTINGS_PATH,
|
||||
ADMIN_SETTINGS_CATEGORY_PATH,
|
||||
ADMIN_SETTINGS_CATEGORY_DEFAULT_PATH,
|
||||
BUILDER_PATH_DEPRECATED,
|
||||
VIEWER_PATH_DEPRECATED,
|
||||
SIGNUP_SUCCESS_URL,
|
||||
SIGN_UP_URL,
|
||||
TEMPLATES_PATH,
|
||||
USERS_URL,
|
||||
USER_AUTH_URL,
|
||||
VIEWER_CUSTOM_PATH,
|
||||
VIEWER_PATCH_PATH,
|
||||
BUILDER_PATCH_PATH,
|
||||
VIEWER_PATH,
|
||||
VIEWER_PATH_DEPRECATED,
|
||||
WORKSPACE_URL,
|
||||
} from "constants/routes";
|
||||
import WorkspaceLoader from "pages/workspace/loader";
|
||||
import ApplicationListLoader from "pages/Applications/loader";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { memo, useMemo, useRef, useState } from "react";
|
||||
import styled from "styled-components";
|
||||
import _ from "lodash";
|
||||
import { isObject, isString } from "lodash";
|
||||
import equal from "fast-deep-equal/es6";
|
||||
import Popper from "pages/Editor/Popper";
|
||||
import ReactJson from "react-json-view";
|
||||
|
|
@ -10,15 +10,19 @@ import {
|
|||
} from "components/editorComponents/CodeEditor/EditorConfig";
|
||||
import { theme } from "constants/DefaultTheme";
|
||||
import { Placement } from "popper.js";
|
||||
import { ScrollIndicator } from "design-system";
|
||||
import { ScrollIndicator, TooltipComponent as Tooltip } from "design-system";
|
||||
import { EvaluatedValueDebugButton } from "components/editorComponents/Debugger/DebugCTA";
|
||||
import { EvaluationSubstitutionType } from "entities/DataTree/dataTreeFactory";
|
||||
import { TooltipComponent as Tooltip } from "design-system";
|
||||
import { Toaster } from "components/ads/Toast";
|
||||
import { Classes, Collapse, Button, Icon } from "@blueprintjs/core";
|
||||
import {
|
||||
Button,
|
||||
Classes,
|
||||
Collapse,
|
||||
Icon,
|
||||
IPopoverSharedProps,
|
||||
} from "@blueprintjs/core";
|
||||
import { IconNames } from "@blueprintjs/icons";
|
||||
import { UNDEFINED_VALIDATION } from "utils/validation/common";
|
||||
import { IPopoverSharedProps } from "@blueprintjs/core";
|
||||
import { ReactComponent as CopyIcon } from "assets/icons/menu/copy-snippet.svg";
|
||||
import copy from "copy-to-clipboard";
|
||||
|
||||
|
|
@ -169,14 +173,17 @@ function CollapseToggle(props: { isOpen: boolean }) {
|
|||
);
|
||||
}
|
||||
|
||||
function copyContent(content: any) {
|
||||
const stringifiedContent = _.isString(content)
|
||||
function copyContent(
|
||||
content: any,
|
||||
onCopyContentText = `Evaluated value copied to clipboard`,
|
||||
) {
|
||||
const stringifiedContent = isString(content)
|
||||
? content
|
||||
: JSON.stringify(content, null, 2);
|
||||
|
||||
copy(stringifiedContent);
|
||||
Toaster.show({
|
||||
text: `Evaluated value copied to clipboard`,
|
||||
text: onCopyContentText,
|
||||
variant: Variant.success,
|
||||
});
|
||||
}
|
||||
|
|
@ -267,7 +274,22 @@ export const CurrentValueViewer = memo(
|
|||
evaluatedValue: any;
|
||||
hideLabel?: boolean;
|
||||
preparedStatementViewer?: boolean;
|
||||
/** @param {number} [collapseStringsAfterLength=20]
|
||||
* This collapses the values visible in (say json) after these many characters and shows ellipsis.
|
||||
*/
|
||||
collapseStringsAfterLength?: number;
|
||||
/** @param {string} [onCopyContentText=`Evaluated value copied to clipboard`]
|
||||
* This parameter contains the string that is shown when the evaluatedValue is copied.
|
||||
*/
|
||||
onCopyContentText?: string;
|
||||
}) {
|
||||
/* Setting the default value for collapseStringsAfterLength to 20;
|
||||
This ensures that earlier code that depends on the value keeps working.
|
||||
*/
|
||||
const collapseStringsAfterLength = props.collapseStringsAfterLength || 20;
|
||||
/* Setting the default value; ensuring that earlier code keeps working. */
|
||||
const onCopyContentText =
|
||||
props.onCopyContentText || `Evaluated value copied to clipboard`;
|
||||
const codeWrapperRef = React.createRef<HTMLPreElement>();
|
||||
const [openEvaluatedValue, setOpenEvaluatedValue] = useState(true);
|
||||
const toggleEvaluatedValue = () => {
|
||||
|
|
@ -281,7 +303,7 @@ export const CurrentValueViewer = memo(
|
|||
);
|
||||
if (props.evaluatedValue !== undefined) {
|
||||
if (
|
||||
_.isObject(props.evaluatedValue) ||
|
||||
isObject(props.evaluatedValue) ||
|
||||
Array.isArray(props.evaluatedValue)
|
||||
) {
|
||||
if (props.preparedStatementViewer) {
|
||||
|
|
@ -305,7 +327,7 @@ export const CurrentValueViewer = memo(
|
|||
fontSize: "12px",
|
||||
},
|
||||
collapsed: 2,
|
||||
collapseStringsAfterLength: 20,
|
||||
collapseStringsAfterLength,
|
||||
shouldCollapse: (field: any) => {
|
||||
const index = field.name * 1;
|
||||
return index >= 2;
|
||||
|
|
@ -347,7 +369,9 @@ export const CurrentValueViewer = memo(
|
|||
<CopyIconWrapper
|
||||
colorTheme={props.theme}
|
||||
minimal
|
||||
onClick={() => copyContent(props.evaluatedValue)}
|
||||
onClick={() =>
|
||||
copyContent(props.evaluatedValue, onCopyContentText)
|
||||
}
|
||||
>
|
||||
<CopyIcon height={34} />
|
||||
</CopyIconWrapper>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ type FeatureFlags = {
|
|||
SNIPPET?: boolean;
|
||||
GIT?: boolean;
|
||||
GIT_IMPORT?: boolean;
|
||||
RBAC?: boolean;
|
||||
AUDIT_LOGS?: boolean;
|
||||
};
|
||||
|
||||
export default FeatureFlags;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ import {
|
|||
IconSize,
|
||||
Menu,
|
||||
MenuItem,
|
||||
notEmptyValidator,
|
||||
Size,
|
||||
Text,
|
||||
TextType,
|
||||
|
|
@ -75,7 +76,6 @@ import EditableText, {
|
|||
EditInteractionKind,
|
||||
SavingState,
|
||||
} from "components/ads/EditableText";
|
||||
import { notEmptyValidator } from "design-system";
|
||||
import { deleteWorkspace, saveWorkspace } from "actions/workspaceActions";
|
||||
import { leaveWorkspace } from "actions/userActions";
|
||||
import CenteredWrapper from "components/designSystems/appsmith/CenteredWrapper";
|
||||
|
|
@ -85,11 +85,11 @@ import { createWorkspaceSubmitHandler } from "@appsmith/pages/workspace/helpers"
|
|||
import ImportApplicationModal from "./ImportApplicationModal";
|
||||
import {
|
||||
createMessage,
|
||||
NO_APPS_FOUND,
|
||||
WORKSPACES_HEADING,
|
||||
SEARCH_APPS,
|
||||
INVITE_USERS_MESSAGE,
|
||||
INVITE_USERS_PLACEHOLDER,
|
||||
NO_APPS_FOUND,
|
||||
SEARCH_APPS,
|
||||
WORKSPACES_HEADING,
|
||||
} from "@appsmith/constants/messages";
|
||||
import { ReactComponent as NoAppsFoundIcon } from "assets/svg/no-apps-icon.svg";
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import {
|
|||
SettingSubtype,
|
||||
SettingTypes,
|
||||
} from "@appsmith/pages/AdminSettings/config/types";
|
||||
|
||||
export const config: AdminConfigType = {
|
||||
type: SettingCategories.ADVANCED,
|
||||
controlType: SettingTypes.GROUP,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import styled from "styled-components";
|
|||
import { TabComponent, TabProp } from "components/ads/Tabs";
|
||||
import { Text, TextType } from "design-system";
|
||||
import { Icon } from "@blueprintjs/core";
|
||||
// import { Link } from "react-router-dom";
|
||||
import General from "./General";
|
||||
import { Colors } from "constants/Colors";
|
||||
import GitConfig from "./GitConfig";
|
||||
|
|
@ -23,9 +22,11 @@ const LinkToApplications = styled.div`
|
|||
margin-bottom: 35px;
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ class AnalyticsUtil {
|
|||
static cachedAnonymoustId: string;
|
||||
static cachedUserId: string;
|
||||
static user?: User = undefined;
|
||||
|
||||
static initializeSmartLook(id: string) {
|
||||
smartlookClient.init(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user