@finos/legend-application-studio 28.19.19 → 28.19.21
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/lib/application/LegendStudioApplicationConfig.d.ts +1 -6
- package/lib/application/LegendStudioApplicationConfig.d.ts.map +1 -1
- package/lib/application/LegendStudioApplicationConfig.js +1 -9
- package/lib/application/LegendStudioApplicationConfig.js.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js +33 -22
- package/lib/components/editor/editor-group/dataProduct/DataPoductEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts +24 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.d.ts.map +1 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js +35 -0
- package/lib/components/editor/editor-group/function-activator/ActivatorArtifactViewer.js.map +1 -0
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js +19 -3
- package/lib/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.js.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js +18 -3
- package/lib/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts +1 -0
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js +10 -1
- package/lib/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js +22 -0
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts +5 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js +23 -1
- package/lib/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.js.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts +1 -0
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.d.ts.map +1 -1
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js +3 -0
- package/lib/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js.map +1 -1
- package/package.json +9 -9
- package/src/application/LegendStudioApplicationConfig.ts +1 -12
- package/src/components/editor/editor-group/dataProduct/DataPoductEditor.tsx +166 -83
- package/src/components/editor/editor-group/function-activator/ActivatorArtifactViewer.tsx +80 -0
- package/src/components/editor/editor-group/function-activator/HostedServiceFunctionActivatorEditor.tsx +65 -18
- package/src/components/editor/editor-group/function-activator/INTERNAL__UnknownFunctionActivatorEdtior.tsx +72 -16
- package/src/components/editor/editor-group/function-activator/MemSQLFunctionActivatorEditor.tsx +67 -18
- package/src/components/editor/editor-group/function-activator/SnowflakeAppFunctionActivatorEditor.tsx +68 -18
- package/src/components/editor/editor-group/function-activator/SnowflakeM2MUdfFunctionActivatorEditor.tsx +67 -18
- package/src/stores/editor/editor-state/element-editor-state/dataProduct/DataProductEditorState.ts +14 -3
- package/src/stores/editor/editor-state/element-editor-state/function-activator/HostedServiceFunctionActivatorEditorState.ts +26 -0
- package/src/stores/editor/editor-state/element-editor-state/function-activator/INTERNAL__UnknownFunctionActivatorEditorState.ts +27 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/MemSQLFunctionActivatorEditorState.ts +29 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeAppFunctionActivatorEditorState.ts +29 -1
- package/src/stores/editor/editor-state/element-editor-state/function-activator/SnowflakeM2MUdfFunctionActivatorEditorState.ts +29 -1
- package/src/stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.ts +6 -0
- package/tsconfig.json +1 -0
@@ -63,6 +63,13 @@ import {
|
|
63
63
|
BuildingIcon,
|
64
64
|
Tooltip,
|
65
65
|
InfoCircleIcon,
|
66
|
+
ResizablePanelGroup,
|
67
|
+
ResizablePanel,
|
68
|
+
MarkdownTextViewer,
|
69
|
+
ResizablePanelSplitter,
|
70
|
+
EyeIcon,
|
71
|
+
CloseEyeIcon,
|
72
|
+
Checkbox,
|
66
73
|
} from '@finos/legend-art';
|
67
74
|
import React, {
|
68
75
|
useRef,
|
@@ -97,6 +104,7 @@ import {
|
|
97
104
|
supportInfo_addEmail,
|
98
105
|
supportInfo_deleteEmail,
|
99
106
|
accessPoint_setClassification,
|
107
|
+
accessPoint_setReproducible,
|
100
108
|
} from '../../../../stores/graph-modifier/DSL_DataProduct_GraphModifierHelper.js';
|
101
109
|
import { LEGEND_STUDIO_TEST_ID } from '../../../../__lib__/LegendStudioTesting.js';
|
102
110
|
import { LEGEND_STUDIO_APPLICATION_NAVIGATION_CONTEXT_KEY } from '../../../../__lib__/LegendStudioApplicationNavigationContext.js';
|
@@ -438,46 +446,28 @@ export const LakehouseDataProductAcccessPointEditor = observer(
|
|
438
446
|
<div style={{ flex: 1 }}>
|
439
447
|
<div className="access-point-editor__metadata">
|
440
448
|
<AccessPointTitle accessPoint={accessPoint} />
|
441
|
-
{editingDescription ? (
|
442
|
-
<textarea
|
443
|
-
className="panel__content__form__section__input"
|
444
|
-
spellCheck={false}
|
445
|
-
value={accessPoint.description ?? ''}
|
446
|
-
onChange={updateAccessPointDescription}
|
447
|
-
placeholder="Access Point description"
|
448
|
-
onBlur={handleDescriptionBlur}
|
449
|
-
style={{
|
450
|
-
overflow: 'hidden',
|
451
|
-
resize: 'none',
|
452
|
-
padding: '0.25rem',
|
453
|
-
}}
|
454
|
-
/>
|
455
|
-
) : (
|
456
|
-
<div
|
457
|
-
onClick={handleDescriptionEdit}
|
458
|
-
title="Click to edit access point description"
|
459
|
-
className="access-point-editor__description-container"
|
460
|
-
>
|
461
|
-
{accessPoint.description ? (
|
462
|
-
<HoverTextArea
|
463
|
-
text={accessPoint.description}
|
464
|
-
handleMouseOver={handleMouseOver}
|
465
|
-
handleMouseOut={handleMouseOut}
|
466
|
-
/>
|
467
|
-
) : (
|
468
|
-
<div
|
469
|
-
className="access-point-editor__group-container__description--warning"
|
470
|
-
onMouseOver={handleMouseOver}
|
471
|
-
onMouseOut={handleMouseOut}
|
472
|
-
>
|
473
|
-
<WarningIcon />
|
474
|
-
{AP_EMPTY_DESC_WARNING}
|
475
|
-
</div>
|
476
|
-
)}
|
477
|
-
{isHovering && hoverIcon()}
|
478
|
-
</div>
|
479
|
-
)}
|
480
449
|
<div className="access-point-editor__info">
|
450
|
+
<div className="access-point-editor__reproducible">
|
451
|
+
<Checkbox
|
452
|
+
disabled={groupState.state.isReadOnly}
|
453
|
+
checked={accessPoint.reproducible ?? false}
|
454
|
+
onChange={() =>
|
455
|
+
accessPoint_setReproducible(
|
456
|
+
accessPoint,
|
457
|
+
!accessPoint.reproducible,
|
458
|
+
)
|
459
|
+
}
|
460
|
+
size="small"
|
461
|
+
style={{ padding: 0, margin: 0 }}
|
462
|
+
/>
|
463
|
+
<Tooltip
|
464
|
+
title="This access point is reproducible based on a specific Lakehouse batch in time"
|
465
|
+
arrow={true}
|
466
|
+
placement={'top'}
|
467
|
+
>
|
468
|
+
<div>Reproducible</div>
|
469
|
+
</Tooltip>
|
470
|
+
</div>
|
481
471
|
{editorStore.applicationStore.config.options
|
482
472
|
.dataProductConfig && (
|
483
473
|
<AccessPointClassification
|
@@ -485,7 +475,6 @@ export const LakehouseDataProductAcccessPointEditor = observer(
|
|
485
475
|
groupState={groupState}
|
486
476
|
/>
|
487
477
|
)}
|
488
|
-
|
489
478
|
<div
|
490
479
|
className={clsx('access-point-editor__type')}
|
491
480
|
title={'Change target environment'}
|
@@ -528,6 +517,46 @@ export const LakehouseDataProductAcccessPointEditor = observer(
|
|
528
517
|
</div>
|
529
518
|
</div>
|
530
519
|
</div>
|
520
|
+
{editingDescription ? (
|
521
|
+
<textarea
|
522
|
+
className="panel__content__form__section__input"
|
523
|
+
spellCheck={false}
|
524
|
+
value={accessPoint.description ?? ''}
|
525
|
+
onChange={updateAccessPointDescription}
|
526
|
+
placeholder="Access Point description"
|
527
|
+
onBlur={handleDescriptionBlur}
|
528
|
+
style={{
|
529
|
+
overflow: 'hidden',
|
530
|
+
resize: 'none',
|
531
|
+
padding: '0.25rem',
|
532
|
+
marginLeft: '0.5rem',
|
533
|
+
}}
|
534
|
+
/>
|
535
|
+
) : (
|
536
|
+
<div
|
537
|
+
onClick={handleDescriptionEdit}
|
538
|
+
title="Click to edit access point description"
|
539
|
+
className="access-point-editor__description-container"
|
540
|
+
>
|
541
|
+
{accessPoint.description ? (
|
542
|
+
<HoverTextArea
|
543
|
+
text={accessPoint.description}
|
544
|
+
handleMouseOver={handleMouseOver}
|
545
|
+
handleMouseOut={handleMouseOut}
|
546
|
+
/>
|
547
|
+
) : (
|
548
|
+
<div
|
549
|
+
className="access-point-editor__group-container__description--warning"
|
550
|
+
onMouseOver={handleMouseOver}
|
551
|
+
onMouseOut={handleMouseOut}
|
552
|
+
>
|
553
|
+
<WarningIcon />
|
554
|
+
{AP_EMPTY_DESC_WARNING}
|
555
|
+
</div>
|
556
|
+
)}
|
557
|
+
{isHovering && hoverIcon()}
|
558
|
+
</div>
|
559
|
+
)}
|
531
560
|
<div className="access-point-editor__content">
|
532
561
|
<div className="access-point-editor__generic-entry">
|
533
562
|
<div className="access-point-editor__entry__container">
|
@@ -841,7 +870,10 @@ const AccessPointGroupEditor = observer(
|
|
841
870
|
</PanelHeaderActions>
|
842
871
|
</PanelHeader>
|
843
872
|
{groupState.accessPointStates.length === 0 && (
|
844
|
-
<div
|
873
|
+
<div
|
874
|
+
className="access-point-editor__group-container__description--warning"
|
875
|
+
style={{ color: 'var(--color-red-300)' }}
|
876
|
+
>
|
845
877
|
<WarningIcon />
|
846
878
|
This group needs at least one access point defined.
|
847
879
|
</div>
|
@@ -1130,49 +1162,100 @@ const HomeTab = observer(
|
|
1130
1162
|
> = (event) => {
|
1131
1163
|
dataProduct_setDescription(product, event.target.value);
|
1132
1164
|
};
|
1133
|
-
|
1165
|
+
const [showPreview, setshowPreview] = useState(false);
|
1134
1166
|
return (
|
1135
|
-
<div
|
1136
|
-
<
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1167
|
+
<div className="panel__content">
|
1168
|
+
<ResizablePanelGroup orientation="vertical">
|
1169
|
+
<ResizablePanel>
|
1170
|
+
<PanelFormTextField
|
1171
|
+
name="Title"
|
1172
|
+
value={product.title}
|
1173
|
+
prompt="Provide a descriptive name for the Data Product to appear in Marketplace."
|
1174
|
+
update={updateDataProductTitle}
|
1175
|
+
placeholder="Enter title"
|
1176
|
+
/>
|
1177
|
+
<div style={{ margin: '1rem' }}>
|
1178
|
+
<div
|
1179
|
+
className="panel__content__form__section__header__label"
|
1180
|
+
style={{ justifyContent: 'space-between', width: '45rem' }}
|
1181
|
+
>
|
1182
|
+
Description
|
1183
|
+
<button
|
1184
|
+
className="btn__dropdown-combo__label"
|
1185
|
+
onClick={() => setshowPreview(!showPreview)}
|
1186
|
+
title={showPreview ? 'Hide Preview' : 'Preview Description'}
|
1187
|
+
tabIndex={-1}
|
1188
|
+
style={{
|
1189
|
+
width: '12rem',
|
1190
|
+
justifyContent: 'center',
|
1191
|
+
}}
|
1192
|
+
>
|
1193
|
+
{showPreview ? (
|
1194
|
+
<>
|
1195
|
+
<CloseEyeIcon className="btn__dropdown-combo__label__icon" />
|
1196
|
+
<div className="btn__dropdown-combo__label__title">
|
1197
|
+
Hide Preview
|
1198
|
+
</div>
|
1199
|
+
</>
|
1200
|
+
) : (
|
1201
|
+
<>
|
1202
|
+
<EyeIcon className="btn__dropdown-combo__label__icon" />
|
1203
|
+
<div className="btn__dropdown-combo__label__title">
|
1204
|
+
Preview
|
1205
|
+
</div>
|
1206
|
+
</>
|
1207
|
+
)}
|
1208
|
+
</button>
|
1209
|
+
</div>
|
1210
|
+
|
1211
|
+
<div
|
1212
|
+
className="panel__content__form__section__header__prompt"
|
1213
|
+
style={{
|
1214
|
+
color:
|
1215
|
+
product.description === '' ||
|
1216
|
+
product.description === undefined
|
1217
|
+
? 'var(--color-red-300)'
|
1218
|
+
: 'var(--color-light-grey-400)',
|
1219
|
+
width: '45rem',
|
1220
|
+
}}
|
1221
|
+
>
|
1222
|
+
Clearly describe the purpose, content, and intended use of the
|
1223
|
+
Data Product. Markdown is supported.
|
1224
|
+
</div>
|
1225
|
+
<textarea
|
1226
|
+
className="panel__content__form__section__textarea"
|
1227
|
+
spellCheck={false}
|
1228
|
+
disabled={isReadOnly}
|
1229
|
+
value={product.description}
|
1230
|
+
onChange={updateDataProductDescription}
|
1231
|
+
style={{
|
1232
|
+
padding: '0.5rem',
|
1233
|
+
width: '45rem',
|
1234
|
+
height: '10rem',
|
1235
|
+
borderColor:
|
1236
|
+
product.description === '' ||
|
1237
|
+
product.description === undefined
|
1238
|
+
? 'var(--color-red-300)'
|
1239
|
+
: 'transparent',
|
1240
|
+
resize: 'vertical',
|
1241
|
+
maxHeight: '100%',
|
1242
|
+
maxWidth: '100%',
|
1243
|
+
}}
|
1244
|
+
/>
|
1245
|
+
</div>
|
1246
|
+
</ResizablePanel>
|
1247
|
+
{showPreview && <ResizablePanelSplitter />}
|
1248
|
+
{showPreview && (
|
1249
|
+
<ResizablePanel>
|
1250
|
+
<div className="text-element-editor__preview">
|
1251
|
+
<MarkdownTextViewer
|
1252
|
+
value={{ value: product.description ?? '' }}
|
1253
|
+
className="text-element-editor__preview__markdown"
|
1254
|
+
/>
|
1255
|
+
</div>
|
1256
|
+
</ResizablePanel>
|
1257
|
+
)}
|
1258
|
+
</ResizablePanelGroup>
|
1176
1259
|
</div>
|
1177
1260
|
);
|
1178
1261
|
},
|
@@ -0,0 +1,80 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
import {
|
18
|
+
Dialog,
|
19
|
+
Modal,
|
20
|
+
ModalBody,
|
21
|
+
ModalFooter,
|
22
|
+
ModalFooterButton,
|
23
|
+
ModalHeader,
|
24
|
+
} from '@finos/legend-art';
|
25
|
+
import { observer } from 'mobx-react-lite';
|
26
|
+
import { CODE_EDITOR_LANGUAGE } from '@finos/legend-code-editor';
|
27
|
+
import { CodeEditor } from '@finos/legend-lego/code-editor';
|
28
|
+
import type { PlainObject } from '@finos/legend-shared';
|
29
|
+
|
30
|
+
export const ActivatorArtifactViewer = observer(
|
31
|
+
(props: {
|
32
|
+
artifact: PlainObject | undefined;
|
33
|
+
setArtifact: (value: PlainObject | undefined) => void;
|
34
|
+
darkMode: boolean;
|
35
|
+
}) => {
|
36
|
+
const { artifact, setArtifact, darkMode } = props;
|
37
|
+
const closeArtifact = (): void => {
|
38
|
+
setArtifact(undefined);
|
39
|
+
};
|
40
|
+
|
41
|
+
if (!artifact) {
|
42
|
+
return null;
|
43
|
+
}
|
44
|
+
|
45
|
+
return (
|
46
|
+
<Dialog
|
47
|
+
open={Boolean(artifact)}
|
48
|
+
onClose={closeArtifact}
|
49
|
+
classes={{
|
50
|
+
root: 'editor-modal__root-container',
|
51
|
+
container: 'editor-modal__container',
|
52
|
+
paper: 'editor-modal__content',
|
53
|
+
}}
|
54
|
+
>
|
55
|
+
<Modal className="editor-modal" darkMode={darkMode}>
|
56
|
+
<ModalHeader title="Artifact" />
|
57
|
+
<ModalBody>
|
58
|
+
<div className="panel__content execution-plan-viewer__panel__content">
|
59
|
+
<CodeEditor
|
60
|
+
inputValue={JSON.stringify(artifact, null, 2)}
|
61
|
+
isReadOnly={true}
|
62
|
+
language={CODE_EDITOR_LANGUAGE.JSON}
|
63
|
+
hidePadding={true}
|
64
|
+
hideMinimap={true}
|
65
|
+
/>
|
66
|
+
</div>
|
67
|
+
</ModalBody>
|
68
|
+
<ModalFooter>
|
69
|
+
<ModalFooterButton
|
70
|
+
title="Close artifact modal"
|
71
|
+
onClick={closeArtifact}
|
72
|
+
text="Close"
|
73
|
+
type="secondary"
|
74
|
+
/>
|
75
|
+
</ModalFooter>
|
76
|
+
</Modal>
|
77
|
+
</Dialog>
|
78
|
+
);
|
79
|
+
},
|
80
|
+
);
|
@@ -39,6 +39,7 @@ import {
|
|
39
39
|
TimesIcon,
|
40
40
|
clsx,
|
41
41
|
PanelHeader,
|
42
|
+
CaretDownIcon,
|
42
43
|
} from '@finos/legend-art';
|
43
44
|
import {
|
44
45
|
type PostDeploymentAction,
|
@@ -95,6 +96,7 @@ import {
|
|
95
96
|
import type { DSL_Service_LegendStudioApplicationPlugin_Extension } from '../../../../stores/extensions/DSL_Service_LegendStudioApplicationPlugin_Extension.js';
|
96
97
|
import { UnsupportedEditorPanel } from '../UnsupportedElementEditor.js';
|
97
98
|
import type { LegendStudioApplicationPlugin } from '../../../../stores/LegendStudioApplicationPlugin.js';
|
99
|
+
import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
|
98
100
|
|
99
101
|
const renderEditorPostAction = (
|
100
102
|
postDeploymentAction: PostDeploymentAction,
|
@@ -417,6 +419,11 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
417
419
|
applicationStore.alertUnhandledError,
|
418
420
|
);
|
419
421
|
};
|
422
|
+
const renderArtifact = (): void => {
|
423
|
+
flowResult(editorState.renderArtifact()).catch(
|
424
|
+
applicationStore.alertUnhandledError,
|
425
|
+
);
|
426
|
+
};
|
420
427
|
const deploy = (): void => {
|
421
428
|
flowResult(editorState.deployToSandbox()).catch(
|
422
429
|
applicationStore.alertUnhandledError,
|
@@ -477,6 +484,7 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
477
484
|
<PanelLoadingIndicator
|
478
485
|
isLoading={Boolean(
|
479
486
|
editorState.validateState.isInProgress ||
|
487
|
+
editorState.renderArtifactState.isInProgress ||
|
480
488
|
editorState.deployState.isInProgress,
|
481
489
|
)}
|
482
490
|
/>
|
@@ -514,24 +522,55 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
514
522
|
Rest Service Activator
|
515
523
|
</div>
|
516
524
|
<div className="hosted-service-function-activator-editor__header__actions">
|
517
|
-
<
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
525
|
+
<div className="hosted-service-function-activator-editor__header__actions btn__dropdown-combo--primary">
|
526
|
+
<button
|
527
|
+
className="hosted-service-function-activator-editor__header__actions__action hosted-service-function-activator-editor__header__actions__action--primary"
|
528
|
+
onClick={validate}
|
529
|
+
disabled={editorState.validateState.isInProgress}
|
530
|
+
tabIndex={-1}
|
531
|
+
title="Click Validate to verify your activator before deployment"
|
532
|
+
>
|
533
|
+
Validate
|
534
|
+
</button>
|
535
|
+
<ControlledDropdownMenu
|
536
|
+
className="hosted-service-function-activator-editor__header__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
|
537
|
+
title="activator-artifact-dropdown"
|
538
|
+
content={
|
539
|
+
<MenuContent>
|
540
|
+
<MenuContentItem
|
541
|
+
className="btn__dropdown-combo__option"
|
542
|
+
onClick={renderArtifact}
|
543
|
+
title="Render artifact"
|
544
|
+
>
|
545
|
+
Render Artifact
|
546
|
+
</MenuContentItem>
|
547
|
+
</MenuContent>
|
548
|
+
}
|
549
|
+
menuProps={{
|
550
|
+
anchorOrigin: {
|
551
|
+
vertical: 'bottom',
|
552
|
+
horizontal: 'right',
|
553
|
+
},
|
554
|
+
transformOrigin: {
|
555
|
+
vertical: 'top',
|
556
|
+
horizontal: 'right',
|
557
|
+
},
|
558
|
+
}}
|
559
|
+
>
|
560
|
+
<CaretDownIcon />
|
561
|
+
</ControlledDropdownMenu>
|
562
|
+
</div>
|
563
|
+
<div className="hosted-service-function-activator-editor__header__actions btn__dropdown-combo--primary">
|
564
|
+
<button
|
565
|
+
className="hosted-service-function-activator-editor__header__actions__action hosted-service-function-activator-editor__header__actions__action--primary"
|
566
|
+
onClick={deploy}
|
567
|
+
disabled={editorState.deployState.isInProgress}
|
568
|
+
title="Deploy to sandbox"
|
569
|
+
tabIndex={-1}
|
570
|
+
>
|
571
|
+
Deploy to Sandbox
|
572
|
+
</button>
|
573
|
+
</div>
|
535
574
|
</div>
|
536
575
|
</div>
|
537
576
|
<PanelForm>
|
@@ -725,6 +764,14 @@ export const HostedServiceFunctionActivatorEditor = observer(() => {
|
|
725
764
|
/>
|
726
765
|
</div>
|
727
766
|
)}
|
767
|
+
<ActivatorArtifactViewer
|
768
|
+
artifact={editorState.artifact}
|
769
|
+
setArtifact={(value) => editorState.setArtifact(value)}
|
770
|
+
darkMode={
|
771
|
+
!applicationStore.layoutService
|
772
|
+
.TEMPORARY__isLightColorThemeEnabled
|
773
|
+
}
|
774
|
+
/>
|
728
775
|
</PanelContent>
|
729
776
|
</Panel>
|
730
777
|
</div>
|
@@ -23,6 +23,11 @@ import {
|
|
23
23
|
Panel,
|
24
24
|
PanelContent,
|
25
25
|
PanelHeader,
|
26
|
+
ControlledDropdownMenu,
|
27
|
+
MenuContent,
|
28
|
+
MenuContentItem,
|
29
|
+
CaretDownIcon,
|
30
|
+
PanelLoadingIndicator,
|
26
31
|
} from '@finos/legend-art';
|
27
32
|
import { useApplicationStore } from '@finos/legend-application';
|
28
33
|
import { flowResult } from 'mobx';
|
@@ -33,6 +38,7 @@ import {
|
|
33
38
|
getClassProperty,
|
34
39
|
} from '@finos/legend-graph';
|
35
40
|
import { returnUndefOnError } from '@finos/legend-shared';
|
41
|
+
import { ActivatorArtifactViewer } from './ActivatorArtifactViewer.js';
|
36
42
|
|
37
43
|
export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
38
44
|
const editorStore = useEditorStore();
|
@@ -45,6 +51,11 @@ export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
|
45
51
|
applicationStore.alertUnhandledError,
|
46
52
|
);
|
47
53
|
};
|
54
|
+
const renderArtifact = (): void => {
|
55
|
+
flowResult(editorState.renderArtifact()).catch(
|
56
|
+
applicationStore.alertUnhandledError,
|
57
|
+
);
|
58
|
+
};
|
48
59
|
const publishToSandbox = (): void => {
|
49
60
|
flowResult(editorState.publishToSandbox()).catch(
|
50
61
|
applicationStore.alertUnhandledError,
|
@@ -66,6 +77,13 @@ export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
|
66
77
|
<div className="function-activator-editor">
|
67
78
|
<Panel>
|
68
79
|
<PanelHeader title="function activator" />
|
80
|
+
<PanelLoadingIndicator
|
81
|
+
isLoading={Boolean(
|
82
|
+
editorState.validateState.isInProgress ||
|
83
|
+
editorState.renderArtifactState.isInProgress ||
|
84
|
+
editorState.publishToSandboxState.isInProgress,
|
85
|
+
)}
|
86
|
+
/>
|
69
87
|
<PanelContent>
|
70
88
|
<div className="function-activator-editor__content">
|
71
89
|
{valueBuilderState && (
|
@@ -118,23 +136,61 @@ export const INTERNAL__UnknownFunctionActivatorEdtior = observer(() => {
|
|
118
136
|
)}
|
119
137
|
</div>
|
120
138
|
<div className="function-activator-editor__footer">
|
121
|
-
<
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
139
|
+
<div className="function-activator-editor__footer__actions btn__dropdown-combo--primary">
|
140
|
+
<button
|
141
|
+
className="function-activator-editor__footer__actions__action btn--dark"
|
142
|
+
onClick={validate}
|
143
|
+
disabled={editorState.validateState.isInProgress}
|
144
|
+
tabIndex={-1}
|
145
|
+
>
|
146
|
+
Validate
|
147
|
+
</button>
|
148
|
+
<ControlledDropdownMenu
|
149
|
+
className="function-activator-editor__footer__actions btn__dropdown-combo btn__dropdown-combo__dropdown-btn"
|
150
|
+
title="activator-artifact-dropdown"
|
151
|
+
content={
|
152
|
+
<MenuContent>
|
153
|
+
<MenuContentItem
|
154
|
+
className="btn__dropdown-combo__option"
|
155
|
+
onClick={renderArtifact}
|
156
|
+
>
|
157
|
+
Render Artifact
|
158
|
+
</MenuContentItem>
|
159
|
+
</MenuContent>
|
160
|
+
}
|
161
|
+
menuProps={{
|
162
|
+
anchorOrigin: {
|
163
|
+
vertical: 'bottom',
|
164
|
+
horizontal: 'right',
|
165
|
+
},
|
166
|
+
transformOrigin: {
|
167
|
+
vertical: 'top',
|
168
|
+
horizontal: 'right',
|
169
|
+
},
|
170
|
+
}}
|
171
|
+
>
|
172
|
+
<CaretDownIcon />
|
173
|
+
</ControlledDropdownMenu>
|
174
|
+
</div>
|
175
|
+
<div className="function-activator-editor__footer__actions btn__dropdown-combo--primary">
|
176
|
+
<button
|
177
|
+
className="function-activator-editor__footer__actions__action btn--dark"
|
178
|
+
onClick={publishToSandbox}
|
179
|
+
disabled={editorState.publishToSandboxState.isInProgress}
|
180
|
+
tabIndex={-1}
|
181
|
+
>
|
182
|
+
Publish to Sandbox
|
183
|
+
</button>
|
184
|
+
</div>
|
137
185
|
</div>
|
186
|
+
<ActivatorArtifactViewer
|
187
|
+
artifact={editorState.artifact}
|
188
|
+
setArtifact={(value) => editorState.setArtifact(value)}
|
189
|
+
darkMode={
|
190
|
+
!applicationStore.layoutService
|
191
|
+
.TEMPORARY__isLightColorThemeEnabled
|
192
|
+
}
|
193
|
+
/>
|
138
194
|
</PanelContent>
|
139
195
|
</Panel>
|
140
196
|
</div>
|