Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
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
openSource
apollo
Commits
19336cf9
Commit
19336cf9
authored
Oct 20, 2016
by
Jason Song
Committed by
GitHub
Oct 20, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #437 from lepdou/bugfix_lock
bugfix: text modal lock check
parents
be970582
ec0c9dc8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
11 deletions
+6
-11
config.html
apollo-portal/src/main/resources/static/config.html
+1
-0
ConfigNamespaceController.js
...ic/scripts/controller/config/ConfigNamespaceController.js
+2
-0
namespace-panel-directive.js
...ces/static/scripts/directive/namespace-panel-directive.js
+3
-11
No files found.
apollo-portal/src/main/resources/static/config.html
View file @
19336cf9
...
...
@@ -162,6 +162,7 @@
<div
ng-repeat=
"namespace in namespaces"
>
<apollonspanel
namespace=
"namespace"
app-id=
"pageContext.appId"
env=
"pageContext.env"
cluster=
"pageContext.clusterName"
lock-check=
"lockCheck"
pre-release-ns=
"prepareReleaseNamespace"
create-item=
"createItem"
edit-item=
"editItem"
pre-delete-item=
"preDeleteItem"
commit-change=
"commitChange"
...
...
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigNamespaceController.js
View file @
19336cf9
...
...
@@ -48,6 +48,8 @@ application_module.controller("ConfigNamespaceController",
$scope
.
showText
=
showText
;
$scope
.
showNoModifyPermissionDialog
=
showNoModifyPermissionDialog
;
$scope
.
lockCheck
=
lockCheck
;
$scope
.
releaseBtnDisabled
=
false
;
$scope
.
rollbackBtnDisabled
=
false
;
...
...
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
View file @
19336cf9
...
...
@@ -11,6 +11,7 @@ directive_module.directive('apollonspanel',
appId
:
'='
,
env
:
'='
,
cluster
:
'='
,
lockCheck
:
'='
,
preReleaseNs
:
'='
,
preRollback
:
'='
,
createItem
:
'='
,
...
...
@@ -315,7 +316,7 @@ directive_module.directive('apollonspanel',
}
function
toggleTextEditStatus
(
namespace
)
{
if
(
!
lockCheck
(
namespace
))
{
if
(
!
scope
.
lockCheck
(
namespace
))
{
return
;
}
namespace
.
isTextEditing
=
!
namespace
.
isTextEditing
;
...
...
@@ -332,7 +333,7 @@ directive_module.directive('apollonspanel',
}
function
goToSyncPage
(
namespace
)
{
if
(
!
lockCheck
(
namespace
))
{
if
(
!
scope
.
lockCheck
(
namespace
))
{
return
false
;
}
$window
.
location
.
href
=
...
...
@@ -417,15 +418,6 @@ directive_module.directive('apollonspanel',
namespace
.
viewItems
=
items
;
}
function
lockCheck
(
namespace
)
{
if
(
namespace
.
lockOwner
&&
scope
.
currentUser
!=
namespace
.
lockOwner
)
{
scope
.
lockOwner
=
namespace
.
lockOwner
;
$
(
'#namespaceLockedDialog'
).
modal
(
'show'
);
return
false
;
}
return
true
;
}
}
}
});
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