Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
bkunyun
Project
Project
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
Administrator
bkunyun
Commits
12c9acd2
Commit
12c9acd2
authored
Nov 01, 2022
by
chenshouchao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-20221012-environment' into 'release'
cn-Feat 20221012 environment See merge request
!171
parents
18f4c3e4
13ffe776
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
12 deletions
+54
-12
index.module.css
.../UserResourcesEnvironment/AddEnvironment/index.module.css
+12
-0
index.tsx
...sources/UserResourcesEnvironment/AddEnvironment/index.tsx
+26
-3
index.tsx
...ceCenter/UserResources/UserResourcesEnvironment/index.tsx
+16
-9
No files found.
src/views/ResourceCenter/UserResources/UserResourcesEnvironment/AddEnvironment/index.module.css
View file @
12c9acd2
...
@@ -78,6 +78,18 @@
...
@@ -78,6 +78,18 @@
.code
{
.code
{
background-color
:
rgba
(
247
,
248
,
250
,
1
);
background-color
:
rgba
(
247
,
248
,
250
,
1
);
flex
:
1
;
flex
:
1
;
position
:
relative
;
}
.codeHelper
{
width
:
100%
;
box-sizing
:
border-box
;
position
:
absolute
;
bottom
:
0
;
color
:
rgba
(
255
,
78
,
78
,
1
);
font-size
:
12px
;
line-height
:
20px
;
padding
:
6px
20px
;
background-color
:
rgba
(
255
,
232
,
232
,
1
);
}
}
.label
{
.label
{
color
:
rgba
(
30
,
38
,
51
,
1
);
color
:
rgba
(
30
,
38
,
51
,
1
);
...
...
src/views/ResourceCenter/UserResources/UserResourcesEnvironment/AddEnvironment/index.tsx
View file @
12c9acd2
...
@@ -27,10 +27,11 @@ import { getTokenInfo } from "@/utils/util";
...
@@ -27,10 +27,11 @@ import { getTokenInfo } from "@/utils/util";
type
IAddEnvironmentProps
=
{
type
IAddEnvironmentProps
=
{
setAddopen
:
any
;
setAddopen
:
any
;
setTitle
:
any
;
};
};
const
AddEnvironment
=
(
props
:
IAddEnvironmentProps
)
=>
{
const
AddEnvironment
=
(
props
:
IAddEnvironmentProps
)
=>
{
const
{
setAddopen
}
=
props
;
const
{
setAddopen
,
setTitle
}
=
props
;
const
Message
=
useMessage
();
const
Message
=
useMessage
();
let
tokenInfo
=
getTokenInfo
();
let
tokenInfo
=
getTokenInfo
();
const
[
hpczoneList
,
setHpczoneList
]
=
useState
<
Array
<
any
>>
([]);
// 计算区列表 通过计算区列表和计算区id拿fileServerEndPoint
const
[
hpczoneList
,
setHpczoneList
]
=
useState
<
Array
<
any
>>
([]);
// 计算区列表 通过计算区列表和计算区id拿fileServerEndPoint
...
@@ -63,6 +64,14 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
...
@@ -63,6 +64,14 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
error
:
false
,
error
:
false
,
text
:
""
,
text
:
""
,
});
});
const
[
shellHelper
]
=
useState
({
error
:
false
,
text
:
"请输入Shell脚本"
,
});
const
[
pythonHelper
]
=
useState
({
error
:
false
,
text
:
"请输入Python脚本"
,
});
const
onDrop
=
useCallback
(
const
onDrop
=
useCallback
(
(
acceptedFiles
:
any
)
=>
{
(
acceptedFiles
:
any
)
=>
{
let
origin
=
""
;
let
origin
=
""
;
...
@@ -111,6 +120,10 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
...
@@ -111,6 +120,10 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
setIsUploading
(
false
);
setIsUploading
(
false
);
setFilePaths
([
`/ProjectData/
${
homeDirectoryMountPoint
}
/
${
path
}
`
]);
setFilePaths
([
`/ProjectData/
${
homeDirectoryMountPoint
}
/
${
path
}
`
]);
setFileName
(
path
);
setFileName
(
path
);
setFilePathsHelper
({
error
:
false
,
text
:
""
,
});
},
},
});
});
setIsUploading
(
true
);
setIsUploading
(
true
);
...
@@ -164,6 +177,7 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
...
@@ -164,6 +177,7 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
{
{
onSuccess
:
()
=>
{
onSuccess
:
()
=>
{
Message
.
success
(
"开始构建应用环境"
);
Message
.
success
(
"开始构建应用环境"
);
setTitle
(
""
);
setAddopen
(
false
);
setAddopen
(
false
);
},
},
}
}
...
@@ -339,7 +353,10 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
...
@@ -339,7 +353,10 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
<
SwitchBatchFolw
<
SwitchBatchFolw
active=
{
taskType
}
active=
{
taskType
}
setActive=
{
setTaskType
}
setActive=
{
setTaskType
}
goBack=
{
()
=>
setAddopen
(
false
)
}
goBack=
{
()
=>
{
setTitle
(
""
);
setAddopen
(
false
);
}
}
></
SwitchBatchFolw
>
></
SwitchBatchFolw
>
</
div
>
</
div
>
<
div
className=
{
style
.
right
}
>
<
div
className=
{
style
.
right
}
>
...
@@ -499,6 +516,9 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
...
@@ -499,6 +516,9 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
height=
"535px"
height=
"535px"
width=
{
`${codeWidth}px`
}
width=
{
`${codeWidth}px`
}
/>
/>
{
taskType
===
"BATCH"
&&
!
code
&&
(
<
div
className=
{
style
.
codeHelper
}
>
{
shellHelper
.
text
}
</
div
>
)
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -508,13 +528,16 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
...
@@ -508,13 +528,16 @@ const AddEnvironment = (props: IAddEnvironmentProps) => {
Python脚本
Python脚本
<
span
className=
{
style
.
required
}
>
*
</
span
>
<
span
className=
{
style
.
required
}
>
*
</
span
>
</
div
>
</
div
>
<
div
className=
{
style
.
code
}
id=
"addEnvironmentCode"
>
<
div
className=
{
style
.
code
}
>
<
Code
<
Code
value=
{
flowCode
}
value=
{
flowCode
}
onChange=
{
(
e
:
string
)
=>
setFlowCode
(
e
)
}
onChange=
{
(
e
:
string
)
=>
setFlowCode
(
e
)
}
height=
"535px"
height=
"535px"
width=
{
`${codeWidth + 368}px`
}
width=
{
`${codeWidth + 368}px`
}
/>
/>
{
!
flowCode
&&
(
<
div
className=
{
style
.
codeHelper
}
>
{
pythonHelper
.
text
}
</
div
>
)
}
</
div
>
</
div
>
</
div
>
</
div
>
)
}
)
}
...
...
src/views/ResourceCenter/UserResources/UserResourcesEnvironment/index.tsx
View file @
12c9acd2
...
@@ -198,14 +198,16 @@ const UserResourcesEnvironment = () => {
...
@@ -198,14 +198,16 @@ const UserResourcesEnvironment = () => {
<
div
className=
{
style
.
environment
}
>
<
div
className=
{
style
.
environment
}
>
<
div
className=
{
style
.
top
}
>
<
div
className=
{
style
.
top
}
>
<
div
className=
{
style
.
topLeft
}
>
<
div
className=
{
style
.
topLeft
}
>
<
SearchInput
{
!
addOpen
&&
(
sx=
{
{
width
:
340
,
marginRight
:
"16px"
}
}
<
SearchInput
onKeyUp=
{
(
e
:
any
)
=>
{
sx=
{
{
width
:
340
,
marginRight
:
"16px"
}
}
if
(
e
.
keyCode
===
13
)
{
onKeyUp=
{
(
e
:
any
)
=>
{
setTitle
(
e
.
target
.
value
);
if
(
e
.
keyCode
===
13
)
{
}
setTitle
(
e
.
target
.
value
);
}
}
}
></
SearchInput
>
}
}
></
SearchInput
>
)
}
{
!
addOpen
&&
(
{
!
addOpen
&&
(
<
MySelect
<
MySelect
options=
{
[
options=
{
[
...
@@ -264,7 +266,12 @@ const UserResourcesEnvironment = () => {
...
@@ -264,7 +266,12 @@ const UserResourcesEnvironment = () => {
setSortState=
{
setSortState
}
setSortState=
{
setSortState
}
></
MyTable
>
></
MyTable
>
</
div
>
</
div
>
{
addOpen
&&
<
AddEnvironment
setAddopen=
{
setAddopen
}
></
AddEnvironment
>
}
{
addOpen
&&
(
<
AddEnvironment
setAddopen=
{
setAddopen
}
setTitle=
{
setTitle
}
></
AddEnvironment
>
)
}
{
deleteOpen
&&
(
{
deleteOpen
&&
(
<
DeleteEnvironment
<
DeleteEnvironment
id=
{
id
}
id=
{
id
}
...
...
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