-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/network-security-dashboard' into UXCT-503-network-…
…security-dashboard-feedback Signed-off-by: Stephanie Moallic <[email protected]>
- Loading branch information
Showing
21 changed files
with
268 additions
and
39 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
packages/manager/apps/dedicated/client/app/ip/components/list/firewall/firewall.constant.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export const ALLOWED_LANGUAGES = { | ||
en: { | ||
isDefault: true, | ||
}, | ||
fr: { | ||
isDefault: false, | ||
}, | ||
}; | ||
|
||
export const BASE_URL_SURVEY = 'https://survey.ovh.com/index.php/116651?lang='; | ||
|
||
export default { ALLOWED_LANGUAGES, BASE_URL_SURVEY }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/manager/apps/dedicated/client/app/network-security/network-security.controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import isObject from 'lodash/isObject'; | ||
import { | ||
ALLOWED_LANGUAGES, | ||
BASE_URL_SURVEY, | ||
} from './network-security.constant'; | ||
|
||
export default class NetworkSecurityController { | ||
/* @ngInject */ | ||
constructor(coreConfig, networkSecurityService) { | ||
this.coreConfig = coreConfig; | ||
this.networkSecurityService = networkSecurityService; | ||
this.ALLOWED_LANGUAGES = ALLOWED_LANGUAGES; | ||
this.BASE_URL_SURVEY = BASE_URL_SURVEY; | ||
} | ||
|
||
$onInit() { | ||
// Get default language | ||
const defaultLanguage = Object.keys(this.ALLOWED_LANGUAGES).find( | ||
(key) => this.ALLOWED_LANGUAGES[key].isDefault, | ||
); | ||
const userLanguage = this.coreConfig.getUserLanguage(); | ||
|
||
const languageToUse = isObject(this.ALLOWED_LANGUAGES[userLanguage]) | ||
? userLanguage | ||
: defaultLanguage; | ||
|
||
// Get user | ||
const user = this.coreConfig.getUser(); | ||
|
||
// Build url for survey link | ||
this.surveyUrl = `${this.BASE_URL_SURVEY}${languageToUse}&nic=${user.nichandle}`; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.