Skip to content

Commit e560992

Browse files
authored
Merge pull request #905 from ercole-io/settings-cloud-params
Add cloud advisors settings params
2 parents 7e1d361 + eb3abdb commit e560992

File tree

3 files changed

+57
-4
lines changed

3 files changed

+57
-4
lines changed

src/components/Menu.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,15 +401,15 @@ export default {
401401
title: this.$i18n.t('menu.oracle'),
402402
icon: 'fas fa-cloud',
403403
attributes: { 'data-cy': 'mn-cloud-oracle' },
404-
hidden: this.checkMenu('Oracle', 'Cloud Advisors'),
404+
hidden: this.checkMenu('OCI', 'Cloud Advisors'),
405405
child: [
406406
{
407407
href: { name: 'oracle-profile-configurations' },
408408
title: this.$i18n.t('menu.profileConfig'),
409409
icon: 'fas fa-user-cog',
410410
class: 'menu-third-level',
411411
attributes: { 'data-cy': 'mn-cloud-oracle-profile' },
412-
hidden: this.checkMenu('Profile Configuration', 'Oracle'),
412+
hidden: this.checkMenu('Profile Configurations', 'OCI'),
413413
},
414414
{
415415
href: { name: 'oracle-recommendations' },
@@ -418,7 +418,7 @@ export default {
418418
class: 'menu-third-level',
419419
disabled: !this.getCloudActiveProfiles('oci'),
420420
attributes: { 'data-cy': 'mn-cloud-oracle-recommendations' },
421-
hidden: this.checkMenu('Recommendations', 'Oracle'),
421+
hidden: this.checkMenu('Recommendations', 'OCI'),
422422
},
423423
],
424424
},
@@ -434,7 +434,7 @@ export default {
434434
icon: 'fas fa-user-cog',
435435
class: 'menu-third-level',
436436
attributes: { 'data-cy': 'mn-cloud-aws-profile' },
437-
hidden: this.checkMenu('Profile Configuration', 'AWS'),
437+
hidden: this.checkMenu('Profile Configurations', 'AWS'),
438438
},
439439
{
440440
href: { name: 'aws-recommendations' },

src/components/settings/ApiService.vue

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,50 @@
270270
</div>
271271
</div>
272272
</div>
273+
274+
<hr class="my-3" />
275+
<p class="is-size-6 has-text-weight-semibold">Cloud Advisors</p>
276+
277+
<div class="columns is-multiline">
278+
<div class="column is-2">
279+
<div class="field">
280+
<label
281+
v-html="highlight(APIServiceLabels[21])"
282+
class="label is-small"
283+
/>
284+
<CustomRadio
285+
v-model="APIService.EnableOciMenu"
286+
:options="trueOrFalseOptions"
287+
/>
288+
</div>
289+
</div>
290+
291+
<div class="column is-2">
292+
<div class="field">
293+
<label
294+
v-html="highlight(APIServiceLabels[22])"
295+
class="label is-small"
296+
/>
297+
<CustomRadio
298+
v-model="APIService.EnableAwsMenu"
299+
:options="trueOrFalseOptions"
300+
/>
301+
</div>
302+
</div>
303+
304+
<div class="column is-2">
305+
<div class="field">
306+
<label
307+
v-html="highlight(APIServiceLabels[23])"
308+
class="label is-small"
309+
/>
310+
<CustomRadio
311+
v-model="APIService.EnableGcpMenu"
312+
:options="trueOrFalseOptions"
313+
/>
314+
</div>
315+
</div>
316+
</div>
273317
</article>
274318
</template>
275319

src/mixins/settings/settings.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ export default {
4949
OracleDatabasePoliciesAudit: null,
5050
RoundLicenses: null,
5151
PGASGASumTargetPercentage: null,
52+
EnableAwsMenu: null,
53+
EnableGcpMenu: null,
54+
EnableOciMenu: null,
5255
},
5356
AlertService: {
5457
RemoteEndpoint: null,
@@ -159,6 +162,9 @@ export default {
159162
'Policy Audit Names to Verify on Databases',
160163
'Round Decimal Licenses',
161164
'Threshold Percentage of DB Memory vs Host Memory',
165+
'Show OCI Cloud Advisors on menu?',
166+
'Show AWS Cloud Advisors on menu?',
167+
'Show GCP Cloud Advisors on menu?',
162168
],
163169
highlightApiService: false,
164170
AlertServiceLabels: [
@@ -311,6 +317,9 @@ export default {
311317
// never change
312318
RoundLicenses: this.getAPIService.RoundLicenses,
313319
PGASGASumTargetPercentage: this.getAPIService.PGASGASumTargetPercentage,
320+
EnableAwsMenu: this.getAPIService.EnableAwsMenu,
321+
EnableGcpMenu: this.getAPIService.EnableGcpMenu,
322+
EnableOciMenu: this.getAPIService.EnableOciMenu,
314323
}
315324
},
316325
bindOriginalResourceFilePathData() {

0 commit comments

Comments
 (0)