@dovetail-v2/refine 0.3.17-alpha.1 → 0.3.17

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.
@@ -10,7 +10,6 @@ export type ShowContentViewProps<Model extends ResourceModel> = React.PropsWithC
10
10
  record: Model;
11
11
  }>;
12
12
  hideBackButton?: boolean;
13
- canCollapseTabs?: boolean;
14
13
  hideTopBar?: boolean;
15
14
  className?: string;
16
15
  size?: 'small' | 'medium';
@@ -3,12 +3,12 @@ import { i18n as I18nType } from 'i18next';
3
3
  import { Unstructured } from 'k8s-api-provider';
4
4
  import { ConfigMap, Secret } from 'kubernetes-types/core/v1';
5
5
  import { Column } from '../../components/InternalBaseTable';
6
- import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel } from '../../models';
6
+ import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel, IngressModel, ServiceModel, DaemonSetModel, StorageClassModel, PersistentVolumeModel, PersistentVolumeClaimModel, DeploymentModel } from '../../models';
7
7
  export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
8
8
  export declare const NameColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType, resource?: string) => Column<Model>;
9
9
  export declare const PlainTextNameColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
10
10
  export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => Column<Model>;
11
- export declare const StateDisplayColumnRenderer: <Model extends PodModel | ServiceModel | WorkloadModel | JobModel | CronJobModel | DaemonSetModel>(i18n: I18nType) => Column<Model>;
11
+ export declare const StateDisplayColumnRenderer: <Model extends PodModel | ServiceModel | WorkloadModel | DeploymentModel | JobModel | CronJobModel | DaemonSetModel>(i18n: I18nType) => Column<Model>;
12
12
  export declare const WorkloadImageColumnRenderer: <Model extends WorkloadBaseModel>(i18n: I18nType) => Column<Model>;
13
13
  export declare const RestartsColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
14
14
  export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>(i18n: I18nType) => Column<Model>;
package/dist/i18n.d.ts CHANGED
@@ -500,8 +500,6 @@ export declare const resources: {
500
500
  cant_delete_resource_with_name: string;
501
501
  close: string;
502
502
  import_from_file: string;
503
- view_all_info: string;
504
- collapse: string;
505
503
  tcp: string;
506
504
  udp: string;
507
505
  specify_workload: string;
@@ -530,6 +528,7 @@ export declare const resources: {
530
528
  clear_search_condition: string;
531
529
  no_labels: string;
532
530
  no_annotations: string;
531
+ pause_scheduling: string;
533
532
  };
534
533
  };
535
534
  };
@@ -243,8 +243,6 @@ declare const _default: {
243
243
  cant_delete_resource_with_name: string;
244
244
  close: string;
245
245
  import_from_file: string;
246
- view_all_info: string;
247
- collapse: string;
248
246
  tcp: string;
249
247
  udp: string;
250
248
  specify_workload: string;
@@ -273,6 +271,7 @@ declare const _default: {
273
271
  clear_search_condition: string;
274
272
  no_labels: string;
275
273
  no_annotations: string;
274
+ pause_scheduling: string;
276
275
  };
277
276
  };
278
277
  export default _default;
@@ -13,6 +13,7 @@ export declare class DeploymentModel extends WorkloadModel {
13
13
  getReplicaSets(replicaSets: ReplicaSetModel[]): ReplicaSetModel[];
14
14
  get stateDisplay(): ResourceState.UPDATING | ResourceState.READY | ResourceState.STOPPED;
15
15
  get revision(): string | undefined;
16
+ get isPaused(): boolean;
16
17
  getCurrentReplicaSet(replicaSets: ReplicaSetModel[]): ReplicaSetModel | undefined;
17
18
  }
18
19
  export {};
@@ -14,6 +14,7 @@ export type RuleItem = {
14
14
  export declare class IngressModel extends ResourceModel<IngressTypes> {
15
15
  _rawYaml: IngressTypes;
16
16
  constructor(_rawYaml: IngressTypes, _globalStore: GlobalStore);
17
+ get spec(): import("kubernetes-types/networking/v1").IngressSpec;
17
18
  private getFullPath;
18
19
  getFlattenedRules(services?: Service[]): RuleItem[];
19
20
  }
package/dist/refine.cjs CHANGED
@@ -1202,8 +1202,6 @@ const cant_delete_resource = "无法删除{{resource}}";
1202
1202
  const cant_delete_resource_with_name = "无法删除{{resource}} <0>{{name}}</0> 。";
1203
1203
  const close = "关闭";
1204
1204
  const import_from_file = "从文件读取";
1205
- const view_all_info = "查看全部信息";
1206
- const collapse = "收起";
1207
1205
  const tcp = "TCP";
1208
1206
  const udp = "UDP";
1209
1207
  const specify_workload = "指定工作负载";
@@ -1232,6 +1230,7 @@ const no_search_result = "无搜索结果";
1232
1230
  const clear_search_condition = "清空搜索条件";
1233
1231
  const no_labels = "无标签";
1234
1232
  const no_annotations = "无注解";
1233
+ const pause_scheduling = "暂停调度";
1235
1234
  const dovetail = {
1236
1235
  copy,
1237
1236
  reset_arguments,
@@ -1476,8 +1475,6 @@ const dovetail = {
1476
1475
  cant_delete_resource_with_name,
1477
1476
  close,
1478
1477
  import_from_file,
1479
- view_all_info,
1480
- collapse,
1481
1478
  tcp,
1482
1479
  udp,
1483
1480
  specify_workload,
@@ -1505,7 +1502,8 @@ const dovetail = {
1505
1502
  no_search_result,
1506
1503
  clear_search_condition,
1507
1504
  no_labels,
1508
- no_annotations
1505
+ no_annotations,
1506
+ pause_scheduling
1509
1507
  };
1510
1508
  const ZH = {
1511
1509
  dovetail
@@ -8718,6 +8716,9 @@ class IngressModel extends ResourceModel {
8718
8716
  super(_rawYaml, _globalStore);
8719
8717
  this._rawYaml = _rawYaml;
8720
8718
  }
8719
+ get spec() {
8720
+ return this._rawYaml.spec;
8721
+ }
8721
8722
  getFullPath(rule2, path2 = "", port2) {
8722
8723
  if (!rule2.host) {
8723
8724
  return path2 || "";
@@ -9856,6 +9857,10 @@ class DeploymentModel extends WorkloadModel {
9856
9857
  var _a, _b;
9857
9858
  return (_b = (_a = this.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b["deployment.kubernetes.io/revision"];
9858
9859
  }
9860
+ get isPaused() {
9861
+ var _a;
9862
+ return !!((_a = this.spec) == null ? void 0 : _a.paused);
9863
+ }
9859
9864
  getCurrentReplicaSet(replicaSets) {
9860
9865
  const myReplicaSets = this.getReplicaSets(replicaSets);
9861
9866
  return myReplicaSets.find((rs) => rs.revision === this.revision);
@@ -13806,7 +13811,7 @@ function Tabs(props) {
13806
13811
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13807
13812
  }) });
13808
13813
  }
13809
- const ShowContentView_1gmp0tu = "";
13814
+ const ShowContentView_196cma3 = "";
13810
13815
  const ShowContentWrapperStyle = "soapvs9";
13811
13816
  const BackButton = "b13d603q";
13812
13817
  const ToolBarWrapper = "tm8eaia";
@@ -13863,7 +13868,6 @@ const ShowContentView = (props) => {
13863
13868
  children,
13864
13869
  Dropdown = K8sDropdown,
13865
13870
  hideBackButton = false,
13866
- canCollapseTabs = false,
13867
13871
  className,
13868
13872
  hideTopBar = false,
13869
13873
  size = "medium"
@@ -13985,6 +13989,7 @@ const ShowContentView = (props) => {
13985
13989
  }, group.title);
13986
13990
  }
13987
13991
  const stateDisplay = lodashEs.get(record, "stateDisplay");
13992
+ const isPausedDeployment = record.kind === "Deployment" && record.isPaused;
13988
13993
  const topBar = /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
13989
13994
  className: ToolBarWrapper,
13990
13995
  style: {
@@ -14023,7 +14028,11 @@ const ShowContentView = (props) => {
14023
14028
  }), stateDisplay ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
14024
14029
  state: stateDisplay,
14025
14030
  customResourceStateMap: showConfig.resourceStateMap
14026
- }) : void 0]
14031
+ }) : void 0, isPausedDeployment ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.StatusCapsule, {
14032
+ className: common.cx_default(StateTagStyle, "c18272tc"),
14033
+ color: "yellow",
14034
+ children: i18n2.t("dovetail.pause_scheduling")
14035
+ }) : null]
14027
14036
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Space, {
14028
14037
  children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(core.CanAccess, {
14029
14038
  resource: resourceName,
@@ -14074,42 +14083,12 @@ const ShowContentView = (props) => {
14074
14083
  direction: "vertical",
14075
14084
  className: ShowContentHeaderStyle,
14076
14085
  children: topBar
14077
- }), basicInfo, canCollapseTabs ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(CollapseTabs, {
14078
- children: tabs
14079
- }) : tabs, children]
14080
- });
14081
- };
14082
- const CollapseTabs = (props) => {
14083
- const [isCollapsed, setIsCollapsed] = React.useState(true);
14084
- const {
14085
- t: t2
14086
- } = common.useTranslation();
14087
- return /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, {
14088
- children: [isCollapsed ? null : props.children, /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
14089
- style: {
14090
- display: "flex"
14091
- },
14092
- children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Button, {
14093
- style: {
14094
- margin: "8px auto",
14095
- cursor: "pointer"
14096
- },
14097
- size: "small",
14098
- type: "link",
14099
- onClick: () => setIsCollapsed((v) => !v),
14100
- suffixIcon: isCollapsed ? /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14101
- src: iconsReact.ArrowChevronDownSmall16BlueIcon
14102
- }) : /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14103
- src: iconsReact.ArrowChevronUpSmall16BlueIcon
14104
- }),
14105
- children: isCollapsed ? t2("dovetail.view_all_info") : t2("dovetail.collapse")
14106
- })
14107
- })]
14086
+ }), basicInfo, tabs, children]
14108
14087
  });
14109
14088
  };
14110
14089
  const ShowContent = (props) => {
14111
14090
  var _a;
14112
- const { showConfig, formatter, Dropdown = K8sDropdown, children, canCollapseTabs } = props;
14091
+ const { showConfig, formatter, Dropdown = K8sDropdown, children } = props;
14113
14092
  const parsed = core.useParsed();
14114
14093
  const { resource } = core.useResource();
14115
14094
  const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
@@ -14121,7 +14100,6 @@ const ShowContent = (props) => {
14121
14100
  showConfig,
14122
14101
  formatter,
14123
14102
  Dropdown,
14124
- canCollapseTabs,
14125
14103
  children
14126
14104
  }
14127
14105
  );
@@ -14752,14 +14730,14 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14752
14730
  const {
14753
14731
  t: t2
14754
14732
  } = common.useTranslation();
14755
- const [collapse2, setCollapse] = React.useState(defaultCollapse);
14733
+ const [collapse, setCollapse] = React.useState(defaultCollapse);
14756
14734
  React.useImperativeHandle(ref, () => ({
14757
14735
  setCollapse
14758
14736
  }), [setCollapse]);
14759
14737
  return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
14760
14738
  className: common.cx_default(className),
14761
14739
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
14762
- className: common.cx_default(TitleWrapperStyle$1, collapse2 && CollapsedTitleStyle),
14740
+ className: common.cx_default(TitleWrapperStyle$1, collapse && CollapsedTitleStyle),
14763
14741
  children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx("span", {
14764
14742
  className: eagle.Typo.Label.l4_bold_title,
14765
14743
  children: title
@@ -14767,18 +14745,18 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14767
14745
  type: "link",
14768
14746
  size: "small",
14769
14747
  className: common.cx_default(ButtonStyle),
14770
- onClick: () => setCollapse(!collapse2),
14771
- children: [collapse2 ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14748
+ onClick: () => setCollapse(!collapse),
14749
+ children: [collapse ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Icon, {
14772
14750
  style: {
14773
14751
  marginLeft: 4
14774
14752
  },
14775
- src: collapse2 ? iconsReact.ArrowChevronDown16BlueIcon : iconsReact.ArrowChevronUp16BlueIcon
14753
+ src: collapse ? iconsReact.ArrowChevronDown16BlueIcon : iconsReact.ArrowChevronUp16BlueIcon
14776
14754
  })]
14777
14755
  }) : null]
14778
14756
  }), /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
14779
14757
  className: common.cx_default(contentClassName),
14780
14758
  style: {
14781
- display: collapse2 ? "none" : "block"
14759
+ display: collapse ? "none" : "block"
14782
14760
  },
14783
14761
  children
14784
14762
  })]
@@ -18989,13 +18967,25 @@ const IngressRulesComponent = ({ ingress }) => {
18989
18967
  });
18990
18968
  const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [];
18991
18969
  const result = flattenedRules.map((r2) => {
18992
- const divider = " > ";
18970
+ var _a, _b;
18971
+ const arrow = " → ";
18972
+ const divider = " | ";
18973
+ const secretName = (_b = (_a = ingress.spec.tls) == null ? void 0 : _a.find(
18974
+ ({ hosts }) => hosts == null ? void 0 : hosts.includes(r2.host || "")
18975
+ )) == null ? void 0 : _b.secretName;
18976
+ let tooltip = r2.fullPath;
18977
+ if (r2.serviceName) {
18978
+ tooltip += `${arrow}${r2.serviceName}:${r2.servicePort}`;
18979
+ }
18980
+ if (secretName) {
18981
+ tooltip += `${divider}${secretName}`;
18982
+ }
18993
18983
  return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
18994
18984
  eagle.OverflowTooltip,
18995
18985
  {
18996
18986
  content: /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
18997
18987
  /* @__PURE__ */ common.jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
18998
- /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: divider }),
18988
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: arrow }),
18999
18989
  r2.serviceName ? /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
19000
18990
  /* @__PURE__ */ common.jsxRuntimeExports.jsx(
19001
18991
  ResourceLink,
@@ -19009,9 +18999,20 @@ const IngressRulesComponent = ({ ingress }) => {
19009
18999
  ":",
19010
19000
  r2.servicePort
19011
19001
  ] })
19012
- ] }) : r2.resourceName
19002
+ ] }) : r2.resourceName,
19003
+ secretName ? /* @__PURE__ */ common.jsxRuntimeExports.jsxs(common.jsxRuntimeExports.Fragment, { children: [
19004
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx("span", { children: divider }),
19005
+ /* @__PURE__ */ common.jsxRuntimeExports.jsx(
19006
+ ResourceLink,
19007
+ {
19008
+ resourceName: "secrets",
19009
+ namespace: ingress.metadata.namespace || "default",
19010
+ name: secretName
19011
+ }
19012
+ )
19013
+ ] }) : void 0
19013
19014
  ] }),
19014
- tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
19015
+ tooltip
19015
19016
  },
19016
19017
  r2.fullPath
19017
19018
  );
@@ -19118,10 +19119,26 @@ const StateDisplayColumnRenderer = (i18n2) => {
19118
19119
  sortable: true,
19119
19120
  width: 120,
19120
19121
  sorter: CommonSorter(dataIndex),
19121
- render: (v) => /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
19122
- state: v,
19123
- hideBackground: true
19124
- })
19122
+ render: (v, record) => {
19123
+ if (record.kind === "Deployment" && record.isPaused) {
19124
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsxs("span", {
19125
+ children: [/* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
19126
+ state: v,
19127
+ hideBackground: true
19128
+ }), /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Tag, {
19129
+ color: "yellow",
19130
+ style: {
19131
+ marginLeft: "4px"
19132
+ },
19133
+ children: i18n2.t("dovetail.pause_scheduling")
19134
+ })]
19135
+ });
19136
+ }
19137
+ return /* @__PURE__ */ common.jsxRuntimeExports.jsx(StateTag, {
19138
+ state: v,
19139
+ hideBackground: true
19140
+ });
19141
+ }
19125
19142
  };
19126
19143
  };
19127
19144
  const WorkloadImageColumnRenderer = (i18n2) => {
package/dist/refine.js CHANGED
@@ -12,7 +12,7 @@ import { parse, stringify } from "qs";
12
12
  import React, { createElement, isValidElement, cloneElement, Children, useContext, useCallback, createContext, useState, useEffect, useMemo, useRef, useImperativeHandle, lazy, Suspense, memo, forwardRef } from "react";
13
13
  import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Router } from "react-router-dom";
14
14
  import { usePushModal, usePopModal, DeleteDialog, Tag, RejectDialog, RejectDialogType, Typo, Input, Select, AntdOption, Button, Form, Space, TextArea, kitContext, Loading, Table as Table$2, Pagination, Alert, ImmersiveDialog, SmallDialog, Fields, Units, Link as Link$1, OverflowTooltip, Tooltip, StatusCapsule, Dropdown, Menu as Menu$1, Icon, Divider, LegacyModal, Popover, AntdTable, Upload, TableForm, AutoComplete, getOptions, DonutChart, SegmentControl, Checkbox, Tabs as Tabs$1, TabsTabPane, Col, Row, useMessage, SearchInput, Token, AntdSelectOptGroup, WizardDialog, MenuItemGroup, Layout as Layout$1, InputGroup, InputInteger, Time as Time$1, ModalStack, KitStoreProvider, ConfigProvider } from "@cloudtower/eagle";
15
- import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, ArrowChevronDownSmall16BlueIcon, ArrowChevronUpSmall16BlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
15
+ import { EditPen16PrimaryIcon, Download16GradientBlueIcon, TrashBinDelete16Icon, MoreEllipsis324BoldSecondaryIcon, MoreEllipsis324BoldBlueIcon, MoreEllipsis316BoldBlueIcon, PlusAddCreateNew16BoldOntintIcon, ViewEye16GradientGrayIcon, EntityFilterIgnoreGradient16GrayIcon, InfoICircleFill16GrayIcon, InfoICircleFill16Gray70Icon, RecoverContinue16GradientBlueIcon, SuspendedPause16GradientBlueIcon, ArrowChevronLeft16BoldTertiaryIcon, ArrowChevronLeftSmall16BoldBlueIcon, Retry16GradientBlueIcon, OpenTerminal16GradientBlueIcon, ArrowChevronDown16BlueIcon, ArrowChevronUp16BlueIcon, HierarchyTriangleRight16GrayIcon, HierarchyTriangleRight16BlueIcon, ClipboardCopy16GradientGrayIcon, ClipboardCopy16GradientBlueIcon, Retry16GradientGrayIcon, EditPen16GradientGrayIcon, EditPen16GradientBlueIcon, Showdiff16GradientGrayIcon, Showdiff16GradientBlueIcon, XmarkFailedSeriousWarningFill16RedIcon, Pause16GradientBlueIcon, EditPen16BlueIcon } from "@cloudtower/icons-react";
16
16
  import { first, get as get$2, cloneDeep, set, omit as omit$1, merge, isEqual as isEqual$1, debounce, last, setWith, clone, isObject as isObject$4, uniq, keyBy } from "lodash-es";
17
17
  import yaml$2 from "js-yaml";
18
18
  import { useLocalStorage } from "usehooks-ts";
@@ -1183,8 +1183,6 @@ const cant_delete_resource = "无法删除{{resource}}";
1183
1183
  const cant_delete_resource_with_name = "无法删除{{resource}} <0>{{name}}</0> 。";
1184
1184
  const close = "关闭";
1185
1185
  const import_from_file = "从文件读取";
1186
- const view_all_info = "查看全部信息";
1187
- const collapse = "收起";
1188
1186
  const tcp = "TCP";
1189
1187
  const udp = "UDP";
1190
1188
  const specify_workload = "指定工作负载";
@@ -1213,6 +1211,7 @@ const no_search_result = "无搜索结果";
1213
1211
  const clear_search_condition = "清空搜索条件";
1214
1212
  const no_labels = "无标签";
1215
1213
  const no_annotations = "无注解";
1214
+ const pause_scheduling = "暂停调度";
1216
1215
  const dovetail = {
1217
1216
  copy,
1218
1217
  reset_arguments,
@@ -1457,8 +1456,6 @@ const dovetail = {
1457
1456
  cant_delete_resource_with_name,
1458
1457
  close,
1459
1458
  import_from_file,
1460
- view_all_info,
1461
- collapse,
1462
1459
  tcp,
1463
1460
  udp,
1464
1461
  specify_workload,
@@ -1486,7 +1483,8 @@ const dovetail = {
1486
1483
  no_search_result,
1487
1484
  clear_search_condition,
1488
1485
  no_labels,
1489
- no_annotations
1486
+ no_annotations,
1487
+ pause_scheduling
1490
1488
  };
1491
1489
  const ZH = {
1492
1490
  dovetail
@@ -8699,6 +8697,9 @@ class IngressModel extends ResourceModel {
8699
8697
  super(_rawYaml, _globalStore);
8700
8698
  this._rawYaml = _rawYaml;
8701
8699
  }
8700
+ get spec() {
8701
+ return this._rawYaml.spec;
8702
+ }
8702
8703
  getFullPath(rule2, path2 = "", port2) {
8703
8704
  if (!rule2.host) {
8704
8705
  return path2 || "";
@@ -9837,6 +9838,10 @@ class DeploymentModel extends WorkloadModel {
9837
9838
  var _a, _b;
9838
9839
  return (_b = (_a = this.metadata) == null ? void 0 : _a.annotations) == null ? void 0 : _b["deployment.kubernetes.io/revision"];
9839
9840
  }
9841
+ get isPaused() {
9842
+ var _a;
9843
+ return !!((_a = this.spec) == null ? void 0 : _a.paused);
9844
+ }
9840
9845
  getCurrentReplicaSet(replicaSets) {
9841
9846
  const myReplicaSets = this.getReplicaSets(replicaSets);
9842
9847
  return myReplicaSets.find((rs) => rs.revision === this.revision);
@@ -13787,7 +13792,7 @@ function Tabs(props) {
13787
13792
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
13788
13793
  }) });
13789
13794
  }
13790
- const ShowContentView_1gmp0tu = "";
13795
+ const ShowContentView_196cma3 = "";
13791
13796
  const ShowContentWrapperStyle = "soapvs9";
13792
13797
  const BackButton = "b13d603q";
13793
13798
  const ToolBarWrapper = "tm8eaia";
@@ -13844,7 +13849,6 @@ const ShowContentView = (props) => {
13844
13849
  children,
13845
13850
  Dropdown: Dropdown2 = K8sDropdown,
13846
13851
  hideBackButton = false,
13847
- canCollapseTabs = false,
13848
13852
  className,
13849
13853
  hideTopBar = false,
13850
13854
  size = "medium"
@@ -13966,6 +13970,7 @@ const ShowContentView = (props) => {
13966
13970
  }, group.title);
13967
13971
  }
13968
13972
  const stateDisplay = get$2(record, "stateDisplay");
13973
+ const isPausedDeployment = record.kind === "Deployment" && record.isPaused;
13969
13974
  const topBar = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
13970
13975
  className: ToolBarWrapper,
13971
13976
  style: {
@@ -14004,7 +14009,11 @@ const ShowContentView = (props) => {
14004
14009
  }), stateDisplay ? /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
14005
14010
  state: stateDisplay,
14006
14011
  customResourceStateMap: showConfig.resourceStateMap
14007
- }) : void 0]
14012
+ }) : void 0, isPausedDeployment ? /* @__PURE__ */ jsxRuntimeExports.jsx(StatusCapsule, {
14013
+ className: cx_default(StateTagStyle, "c18272tc"),
14014
+ color: "yellow",
14015
+ children: i18n2.t("dovetail.pause_scheduling")
14016
+ }) : null]
14008
14017
  }), /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, {
14009
14018
  children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !config.hideEdit ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
14010
14019
  resource: resourceName,
@@ -14055,42 +14064,12 @@ const ShowContentView = (props) => {
14055
14064
  direction: "vertical",
14056
14065
  className: ShowContentHeaderStyle,
14057
14066
  children: topBar
14058
- }), basicInfo, canCollapseTabs ? /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseTabs, {
14059
- children: tabs
14060
- }) : tabs, children]
14061
- });
14062
- };
14063
- const CollapseTabs = (props) => {
14064
- const [isCollapsed, setIsCollapsed] = useState(true);
14065
- const {
14066
- t: t2
14067
- } = useTranslation();
14068
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
14069
- children: [isCollapsed ? null : props.children, /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
14070
- style: {
14071
- display: "flex"
14072
- },
14073
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button, {
14074
- style: {
14075
- margin: "8px auto",
14076
- cursor: "pointer"
14077
- },
14078
- size: "small",
14079
- type: "link",
14080
- onClick: () => setIsCollapsed((v) => !v),
14081
- suffixIcon: isCollapsed ? /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14082
- src: ArrowChevronDownSmall16BlueIcon
14083
- }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14084
- src: ArrowChevronUpSmall16BlueIcon
14085
- }),
14086
- children: isCollapsed ? t2("dovetail.view_all_info") : t2("dovetail.collapse")
14087
- })
14088
- })]
14067
+ }), basicInfo, tabs, children]
14089
14068
  });
14090
14069
  };
14091
14070
  const ShowContent = (props) => {
14092
14071
  var _a;
14093
- const { showConfig, formatter, Dropdown: Dropdown2 = K8sDropdown, children, canCollapseTabs } = props;
14072
+ const { showConfig, formatter, Dropdown: Dropdown2 = K8sDropdown, children } = props;
14094
14073
  const parsed = useParsed();
14095
14074
  const { resource } = useResource();
14096
14075
  const id = (_a = parsed == null ? void 0 : parsed.params) == null ? void 0 : _a.id;
@@ -14102,7 +14081,6 @@ const ShowContent = (props) => {
14102
14081
  showConfig,
14103
14082
  formatter,
14104
14083
  Dropdown: Dropdown2,
14105
- canCollapseTabs,
14106
14084
  children
14107
14085
  }
14108
14086
  );
@@ -14733,14 +14711,14 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14733
14711
  const {
14734
14712
  t: t2
14735
14713
  } = useTranslation();
14736
- const [collapse2, setCollapse] = useState(defaultCollapse);
14714
+ const [collapse, setCollapse] = useState(defaultCollapse);
14737
14715
  useImperativeHandle(ref, () => ({
14738
14716
  setCollapse
14739
14717
  }), [setCollapse]);
14740
14718
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
14741
14719
  className: cx_default(className),
14742
14720
  children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
14743
- className: cx_default(TitleWrapperStyle$1, collapse2 && CollapsedTitleStyle),
14721
+ className: cx_default(TitleWrapperStyle$1, collapse && CollapsedTitleStyle),
14744
14722
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
14745
14723
  className: Typo.Label.l4_bold_title,
14746
14724
  children: title
@@ -14748,18 +14726,18 @@ const SectionTitle = React.forwardRef(function SectionTitle2(props, ref) {
14748
14726
  type: "link",
14749
14727
  size: "small",
14750
14728
  className: cx_default(ButtonStyle),
14751
- onClick: () => setCollapse(!collapse2),
14752
- children: [collapse2 ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14729
+ onClick: () => setCollapse(!collapse),
14730
+ children: [collapse ? t2("dovetail.expand") : t2("dovetail.fold"), /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, {
14753
14731
  style: {
14754
14732
  marginLeft: 4
14755
14733
  },
14756
- src: collapse2 ? ArrowChevronDown16BlueIcon : ArrowChevronUp16BlueIcon
14734
+ src: collapse ? ArrowChevronDown16BlueIcon : ArrowChevronUp16BlueIcon
14757
14735
  })]
14758
14736
  }) : null]
14759
14737
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
14760
14738
  className: cx_default(contentClassName),
14761
14739
  style: {
14762
- display: collapse2 ? "none" : "block"
14740
+ display: collapse ? "none" : "block"
14763
14741
  },
14764
14742
  children
14765
14743
  })]
@@ -18970,13 +18948,25 @@ const IngressRulesComponent = ({ ingress }) => {
18970
18948
  });
18971
18949
  const flattenedRules = (serviceData == null ? void 0 : serviceData.data) ? ingress.getFlattenedRules(serviceData == null ? void 0 : serviceData.data) : [];
18972
18950
  const result = flattenedRules.map((r2) => {
18973
- const divider = " > ";
18951
+ var _a, _b;
18952
+ const arrow = " → ";
18953
+ const divider = " | ";
18954
+ const secretName = (_b = (_a = ingress.spec.tls) == null ? void 0 : _a.find(
18955
+ ({ hosts }) => hosts == null ? void 0 : hosts.includes(r2.host || "")
18956
+ )) == null ? void 0 : _b.secretName;
18957
+ let tooltip = r2.fullPath;
18958
+ if (r2.serviceName) {
18959
+ tooltip += `${arrow}${r2.serviceName}:${r2.servicePort}`;
18960
+ }
18961
+ if (secretName) {
18962
+ tooltip += `${divider}${secretName}`;
18963
+ }
18974
18964
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
18975
18965
  OverflowTooltip,
18976
18966
  {
18977
18967
  content: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18978
18968
  /* @__PURE__ */ jsxRuntimeExports.jsx(LinkFallback, { fullPath: r2.fullPath }),
18979
- /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: divider }),
18969
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: arrow }),
18980
18970
  r2.serviceName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18981
18971
  /* @__PURE__ */ jsxRuntimeExports.jsx(
18982
18972
  ResourceLink,
@@ -18990,9 +18980,20 @@ const IngressRulesComponent = ({ ingress }) => {
18990
18980
  ":",
18991
18981
  r2.servicePort
18992
18982
  ] })
18993
- ] }) : r2.resourceName
18983
+ ] }) : r2.resourceName,
18984
+ secretName ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
18985
+ /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: divider }),
18986
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
18987
+ ResourceLink,
18988
+ {
18989
+ resourceName: "secrets",
18990
+ namespace: ingress.metadata.namespace || "default",
18991
+ name: secretName
18992
+ }
18993
+ )
18994
+ ] }) : void 0
18994
18995
  ] }),
18995
- tooltip: `${r2.fullPath}${divider}:${r2.servicePort}`
18996
+ tooltip
18996
18997
  },
18997
18998
  r2.fullPath
18998
18999
  );
@@ -19099,10 +19100,26 @@ const StateDisplayColumnRenderer = (i18n2) => {
19099
19100
  sortable: true,
19100
19101
  width: 120,
19101
19102
  sorter: CommonSorter(dataIndex),
19102
- render: (v) => /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
19103
- state: v,
19104
- hideBackground: true
19105
- })
19103
+ render: (v, record) => {
19104
+ if (record.kind === "Deployment" && record.isPaused) {
19105
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", {
19106
+ children: [/* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
19107
+ state: v,
19108
+ hideBackground: true
19109
+ }), /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, {
19110
+ color: "yellow",
19111
+ style: {
19112
+ marginLeft: "4px"
19113
+ },
19114
+ children: i18n2.t("dovetail.pause_scheduling")
19115
+ })]
19116
+ });
19117
+ }
19118
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(StateTag, {
19119
+ state: v,
19120
+ hideBackground: true
19121
+ });
19122
+ }
19106
19123
  };
19107
19124
  };
19108
19125
  const WorkloadImageColumnRenderer = (i18n2) => {
package/dist/style.css CHANGED
@@ -3637,6 +3637,10 @@
3637
3637
  .c1lh8loq.ant-row {
3638
3638
  row-gap: 4px;
3639
3639
  margin-right: 0 !important;
3640
+ }
3641
+
3642
+ .c18272tc {
3643
+ margin-left: 8px;
3640
3644
  }/* // basic */
3641
3645
  /* FishEye Color Variables and Functions */
3642
3646
  /*
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.3.17-alpha.1",
3
+ "version": "0.3.17",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",