@sparkelf/dsh-dataops-managed 0.3.35 → 0.3.36
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/client.js +208 -143
- package/lib/client.js.map +1 -1
- package/package.json +10 -9
package/lib/client.js
CHANGED
|
@@ -789,21 +789,21 @@ window.__ModuleLoader__.load({
|
|
|
789
789
|
document.head.appendChild(tag);
|
|
790
790
|
}
|
|
791
791
|
var ManagedDataOpsSection_module_css_default = {
|
|
792
|
-
"
|
|
793
|
-
"
|
|
794
|
-
"
|
|
795
|
-
"
|
|
792
|
+
"reviewRow": "_2dqzjG_reviewRow",
|
|
793
|
+
"actions": "_2dqzjG_actions",
|
|
794
|
+
"fields": "_2dqzjG_fields",
|
|
795
|
+
"meta": "_2dqzjG_meta",
|
|
796
796
|
"row": "_2dqzjG_row",
|
|
797
797
|
"copy": "_2dqzjG_copy",
|
|
798
|
-
"
|
|
799
|
-
"meta": "_2dqzjG_meta",
|
|
800
|
-
"reviewActions": "_2dqzjG_reviewActions",
|
|
798
|
+
"section": "_2dqzjG_section",
|
|
801
799
|
"title": "_2dqzjG_title",
|
|
802
|
-
"
|
|
800
|
+
"reviewActions": "_2dqzjG_reviewActions",
|
|
801
|
+
"refusal": "_2dqzjG_refusal",
|
|
802
|
+
"status": "_2dqzjG_status",
|
|
803
|
+
"label": "_2dqzjG_label",
|
|
803
804
|
"reviewRows": "_2dqzjG_reviewRows",
|
|
804
|
-
"actions": "_2dqzjG_actions",
|
|
805
805
|
"reviewHint": "_2dqzjG_reviewHint",
|
|
806
|
-
"
|
|
806
|
+
"card": "_2dqzjG_card",
|
|
807
807
|
"heading": "_2dqzjG_heading"
|
|
808
808
|
};
|
|
809
809
|
//#endregion
|
|
@@ -1685,24 +1685,24 @@ window.__ModuleLoader__.load({
|
|
|
1685
1685
|
document.head.appendChild(tag);
|
|
1686
1686
|
}
|
|
1687
1687
|
var NotificationBell_module_css_default = {
|
|
1688
|
-
"empty": "tE0trG_empty",
|
|
1689
|
-
"dot": "tE0trG_dot",
|
|
1690
|
-
"demo": "tE0trG_demo",
|
|
1691
|
-
"linkButton": "tE0trG_linkButton",
|
|
1692
|
-
"badge": "tE0trG_badge",
|
|
1693
|
-
"dialog": "tE0trG_dialog",
|
|
1694
1688
|
"rowTitle": "tE0trG_rowTitle",
|
|
1695
|
-
"rowTime": "tE0trG_rowTime",
|
|
1696
|
-
"rowMeta": "tE0trG_rowMeta",
|
|
1697
|
-
"button": "tE0trG_button",
|
|
1698
|
-
"rowText": "tE0trG_rowText",
|
|
1699
|
-
"list": "tE0trG_list",
|
|
1700
1689
|
"bell": "tE0trG_bell",
|
|
1701
|
-
"
|
|
1702
|
-
"actions": "tE0trG_actions",
|
|
1690
|
+
"dialog": "tE0trG_dialog",
|
|
1703
1691
|
"rowBody": "tE0trG_rowBody",
|
|
1692
|
+
"rowText": "tE0trG_rowText",
|
|
1693
|
+
"linkButton": "tE0trG_linkButton",
|
|
1694
|
+
"list": "tE0trG_list",
|
|
1695
|
+
"button": "tE0trG_button",
|
|
1696
|
+
"badge": "tE0trG_badge",
|
|
1697
|
+
"rowMeta": "tE0trG_rowMeta",
|
|
1698
|
+
"rowIcon": "tE0trG_rowIcon",
|
|
1699
|
+
"dot": "tE0trG_dot",
|
|
1700
|
+
"empty": "tE0trG_empty",
|
|
1704
1701
|
"pager": "tE0trG_pager",
|
|
1705
|
-
"
|
|
1702
|
+
"actions": "tE0trG_actions",
|
|
1703
|
+
"demo": "tE0trG_demo",
|
|
1704
|
+
"row": "tE0trG_row",
|
|
1705
|
+
"rowTime": "tE0trG_rowTime"
|
|
1706
1706
|
};
|
|
1707
1707
|
//#endregion
|
|
1708
1708
|
//#region src/client/NotificationBell.tsx
|
|
@@ -1993,62 +1993,62 @@ window.__ModuleLoader__.load({
|
|
|
1993
1993
|
document.head.appendChild(tag);
|
|
1994
1994
|
}
|
|
1995
1995
|
var SkillPlazaSection_module_css_default = {
|
|
1996
|
-
"
|
|
1996
|
+
"head": "_9FdZvq_head",
|
|
1997
|
+
"tabActive": "_9FdZvq_tabActive",
|
|
1997
1998
|
"riskHead": "_9FdZvq_riskHead",
|
|
1998
|
-
"
|
|
1999
|
-
"demoTag": "_9FdZvq_demoTag",
|
|
2000
|
-
"findings": "_9FdZvq_findings",
|
|
2001
|
-
"findingText": "_9FdZvq_findingText",
|
|
2002
|
-
"audit": "_9FdZvq_audit",
|
|
2003
|
-
"cardTop": "_9FdZvq_cardTop",
|
|
2004
|
-
"detailButton": "_9FdZvq_detailButton",
|
|
2005
|
-
"risk": "_9FdZvq_risk",
|
|
2006
|
-
"findingHint": "_9FdZvq_findingHint",
|
|
2007
|
-
"noteField": "_9FdZvq_noteField",
|
|
2008
|
-
"reviewError": "_9FdZvq_reviewError",
|
|
1999
|
+
"riskSummary": "_9FdZvq_riskSummary",
|
|
2009
2000
|
"cardDesc": "_9FdZvq_cardDesc",
|
|
2010
|
-
"
|
|
2011
|
-
"
|
|
2012
|
-
"cardMarks": "_9FdZvq_cardMarks",
|
|
2013
|
-
"tagTop": "_9FdZvq_tagTop",
|
|
2014
|
-
"title": "_9FdZvq_title",
|
|
2015
|
-
"detailLabel": "_9FdZvq_detailLabel",
|
|
2016
|
-
"detailRow": "_9FdZvq_detailRow",
|
|
2001
|
+
"audit": "_9FdZvq_audit",
|
|
2002
|
+
"cards": "_9FdZvq_cards",
|
|
2017
2003
|
"departmentSelect": "_9FdZvq_departmentSelect",
|
|
2018
|
-
"
|
|
2019
|
-
"
|
|
2020
|
-
"
|
|
2021
|
-
"riskScore": "_9FdZvq_riskScore",
|
|
2022
|
-
"riskFailed": "_9FdZvq_riskFailed",
|
|
2023
|
-
"cardIcon": "_9FdZvq_cardIcon",
|
|
2024
|
-
"empty": "_9FdZvq_empty",
|
|
2025
|
-
"titleCount": "_9FdZvq_titleCount",
|
|
2026
|
-
"finding": "_9FdZvq_finding",
|
|
2027
|
-
"reviewNote": "_9FdZvq_reviewNote",
|
|
2004
|
+
"cardTitle": "_9FdZvq_cardTitle",
|
|
2005
|
+
"risk": "_9FdZvq_risk",
|
|
2006
|
+
"riskEmpty": "_9FdZvq_riskEmpty",
|
|
2028
2007
|
"notice": "_9FdZvq_notice",
|
|
2008
|
+
"riskScore": "_9FdZvq_riskScore",
|
|
2009
|
+
"findings": "_9FdZvq_findings",
|
|
2029
2010
|
"tabs": "_9FdZvq_tabs",
|
|
2011
|
+
"empty": "_9FdZvq_empty",
|
|
2012
|
+
"cardEnd": "_9FdZvq_cardEnd",
|
|
2030
2013
|
"emptyIcon": "_9FdZvq_emptyIcon",
|
|
2031
|
-
"
|
|
2014
|
+
"headRow": "_9FdZvq_headRow",
|
|
2015
|
+
"tab": "_9FdZvq_tab",
|
|
2016
|
+
"sharedTag": "_9FdZvq_sharedTag",
|
|
2032
2017
|
"section": "_9FdZvq_section",
|
|
2018
|
+
"pendingTag": "_9FdZvq_pendingTag",
|
|
2019
|
+
"reviewButton": "_9FdZvq_reviewButton",
|
|
2020
|
+
"title": "_9FdZvq_title",
|
|
2021
|
+
"cardTop": "_9FdZvq_cardTop",
|
|
2022
|
+
"noteField": "_9FdZvq_noteField",
|
|
2023
|
+
"reviewError": "_9FdZvq_reviewError",
|
|
2024
|
+
"cardIcon": "_9FdZvq_cardIcon",
|
|
2025
|
+
"detailButton": "_9FdZvq_detailButton",
|
|
2026
|
+
"riskFailed": "_9FdZvq_riskFailed",
|
|
2027
|
+
"findingText": "_9FdZvq_findingText",
|
|
2033
2028
|
"auditFooter": "_9FdZvq_auditFooter",
|
|
2034
|
-
"
|
|
2029
|
+
"reviewNote": "_9FdZvq_reviewNote",
|
|
2030
|
+
"demoTag": "_9FdZvq_demoTag",
|
|
2031
|
+
"titleCount": "_9FdZvq_titleCount",
|
|
2032
|
+
"detailRow": "_9FdZvq_detailRow",
|
|
2033
|
+
"tagTop": "_9FdZvq_tagTop",
|
|
2034
|
+
"rejectedTag": "_9FdZvq_rejectedTag",
|
|
2035
|
+
"detailLabel": "_9FdZvq_detailLabel",
|
|
2035
2036
|
"departmentBar": "_9FdZvq_departmentBar",
|
|
2036
|
-
"
|
|
2037
|
+
"detailValue": "_9FdZvq_detailValue",
|
|
2038
|
+
"status": "_9FdZvq_status",
|
|
2039
|
+
"departmentLabel": "_9FdZvq_departmentLabel",
|
|
2040
|
+
"card": "_9FdZvq_card",
|
|
2041
|
+
"mark": "_9FdZvq_mark",
|
|
2037
2042
|
"detail": "_9FdZvq_detail",
|
|
2038
2043
|
"emptyText": "_9FdZvq_emptyText",
|
|
2039
|
-
"dialog": "_9FdZvq_dialog",
|
|
2040
2044
|
"auditDialog": "_9FdZvq_auditDialog",
|
|
2041
|
-
"
|
|
2042
|
-
"
|
|
2043
|
-
"
|
|
2044
|
-
"cardTitle": "_9FdZvq_cardTitle",
|
|
2045
|
-
"riskEmpty": "_9FdZvq_riskEmpty",
|
|
2046
|
-
"card": "_9FdZvq_card",
|
|
2047
|
-
"status": "_9FdZvq_status",
|
|
2045
|
+
"severity": "_9FdZvq_severity",
|
|
2046
|
+
"cardMarks": "_9FdZvq_cardMarks",
|
|
2047
|
+
"mine": "_9FdZvq_mine",
|
|
2048
2048
|
"tabCount": "_9FdZvq_tabCount",
|
|
2049
|
-
"
|
|
2050
|
-
"
|
|
2051
|
-
"
|
|
2049
|
+
"finding": "_9FdZvq_finding",
|
|
2050
|
+
"findingHint": "_9FdZvq_findingHint",
|
|
2051
|
+
"dialog": "_9FdZvq_dialog"
|
|
2052
2052
|
};
|
|
2053
2053
|
//#endregion
|
|
2054
2054
|
//#region src/client/SkillPlazaSection.tsx
|
|
@@ -2714,18 +2714,18 @@ window.__ModuleLoader__.load({
|
|
|
2714
2714
|
}
|
|
2715
2715
|
var WanxiangBrand_module_css_default = {
|
|
2716
2716
|
"animatedMark": "s0HPxG_animatedMark",
|
|
2717
|
-
"unit-core": "s0HPxG_unit-core",
|
|
2718
|
-
"unitCore": "s0HPxG_unitCore",
|
|
2719
|
-
"harness": "s0HPxG_harness",
|
|
2720
|
-
"wordmark": "s0HPxG_wordmark",
|
|
2721
2717
|
"unitTop": "s0HPxG_unitTop",
|
|
2718
|
+
"wordmark": "s0HPxG_wordmark",
|
|
2722
2719
|
"mark": "s0HPxG_mark",
|
|
2723
2720
|
"unit-top": "s0HPxG_unit-top",
|
|
2724
|
-
"unitRight": "s0HPxG_unitRight",
|
|
2725
|
-
"unitLeft": "s0HPxG_unitLeft",
|
|
2726
2721
|
"unit-left": "s0HPxG_unit-left",
|
|
2727
2722
|
"unit-right": "s0HPxG_unit-right",
|
|
2728
|
-
"sidebarName": "s0HPxG_sidebarName"
|
|
2723
|
+
"sidebarName": "s0HPxG_sidebarName",
|
|
2724
|
+
"unit-core": "s0HPxG_unit-core",
|
|
2725
|
+
"unitLeft": "s0HPxG_unitLeft",
|
|
2726
|
+
"harness": "s0HPxG_harness",
|
|
2727
|
+
"unitRight": "s0HPxG_unitRight",
|
|
2728
|
+
"unitCore": "s0HPxG_unitCore"
|
|
2729
2729
|
};
|
|
2730
2730
|
//#endregion
|
|
2731
2731
|
//#region src/client/WanxiangBrand.tsx
|
|
@@ -3142,72 +3142,72 @@ window.__ModuleLoader__.load({
|
|
|
3142
3142
|
document.head.appendChild(tag);
|
|
3143
3143
|
}
|
|
3144
3144
|
var PermissionCenterSection_module_css_default = {
|
|
3145
|
+
"departments": "PNbOqW_departments",
|
|
3146
|
+
"pager": "PNbOqW_pager",
|
|
3147
|
+
"matrixGroup": "PNbOqW_matrixGroup",
|
|
3148
|
+
"treeActions": "PNbOqW_treeActions",
|
|
3149
|
+
"comboboxEmpty": "PNbOqW_comboboxEmpty",
|
|
3150
|
+
"tabActive": "PNbOqW_tabActive",
|
|
3145
3151
|
"waiting": "PNbOqW_waiting",
|
|
3146
|
-
"
|
|
3147
|
-
"treeName": "PNbOqW_treeName",
|
|
3148
|
-
"deptAdmins": "PNbOqW_deptAdmins",
|
|
3149
|
-
"adminTag": "PNbOqW_adminTag",
|
|
3150
|
-
"rowActions": "PNbOqW_rowActions",
|
|
3151
|
-
"muted": "PNbOqW_muted",
|
|
3152
|
+
"title": "PNbOqW_title",
|
|
3152
3153
|
"treeChildren": "PNbOqW_treeChildren",
|
|
3153
|
-
"comboboxList": "PNbOqW_comboboxList",
|
|
3154
|
-
"combobox": "PNbOqW_combobox",
|
|
3155
|
-
"dialog": "PNbOqW_dialog",
|
|
3156
|
-
"comboboxHint": "PNbOqW_comboboxHint",
|
|
3157
|
-
"panelHead": "PNbOqW_panelHead",
|
|
3158
3154
|
"comboboxTrigger": "PNbOqW_comboboxTrigger",
|
|
3159
|
-
"
|
|
3160
|
-
"department": "PNbOqW_department",
|
|
3161
|
-
"protected": "PNbOqW_protected",
|
|
3162
|
-
"candidates": "PNbOqW_candidates",
|
|
3163
|
-
"treeToggle": "PNbOqW_treeToggle",
|
|
3164
|
-
"scopeBadge": "PNbOqW_scopeBadge",
|
|
3165
|
-
"dialogBody": "PNbOqW_dialogBody",
|
|
3166
|
-
"search": "PNbOqW_search",
|
|
3167
|
-
"comboboxEmpty": "PNbOqW_comboboxEmpty",
|
|
3168
|
-
"permission": "PNbOqW_permission",
|
|
3169
|
-
"matrixNote": "PNbOqW_matrixNote",
|
|
3155
|
+
"tabs": "PNbOqW_tabs",
|
|
3170
3156
|
"treeRow": "PNbOqW_treeRow",
|
|
3171
|
-
"
|
|
3157
|
+
"field": "PNbOqW_field",
|
|
3158
|
+
"tab": "PNbOqW_tab",
|
|
3159
|
+
"tableScroll": "PNbOqW_tableScroll",
|
|
3160
|
+
"comboboxSearch": "PNbOqW_comboboxSearch",
|
|
3172
3161
|
"matrixPermission": "PNbOqW_matrixPermission",
|
|
3173
|
-
"
|
|
3174
|
-
"
|
|
3175
|
-
"
|
|
3176
|
-
"
|
|
3162
|
+
"dialogFooter": "PNbOqW_dialogFooter",
|
|
3163
|
+
"adminTag": "PNbOqW_adminTag",
|
|
3164
|
+
"subtitle": "PNbOqW_subtitle",
|
|
3165
|
+
"comboboxOption": "PNbOqW_comboboxOption",
|
|
3166
|
+
"copied": "PNbOqW_copied",
|
|
3167
|
+
"sectionTitle": "PNbOqW_sectionTitle",
|
|
3168
|
+
"empty": "PNbOqW_empty",
|
|
3177
3169
|
"matrixScroll": "PNbOqW_matrixScroll",
|
|
3170
|
+
"treeToggle": "PNbOqW_treeToggle",
|
|
3171
|
+
"onlyAdmin": "PNbOqW_onlyAdmin",
|
|
3172
|
+
"dialog": "PNbOqW_dialog",
|
|
3173
|
+
"treeSpacer": "PNbOqW_treeSpacer",
|
|
3174
|
+
"dialogBody": "PNbOqW_dialogBody",
|
|
3175
|
+
"notice": "PNbOqW_notice",
|
|
3176
|
+
"comboboxMenu": "PNbOqW_comboboxMenu",
|
|
3177
|
+
"protected": "PNbOqW_protected",
|
|
3178
|
+
"combobox": "PNbOqW_combobox",
|
|
3179
|
+
"error": "PNbOqW_error",
|
|
3180
|
+
"treeName": "PNbOqW_treeName",
|
|
3181
|
+
"comboboxHint": "PNbOqW_comboboxHint",
|
|
3182
|
+
"candidate": "PNbOqW_candidate",
|
|
3178
3183
|
"detailGrid": "PNbOqW_detailGrid",
|
|
3179
3184
|
"table": "PNbOqW_table",
|
|
3180
|
-
"
|
|
3181
|
-
"
|
|
3182
|
-
"
|
|
3183
|
-
"
|
|
3184
|
-
"
|
|
3185
|
-
"
|
|
3186
|
-
"
|
|
3187
|
-
"
|
|
3188
|
-
"comboboxSearch": "PNbOqW_comboboxSearch",
|
|
3189
|
-
"comboboxCheck": "PNbOqW_comboboxCheck",
|
|
3190
|
-
"tabs": "PNbOqW_tabs",
|
|
3185
|
+
"matrixNote": "PNbOqW_matrixNote",
|
|
3186
|
+
"scopeBadge": "PNbOqW_scopeBadge",
|
|
3187
|
+
"comboboxPlaceholder": "PNbOqW_comboboxPlaceholder",
|
|
3188
|
+
"matrix": "PNbOqW_matrix",
|
|
3189
|
+
"rowActions": "PNbOqW_rowActions",
|
|
3190
|
+
"search": "PNbOqW_search",
|
|
3191
|
+
"panel": "PNbOqW_panel",
|
|
3192
|
+
"panelFoot": "PNbOqW_panelFoot",
|
|
3191
3193
|
"comboboxOptionActive": "PNbOqW_comboboxOptionActive",
|
|
3192
|
-
"pager": "PNbOqW_pager",
|
|
3193
|
-
"departments": "PNbOqW_departments",
|
|
3194
|
-
"empty": "PNbOqW_empty",
|
|
3195
|
-
"tabActive": "PNbOqW_tabActive",
|
|
3196
|
-
"title": "PNbOqW_title",
|
|
3197
|
-
"head": "PNbOqW_head",
|
|
3198
3194
|
"readOnly": "PNbOqW_readOnly",
|
|
3199
3195
|
"matrixModule": "PNbOqW_matrixModule",
|
|
3200
|
-
"
|
|
3201
|
-
"
|
|
3202
|
-
"
|
|
3203
|
-
"
|
|
3204
|
-
"
|
|
3196
|
+
"permission": "PNbOqW_permission",
|
|
3197
|
+
"department": "PNbOqW_department",
|
|
3198
|
+
"permDescription": "PNbOqW_permDescription",
|
|
3199
|
+
"permCopy": "PNbOqW_permCopy",
|
|
3200
|
+
"head": "PNbOqW_head",
|
|
3201
|
+
"panelHead": "PNbOqW_panelHead",
|
|
3205
3202
|
"treeRoot": "PNbOqW_treeRoot",
|
|
3206
|
-
"
|
|
3207
|
-
"
|
|
3208
|
-
"
|
|
3209
|
-
"
|
|
3210
|
-
"
|
|
3203
|
+
"demo": "PNbOqW_demo",
|
|
3204
|
+
"comboboxCheck": "PNbOqW_comboboxCheck",
|
|
3205
|
+
"muted": "PNbOqW_muted",
|
|
3206
|
+
"deptAdmins": "PNbOqW_deptAdmins",
|
|
3207
|
+
"candidates": "PNbOqW_candidates",
|
|
3208
|
+
"page": "PNbOqW_page",
|
|
3209
|
+
"dialogHint": "PNbOqW_dialogHint",
|
|
3210
|
+
"comboboxList": "PNbOqW_comboboxList"
|
|
3211
3211
|
};
|
|
3212
3212
|
//#endregion
|
|
3213
3213
|
//#region src/client/combobox.ts
|
|
@@ -4645,18 +4645,18 @@ window.__ModuleLoader__.load({
|
|
|
4645
4645
|
document.head.appendChild(tag);
|
|
4646
4646
|
}
|
|
4647
4647
|
var WorkspaceUpgradePrompt_module_css_default = {
|
|
4648
|
-
"sessionRow": "razUfG_sessionRow",
|
|
4649
|
-
"copy": "razUfG_copy",
|
|
4650
4648
|
"sessionTitle": "razUfG_sessionTitle",
|
|
4651
4649
|
"title": "razUfG_title",
|
|
4652
|
-
"
|
|
4653
|
-
"error": "razUfG_error",
|
|
4654
|
-
"actions": "razUfG_actions",
|
|
4655
|
-
"banner": "razUfG_banner",
|
|
4656
|
-
"dialogBody": "razUfG_dialogBody",
|
|
4650
|
+
"sessionRow": "razUfG_sessionRow",
|
|
4657
4651
|
"sessionList": "razUfG_sessionList",
|
|
4652
|
+
"banner": "razUfG_banner",
|
|
4658
4653
|
"body": "razUfG_body",
|
|
4659
|
-
"
|
|
4654
|
+
"sessionPath": "razUfG_sessionPath",
|
|
4655
|
+
"copy": "razUfG_copy",
|
|
4656
|
+
"dialogText": "razUfG_dialogText",
|
|
4657
|
+
"dialogBody": "razUfG_dialogBody",
|
|
4658
|
+
"actions": "razUfG_actions",
|
|
4659
|
+
"error": "razUfG_error"
|
|
4660
4660
|
};
|
|
4661
4661
|
//#endregion
|
|
4662
4662
|
//#region src/client/WorkspaceUpgradePrompt.tsx
|
|
@@ -5197,7 +5197,37 @@ window.__ModuleLoader__.load({
|
|
|
5197
5197
|
nonce: typeof record.nonce === "string" ? record.nonce : void 0
|
|
5198
5198
|
};
|
|
5199
5199
|
};
|
|
5200
|
-
const
|
|
5200
|
+
const readHostTheme = () => document.body.hasAttribute("data-ds-dark-theme") ? "dark" : "light";
|
|
5201
|
+
/**
|
|
5202
|
+
* 门户 origin 归一化:同源代理部署(DSH 挂在门户路径前缀下,如 `/dsh/`)里,host config
|
|
5203
|
+
* 可能仍返回本机开发 origin(如 `http://127.0.0.1:3000`)。iframe 必须落在**当前门户
|
|
5204
|
+
* origin** 上,否则跨 origin 拿不到 sessionStorage token,页面会卡在「正在恢复会话」。
|
|
5205
|
+
*
|
|
5206
|
+
* 只在「DSH 页面不在根路径」且 base 是 loopback、与当前 origin 不同时改写;直连部署
|
|
5207
|
+
* (DSH 在 `/` 或独立 origin)保持原 base,不影响本地 3000/32000 的分origin模式。
|
|
5208
|
+
*/
|
|
5209
|
+
const normalizeEmbedBase = (configured, sameOrigin) => {
|
|
5210
|
+
try {
|
|
5211
|
+
const base = new URL(configured, window.location.origin);
|
|
5212
|
+
const page = window.location;
|
|
5213
|
+
const isLoopback = base.hostname === "127.0.0.1" || base.hostname === "localhost";
|
|
5214
|
+
const underProxyPrefix = page.pathname !== "/" && !/^\/(?:index\.html)?$/u.test(page.pathname);
|
|
5215
|
+
if (!sameOrigin && isLoopback && underProxyPrefix && base.origin !== page.origin) return {
|
|
5216
|
+
base: page.origin,
|
|
5217
|
+
sameOrigin: true
|
|
5218
|
+
};
|
|
5219
|
+
return {
|
|
5220
|
+
base: configured,
|
|
5221
|
+
sameOrigin
|
|
5222
|
+
};
|
|
5223
|
+
} catch {
|
|
5224
|
+
return {
|
|
5225
|
+
base: configured,
|
|
5226
|
+
sameOrigin
|
|
5227
|
+
};
|
|
5228
|
+
}
|
|
5229
|
+
};
|
|
5230
|
+
const buildEmbedUrl = (config, meta, theme) => {
|
|
5201
5231
|
const base = config.embedBaseUrl.replace(/\/+$/u, "");
|
|
5202
5232
|
const hash = config.token === void 0 ? "" : "#accessToken=" + encodeURIComponent(config.token);
|
|
5203
5233
|
if (meta.resourceId !== void 0 && (meta.mode === "detail" || meta.mode === "audit")) {
|
|
@@ -5205,12 +5235,13 @@ window.__ModuleLoader__.load({
|
|
|
5205
5235
|
assetTab: "resources",
|
|
5206
5236
|
prototype: "resource-detail",
|
|
5207
5237
|
resourceId: String(meta.resourceId),
|
|
5208
|
-
embed: "1"
|
|
5238
|
+
embed: "1",
|
|
5239
|
+
theme
|
|
5209
5240
|
});
|
|
5210
5241
|
if (meta.mode === "audit") params.set("tab", "audit");
|
|
5211
5242
|
return `${base}/assets?${params.toString()}${hash}`;
|
|
5212
5243
|
}
|
|
5213
|
-
return `${base}/assets?assetTab=resources&embed=1${hash}`;
|
|
5244
|
+
return `${base}/assets?assetTab=resources&embed=1&theme=${theme}${hash}`;
|
|
5214
5245
|
};
|
|
5215
5246
|
const frameStyle = {
|
|
5216
5247
|
width: "100%",
|
|
@@ -5241,13 +5272,15 @@ window.__ModuleLoader__.load({
|
|
|
5241
5272
|
const [notice, setNotice] = (0, react.useState)("");
|
|
5242
5273
|
const [reloadKey, setReloadKey] = (0, react.useState)(0);
|
|
5243
5274
|
const [filter, setFilter] = (0, react.useState)({ scope: "all" });
|
|
5275
|
+
const [theme] = (0, react.useState)(readHostTheme);
|
|
5244
5276
|
const iframeRef = (0, react.useRef)(null);
|
|
5245
5277
|
const meta = readMeta(tab.meta);
|
|
5246
|
-
const src = (0, react.useMemo)(() => config === null ? "" : buildEmbedUrl(config, meta), [
|
|
5278
|
+
const src = (0, react.useMemo)(() => config === null ? "" : buildEmbedUrl(config, meta, theme), [
|
|
5247
5279
|
config,
|
|
5248
5280
|
meta.resourceId,
|
|
5249
5281
|
meta.mode,
|
|
5250
5282
|
meta.nonce,
|
|
5283
|
+
theme,
|
|
5251
5284
|
reloadKey
|
|
5252
5285
|
]);
|
|
5253
5286
|
(0, react.useEffect)(() => {
|
|
@@ -5258,11 +5291,21 @@ window.__ModuleLoader__.load({
|
|
|
5258
5291
|
if (!response.ok) throw new Error("HTTP " + response.status.toString());
|
|
5259
5292
|
const body = await response.json();
|
|
5260
5293
|
if (!live) return;
|
|
5294
|
+
const sameOrigin = body.sameOrigin === true;
|
|
5295
|
+
const hostToken = typeof body.token === "string" && body.token !== "" ? body.token : void 0;
|
|
5296
|
+
let sessionToken;
|
|
5297
|
+
if (hostToken === void 0 && sameOrigin) try {
|
|
5298
|
+
const stored = window.sessionStorage.getItem("dataops_auth_token");
|
|
5299
|
+
if (stored !== null && stored !== "") sessionToken = stored;
|
|
5300
|
+
} catch {}
|
|
5301
|
+
const token = hostToken ?? sessionToken;
|
|
5302
|
+
if (token === void 0) throw new Error("缺少 DataOps 登录凭证,请重新登录工作区");
|
|
5303
|
+
const normalized = normalizeEmbedBase(body.embedBaseUrl, sameOrigin);
|
|
5261
5304
|
const next = {
|
|
5262
|
-
embedBaseUrl:
|
|
5263
|
-
sameOrigin:
|
|
5305
|
+
embedBaseUrl: normalized.base,
|
|
5306
|
+
sameOrigin: normalized.sameOrigin,
|
|
5264
5307
|
tabType: body.tabType,
|
|
5265
|
-
|
|
5308
|
+
token
|
|
5266
5309
|
};
|
|
5267
5310
|
if (next.sameOrigin && next.token !== void 0) try {
|
|
5268
5311
|
window.sessionStorage.setItem("dataops_auth_token", next.token);
|
|
@@ -5353,6 +5396,27 @@ window.__ModuleLoader__.load({
|
|
|
5353
5396
|
...payload
|
|
5354
5397
|
}, "*");
|
|
5355
5398
|
}, [filter]);
|
|
5399
|
+
const postTheme = (0, react.useCallback)((value) => {
|
|
5400
|
+
iframeRef.current?.contentWindow?.postMessage({
|
|
5401
|
+
source: "dsh-host",
|
|
5402
|
+
type: "dataops-theme",
|
|
5403
|
+
theme: value
|
|
5404
|
+
}, "*");
|
|
5405
|
+
}, []);
|
|
5406
|
+
(0, react.useEffect)(() => {
|
|
5407
|
+
let current = readHostTheme();
|
|
5408
|
+
const observer = new MutationObserver(() => {
|
|
5409
|
+
const next = readHostTheme();
|
|
5410
|
+
if (next === current) return;
|
|
5411
|
+
current = next;
|
|
5412
|
+
postTheme(next);
|
|
5413
|
+
});
|
|
5414
|
+
observer.observe(document.body, {
|
|
5415
|
+
attributes: true,
|
|
5416
|
+
attributeFilter: ["data-ds-dark-theme"]
|
|
5417
|
+
});
|
|
5418
|
+
return () => observer.disconnect();
|
|
5419
|
+
}, [postTheme]);
|
|
5356
5420
|
(0, react.useEffect)(() => {
|
|
5357
5421
|
postFilter();
|
|
5358
5422
|
}, [postFilter]);
|
|
@@ -5416,6 +5480,7 @@ window.__ModuleLoader__.load({
|
|
|
5416
5480
|
onLoad: () => {
|
|
5417
5481
|
setLoading(false);
|
|
5418
5482
|
postFilter();
|
|
5483
|
+
postTheme(readHostTheme());
|
|
5419
5484
|
},
|
|
5420
5485
|
onError: () => {
|
|
5421
5486
|
setLoading(false);
|