Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DBRepo
Manage
Activity
Members
Labels
Plan
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FAIR Data Austria DB Repository
DBRepo
Commits
910d365a
Unverified
Commit
910d365a
authored
May 19, 2023
by
Martin Weise
Browse files
Options
Downloads
Patches
Plain Diff
Finalized
parent
1b5617fd
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!163
Relase 1.3.0
,
!161
Resolve "Frontend bugs"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbrepo-ui/pages/container/_container_id/database/_database_id/info.vue
+39
-8
39 additions, 8 deletions
...es/container/_container_id/database/_database_id/info.vue
with
39 additions
and
8 deletions
dbrepo-ui/pages/container/_container_id/database/_database_id/info.vue
+
39
−
8
View file @
910d365a
...
@@ -232,13 +232,22 @@
...
@@ -232,13 +232,22 @@
</v-list>
</v-list>
<v-card-actions>
<v-card-actions>
<v-btn
<v-btn
v-if=
"needsStart"
v-if=
"
canStartContainer &&
needsStart"
small
small
secondary
secondary
color=
"secondary"
color=
"secondary"
:loading=
"loadingStart"
:loading=
"loadingStart"
@
click.stop=
"startContainer"
>
@
click.stop=
"startContainer"
>
Start
Start Container
</v-btn>
<v-btn
v-if=
"canStopContainer && !needsStart"
small
secondary
color=
"error"
:loading=
"loadingStop"
@
click.stop=
"stopContainer"
>
Stop Container
</v-btn>
</v-btn>
</v-card-actions>
</v-card-actions>
</v-card-text>
</v-card-text>
...
@@ -286,6 +295,7 @@ export default {
...
@@ -286,6 +295,7 @@ export default {
loading
:
false
,
loading
:
false
,
loadingDelete
:
false
,
loadingDelete
:
false
,
loadingStart
:
false
,
loadingStart
:
false
,
loadingStop
:
false
,
editDialog
:
false
,
editDialog
:
false
,
deleteDialog
:
false
,
deleteDialog
:
false
,
persistDialog
:
false
,
persistDialog
:
false
,
...
@@ -381,6 +391,21 @@ export default {
...
@@ -381,6 +391,21 @@ export default {
}
}
return
this
.
roles
.
includes
(
'
create-identifier
'
)
&&
this
.
isOwner
return
this
.
roles
.
includes
(
'
create-identifier
'
)
&&
this
.
isOwner
},
},
canStartContainer
()
{
if
(
!
this
.
roles
)
{
return
false
}
if
(
this
.
roles
.
includes
(
'
modify-foreign-container-state
'
))
{
return
true
}
return
this
.
roles
.
includes
(
'
modify-container-state
'
)
&&
this
.
isOwner
},
canStopContainer
()
{
if
(
!
this
.
roles
)
{
return
false
}
return
this
.
roles
.
includes
(
'
modify-foreign-container-state
'
)
},
canEditIdentifier
()
{
canEditIdentifier
()
{
if
(
!
this
.
roles
||
!
this
.
hasIdentifier
)
{
if
(
!
this
.
roles
||
!
this
.
hasIdentifier
)
{
return
false
return
false
...
@@ -445,12 +470,6 @@ export default {
...
@@ -445,12 +470,6 @@ export default {
return
this
.
database
.
owner
.
username
===
this
.
user
.
username
return
this
.
database
.
owner
.
username
===
this
.
user
.
username
},
},
needsStart
()
{
needsStart
()
{
if
(
!
this
.
user
)
{
return
false
}
if
(
this
.
database
.
container
.
owner
.
username
!==
this
.
user
.
username
)
{
return
false
}
return
!
this
.
database
.
container
.
running
return
!
this
.
database
.
container
.
running
}
}
},
},
...
@@ -479,6 +498,18 @@ export default {
...
@@ -479,6 +498,18 @@ export default {
this
.
loadingStart
=
false
this
.
loadingStart
=
false
})
})
})
})
},
stopContainer
()
{
this
.
loadingStop
=
true
return
new
Promise
(()
=>
{
ContainerService
.
modify
(
this
.
database
.
container
.
id
,
'
stop
'
)
.
then
(()
=>
{
this
.
$store
.
dispatch
(
'
reloadDatabase
'
)
})
.
finally
(()
=>
{
this
.
loadingStop
=
false
})
})
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment