Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
5e9dfeb9
Commit
5e9dfeb9
authored
Nov 08, 2022
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务管理
parent
fe454c2f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
App.js
src/App.js
+2
-2
pds.js
src/service/pds.js
+2
-2
ModelTree.jsx
src/view/Manage/Model/Component/ModelTree.jsx
+5
-2
index.jsx
src/view/Manage/Model/index.jsx
+9
-6
No files found.
src/App.js
View file @
5e9dfeb9
...
@@ -124,7 +124,7 @@ export class App extends React.Component {
...
@@ -124,7 +124,7 @@ export class App extends React.Component {
);
);
}
}
if
(
message
===
'showDataService'
)
{
if
(
message
===
'showDataService'
||
message
===
'showDataServiceManage'
)
{
return
(
return
(
<
AppContext
.
Provider
value
=
{{
<
AppContext
.
Provider
value
=
{{
env
:
hostParams
?.
env
,
env
:
hostParams
?.
env
,
...
@@ -135,7 +135,7 @@ export class App extends React.Component {
...
@@ -135,7 +135,7 @@ export class App extends React.Component {
setGlobalState
,
setGlobalState
,
onGlobalStateChange
onGlobalStateChange
}}
>
}}
>
<
DataService
/>
<
DataService
isOnlyEnding
=
{
message
===
'showDataServiceManage'
}
/
>
<
/AppContext.Provider
>
<
/AppContext.Provider
>
);
);
}
}
...
...
src/service/pds.js
View file @
5e9dfeb9
...
@@ -4,8 +4,8 @@ export function refreshCatalog() {
...
@@ -4,8 +4,8 @@ export function refreshCatalog() {
return
GetJSON
(
"/pdataservice/pdsCURD/refreshDataServiceCatalog"
)
return
GetJSON
(
"/pdataservice/pdsCURD/refreshDataServiceCatalog"
)
}
}
export
function
loadStateCatalog
()
{
export
function
loadStateCatalog
(
payload
)
{
return
GetJSON
(
"/pdataservice/pdsCURD/loadDataServiceStateCatalog"
)
return
GetJSON
(
"/pdataservice/pdsCURD/loadDataServiceStateCatalog"
,
payload
)
}
}
export
function
saveCatalog
(
payload
)
{
export
function
saveCatalog
(
payload
)
{
...
...
src/view/Manage/Model/Component/ModelTree.jsx
View file @
5e9dfeb9
...
@@ -34,7 +34,7 @@ const ModelTree = (props) => {
...
@@ -34,7 +34,7 @@ const ModelTree = (props) => {
id
:
MENU_ID
,
id
:
MENU_ID
,
});
});
const
{
onSelect
,
onViewChange
,
refrence
=
''
,
importStockModel
,
keyword
}
=
props
;
const
{
onSelect
,
onViewChange
,
refrence
=
''
,
importStockModel
,
keyword
,
isOnlyEnding
=
false
}
=
props
;
const
{
user
,
env
}
=
useContext
(
AppContext
);
const
{
user
,
env
}
=
useContext
(
AppContext
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
@@ -220,6 +220,9 @@ const ModelTree = (props) => {
...
@@ -220,6 +220,9 @@ const ModelTree = (props) => {
setLoading(true);
setLoading(true);
dispatch({
dispatch({
type: 'pds.loadStateCatalog',
type: 'pds.loadStateCatalog',
payload: {
isOnlyEnding
},
callback: data => {
callback: data => {
setLoading(false);
setLoading(false);
let _treeData = data?.subCatalogs||[];
let _treeData = data?.subCatalogs||[];
...
@@ -514,7 +517,7 @@ const ModelTree = (props) => {
...
@@ -514,7 +517,7 @@ const ModelTree = (props) => {
</
Dropdown
>
</
Dropdown
>
{
{
(
viewSelectedKey
===
'dir'
&&
getDataModelerRole
(
user
)
===
DataModelerRoleAdmin
)
&&
(
(
viewSelectedKey
===
'dir'
&&
getDataModelerRole
(
user
)
===
DataModelerRoleAdmin
&&
!
isOnlyEnding
)
&&
(
<
Tooltip
title=
"新增目录"
className=
'ml-6'
>
<
Tooltip
title=
"新增目录"
className=
'ml-6'
>
<
PlusOutlined
className=
'default'
onClick=
{
add
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
<
PlusOutlined
className=
'default'
onClick=
{
add
}
style=
{
{
fontSize
:
16
,
cursor
:
'pointer'
}
}
/>
</
Tooltip
>
</
Tooltip
>
...
...
src/view/Manage/Model/index.jsx
View file @
5e9dfeb9
...
@@ -29,8 +29,8 @@ const InputDebounce = DebounceInput(300)(Input);
...
@@ -29,8 +29,8 @@ const InputDebounce = DebounceInput(300)(Input);
class
Model
extends
React
.
Component
{
class
Model
extends
React
.
Component
{
constructor
()
{
constructor
(
props
)
{
super
();
super
(
props
);
this
.
state
=
{
this
.
state
=
{
importModalVisible
:
false
,
importModalVisible
:
false
,
importStockWordDrawerVisible
:
false
,
importStockWordDrawerVisible
:
false
,
...
@@ -50,7 +50,7 @@ class Model extends React.Component {
...
@@ -50,7 +50,7 @@ class Model extends React.Component {
hints
:
[],
hints
:
[],
loadingStates
:
false
,
loadingStates
:
false
,
modelStates
:
[],
modelStates
:
[],
currentModelState
:
''
,
currentModelState
:
props
.
isOnlyEnding
?
'4_0'
:
''
,
currentView
:
''
,
currentView
:
''
,
exportDDLModalReference
:
'exportDDL'
,
exportDDLModalReference
:
'exportDDL'
,
currentModel
:
{},
currentModel
:
{},
...
@@ -83,10 +83,13 @@ class Model extends React.Component {
...
@@ -83,10 +83,13 @@ class Model extends React.Component {
this
.
setState
({
loadingStates
:
true
},
()
=>
{
this
.
setState
({
loadingStates
:
true
},
()
=>
{
dispatch
({
dispatch
({
type
:
'pds.loadStateCatalog'
,
type
:
'pds.loadStateCatalog'
,
payload
:
{
isOnlyEnding
:
this
.
props
.
isOnlyEnding
},
callback
:
data
=>
{
callback
:
data
=>
{
this
.
setState
({
this
.
setState
({
loadingStates
:
false
,
loadingStates
:
false
,
modelStates
:
[{
name
:
'all'
,
id
:
''
,
cnName
:
'所有状态'
},
...(
data
?.
subCatalogs
||
[])]
modelStates
:
this
.
props
.
isOnlyEnding
?
data
?.
subCatalogs
||
[]
:
[{
name
:
'all'
,
id
:
''
,
cnName
:
'所有状态'
},
...(
data
?.
subCatalogs
||
[])]
});
});
},
},
error
:
()
=>
{
error
:
()
=>
{
...
@@ -466,7 +469,7 @@ class Model extends React.Component {
...
@@ -466,7 +469,7 @@ class Model extends React.Component {
}
}
render() {
render() {
const { app } = this.props;
const { app
, isOnlyEnding
} = this.props;
const { importModalVisible, catalogId, loadingTableData, selectModelerIds, keyword, filterTableData, selectModelerNames, exportDDLModalVisible, exportOtherModalVisible, importStockWordDrawerVisible , loadingStates, modelStates, currentModelState, currentView, recatalogModalVisible, exportDDLModalReference, currentModel, offset, historyAndVersionDrawerVisible, modelerId, startFlowModalVisible, expandTree, showDeleteTip, colSettingModalVisible, visibleColNames } = this.state;
const { importModalVisible, catalogId, loadingTableData, selectModelerIds, keyword, filterTableData, selectModelerNames, exportDDLModalVisible, exportOtherModalVisible, importStockWordDrawerVisible , loadingStates, modelStates, currentModelState, currentView, recatalogModalVisible, exportDDLModalReference, currentModel, offset, historyAndVersionDrawerVisible, modelerId, startFlowModalVisible, expandTree, showDeleteTip, colSettingModalVisible, visibleColNames } = this.state;
const classes = classNames('data-model', {
const classes = classNames('data-model', {
...
@@ -509,7 +512,7 @@ class Model extends React.Component {
...
@@ -509,7 +512,7 @@ class Model extends React.Component {
>
>
<Space>
<Space>
{
{
currentView==='dir' && (getDataModelerRole(app?.user)!==DataModelerRoleReader) && <React.Fragment>
currentView==='dir' && (getDataModelerRole(app?.user)!==DataModelerRoleReader) &&
!isOnlyEnding &&
<React.Fragment>
<Space>
<Space>
<Button onClick={() => {
<Button onClick={() => {
app?.editServer?.({ dirId: catalogId })
app?.editServer?.({ dirId: catalogId })
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment