domain 域名管理
This commit is contained in:
parent
e5c1f34b8e
commit
515d1bd8e5
|
|
@ -167,184 +167,4 @@
|
|||
--td-brand-color-6: var(--oak-brand-color-6);
|
||||
--td-brand-color-7: var(--oak-brand-color-7);
|
||||
--td-brand-color-8: var(--oak-brand-color-8);
|
||||
--td-brand-color-9: var(--oak-brand-color-9);
|
||||
--td-brand-color-10: var(--oak-brand-color-10);
|
||||
--td-warning-color-1: var(--oak-warning-color-1);
|
||||
--td-warning-color-2: var(--oak-warning-color-2);
|
||||
--td-warning-color-3: var(--oak-warning-color-3);
|
||||
--td-warning-color-4: var(--oak-warning-color-4);
|
||||
--td-warning-color-5: var(--oak-warning-color-5);
|
||||
--td-warning-color-6: var(--oak-warning-color-6);
|
||||
--td-warning-color-7: var(--oak-warning-color-7);
|
||||
--td-warning-color-8: var(--oak-warning-color-8);
|
||||
--td-warning-color-9: var(--oak-warning-color-9);
|
||||
--td-warning-color-10: var(--oak-warning-color-10);
|
||||
--td-error-color-1: var(--oak-error-color-1);
|
||||
--td-error-color-2: var(--oak-error-color-2);
|
||||
--td-error-color-3: var(--oak-error-color-3);
|
||||
--td-error-color-4: var(--oak-error-color-4);
|
||||
--td-error-color-5: var(--oak-error-color-5);
|
||||
--td-error-color-6: var(--oak-error-color-6);
|
||||
--td-error-color-7: var(--oak-error-color-7);
|
||||
--td-error-color-8: var(--oak-error-color-8);
|
||||
--td-error-color-9: var(--oak-error-color-9);
|
||||
--td-error-color-10: var(--oak-error-color-10);
|
||||
--td-success-color-1: var(--oak-success-color-1);
|
||||
--td-success-color-2: var(--oak-success-color-2);
|
||||
--td-success-color-3: var(--oak-success-color-3);
|
||||
--td-success-color-4: var(--oak-success-color-4);
|
||||
--td-success-color-5: var(--oak-success-color-5);
|
||||
--td-success-color-6: var(--oak-success-color-6);
|
||||
--td-success-color-7: var(--oak-success-color-7);
|
||||
--td-success-color-8: var(--oak-success-color-8);
|
||||
--td-success-color-9: var(--oak-success-color-9);
|
||||
--td-success-color-10: var(--oak-success-color-10);
|
||||
--td-gray-color-1: var(--oak-gray-color-1);
|
||||
--td-gray-color-2: var(--oak-gray-color-2);
|
||||
--td-gray-color-3: var(--oak-gray-color-3);
|
||||
--td-gray-color-4: var(--oak-gray-color-4);
|
||||
--td-gray-color-5: var(--oak-gray-color-5);
|
||||
--td-gray-color-6: var(--oak-gray-color-6);
|
||||
--td-gray-color-7: var(--oak-gray-color-7);
|
||||
--td-gray-color-8: var(--oak-gray-color-8);
|
||||
--td-gray-color-9: var(--oak-gray-color-9);
|
||||
--td-gray-color-10: var(--oak-gray-color-10);
|
||||
--td-gray-color-11: var(--oak-gray-color-11);
|
||||
--td-gray-color-12: var(--oak-gray-color-12);
|
||||
--td-gray-color-13: var(--oak-gray-color-13);
|
||||
--td-gray-color-14: var(--oak-gray-color-14);
|
||||
--td-font-white-1: var(--oak-font-white-1);
|
||||
--td-font-white-2: var(--oak-font-white-2);
|
||||
--td-font-white-3: var(--oak-font-white-3);
|
||||
--td-font-white-4: var(--oak-font-white-4);
|
||||
--td-font-gray-1: var(--oak-font-gray-1);
|
||||
--td-font-gray-2: var(--oak-font-gray-2);
|
||||
--td-font-gray-3: var(--oak-font-gray-3);
|
||||
--td-font-gray-4: var(--oak-font-gray-4);
|
||||
--td-brand-color: var(--oak-brand-color);
|
||||
--td-warning-color: var(--oak-warning-color);
|
||||
--td-error-color: var(--oak-error-color);
|
||||
--td-success-color: var(--oak-success-color);
|
||||
--td-brand-color-hover: var(--oak-brand-color-hover);
|
||||
--td-brand-color-focus: var(--oak-brand-color-focus);
|
||||
--td-brand-color-active: var(--oak-brand-color-active);
|
||||
--td-brand-color-disabled: var(--oak-brand-color-disabled);
|
||||
--td-brand-color-light: var(--oak-brand-color-light);
|
||||
--td-warning-color-hover: var(--oak-warning-color-hover);
|
||||
--td-warning-color-focus: var(--oak-warning-color-focus);
|
||||
--td-warning-color-active: var(--oak-warning-color-active);
|
||||
--td-warning-color-disabled: var(--oak-warning-color-disabled);
|
||||
--td-warning-color-light: var(--oak-warning-color-light);
|
||||
--td-error-color-hover: var(--oak-error-color-hover);
|
||||
--td-error-color-focus: var(--oak-error-color-focus);
|
||||
--td-error-color-active: var(--oak-error-color-active);
|
||||
--td-error-color-disabled: var(--oak-error-color-disabled);
|
||||
--td-error-color-light: var(--oak-error-color-light);
|
||||
--td-success-color-hover: var(--oak-success-color-hover);
|
||||
--td-success-color-focus: var(--oak-success-color-focus);
|
||||
--td-success-color-active: var(--oak-success-color-active);
|
||||
--td-success-color-disabled: var(--oak-success-color-disabled);
|
||||
--td-success-color-light: var(--oak-success-color-light);
|
||||
--td-mask-active: var(--oak-mask-active);
|
||||
--td-mask-disabled: var(--oak-mask-disabled);
|
||||
--td-bg-color-page: var(--oak-bg-color-page);
|
||||
--td-bg-color-container: var(--oak-bg-color-container);
|
||||
--td-bg-color-container-hover: var(--oak-bg-color-container-hover);
|
||||
--td-bg-color-container-active: var(--oak-bg-color-container-active);
|
||||
--td-bg-color-container-select: var(--oak-bg-color-container-select);
|
||||
--td-bg-color-secondarycontainer: var(--oak-bg-color-secondarycontainer);
|
||||
--td-bg-color-secondarycontainer-hover: var(--oak--bg-color-secondarycontainer-hover);
|
||||
--td-bg-color-secondarycontainer-active: var(--oak-bg-color-secondarycontainer-active);
|
||||
--td-bg-color-component: var(--oak-bg-color-component);
|
||||
--td-bg-color-component-hover: var(--oak-bg-color-component-hover);
|
||||
--td-bg-color-component-active: var(--oak-bg-color-component-hover);
|
||||
--td-bg-color-component-disabled: var(--oak-bg-color-component-disabled);
|
||||
--td-bg-color-specialcomponent: var(--oak-bg-color-specialcomponent);
|
||||
--td-text-color-primary: var(--oak-text-color-primary);
|
||||
--td-text-color-secondary: var(--oak-text-color-secondary);
|
||||
--td-text-color-placeholder: var(--oak-text-color-placeholder);
|
||||
--td-text-color-disabled: var(--oak-text-color-disabled);
|
||||
--td-text-color-anti: var(--oak-text-color-anti);
|
||||
--td-text-color-brand: var(--oak-text-color-link);
|
||||
--td-text-color-link: var(--oak-text-color-link);
|
||||
--td-border-level-1-color: var(--oak-border-level-1-color);
|
||||
--td-border-level-2-color: var(--oak-border-level-2-color);
|
||||
--td-component-stroke: var(--oak-component-stroke);
|
||||
--td-component-border: var(--oak-component-border);
|
||||
--td-shadow-1: var(--oak-shadow-1);
|
||||
--td-shadow-2: var(--oak-shadow-2);
|
||||
--td-shadow-3: var(--oak-shadow-3);
|
||||
--td-shadow-inset-top: var(--oak-shadow-inset-top);
|
||||
--td-shadow-inset-right: var(--oak-shadow-inset-right);
|
||||
--td-shadow-inset-bottom: var(--oak-shadow-inset-bottom);
|
||||
--td-shadow-inset-left: var(--oak-shadow-inset-left);
|
||||
--td-table-shadow-color: var(--oak-table-shadow-color);
|
||||
--td-scrollbar-color: var(--oak-scrollbar-color);
|
||||
--td-scrollbar-hover-color: var(--oak-scrollbar-hover-color);
|
||||
--td-scroll-track-color: var(--oak-scroll-track-color);
|
||||
}
|
||||
|
||||
:root {
|
||||
--td-radius-small: var(--oak-radius-small);
|
||||
--td-radius-default: var(--oak-radius-default);
|
||||
--td-radius-medium: var(--oak-radius-medium);
|
||||
--td-radius-large: var(--oak-radius-large);
|
||||
--td-radius-extraLarge: var(--oak-radius-extraLarge);
|
||||
--td-radius-round: var(--oak-radius-round);
|
||||
--td-radius-circle: var(--oak-radius-circle);
|
||||
}
|
||||
|
||||
:root {
|
||||
--td-font-family: var(--oak-font-family);
|
||||
--td-font-family-medium: var(--oak-font-family-medium);
|
||||
--td-font-size-link-small: var(--oak-font-size-link-small);
|
||||
--td-font-size-link-medium: var(--oak-font-size-link-medium);
|
||||
--td-font-size-link-large: var(--oak-font-size-link-large);
|
||||
--td-font-size-mark-small: var(--oak-font-size-mark-small);
|
||||
--td-font-size-mark-medium: var(--oak-font-size-mark-medium);
|
||||
--td-font-size-body-small: var(--oak-font-size-body-small);
|
||||
--td-font-size-body-medium: var(--oak-font-size-body-medium);
|
||||
--td-font-size-body-large: var(--oak-font-size-body-large);
|
||||
--td-font-size-title-small: var(--oak-font-size-title-small);
|
||||
--td-font-size-title-medium: var(--oak-font-size-title-medium);
|
||||
--td-font-size-title-large: var(--oak-font-size-title-large);
|
||||
--td-font-size-headline-small: var(--oak-font-size-headline-small);
|
||||
--td-font-size-headline-medium: var(--oak-font-size-headline-medium);
|
||||
--td-font-size-headline-large: var(--oak-font-size-headline-large);
|
||||
--td-font-size-display-medium: var(--oak-font-size-display-medium);
|
||||
--td-font-size-display-large: var(--oak-font-size-display-large);
|
||||
|
||||
--td-line-height-link-small: var(--oak-line-height-link-small);
|
||||
--td-line-height-link-medium: var(--oak-line-height-link-medium);
|
||||
--td-line-height-link-large: var(--oak-line-height-link-large);
|
||||
--td-line-height-mark-small: var(--oak-line-height-mark-small);
|
||||
--td-line-height-mark-medium: var(--oak-line-height-mark-medium);
|
||||
--td-line-height-body-small: var(--oak-line-height-body-small);
|
||||
--td-line-height-body-medium: var(--oak-line-height-body-medium);
|
||||
--td-line-height-body-large: var(--oak-line-height-body-large);
|
||||
--td-line-height-title-small: var(--oak-line-height-title-small);
|
||||
--td-line-height-title-medium: var(--oak-line-height-title-medium);
|
||||
--td-line-height-title-large: var(--oak-line-height-title-large);
|
||||
--td-line-height-headline-small: var(--oak-line-height-headline-small);
|
||||
--td-line-height-headline-medium: var(--oak-line-height-headline-medium);
|
||||
--td-line-height-headline-large: var(--oak-line-height-headline-large);
|
||||
--td-line-height-display-medium: var(--oak-line-height-display-medium);
|
||||
--td-line-height-display-large: var(--oak-line-height-display-large);
|
||||
|
||||
--td-font-link-small: var(--oak-font-size-link-small) / var(--oak-line-height-link-small) var(--oak-font-family);
|
||||
--td-font-link-medium: var(--oak-font-size-link-medium) / var(--oak-line-height-link-medium) var(--oak-font-family);
|
||||
--td-font-link-large: var(--oak-font-size-link-large) / var(--oak-line-height-link-large) var(--oak-font-family);
|
||||
--td-font-mark-small: 600 var(--oak-font-size-mark-small) / var(--oak-line-height-mark-small) var(--oak-font-family);
|
||||
--td-font-mark-medium: 600 var(--oak-font-size-mark-medium) / var(--oak-line-height-mark-medium) var(--oak-font-family);
|
||||
--td-font-body-small: var(--oak-font-size-body-small) / var(--oak-line-height-body-small) var(--oak-font-family);
|
||||
--td-font-body-medium: var(--oak-font-size-body-medium) / var(--oak-line-height-body-medium) var(--oak-font-family);
|
||||
--td-font-body-large: var(--oak-font-size-body-large) / var(--oak-line-height-body-large) var(--oak-font-family);
|
||||
--td-font-title-small: 600 var(--oak-font-size-title-small) / var(--oak-line-height-title-small) var(--oak-font-family);
|
||||
--td-font-title-medium: 600 var(--oak-font-size-title-medium) / var(--oak-line-height-title-medium) var(--oak-font-family);
|
||||
--td-font-title-large: 600 var(--oak-font-size-title-large) / var(--oak-line-height-title-large) var(--oak-font-family);
|
||||
--td-font-headline-small: 600 var(--oak-font-size-headline-small) / var(--oak-line-height-headline-small) var(--oak-font-family);
|
||||
--td-font-headline-medium: 600 var(--oak-font-size-headline-medium) / var(--oak-line-height-headline-medium) var(--oak-font-family);
|
||||
--td-font-headline-large: 600 var(--oak-font-size-headline-large) / var(--td2line-height-headline-large) var(--oak-font-family);
|
||||
--td-font-display-medium: 600 var(--oak-font-size-display-medium) / var(--oak-line-height-display-medium) var(--oak-font-family);
|
||||
--td-font-display-large: 600 var(--oak-font-size-display-large) / var(--oak-line-height-display-large) var(--oak-font-family);
|
||||
}
|
||||
--td-brand-color-9: var(--o
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'domain',
|
||||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
protocol: 1,
|
||||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return data || {};
|
||||
},
|
||||
observers: {
|
||||
tab: function (tab) {
|
||||
this.setState({
|
||||
tabValue: tab,
|
||||
});
|
||||
},
|
||||
},
|
||||
lifetimes: {
|
||||
attached: function () {
|
||||
this.setState({
|
||||
tabValue: this.props.tab,
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onTabClick: function (key) {
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'domain', false, {
|
||||
oakId: string;
|
||||
systemId: string;
|
||||
url: string;
|
||||
apiPath: string;
|
||||
port: string;
|
||||
protocol: EntityDict['domain']['Schema']['protocol'];
|
||||
tabValue: 'detail';
|
||||
}, {
|
||||
onTabClick: (key: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, url = _a.url, tabValue = _a.tabValue;
|
||||
var _b = props.methods, t = _b.t, navigateBack = _b.navigateBack, onTabClick = _b.onTabClick;
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: true, title: "\u57DF\u540D\u6982\u89C8" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: (0, jsx_runtime_1.jsx)(antd_1.Card, tslib_1.__assign({ title: url, bordered: false }, { children: (0, jsx_runtime_1.jsx)(antd_1.Tabs, { activeKey: tabValue, onTabClick: function (key) {
|
||||
onTabClick(key);
|
||||
}, items: [
|
||||
{
|
||||
label: '系统概览',
|
||||
key: 'detail',
|
||||
children: (0, jsx_runtime_1.jsx)("div", { children: "\u8BE6\u60C5" }),
|
||||
},
|
||||
] }) })) })) })));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = OakComponent({
|
||||
isList: true,
|
||||
entity: 'domain',
|
||||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
protocol: 1,
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
filter: function (_a) {
|
||||
var props = _a.props;
|
||||
if (props.systemId) {
|
||||
return {
|
||||
systemId: props.systemId,
|
||||
};
|
||||
}
|
||||
return {};
|
||||
},
|
||||
},
|
||||
],
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
var pagination = this.getPagination();
|
||||
return {
|
||||
list: data,
|
||||
pagination: pagination,
|
||||
};
|
||||
},
|
||||
data: {
|
||||
open: false,
|
||||
},
|
||||
methods: {
|
||||
goDetail: function (id) {
|
||||
this.navigateTo({
|
||||
url: '/domain/detail',
|
||||
oakId: id,
|
||||
tab: 'detail',
|
||||
});
|
||||
},
|
||||
goUpdate: function (id) {
|
||||
this.navigateTo({
|
||||
url: '/domain/upsert',
|
||||
oakId: id,
|
||||
});
|
||||
},
|
||||
goCreate: function () {
|
||||
var _a = this.props, width = _a.width, systemId = _a.systemId;
|
||||
this.navigateTo({
|
||||
url: '/domain/upsert',
|
||||
systemId: systemId,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'system', true, {
|
||||
searchValue: string;
|
||||
list: EntityDict['system']['Schema'][];
|
||||
pagination: any;
|
||||
showBack: boolean;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
}, {
|
||||
goDetail: (id: string) => void;
|
||||
goCreate: () => void;
|
||||
goUpdate: (id: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var _a = props.data, pagination = _a.pagination, _b = _a.list, list = _b === void 0 ? [] : _b, oakLoading = _a.oakLoading, showBack = _a.showBack, variant = _a.variant, oakFullpath = _a.oakFullpath;
|
||||
var _c = pagination || {}, pageSize = _c.pageSize, total = _c.total, currentPage = _c.currentPage;
|
||||
var _d = props.methods, t = _d.t, setPageSize = _d.setPageSize, setCurrentPage = _d.setCurrentPage, goCreate = _d.goCreate, goDetail = _d.goDetail, goUpdate = _d.goUpdate;
|
||||
return ((0, jsx_runtime_1.jsxs)(Container, tslib_1.__assign({ showBack: showBack, variant: variant }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Space, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
goCreate();
|
||||
} }, { children: "\u6DFB\u52A0\u57DF\u540D" })) }), (0, jsx_runtime_1.jsx)(antd_1.Table, { loading: oakLoading, dataSource: list, rowKey: "id", columns: [
|
||||
// {
|
||||
// dataIndex: 'id',
|
||||
// title: '序号',
|
||||
// render: (value, record, index) => {
|
||||
// return index + 1;
|
||||
// },
|
||||
// },
|
||||
{
|
||||
dataIndex: 'url',
|
||||
title: '域名',
|
||||
},
|
||||
{
|
||||
dataIndex: 'apiPath',
|
||||
title: '请求路径',
|
||||
},
|
||||
{
|
||||
dataIndex: 'port',
|
||||
title: '端口',
|
||||
},
|
||||
{
|
||||
dataIndex: 'protocol',
|
||||
title: '协议',
|
||||
},
|
||||
{
|
||||
dataIndex: 'op',
|
||||
width: 200,
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
render: function (value, record, index) {
|
||||
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
goDetail(record.id);
|
||||
} }, { children: "\u6982\u89C8" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
|
||||
goUpdate(record.id);
|
||||
} }, { children: "\u66F4\u65B0" }))] }));
|
||||
},
|
||||
fixed: 'right',
|
||||
},
|
||||
], pagination: {
|
||||
total: total,
|
||||
pageSize: pageSize,
|
||||
current: currentPage,
|
||||
onShowSizeChange: function (pageSize) {
|
||||
setPageSize(pageSize);
|
||||
},
|
||||
onChange: function (current) {
|
||||
setCurrentPage(current);
|
||||
},
|
||||
} })] })));
|
||||
}
|
||||
exports.default = Render;
|
||||
function Container(props) {
|
||||
var children = props.children, _a = props.variant, variant = _a === void 0 ? 'alone' : _a, showBack = props.showBack;
|
||||
if (['inline', 'dialog'].includes(variant)) {
|
||||
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: showBack, title: "\u7CFB\u7EDF\u7BA1\u7406" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: children })) })));
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
declare const _default: import("react").ComponentType<any>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
exports.default = OakComponent({
|
||||
isList: false,
|
||||
entity: 'domain',
|
||||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
protocol: 1,
|
||||
},
|
||||
formData: function (_a) {
|
||||
var data = _a.data;
|
||||
return data || {};
|
||||
},
|
||||
lifetimes: {
|
||||
ready: function () {
|
||||
var _a = this.props, systemId = _a.systemId, oakId = _a.oakId;
|
||||
if (!oakId) {
|
||||
if (systemId) {
|
||||
this.update({ systemId: systemId });
|
||||
}
|
||||
}
|
||||
if (systemId) {
|
||||
this.update({ systemId: systemId });
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
confirm: function () {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, this.execute()];
|
||||
case 1:
|
||||
_a.sent();
|
||||
this.navigateBack();
|
||||
return [2 /*return*/];
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'domain', false, {
|
||||
id: string;
|
||||
systemId: string;
|
||||
url: string;
|
||||
apiPath: string;
|
||||
port: number;
|
||||
protocol: EntityDict['domain']['Schema']['protocol'];
|
||||
variant: 'inline' | 'alone' | 'dialog';
|
||||
showBack: boolean;
|
||||
}, {
|
||||
confirm: () => void;
|
||||
}>): JSX.Element;
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var jsx_runtime_1 = require("react/jsx-runtime");
|
||||
var antd_1 = require("antd");
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var _a = props.data, systemId = _a.systemId, url = _a.url, apiPath = _a.apiPath, port = _a.port, protocol = _a.protocol, variant = _a.variant, _b = _a.showBack, showBack = _b === void 0 ? true : _b;
|
||||
var _c = props.methods, t = _c.t, update = _c.update, navigateBack = _c.navigateBack, confirm = _c.confirm;
|
||||
return ((0, jsx_runtime_1.jsx)(Container, tslib_1.__assign({ variant: variant, showBack: showBack }, { children: (0, jsx_runtime_1.jsx)(antd_1.Row, { children: (0, jsx_runtime_1.jsx)(antd_1.Col, tslib_1.__assign({ xs: 24, sm: 12 }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Form, tslib_1.__assign({ colon: true, labelCol: { span: 6 }, wrapperCol: { span: 16 } }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u8BBF\u95EE\u57DF\u540D", requiredMark: true, name: "url", rules: [
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
] }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { placeholder: "\u8F93\u5165\u57DF\u540D\uFF0C\u4F8B\u5982\uFF1Awww.abc.com", onChange: function (e) {
|
||||
update({
|
||||
url: e.target.value,
|
||||
});
|
||||
}, value: url }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u8BF7\u6C42\u8DEF\u5F84", requiredMark: true, name: "apiPath" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { onChange: function (e) {
|
||||
update({
|
||||
apiPath: e.target.value,
|
||||
});
|
||||
}, value: apiPath }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: "\u7AEF\u53E3", requiredMark: true, name: "port" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Input, { type: 'number', onChange: function (e) {
|
||||
var v = e.target.value;
|
||||
update({
|
||||
port: v ? Number(v) : undefined,
|
||||
});
|
||||
}, value: port }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ name: "protocol", label: "\u534F\u8BAE" }, { children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(antd_1.Select
|
||||
// mode="multiple"
|
||||
, {
|
||||
// mode="multiple"
|
||||
allowClear: true, style: { width: '100%' }, placeholder: "\u8BF7\u9009\u62E9\u534F\u8BAE", value: protocol, onChange: function (value) {
|
||||
update({
|
||||
protocol: value,
|
||||
});
|
||||
}, options: [
|
||||
{
|
||||
label: 'http',
|
||||
value: 'http',
|
||||
},
|
||||
{
|
||||
label: 'https',
|
||||
value: 'https',
|
||||
},
|
||||
] }) }) })), (0, jsx_runtime_1.jsx)(Action, tslib_1.__assign({ variant: variant }, { children: (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ wrapperCol: { offset: 6 } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
|
||||
confirm();
|
||||
} }, { children: "\u786E\u5B9A" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ onClick: function () {
|
||||
navigateBack();
|
||||
} }, { children: "\u8FD4\u56DE" }))] }) })) }))] })) })) }) })));
|
||||
}
|
||||
exports.default = Render;
|
||||
function Action(props) {
|
||||
var children = props.children, variant = props.variant;
|
||||
if (variant === 'dialog') {
|
||||
return null;
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }));
|
||||
}
|
||||
function Container(props) {
|
||||
var children = props.children, variant = props.variant, showBack = props.showBack;
|
||||
if (variant === 'inline' || variant === 'dialog') {
|
||||
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
||||
}
|
||||
return ((0, jsx_runtime_1.jsx)(pageHeader_1.default, tslib_1.__assign({ showBack: showBack, title: "\u7CFB\u7EDF\u7F16\u8F91" }, { children: (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: children })) })));
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ export default function Render(props: WebComponentProps<EntityDict, 'platform',
|
|||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
tabValue: 'detail' | 'application_list';
|
||||
tabValue: 'detail' | 'application_list' | 'domain_list';
|
||||
}, {
|
||||
onTabClick: (key: string) => void;
|
||||
}>): JSX.Element;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|||
var antd_1 = require("antd");
|
||||
var pageHeader_1 = tslib_1.__importDefault(require("../../../components/common/pageHeader"));
|
||||
var list_1 = tslib_1.__importDefault(require("../../../pages/application/list"));
|
||||
var list_2 = tslib_1.__importDefault(require("../../../pages/domain/list"));
|
||||
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
|
||||
function Render(props) {
|
||||
var _a = props.data, oakId = _a.oakId, config = _a.config, name = _a.name, tabValue = _a.tabValue;
|
||||
|
|
@ -22,6 +23,11 @@ function Render(props) {
|
|||
key: 'application_list',
|
||||
children: ((0, jsx_runtime_1.jsx)(list_1.default, { systemId: oakId, variant: "inline", oakPath: "$system/detail-application/list", oakAutoUnmount: true })),
|
||||
},
|
||||
{
|
||||
label: '域名管理',
|
||||
key: 'domain_list',
|
||||
children: ((0, jsx_runtime_1.jsx)(list_2.default, { systemId: oakId, variant: "inline", oakPath: "$system/detail-domain/list", oakAutoUnmount: true })),
|
||||
},
|
||||
] }) })) })) })));
|
||||
}
|
||||
exports.default = Render;
|
||||
|
|
|
|||
|
|
@ -28,20 +28,9 @@ exports.default = OakComponent({
|
|||
methods: {
|
||||
confirm: function () {
|
||||
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
||||
var domain;
|
||||
return tslib_1.__generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0:
|
||||
domain = this.state.domain;
|
||||
if (!domain) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '访问域名必须设置'
|
||||
});
|
||||
return [2 /*return*/];
|
||||
}
|
||||
;
|
||||
return [4 /*yield*/, this.execute()];
|
||||
case 0: return [4 /*yield*/, this.execute()];
|
||||
case 1:
|
||||
_a.sent();
|
||||
this.navigateBack();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
export default OakComponent({
|
||||
isList: false,
|
||||
entity: 'domain',
|
||||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
protocol: 1,
|
||||
},
|
||||
formData({ data }) {
|
||||
return data || {};
|
||||
},
|
||||
observers: {
|
||||
tab: function (tab) {
|
||||
this.setState({
|
||||
tabValue: tab,
|
||||
});
|
||||
},
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.setState({
|
||||
tabValue: this.props.tab,
|
||||
});
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
onTabClick(key: 'detail') {
|
||||
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
.container {
|
||||
background: var(--oak-bg-color-container);
|
||||
box-shadow: 0 2px 3px #0000001a;
|
||||
border-radius: 3px;
|
||||
padding: 30px 32px;
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
import React from 'react';
|
||||
import { Tabs, Card } from 'antd';
|
||||
import PageHeader from '../../../components/common/pageHeader';
|
||||
import ApplicationList from '../../../pages/application/list';
|
||||
|
||||
import Style from './web.module.less';
|
||||
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
||||
export default function Render(
|
||||
props: WebComponentProps<
|
||||
EntityDict,
|
||||
'domain',
|
||||
false,
|
||||
{
|
||||
oakId: string;
|
||||
systemId: string;
|
||||
url: string;
|
||||
apiPath: string;
|
||||
port: string;
|
||||
protocol: EntityDict['domain']['Schema']['protocol'];
|
||||
tabValue: 'detail';
|
||||
},
|
||||
{
|
||||
onTabClick: (key: string) => void;
|
||||
}
|
||||
>
|
||||
) {
|
||||
const { oakId, url, tabValue } = props.data;
|
||||
const { t, navigateBack, onTabClick } = props.methods;
|
||||
return (
|
||||
<PageHeader showBack={true} title="域名概览">
|
||||
<div className={Style.container}>
|
||||
<Card title={url} bordered={false}>
|
||||
<Tabs
|
||||
activeKey={tabValue}
|
||||
onTabClick={(key) => {
|
||||
onTabClick(key);
|
||||
}}
|
||||
items={[
|
||||
{
|
||||
label: '系统概览',
|
||||
key: 'detail',
|
||||
children: <div>详情</div>,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
</div>
|
||||
</PageHeader>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
export default OakComponent({
|
||||
isList: true,
|
||||
entity: 'domain',
|
||||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
protocol: 1,
|
||||
},
|
||||
filters: [
|
||||
{
|
||||
filter: ({ props }) => {
|
||||
if (props.systemId) {
|
||||
return {
|
||||
systemId: props.systemId,
|
||||
};
|
||||
}
|
||||
return {};
|
||||
},
|
||||
},
|
||||
],
|
||||
formData({ data }) {
|
||||
const pagination = this.getPagination();
|
||||
return {
|
||||
list: data,
|
||||
pagination,
|
||||
};
|
||||
},
|
||||
data: {
|
||||
open: false,
|
||||
},
|
||||
methods: {
|
||||
goDetail(id: string) {
|
||||
this.navigateTo({
|
||||
url: '/domain/detail',
|
||||
oakId: id,
|
||||
tab: 'detail',
|
||||
});
|
||||
},
|
||||
goUpdate(id: string,) {
|
||||
this.navigateTo({
|
||||
url: '/domain/upsert',
|
||||
oakId: id,
|
||||
});
|
||||
},
|
||||
goCreate() {
|
||||
const { width, systemId } = this.props;
|
||||
this.navigateTo({
|
||||
url: '/domain/upsert',
|
||||
systemId,
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
.container {
|
||||
background: var(--oak-bg-color-container);
|
||||
box-shadow: 0 2px 3px #0000001a;
|
||||
border-radius: 3px;
|
||||
padding: 30px 32px;
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
import * as React from 'react';
|
||||
import { Table, Button, Space, Typography, Modal, Tag } from 'antd';
|
||||
import PageHeader from '../../../components/common/pageHeader';
|
||||
|
||||
import Style from './web.module.less';
|
||||
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
||||
export default function Render(
|
||||
props: WebComponentProps<
|
||||
EntityDict,
|
||||
'system',
|
||||
true,
|
||||
{
|
||||
searchValue: string;
|
||||
list: EntityDict['system']['Schema'][];
|
||||
pagination: any;
|
||||
showBack: boolean;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
},
|
||||
{
|
||||
goDetail: (id: string) => void;
|
||||
goCreate: () => void;
|
||||
goUpdate: (id: string) => void;
|
||||
}
|
||||
>
|
||||
) {
|
||||
const {
|
||||
pagination,
|
||||
list = [],
|
||||
oakLoading,
|
||||
showBack,
|
||||
variant,
|
||||
oakFullpath,
|
||||
} = props.data;
|
||||
|
||||
const { pageSize, total, currentPage } = pagination || {};
|
||||
|
||||
const {
|
||||
t,
|
||||
setPageSize,
|
||||
setCurrentPage,
|
||||
goCreate,
|
||||
goDetail,
|
||||
goUpdate,
|
||||
} = props.methods;
|
||||
|
||||
return (
|
||||
<Container showBack={showBack} variant={variant}>
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
goCreate();
|
||||
}}
|
||||
>
|
||||
添加域名
|
||||
</Button>
|
||||
</Space>
|
||||
|
||||
<Table
|
||||
loading={oakLoading}
|
||||
dataSource={list}
|
||||
rowKey="id"
|
||||
columns={[
|
||||
// {
|
||||
// dataIndex: 'id',
|
||||
// title: '序号',
|
||||
// render: (value, record, index) => {
|
||||
// return index + 1;
|
||||
// },
|
||||
// },
|
||||
|
||||
{
|
||||
dataIndex: 'url',
|
||||
title: '域名',
|
||||
},
|
||||
{
|
||||
dataIndex: 'apiPath',
|
||||
title: '请求路径',
|
||||
},
|
||||
{
|
||||
dataIndex: 'port',
|
||||
title: '端口',
|
||||
},
|
||||
{
|
||||
dataIndex: 'protocol',
|
||||
title: '协议',
|
||||
},
|
||||
{
|
||||
dataIndex: 'op',
|
||||
width: 200,
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
render: (value, record, index) => {
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
goDetail(record.id);
|
||||
}}
|
||||
>
|
||||
概览
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
goUpdate(record.id);
|
||||
}}
|
||||
>
|
||||
更新
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
},
|
||||
fixed: 'right',
|
||||
},
|
||||
]}
|
||||
pagination={{
|
||||
total,
|
||||
pageSize,
|
||||
current: currentPage,
|
||||
onShowSizeChange: (pageSize: number) => {
|
||||
setPageSize(pageSize);
|
||||
},
|
||||
onChange: (current: number) => {
|
||||
setCurrentPage(current);
|
||||
},
|
||||
}}
|
||||
/>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
function Container(props: {
|
||||
children: React.ReactNode;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
showBack?: boolean;
|
||||
}) {
|
||||
const { children, variant = 'alone', showBack } = props;
|
||||
if (['inline', 'dialog'].includes(variant)) {
|
||||
return <>{children}</>;
|
||||
}
|
||||
return (
|
||||
<PageHeader showBack={showBack} title="系统管理">
|
||||
<div className={Style.container}>{children}</div>
|
||||
</PageHeader>
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
export default OakComponent({
|
||||
isList: false,
|
||||
entity: 'domain',
|
||||
projection: {
|
||||
id: 1,
|
||||
systemId: 1,
|
||||
url: 1,
|
||||
apiPath: 1,
|
||||
port: 1,
|
||||
protocol: 1,
|
||||
},
|
||||
formData({ data }) {
|
||||
return data || {};
|
||||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
const { systemId, oakId } = this.props;
|
||||
|
||||
if (!oakId) {
|
||||
if (systemId) {
|
||||
this.update({ systemId });
|
||||
}
|
||||
}
|
||||
if (systemId) {
|
||||
this.update({ systemId });
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async confirm() {
|
||||
await this.execute();
|
||||
this.navigateBack();
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
.container {
|
||||
background: var(--oak-bg-color-container);
|
||||
box-shadow: 0 2px 3px #0000001a;
|
||||
border-radius: 3px;
|
||||
padding: 30px 32px;
|
||||
}
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
import React from 'react';
|
||||
import { Button, Form, Row, Col, Switch, Input, Space, Select } from 'antd';
|
||||
|
||||
import PageHeader from '../../../components/common/pageHeader';
|
||||
import Style from './web.module.less';
|
||||
|
||||
|
||||
import { EntityDict } from '../../../general-app-domain';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
|
||||
export default function Render(
|
||||
props: WebComponentProps<
|
||||
EntityDict,
|
||||
'domain',
|
||||
false,
|
||||
{
|
||||
id: string;
|
||||
systemId: string;
|
||||
url: string;
|
||||
apiPath: string;
|
||||
port: number;
|
||||
protocol: EntityDict['domain']['Schema']['protocol'];
|
||||
variant: 'inline' | 'alone' | 'dialog';
|
||||
showBack: boolean;
|
||||
},
|
||||
{
|
||||
confirm: () => void;
|
||||
}
|
||||
>
|
||||
) {
|
||||
const {
|
||||
systemId,
|
||||
url,
|
||||
apiPath,
|
||||
port,
|
||||
protocol,
|
||||
|
||||
variant,
|
||||
showBack = true,
|
||||
} = props.data;
|
||||
const { t, update, navigateBack, confirm } = props.methods;
|
||||
|
||||
return (
|
||||
<Container variant={variant} showBack={showBack}>
|
||||
<Row>
|
||||
<Col xs={24} sm={12}>
|
||||
<Form
|
||||
colon={true}
|
||||
labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
>
|
||||
<Form.Item
|
||||
label="访问域名"
|
||||
requiredMark
|
||||
name="url"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<>
|
||||
<Input
|
||||
placeholder="输入域名,例如:www.abc.com"
|
||||
onChange={(e) => {
|
||||
update({
|
||||
url: e.target.value,
|
||||
});
|
||||
}}
|
||||
value={url}
|
||||
/>
|
||||
</>
|
||||
</Form.Item>
|
||||
<Form.Item label="请求路径" requiredMark name="apiPath">
|
||||
<>
|
||||
<Input
|
||||
onChange={(e) => {
|
||||
update({
|
||||
apiPath: e.target.value,
|
||||
});
|
||||
}}
|
||||
value={apiPath}
|
||||
/>
|
||||
</>
|
||||
</Form.Item>
|
||||
<Form.Item label="端口" requiredMark name="port">
|
||||
<>
|
||||
<Input
|
||||
type='number'
|
||||
onChange={(e) => {
|
||||
const v = e.target.value;
|
||||
update({
|
||||
port: v ? Number(v) : undefined,
|
||||
});
|
||||
}}
|
||||
value={port}
|
||||
/>
|
||||
</>
|
||||
</Form.Item>
|
||||
<Form.Item name="protocol" label="协议">
|
||||
<>
|
||||
<Select
|
||||
// mode="multiple"
|
||||
allowClear
|
||||
style={{ width: '100%' }}
|
||||
placeholder="请选择协议"
|
||||
value={protocol}
|
||||
onChange={(value: string) => {
|
||||
update({
|
||||
protocol:
|
||||
value as EntityDict['domain']['Schema']['protocol'],
|
||||
});
|
||||
}}
|
||||
options={[
|
||||
{
|
||||
label: 'http',
|
||||
value: 'http',
|
||||
},
|
||||
{
|
||||
label: 'https',
|
||||
value: 'https',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</>
|
||||
</Form.Item>
|
||||
|
||||
<Action variant={variant}>
|
||||
<Form.Item wrapperCol={{ offset: 6 }}>
|
||||
<Space>
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
confirm();
|
||||
}}
|
||||
>
|
||||
确定
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
navigateBack();
|
||||
}}
|
||||
>
|
||||
返回
|
||||
</Button>
|
||||
</Space>
|
||||
</Form.Item>
|
||||
</Action>
|
||||
</Form>
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
function Action(props: {
|
||||
children: React.ReactNode;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
}) {
|
||||
const { children, variant } = props;
|
||||
if (variant === 'dialog') {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<>{children}</>
|
||||
)
|
||||
}
|
||||
|
||||
function Container(props: {
|
||||
children: React.ReactNode;
|
||||
variant?: 'inline' | 'alone' | 'dialog';
|
||||
showBack?: boolean;
|
||||
}) {
|
||||
const { children, variant, showBack } = props;
|
||||
if (variant === 'inline' || variant === 'dialog') {
|
||||
return <>{children}</>;
|
||||
}
|
||||
return (
|
||||
<PageHeader showBack={showBack} title="系统编辑">
|
||||
<div className={Style.container}>{children}</div>
|
||||
</PageHeader>
|
||||
);
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import { Tabs, Card } from 'antd';
|
||||
import PageHeader from '../../../components/common/pageHeader';
|
||||
import ApplicationList from '../../../pages/application/list';
|
||||
import DomainList from '../../../pages/domain/list';
|
||||
|
||||
import Style from './web.module.less';
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ export default function Render(
|
|||
description: string;
|
||||
oakId: string;
|
||||
config: Config;
|
||||
tabValue: 'detail' | 'application_list';
|
||||
tabValue: 'detail' | 'application_list' | 'domain_list';
|
||||
},
|
||||
{
|
||||
onTabClick: (key: string) => void;
|
||||
|
|
@ -55,6 +56,18 @@ export default function Render(
|
|||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
label: '域名管理',
|
||||
key: 'domain_list',
|
||||
children: (
|
||||
<DomainList
|
||||
systemId={oakId}
|
||||
variant="inline"
|
||||
oakPath="$system/detail-domain/list"
|
||||
oakAutoUnmount={true}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -24,15 +24,6 @@ export default OakComponent({
|
|||
},
|
||||
methods: {
|
||||
async confirm() {
|
||||
const { domain } = this.state;
|
||||
if (!domain) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '访问域名必须设置'
|
||||
})
|
||||
return;
|
||||
|
||||
};
|
||||
await this.execute();
|
||||
this.navigateBack();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue