Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
jijisa
/
porch
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0ad34fa4
authored
Mar 28, 2017
by
Heechul Kim
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
added disk partition templates
parent
f8e0246d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
quasar/src/components/machine/Create.vue
quasar/src/components/machine/List.vue
quasar/src/components/machine/Create.vue
View file @
0ad34fa4
...
@@ -48,6 +48,17 @@
...
@@ -48,6 +48,17 @@
</div>
</div>
<br><br>
<br><br>
<div
class=
"stacked-label"
>
<div
class=
"stacked-label"
>
<label>
Disk Partition Template
</label>
<br>
<q-select
type=
"radio"
v-model=
"form.dpt"
ref=
"dpt"
:options=
"selectDPT"
>
</q-select>
</div>
<br><br>
<div
class=
"stacked-label"
>
<label>
IPMI IP주소
</label>
<label>
IPMI IP주소
</label>
<input
<input
type=
"text"
type=
"text"
...
@@ -169,6 +180,7 @@ export default {
...
@@ -169,6 +180,7 @@ export default {
name
:
''
,
name
:
''
,
type
:
''
,
type
:
''
,
os
:
''
,
os
:
''
,
dpt
:
''
,
ipmi_ip
:
''
,
ipmi_ip
:
''
,
mac
:
''
,
mac
:
''
,
ip
:
''
,
ip
:
''
,
...
@@ -182,7 +194,8 @@ export default {
...
@@ -182,7 +194,8 @@ export default {
{
'label'
:
'PM'
,
value
:
'PM'
},
{
'label'
:
'PM'
,
value
:
'PM'
},
{
'label'
:
'VM'
,
value
:
'VM'
}
{
'label'
:
'VM'
,
value
:
'VM'
}
],
],
selectOS
:
selectOS
selectOS
:
selectOS
,
selectDPT
:
[]
}
}
},
},
validations
:
{
validations
:
{
...
@@ -205,6 +218,7 @@ export default {
...
@@ -205,6 +218,7 @@ export default {
name
:
this
.
form
.
name
,
name
:
this
.
form
.
name
,
type
:
this
.
form
.
type
,
type
:
this
.
form
.
type
,
os
:
this
.
form
.
os
,
os
:
this
.
form
.
os
,
dpt
:
this
.
form
.
dpt
,
ipmi_ip
:
this
.
form
.
ipmi_ip
,
ipmi_ip
:
this
.
form
.
ipmi_ip
,
mac
:
this
.
form
.
mac
,
mac
:
this
.
form
.
mac
,
ip
:
this
.
form
.
ip
,
ip
:
this
.
form
.
ip
,
...
@@ -232,11 +246,30 @@ export default {
...
@@ -232,11 +246,30 @@ export default {
Toast
.
create
.
negative
(
response
.
statusText
)
Toast
.
create
.
negative
(
response
.
statusText
)
this
.
$refs
.
name
.
focus
()
this
.
$refs
.
name
.
focus
()
})
})
},
getDPT
:
function
()
{
const
url
=
API_URL
+
'/machine/dpt'
const
token
=
this
.
$store
.
state
.
token
const
headers
=
{
headers
:
{
'Authorization'
:
`Bearer
${
token
}
`
}
}
this
.
$http
.
get
(
url
,
headers
).
then
(
response
=>
{
let
self
=
this
response
.
body
.
forEach
(
function
(
el
)
{
self
.
selectDPT
.
push
({
'label'
:
el
,
'value'
:
el
})
})
},
response
=>
{
Toast
.
create
.
negative
(
'디스크 파티션 템플릿 정보 수신 실패'
)
})
}
}
},
},
mounted
()
{
mounted
()
{
if
(
!
this
.
$store
.
state
.
login
)
{
this
.
$router
.
push
(
'/'
)
}
if
(
!
this
.
$store
.
state
.
login
)
{
this
.
$router
.
push
(
'/'
)
}
this
.
getDPT
()
this
.
$refs
.
name
.
focus
()
this
.
$refs
.
name
.
focus
()
}
}
}
}
...
...
quasar/src/components/machine/List.vue
View file @
0ad34fa4
...
@@ -272,6 +272,15 @@ export default {
...
@@ -272,6 +272,15 @@ export default {
model
:
row
.
os
,
model
:
row
.
os
,
items
:
selectOS
items
:
selectOS
},
},
header11
:
{
type
:
'heading'
,
label
:
'디스크 파티션 템플릿'
},
dpt
:
{
type
:
'radio'
,
model
:
row
.
dpt
,
items
:
this
.
getDPT
()
},
header2
:
{
header2
:
{
type
:
'heading'
,
type
:
'heading'
,
label
:
'그룹'
label
:
'그룹'
...
@@ -383,6 +392,24 @@ export default {
...
@@ -383,6 +392,24 @@ export default {
]
]
})
})
},
},
getDPT
:
function
()
{
const
url
=
API_URL
+
'/machine/dpt'
const
token
=
this
.
$store
.
state
.
token
const
headers
=
{
headers
:
{
'Authorization'
:
`Bearer
${
token
}
`
}
}
let
selectDPT
=
[]
this
.
$http
.
get
(
url
,
headers
).
then
(
response
=>
{
response
.
body
.
forEach
(
function
(
el
)
{
selectDPT
.
push
({
'label'
:
el
,
'value'
:
el
})
})
},
response
=>
{
Toast
.
create
.
negative
(
'디스크 파티션 템플릿 정보 수신 실패'
)
})
return
selectDPT
},
getSectionList
:
function
()
{
getSectionList
:
function
()
{
const
url
=
API_URL
+
'/section'
const
url
=
API_URL
+
'/section'
const
token
=
this
.
$store
.
state
.
token
const
token
=
this
.
$store
.
state
.
token
...
@@ -446,13 +473,13 @@ export default {
...
@@ -446,13 +473,13 @@ export default {
return
this
.
$store
.
state
.
role
===
'admin'
return
this
.
$store
.
state
.
role
===
'admin'
},
},
loadData
:
function
()
{
loadData
:
function
()
{
const
url
=
API_URL
+
'/machine'
const
token
=
this
.
$store
.
state
.
token
const
token
=
this
.
$store
.
state
.
token
const
headers
=
{
const
headers
=
{
headers
:
{
headers
:
{
'Authorization'
:
`Bearer
${
token
}
`
'Authorization'
:
`Bearer
${
token
}
`
}
}
}
}
let
url
=
API_URL
+
'/machine'
this
.
$http
.
get
(
url
,
headers
).
then
(
response
=>
{
this
.
$http
.
get
(
url
,
headers
).
then
(
response
=>
{
this
.
machines
=
response
.
body
this
.
machines
=
response
.
body
},
response
=>
{
},
response
=>
{
...
...
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