diff --git a/src/maasserver/static/js/angular/controllers/node_details_networking.js b/src/maasserver/static/js/angular/controllers/node_details_networking.js index e70405c..d0a80ec 100644 --- a/src/maasserver/static/js/angular/controllers/node_details_networking.js +++ b/src/maasserver/static/js/angular/controllers/node_details_networking.js @@ -310,6 +310,7 @@ export function NodeNetworkingController( $scope.editInterfaceLinkMonitoring = null; $scope.isSaving = false; $scope.snippets = DHCPSnippetsManager.getItems(); + $scope.filteredSnippets = []; $scope.modes = [ { mode: LINK_MODE.AUTO, @@ -508,10 +509,9 @@ export function NodeNetworkingController( } }); - $scope.filteredSnippets = DHCPSnippetsManager.getFilteredSnippets( - $scope.snippets, - subnetIPs - ); + $scope.filteredSnippets = $scope.snippets.filter(snippet => { + return snippet.node === $scope.node.system_id; + }); // Update the scope interface links mapping. $scope.interfaceLinksMap = {}; diff --git a/src/maasserver/static/js/angular/directives/dhcp_snippets_table.js b/src/maasserver/static/js/angular/directives/dhcp_snippets_table.js index e2d5f97..86df4ea 100644 --- a/src/maasserver/static/js/angular/directives/dhcp_snippets_table.js +++ b/src/maasserver/static/js/angular/directives/dhcp_snippets_table.js @@ -11,7 +11,8 @@ function maasDhcpSnippetsTable($window) { scope: { snippets: "=", allowAddNew: "=", - allowDelete: "=" + allowDelete: "=", + hideAllSnippetsLink: "=" }, templateUrl: "static/partials/dhcp-snippets-table.html?v=" + diff --git a/src/maasserver/static/partials/dhcp-snippets-table.html b/src/maasserver/static/partials/dhcp-snippets-table.html index 56f36a5..c99b5a4 100644 --- a/src/maasserver/static/partials/dhcp-snippets-table.html +++ b/src/maasserver/static/partials/dhcp-snippets-table.html @@ -190,4 +190,13 @@ -
\ No newline at end of file +