@orchestrator-ui/orchestrator-ui-components 3.7.0 → 3.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-lint.log +1 -1
- package/.turbo/turbo-test.log +4 -4
- package/CHANGELOG.md +16 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +23 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/WfoPageTemplate/WfoSidebar/styles.ts +1 -1
- package/src/components/WfoSettings/WfoModifySettings.tsx +15 -8
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoProductBlockKeyValueRow.tsx +3 -2
- package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoSubscriptionProductBlock.tsx +3 -0
- package/src/components/WfoSubscription/overrides/useSubscriptionDetailValueOverride.ts +2 -1
- package/src/configuration/policy-resources.ts +1 -0
- package/src/configuration/version.ts +1 -1
- package/src/rtk/slices/orchestratorComponentOverride.ts +1 -0
package/package.json
CHANGED
|
@@ -6,8 +6,10 @@ import { EuiFlexItem, EuiPanel, EuiSpacer, EuiText } from '@elastic/eui';
|
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
WfoEngineStatusButton,
|
|
9
|
+
WfoIsAllowedToRender,
|
|
9
10
|
WfoResetTextSearchIndexButton,
|
|
10
11
|
} from '@/components';
|
|
12
|
+
import { PolicyResource } from '@/configuration';
|
|
11
13
|
|
|
12
14
|
export const WfoModifySettings = () => {
|
|
13
15
|
const t = useTranslations('settings.page');
|
|
@@ -20,14 +22,19 @@ export const WfoModifySettings = () => {
|
|
|
20
22
|
<EuiSpacer size="m"></EuiSpacer>
|
|
21
23
|
<WfoResetTextSearchIndexButton />
|
|
22
24
|
</EuiPanel>
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
|
|
26
|
+
<WfoIsAllowedToRender
|
|
27
|
+
resource={PolicyResource.SETTINGS_START_STOP_ENGINE}
|
|
28
|
+
>
|
|
29
|
+
<EuiSpacer />
|
|
30
|
+
<EuiPanel hasShadow={false} color="subdued" paddingSize="l">
|
|
31
|
+
<EuiText size="s">
|
|
32
|
+
<h4>{t('modifyEngine')}</h4>
|
|
33
|
+
</EuiText>
|
|
34
|
+
<EuiSpacer size="m"></EuiSpacer>
|
|
35
|
+
<WfoEngineStatusButton />
|
|
36
|
+
</EuiPanel>
|
|
37
|
+
</WfoIsAllowedToRender>
|
|
31
38
|
</EuiFlexItem>
|
|
32
39
|
);
|
|
33
40
|
};
|
package/src/components/WfoSubscription/WfoSubscriptionProductBlock/WfoProductBlockKeyValueRow.tsx
CHANGED
|
@@ -11,11 +11,12 @@ import { getStyles } from './styles';
|
|
|
11
11
|
|
|
12
12
|
export type WfoProductBlockKeyValueRowProps = {
|
|
13
13
|
fieldValue: FieldValue | RenderableFieldValue;
|
|
14
|
+
allFieldValues: FieldValue[] | RenderableFieldValue[];
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export const WfoProductBlockKeyValueRow: FC<
|
|
17
18
|
WfoProductBlockKeyValueRowProps
|
|
18
|
-
> = ({ fieldValue }) => {
|
|
19
|
+
> = ({ fieldValue, allFieldValues }) => {
|
|
19
20
|
const { leftColumnStyle, rowStyle } = useWithOrchestratorTheme(getStyles);
|
|
20
21
|
const { getOverriddenValue } = useSubscriptionDetailValueOverride();
|
|
21
22
|
|
|
@@ -40,7 +41,7 @@ export const WfoProductBlockKeyValueRow: FC<
|
|
|
40
41
|
<b>{camelToHuman(field)}</b>
|
|
41
42
|
</td>
|
|
42
43
|
<td>
|
|
43
|
-
{getOverriddenValue(fieldValue) ?? (
|
|
44
|
+
{getOverriddenValue(fieldValue, allFieldValues) ?? (
|
|
44
45
|
<WfoProductBlockValue value={value} />
|
|
45
46
|
)}
|
|
46
47
|
</td>
|
|
@@ -13,6 +13,7 @@ export const useSubscriptionDetailValueOverride = () => {
|
|
|
13
13
|
|
|
14
14
|
const getOverriddenValue = (
|
|
15
15
|
fieldValue: FieldValue | RenderableFieldValue,
|
|
16
|
+
allFieldValues: FieldValue[] | RenderableFieldValue[],
|
|
16
17
|
): React.ReactNode | null => {
|
|
17
18
|
if (!valueOverrideConfiguration) {
|
|
18
19
|
return null;
|
|
@@ -23,7 +24,7 @@ export const useSubscriptionDetailValueOverride = () => {
|
|
|
23
24
|
|
|
24
25
|
// This check is needed because TS does not infer the type correctly
|
|
25
26
|
if (renderFunctionForField) {
|
|
26
|
-
return renderFunctionForField(fieldValue);
|
|
27
|
+
return renderFunctionForField(fieldValue, allFieldValues);
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
return null;
|
|
@@ -17,5 +17,6 @@ export enum PolicyResource {
|
|
|
17
17
|
TASKS_CREATE = '/orchestrator/processes/create/task',
|
|
18
18
|
TASKS_RETRY_ALL = '/orchestrator/processes/all-tasks/retry',
|
|
19
19
|
SETTINGS_FLUSH_CACHE = '/orchestrator/settings/flush-cache',
|
|
20
|
+
SETTINGS_START_STOP_ENGINE = '/orchestrator/settings/start-stop-engine',
|
|
20
21
|
SET_IN_SYNC = '/orchestrator/subscriptions/set-in-sync',
|
|
21
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '3.
|
|
1
|
+
export const ORCHESTRATOR_UI_LIBRARY_VERSION = '3.8.1';
|
|
@@ -6,6 +6,7 @@ import { FieldValue, RenderableFieldValue, SubscriptionDetail } from '@/types';
|
|
|
6
6
|
|
|
7
7
|
export type ValueOverrideFunction = (
|
|
8
8
|
fieldValue: FieldValue | RenderableFieldValue,
|
|
9
|
+
allFieldValues: FieldValue[] | RenderableFieldValue[],
|
|
9
10
|
) => ReactNode;
|
|
10
11
|
export type ValueOverrideConfiguration = Record<string, ValueOverrideFunction>;
|
|
11
12
|
|