fix(intel): fix switches params [EE-2166] (#6284)

* fix(intel): fix switches params

* feat(settings): prevent openamt panel to render
pull/6290/head
Chaim Lev-Ari 2021-12-16 11:19:12 +02:00 committed by GitHub
parent efa125790f
commit 730fdb160d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,7 @@
class OpenAmtController {
/* @ngInject */
constructor($async, $state, OpenAMTService, SettingsService, Notifications) {
Object.assign(this, { $async, $state, OpenAMTService, SettingsService, Notifications });
constructor($async, $scope, $state, OpenAMTService, SettingsService, Notifications) {
Object.assign(this, { $async, $scope, $state, OpenAMTService, SettingsService, Notifications });
this.originalValues = {};
this.formValues = {
@ -28,6 +28,13 @@ class OpenAmtController {
};
this.save = this.save.bind(this);
this.onChangeEnableOpenAMT = this.onChangeEnableOpenAMT.bind(this);
}
onChangeEnableOpenAMT(checked) {
return this.$scope.$evalAsync(() => {
this.formValues.enableOpenAMT = checked;
});
}
isFormChanged() {

View File

@ -4,7 +4,7 @@
<rd-widget-header icon="fa-laptop" title-text="Intel OpenAMT"></rd-widget-header>
<rd-widget-body>
<form class="form-horizontal" name="openAMTForm">
<por-switch-field ng-model="$ctrl.formValues.enableOpenAMT" label="Enable edge OpenAMT"></por-switch-field>
<por-switch-field checked="$ctrl.formValues.enableOpenAMT" label="'Enable edge OpenAMT'" on-change="($ctrl.onChangeEnableOpenAMT)"></por-switch-field>
<span class="small">
<p class="text-muted" style="margin-top: 10px;">
<i class="fa fa-exclamation-circle blue-icon" aria-hidden="true" style="margin-right: 2px;"></i>
@ -176,7 +176,7 @@
<div class="form-group">
<div class="col-sm-12">
<por-switch-field ng-model="$ctrl.formValues.useWirelessConfig" label="Wireless Configuration"></por-switch-field>
<!-- <por-switch-field checked="$ctrl.formValues.useWirelessConfig" label="'Wireless Configuration'" on-change="$ctrl.onChangeUseWirelessConfig"></por-switch-field> -->
</div>
</div>
<div ng-show="$ctrl.formValues.useWirelessConfig">

View File

@ -184,7 +184,7 @@
<ssl-certificate-settings></ssl-certificate-settings>
<open-amt-settings ng-show="settings.FeatureFlagSettings && settings.FeatureFlagSettings['open-amt']"></open-amt-settings>
<open-amt-settings ng-if="settings.FeatureFlagSettings && settings.FeatureFlagSettings['open-amt']"></open-amt-settings>
<div class="row">
<div class="col-sm-12">