Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
apaas-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gzga-jzapi
apaas-ui
Commits
ea35f905
Commit
ea35f905
authored
Jul 28, 2020
by
徐一鸣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
云资源申请命名空间验证
parent
3ee34dd7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
43 deletions
+76
-43
src/components/allot-info-confirm.vue
src/components/allot-info-confirm.vue
+1
-1
src/components/shop-cloud/shop-cloud.vue
src/components/shop-cloud/shop-cloud.vue
+75
-42
No files found.
src/components/allot-info-confirm.vue
View file @
ea35f905
...
@@ -184,7 +184,7 @@ export default {
...
@@ -184,7 +184,7 @@ export default {
this
.
hideDialog
();
this
.
hideDialog
();
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
"
分配失败
"
,
message
:
data
.
errMsg
||
"
分配失败
"
,
type
:
"
warning
"
,
type
:
"
warning
"
,
});
});
}
}
...
...
src/components/shop-cloud/shop-cloud.vue
View file @
ea35f905
...
@@ -222,7 +222,7 @@
...
@@ -222,7 +222,7 @@
:max=
"10"
:max=
"10"
placeholder=
"请选择内存最高使用量"
placeholder=
"请选择内存最高使用量"
></el-input-number>
></el-input-number>
<div
class=
"input_right"
>
核
</div>
<div
class=
"input_right"
>
GB
</div>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"11"
>
<el-col
:span=
"11"
>
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
:max=
"10"
:max=
"10"
placeholder=
"请选择内存默认使用量"
placeholder=
"请选择内存默认使用量"
></el-input-number>
></el-input-number>
<div
class=
"input_right"
>
核
</div>
<div
class=
"input_right"
>
GB
</div>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
...
@@ -1197,51 +1197,84 @@ export default {
...
@@ -1197,51 +1197,84 @@ export default {
}
);
}
);
}
}
}
,
}
,
checkNamespace
(
namespace
,
cb
)
{
this
.
$http
.
get
(
"
/apaas/service/v3/resource/apply/checkNs
"
,
{
params
:
{
namespace
}
,
}
)
.
then
(({
data
}
)
=>
{
if
(
data
.
success
===
1
)
{
if
(
data
.
data
===
1
)
{
typeof
cb
===
"
function
"
&&
cb
();
}
else
if
(
data
.
data
===
-
1
)
{
this
.
$message
({
message
:
`命名空间名称已存在`
,
type
:
"
error
"
,
}
);
}
else
if
(
data
.
data
===
-
1
)
{
this
.
$message
({
message
:
`命名空间名称验证失败`
,
type
:
"
error
"
,
}
);
}
}
}
)
.
catch
((
error
)
=>
{
console
.
log
(
error
);
this
.
$message
({
message
:
`命名空间名称验证失败`
,
type
:
"
error
"
,
}
);
}
);
}
,
determineSubmit
()
{
determineSubmit
()
{
if
(
this
.
activeName
==
0
)
{
if
(
this
.
activeName
==
0
)
{
let
query
=
{
this
.
checkNamespace
(
this
.
formNew
.
namespace
,
()
=>
{
resource_info
:
{
let
query
=
{
namespace
:
this
.
formNew
.
namespace
,
resource_info
:
{
workplace
:
this
.
formNew
.
workplace
,
namespace
:
this
.
formNew
.
namespace
,
workplacedesc
:
this
.
formNew
.
workplacedesc
,
workplace
:
this
.
formNew
.
workplace
,
}
,
workplacedesc
:
this
.
formNew
.
workplacedesc
,
resource_apply
:
{
}
,
apply_file
:
this
.
formNew
.
apply_file
,
resource_apply
:
{
cpu
:
Number
(
this
.
formNew
.
cpu
),
apply_file
:
this
.
formNew
.
apply_file
,
duration
:
this
.
formNew
.
appDuration
,
cpu
:
Number
(
this
.
formNew
.
cpu
),
duration_unit
:
Number
(
this
.
formNew
.
durType
),
duration
:
this
.
formNew
.
appDuration
,
apply_connect_username
:
this
.
form
.
link_man
,
duration_unit
:
Number
(
this
.
formNew
.
durType
),
apply_connect_mobile
:
this
.
form
.
phone
,
apply_connect_username
:
this
.
form
.
link_man
,
memory
:
Number
(
this
.
formNew
.
memory
),
apply_connect_mobile
:
this
.
form
.
phone
,
containers
:
this
.
formNew
.
containerGroup
,
memory
:
Number
(
this
.
formNew
.
memory
),
disk_num
:
this
.
formNew
.
dataDisk
,
containers
:
this
.
formNew
.
containerGroup
,
disk_cap
:
this
.
formNew
.
perDataDisk
,
one_cpu_min
:
this
.
formNew
.
perCPU
,
one_cpu_max
:
this
.
formNew
.
perCPUs
,
one_memory_min
:
this
.
formNew
.
perRAM
,
one_memory_max
:
this
.
formNew
.
perRAMs
,
}
,
disks
:
[
{
disk_num
:
this
.
formNew
.
dataDisk
,
disk_num
:
this
.
formNew
.
dataDisk
,
disk_cap
:
this
.
formNew
.
perDataDisk
,
disk_cap
:
this
.
formNew
.
perDataDisk
,
store_type
:
this
.
formNew
.
store_type
,
one_cpu_min
:
this
.
formNew
.
perCPU
,
one_cpu_max
:
this
.
formNew
.
perCPUs
,
one_memory_min
:
this
.
formNew
.
perRAM
,
one_memory_max
:
this
.
formNew
.
perRAMs
,
}
,
}
,
],
disks
:
[
}
;
{
this
.
$api
.
serviceShop
.
applicationCloud
(
query
).
then
((
response
)
=>
{
disk_num
:
this
.
formNew
.
dataDisk
,
if
(
response
.
data
.
success
==
1
)
{
disk_cap
:
this
.
formNew
.
perDataDisk
,
this
.
$message
({
store_type
:
this
.
formNew
.
store_type
,
message
:
"
申请成功
"
,
}
,
type
:
"
success
"
,
],
}
);
}
;
this
.
$router
.
push
(
"
/services_shop
"
);
this
.
$api
.
serviceShop
.
applicationCloud
(
query
).
then
((
response
)
=>
{
}
else
{
if
(
response
.
data
.
success
==
1
)
{
this
.
$message
({
this
.
$message
({
message
:
`申请失败,${response.data.errMsg
}
`
,
message
:
"
申请成功
"
,
type
:
"
error
"
,
type
:
"
success
"
,
}
);
}
);
}
this
.
$router
.
push
(
"
/services_shop
"
);
}
else
{
this
.
$message
({
message
:
`申请失败,${response.data.errMsg
}
`
,
type
:
"
error
"
,
}
);
}
}
);
}
);
}
);
}
else
{
}
else
{
let
query
=
{
let
query
=
{
...
...
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