Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
apollo
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
apollo
Commits
e600f5b8
Unverified
Commit
e600f5b8
authored
Dec 02, 2018
by
Jason Song
Committed by
GitHub
Dec 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1733 from nobodyiam/refresh-namespace-when-lazy-load
refresh namespace when doing lazy load
parents
bd5ad503
94fa6164
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
9 deletions
+12
-9
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigNamespaceController.js
...ic/scripts/controller/config/ConfigNamespaceController.js
+3
-2
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
...ces/static/scripts/directive/namespace-panel-directive.js
+8
-6
apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html
...es/static/views/component/namespace-panel-master-tab.html
+1
-1
No files found.
apollo-portal/src/main/resources/static/scripts/controller/config/ConfigNamespaceController.js
View file @
e600f5b8
...
@@ -128,9 +128,10 @@ function controller($rootScope, $scope, toastr, AppUtil, EventManager, ConfigSer
...
@@ -128,9 +128,10 @@ function controller($rootScope, $scope, toastr, AppUtil, EventManager, ConfigSer
$scope
.
namespaces
.
forEach
(
function
(
namespace
,
index
)
{
$scope
.
namespaces
.
forEach
(
function
(
namespace
,
index
)
{
if
(
namespace
.
baseInfo
.
namespaceName
==
result
.
baseInfo
.
namespaceName
)
{
if
(
namespace
.
baseInfo
.
namespaceName
==
result
.
baseInfo
.
namespaceName
)
{
result
.
showNamespaceBody
=
true
;
result
.
initialized
=
true
;
result
.
show
=
namespace
.
show
;
$scope
.
namespaces
[
index
]
=
result
;
$scope
.
namespaces
[
index
]
=
result
;
$scope
.
namespaces
[
index
].
showNamespaceBody
=
true
;
$scope
.
namespaces
[
index
].
initialized
=
true
;
}
}
});
});
...
...
apollo-portal/src/main/resources/static/scripts/directive/namespace-panel-directive.js
View file @
e600f5b8
...
@@ -44,7 +44,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
...
@@ -44,7 +44,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
var
operate_branch_storage_key
=
'
OperateBranch
'
;
var
operate_branch_storage_key
=
'
OperateBranch
'
;
scope
.
init
=
init
;
scope
.
refreshNamespace
=
refreshNamespace
;
scope
.
switchView
=
switchView
;
scope
.
switchView
=
switchView
;
scope
.
toggleItemSearchInput
=
toggleItemSearchInput
;
scope
.
toggleItemSearchInput
=
toggleItemSearchInput
;
scope
.
searchItems
=
searchItems
;
scope
.
searchItems
=
searchItems
;
...
@@ -80,7 +80,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
...
@@ -80,7 +80,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
preInit
(
scope
.
namespace
);
preInit
(
scope
.
namespace
);
if
(
!
scope
.
lazyLoad
||
scope
.
namespace
.
initialized
)
{
if
(
!
scope
.
lazyLoad
||
scope
.
namespace
.
initialized
)
{
init
(
false
);
init
();
}
}
function
preInit
(
namespace
)
{
function
preInit
(
namespace
)
{
...
@@ -93,13 +93,15 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
...
@@ -93,13 +93,15 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
.
replace
(
"
.yaml
"
,
""
);
.
replace
(
"
.yaml
"
,
""
);
}
}
function
init
(
forceShowBody
)
{
function
init
()
{
initNamespace
(
scope
.
namespace
);
initNamespace
(
scope
.
namespace
);
initOther
();
initOther
();
scope
.
namespace
.
initialized
=
true
;
scope
.
namespace
.
initialized
=
true
;
if
(
forceShowBody
)
{
}
scope
.
showNamespaceBody
=
true
;
}
function
refreshNamespace
()
{
EventManager
.
emit
(
EventManager
.
EventType
.
REFRESH_NAMESPACE
,
{
namespace
:
scope
.
namespace
});
}
}
function
initNamespace
(
namespace
,
viewType
)
{
function
initNamespace
(
namespace
,
viewType
)
{
...
...
apollo-portal/src/main/resources/static/views/component/namespace-panel-master-tab.html
View file @
e600f5b8
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<button
type=
"button"
class=
"btn btn-default btn-sm"
<button
type=
"button"
class=
"btn btn-default btn-sm"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"加载Namespace"
data-tooltip=
"tooltip"
data-placement=
"bottom"
title=
"加载Namespace"
ng-click=
"
init(true
)"
>
ng-click=
"
refreshNamespace(
)"
>
<img
src=
"img/more.png"
>
<img
src=
"img/more.png"
>
加载Namespace
加载Namespace
</button>
</button>
...
...
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