Skip to content

Commit

Permalink
fix(dedicated): add transition and missing resolve
Browse files Browse the repository at this point in the history
  ref: INC0035791

Signed-off-by: Antony MARION <antony.marion.ext@ovhcloud.com>
  • Loading branch information
Antony MARION committed May 13, 2024
1 parent 3a08269 commit 689e2e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import template from './traffic.html';
export default {
bindings: {
getSubnet: '<',
ip: '<?',
dateTime: '<?',
},
controller,
template,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export default class TrafficController {
this.services = data;
return data;
});
this.ip = this.$stateParams.ip;
this.dateTime = this.$stateParams.dateTime
? new Date(this.$stateParams.dateTime)
: null;
if (this.dateTime) {
const dateLimit = new Date();
dateLimit.setDate(dateLimit.getDate() - 14);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export default /* @ngInject */ ($stateProvider) => {
url: '?ip&dateTime',
component: 'traffic',
resolve: {
ip: /* @ngInject */ ($transition$) => $transition$.params().ip,
dateTime: /* @ngInject */ ($transition$) =>
$transition$.params().dateTime
? new Date($transition$.params().dateTime)
: null,
breadcrumb: /* @ngInject */ ($translate) =>
$translate.instant('network_security_dashboard_traffic_breadcrumb'),
},
Expand Down

0 comments on commit 689e2e8

Please sign in to comment.