Skip to content

Commit

Permalink
Resolve custom-event-name-casing lint warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Sukanya Pandey <[email protected]>
Change-Id: I9eea4eac3b8cacc216fc9ad1011e51622622e75f
  • Loading branch information
Sukanya Pandey authored and rfrandse committed Jun 30, 2022
1 parent d30da5c commit a0a2094
Show file tree
Hide file tree
Showing 31 changed files with 73 additions and 74 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module.exports = {
},
],
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
'vue/custom-event-name-casing': ['warn'],
},
parserOptions: {
parser: 'babel-eslint',
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppHeader/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default {
},
mounted() {
this.$root.$on(
'change:isNavigationOpen',
'change-is-navigation-open',
(isNavigationOpen) => (this.isNavigationOpen = isNavigationOpen)
);
},
Expand All @@ -195,7 +195,7 @@ export default {
this.$store.dispatch('authentication/logout');
},
toggleNavigation() {
this.$root.$emit('toggle:navigation');
this.$root.$emit('toggle-navigation');
},
},
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppNavigation/AppNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ export default {
this.isNavigationOpen = false;
},
isNavigationOpen: function (isNavigationOpen) {
this.$root.$emit('change:isNavigationOpen', isNavigationOpen);
this.$root.$emit('change-is-navigation-open', isNavigationOpen);
},
},
mounted() {
this.$root.$on('toggle:navigation', () => this.toggleIsOpen());
this.$root.$on('toggle-navigation', () => this.toggleIsOpen());
},
methods: {
toggleIsOpen() {
Expand Down
6 changes: 3 additions & 3 deletions src/components/Global/LoadingBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export default {
};
},
created() {
this.$root.$on('loader::start', () => {
this.$root.$on('loader-start', () => {
this.startLoadingInterval();
});
this.$root.$on('loader::end', () => {
this.$root.$on('loader-end', () => {
this.endLoadingInterval();
});
this.$root.$on('loader::hide', () => {
this.$root.$on('loader-hide', () => {
this.hideLoadingBar();
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Global/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ export default {
},
methods: {
onChangeInput() {
this.$emit('changeSearch', this.filter);
this.$emit('change-search', this.filter);
},
onClearSearch() {
this.filter = '';
this.$emit('clearSearch');
this.$emit('clear-search');
this.$refs.searchInput.focus();
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Global/TableFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default {
this.emitChange();
},
emitChange() {
this.$emit('filterChange', {
this.$emit('filter-change', {
activeFilters: this.activeFilters,
});
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Global/TableRowAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
:aria-label="title"
:title="title"
:disabled="!enabled"
@click="$emit('click:tableAction', value)"
@click="$emit('click-table-action', value)"
>
<slot name="icon">
{{ title }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Global/TableToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
:data-test-id="`table-button-${action.value}Selected`"
variant="primary"
class="d-block"
@click="$emit('batchAction', action.value)"
@click="$emit('batch-action', action.value)"
>
{{ action.label }}
</b-button>
<slot name="export"></slot>
<b-button
variant="secondary"
class="d-block"
@click="$emit('clearSelected')"
@click="$emit('clear-selected')"
>
{{ $t('global.action.cancel') }}
</b-button>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Mixins/LoadingBarMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ const LoadingBarMixin = {
},
methods: {
startLoader() {
this.$root.$emit('loader::start');
this.$root.$emit('loader-start');
this.loading = true;
},
endLoader() {
this.$root.$emit('loader::end');
this.$root.$emit('loader-end');
this.loading = false;
},
hideLoader() {
this.$root.$emit('loader::hide');
this.$root.$emit('loader-hide');
},
},
};
Expand Down
6 changes: 3 additions & 3 deletions src/views/AccessControl/Ldap/TableRoleGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
ref="toolbar"
:selected-items-count="selectedRows.length"
:actions="batchActions"
@clearSelected="clearSelectedRows($refs.table)"
@batchAction="onBatchAction"
@clear-selected="clearSelectedRows($refs.table)"
@batch-action="onBatchAction"
/>
<b-table
ref="table"
Expand Down Expand Up @@ -67,7 +67,7 @@
:value="action.value"
:enabled="action.enabled"
:title="action.title"
@click:tableAction="onTableRowAction($event, item)"
@click-table-action="onTableRowAction($event, item)"
>
<template #icon>
<icon-edit v-if="action.value === 'edit'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
ref="toolbar"
:selected-items-count="selectedRows.length"
:actions="tableToolbarActions"
@clearSelected="clearSelectedRows($refs.table)"
@batchAction="onBatchAction"
@clear-selected="clearSelectedRows($refs.table)"
@batch-action="onBatchAction"
/>
<b-table
ref="table"
Expand Down Expand Up @@ -63,7 +63,7 @@
:value="action.value"
:enabled="action.enabled"
:title="action.title"
@click:tableAction="onTableRowAction($event, item)"
@click-table-action="onTableRowAction($event, item)"
>
<template #icon>
<icon-edit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
:value="action.value"
:title="action.title"
:enabled="action.enabled"
@click:tableAction="onTableRowAction($event, item)"
@click-table-action="onTableRowAction($event, item)"
>
<template #icon>
<icon-replace v-if="action.value === 'replace'" />
Expand Down
4 changes: 2 additions & 2 deletions src/views/Configuration/NetworkSettings/NetworkSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
:key="actionIndex"
:value="action.value"
:title="action.title"
@click:tableAction="
@click-table-action="
onDeleteIpv4StaticTableRow($event, index)
"
>
Expand Down Expand Up @@ -269,7 +269,7 @@
:key="actionIndex"
:value="action.value"
:title="action.title"
@click:tableAction="onDeleteDnsTableRow($event, index)"
@click-table-action="onDeleteDnsTableRow($event, index)"
>
<template #icon>
<icon-trashcan v-if="action.value === 'delete'" />
Expand Down
2 changes: 1 addition & 1 deletion src/views/Control/ServerPowerOperations/BootSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default {
this.$store.dispatch('hostBootSettings/getBootSettings'),
this.$store.dispatch('hostBootSettings/getTpmPolicy'),
]).finally(() =>
this.$root.$emit('serverPowerOperations::bootSettings::complete')
this.$root.$emit('server-power-operations-boot-settings-complete')
);
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default {
created() {
this.startLoader();
const bootSettingsPromise = new Promise((resolve) => {
this.$root.$on('serverPowerOperations::bootSettings::complete', () =>
this.$root.$on('server-power-operations-boot-settings-complete', () =>
resolve()
);
});
Expand Down
12 changes: 6 additions & 6 deletions src/views/Health/EventLogs/EventLogs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<b-col sm="7" xl="4" class="d-flex flex-column justify-content-end">
<search
:placeholder="$t('pageEventLogs.table.searchLogs')"
@changeSearch="onChangeSearchInput"
@clearSearch="onClearSearchInput"
@change-search="onChangeSearchInput"
@clear-search="onClearSearchInput"
/>
</b-col>
<b-col sm="3" class="d-flex flex-column justify-content-end">
Expand All @@ -21,7 +21,7 @@
</b-row>
<b-row>
<b-col class="text-right">
<table-filter :filters="tableFilters" @filterChange="onFilterChange" />
<table-filter :filters="tableFilters" @filter-change="onFilterChange" />
</b-col>
</b-row>
<b-row>
Expand All @@ -30,8 +30,8 @@
ref="toolbar"
:selected-items-count="selectedRows.length"
:actions="batchActions"
@clearSelected="clearSelectedRows($refs.table)"
@batchAction="onBatchAction"
@clear-selected="clearSelectedRows($refs.table)"
@batch-action="onBatchAction"
>
<template #export>
<table-toolbar-export
Expand Down Expand Up @@ -102,7 +102,7 @@
:row-data="row.item"
:export-name="exportFileNameByDate()"
:data-test-id="`eventLogs-button-deleteRow-${row.index}`"
@click:tableAction="onTableRowAction($event, row.item)"
@click-table-action="onTableRowAction($event, row.item)"
>
<template #icon>
<icon-export v-if="action.value === 'export'" />
Expand Down
14 changes: 7 additions & 7 deletions src/views/Health/HardwareStatus/HardwareStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@ export default {
created() {
this.startLoader();
const systemTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::system::complete', () => resolve());
this.$root.$on('hardware-status-system-complete', () => resolve());
});
const bmcManagerTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::bmcManager::complete', () => resolve());
this.$root.$on('hardware-status-bmc-manager-complete', () => resolve());
});
const chassisTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::chassis::complete', () => resolve());
this.$root.$on('hardware-status-chassis-complete', () => resolve());
});
const dimmSlotTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::dimmSlot::complete', () => resolve());
this.$root.$on('hardware-status-dimm-slot-complete', () => resolve());
});
const fansTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::fans::complete', () => resolve());
this.$root.$on('hardware-status-fans-complete', () => resolve());
});
const powerSuppliesTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::powerSupplies::complete', () =>
this.$root.$on('hardware-status-power-supplies-complete', () =>
resolve()
);
});
const processorsTablePromise = new Promise((resolve) => {
this.$root.$on('hardwareStatus::processors::complete', () => resolve());
this.$root.$on('hardware-status-processors-complete', () => resolve());
});
// Combine all child component Promises to indicate
// when page data load complete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export default {
created() {
this.$store.dispatch('bmc/getBmcInfo').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::bmcManager::complete');
this.$root.$emit('hardware-status-bmc-manager-complete');
});
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
created() {
this.$store.dispatch('chassis/getChassisInfo').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::chassis::complete');
this.$root.$emit('hardware-status-chassis-complete');
});
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<b-row>
<b-col sm="6" md="5" xl="4">
<search
@changeSearch="onChangeSearchInput"
@clearSearch="onClearSearchInput"
@change-search="onChangeSearchInput"
@clear-search="onClearSearchInput"
/>
</b-col>
<b-col sm="6" md="3" xl="2">
Expand Down Expand Up @@ -137,7 +137,7 @@ export default {
created() {
this.$store.dispatch('memory/getDimms').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::dimmSlot::complete');
this.$root.$emit('hardware-status-dimm-slot-complete');
});
},
methods: {
Expand Down
6 changes: 3 additions & 3 deletions src/views/Health/HardwareStatus/HardwareStatusTableFans.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<b-row>
<b-col sm="6" md="5" xl="4">
<search
@changeSearch="onChangeSearchInput"
@clearSearch="onClearSearchInput"
@change-search="onChangeSearchInput"
@clear-search="onClearSearchInput"
/>
</b-col>
<b-col sm="6" md="3" xl="2">
Expand Down Expand Up @@ -136,7 +136,7 @@ export default {
created() {
this.$store.dispatch('fan/getFanInfo').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::fans::complete');
this.$root.$emit('hardware-status-fans-complete');
});
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<b-row>
<b-col sm="6" md="5" xl="4">
<search
@changeSearch="onChangeSearchInput"
@clearSearch="onClearSearchInput"
@change-search="onChangeSearchInput"
@clear-search="onClearSearchInput"
/>
</b-col>
<b-col sm="6" md="3" xl="2">
Expand Down Expand Up @@ -159,7 +159,7 @@ export default {
created() {
this.$store.dispatch('powerSupply/getPowerSupply').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::powerSupplies::complete');
this.$root.$emit('hardware-status-power-supplies-complete');
});
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<b-row>
<b-col sm="6" md="5" xl="4">
<search
@changeSearch="onChangeSearchInput"
@clearSearch="onClearSearchInput"
@change-search="onChangeSearchInput"
@clear-search="onClearSearchInput"
/>
</b-col>
<b-col sm="6" md="3" xl="2">
Expand Down Expand Up @@ -166,7 +166,7 @@ export default {
created() {
this.$store.dispatch('processors/getProcessorsInfo').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::processors::complete');
this.$root.$emit('hardware-status-processors-complete');
});
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default {
created() {
this.$store.dispatch('system/getSystem').finally(() => {
// Emit initial data fetch complete to parent component
this.$root.$emit('hardwareStatus::system::complete');
this.$root.$emit('hardware-status-system-complete');
});
},
};
Expand Down
Loading

0 comments on commit a0a2094

Please sign in to comment.