Commit e19b7f95 authored by lepdou's avatar lepdou

close/open namespace content

parent d3e0fdb7
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<td ng-bind="appBaseInfo.ownerName"></td> <td ng-bind="appBaseInfo.ownerName"></td>
</tr> </tr>
<tr> <tr>
<th>Email:</th> <th>邮箱:</th>
<td> <td>
<small ng-bind="appBaseInfo.ownerEmail"></small> <small ng-bind="appBaseInfo.ownerEmail"></small>
</td> </td>
......
...@@ -88,7 +88,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -88,7 +88,8 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace.isPublic ? namespace.parentAppId != namespace.baseInfo.appId : false; namespace.isPublic ? namespace.parentAppId != namespace.baseInfo.appId : false;
namespace.displayControl = { namespace.displayControl = {
currentOperateBranch: 'master', currentOperateBranch: 'master',
showSearchInput: false showSearchInput: false,
show: true
}; };
namespace.viewItems = namespace.items; namespace.viewItems = namespace.items;
namespace.isPropertiesFormat = namespace.format == 'properties'; namespace.isPropertiesFormat = namespace.format == 'properties';
...@@ -99,6 +100,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -99,6 +100,7 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace.allInstancesPage = 0; namespace.allInstancesPage = 0;
namespace.commitChangeBtnDisabled = false; namespace.commitChangeBtnDisabled = false;
generateNamespaceId(namespace);
initNamespaceBranch(namespace); initNamespaceBranch(namespace);
initNamespaceViewName(namespace); initNamespaceViewName(namespace);
initNamespaceLock(namespace); initNamespaceLock(namespace);
...@@ -131,7 +133,11 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -131,7 +133,11 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
namespace.branch.latestReleaseInstancesPage = 0; namespace.branch.latestReleaseInstancesPage = 0;
namespace.branch.instanceViewType = namespace_instance_view_type.LATEST_RELEASE; namespace.branch.instanceViewType = namespace_instance_view_type.LATEST_RELEASE;
namespace.branch.hasLoadInstances = false; namespace.branch.hasLoadInstances = false;
namespace.branch.displayControl = {
show: true
};
generateNamespaceId(namespace.branch);
initBranchItems(namespace.branch); initBranchItems(namespace.branch);
initRules(namespace.branch); initRules(namespace.branch);
loadInstanceInfo(namespace.branch); loadInstanceInfo(namespace.branch);
...@@ -201,6 +207,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -201,6 +207,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
} }
} }
function generateNamespaceId(namespace) {
namespace.id = Math.random().toString(36).substr(2);
}
function initPermission(namespace) { function initPermission(namespace) {
PermissionService.has_modify_namespace_permission( PermissionService.has_modify_namespace_permission(
...@@ -338,7 +348,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na ...@@ -338,7 +348,10 @@ function directive($window, toastr, AppUtil, EventManager, PermissionService, Na
function switchBranch(branchName) { function switchBranch(branchName) {
if (branchName != 'master') { if (branchName != 'master') {
scope.namespace.branch.displayControl.show = true;
initRules(scope.namespace.branch); initRules(scope.namespace.branch);
} else {
scope.namespace.displayControl.show = true;
} }
scope.namespace.displayControl.currentOperateBranch = branchName; scope.namespace.displayControl.currentOperateBranch = branchName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment