Skip to content

Commit ff4ab40

Browse files
committed
Revert "Update local user layout and styles"
Merged accidentally. Did not have proper +1s/+2s. The author will resubmit. Apologies for the noise. This reverts commit 5fa09a2. Change-Id: I59a792193f94f51c6f499c385305db919cf43927 Signed-off-by: Gunnar Mills <[email protected]>
1 parent 5fa09a2 commit ff4ab40

File tree

10 files changed

+58
-339
lines changed

10 files changed

+58
-339
lines changed

package-lock.json

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"vue": "2.6.11",
2222
"vue-date-fns": "1.1.0",
2323
"vue-router": "3.1.3",
24-
"vuelidate": "^0.7.4",
2524
"vuex": "3.0.1"
2625
},
2726
"devDependencies": {

src/assets/styles/_form-components.scss

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/assets/styles/_modal.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/assets/styles/_obmc-custom.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
$enable-rounded: false;
2-
$enable-validation-icons: false;
32

43
// Required
54
@import "~bootstrap/scss/functions";
@@ -53,7 +52,4 @@ $colors: map-remove($theme-colors, "light", "dark");
5352

5453
@import "~bootstrap-vue/src/index.scss";
5554

56-
@import "./buttons";
57-
@import "./form-components";
58-
@import "./modal";
59-
@import "./table";
55+
@import "./buttons";

src/assets/styles/_table.scss

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/main.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
AlertPlugin,
88
BadgePlugin,
99
ButtonPlugin,
10-
BVConfigPlugin,
1110
CollapsePlugin,
1211
FormPlugin,
1312
FormCheckboxPlugin,
@@ -23,20 +22,12 @@ import {
2322
NavPlugin,
2423
TablePlugin
2524
} from 'bootstrap-vue';
26-
import Vuelidate from 'vuelidate';
2725

2826
Vue.filter('date', dateFilter);
2927

3028
Vue.use(AlertPlugin);
3129
Vue.use(BadgePlugin);
3230
Vue.use(ButtonPlugin);
33-
Vue.use(BVConfigPlugin, {
34-
BFormText: { textVariant: 'black' },
35-
BTable: {
36-
headVariant: 'light',
37-
footVariant: 'light'
38-
}
39-
});
4031
Vue.use(CollapsePlugin);
4132
Vue.use(FormPlugin);
4233
Vue.use(FormCheckboxPlugin);
@@ -52,7 +43,6 @@ Vue.use(ModalPlugin);
5243
Vue.use(NavbarPlugin);
5344
Vue.use(NavPlugin);
5445
Vue.use(TablePlugin);
55-
Vue.use(Vuelidate);
5646

5747
new Vue({
5848
router,

src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<b-container class="ml-0">
33
<page-title />
44
<b-row>
5-
<b-col lg="10" class="text-right">
5+
<b-col lg="10">
66
<b-button variant="link" @click="initModalSettings">
77
Account policy settings
88
<icon-settings />
@@ -15,11 +15,11 @@
1515
</b-row>
1616
<b-row>
1717
<b-col lg="10">
18-
<b-table show-empty :fields="fields" :items="tableItems">
18+
<b-table bordered show-empty head-variant="dark" :items="tableItems">
19+
<template v-slot:head(actions)="data"></template>
1920
<template v-slot:cell(actions)="data">
2021
<b-button
2122
aria-label="Edit user"
22-
title="Edit user"
2323
variant="link"
2424
:disabled="!data.value.edit"
2525
@click="initModalUser(data.item)"
@@ -28,7 +28,6 @@
2828
</b-button>
2929
<b-button
3030
aria-label="Delete user"
31-
title="Delete user"
3231
variant="link"
3332
:disabled="!data.value.delete"
3433
@click="initModalDelete(data.item)"
@@ -43,7 +42,6 @@
4342
<b-col lg="8">
4443
<b-button v-b-toggle.collapse-role-table variant="link" class="mt-3">
4544
View privilege role descriptions
46-
<icon-chevron />
4745
</b-button>
4846
<b-collapse id="collapse-role-table" class="mt-3">
4947
<table-roles />
@@ -52,7 +50,11 @@
5250
</b-row>
5351
<!-- Modals -->
5452
<modal-settings :settings="settings"></modal-settings>
55-
<modal-user :user="activeUser" @ok="saveUser"></modal-user>
53+
<modal-user
54+
:user="activeUser"
55+
@ok="saveUser"
56+
@hidden="clearActiveUser"
57+
></modal-user>
5658
</b-container>
5759
</template>
5860

@@ -61,7 +63,6 @@ import IconTrashcan from '@carbon/icons-vue/es/trash-can/20';
6163
import IconEdit from '@carbon/icons-vue/es/edit/20';
6264
import IconAdd from '@carbon/icons-vue/es/add--alt/20';
6365
import IconSettings from '@carbon/icons-vue/es/settings/20';
64-
import IconChevron from '@carbon/icons-vue/es/chevron--up/20';
6566
6667
import TableRoles from './TableRoles';
6768
import ModalUser from './ModalUser';
@@ -72,7 +73,6 @@ export default {
7273
name: 'LocalUsers',
7374
components: {
7475
IconAdd,
75-
IconChevron,
7676
IconEdit,
7777
IconSettings,
7878
IconTrashcan,
@@ -84,17 +84,7 @@ export default {
8484
data() {
8585
return {
8686
activeUser: null,
87-
settings: null,
88-
fields: [
89-
'username',
90-
'privilege',
91-
'status',
92-
{
93-
key: 'actions',
94-
label: '',
95-
tdClass: 'table-cell__actions'
96-
}
97-
]
87+
settings: null
9888
};
9989
},
10090
computed: {
@@ -115,8 +105,7 @@ export default {
115105
actions: {
116106
edit: true,
117107
delete: user.UserName === 'root' ? false : true
118-
},
119-
...user
108+
}
120109
};
121110
});
122111
}
@@ -154,15 +143,18 @@ export default {
154143
// fetch settings then show modal
155144
}
156145
},
157-
saveUser({ isNewUser, userData }) {
158-
if (isNewUser) {
159-
this.$store.dispatch('localUsers/createUser', userData);
146+
saveUser({ newUser, form }) {
147+
if (newUser) {
148+
this.$store.dispatch('localUsers/createUser', form);
160149
} else {
161-
this.$store.dispatch('localUsers/updateUser', userData);
150+
this.$store.dispatch('localUsers/updateUser', form);
162151
}
163152
},
164153
deleteUser({ username }) {
165154
this.$store.dispatch('localUsers/deleteUser', username);
155+
},
156+
clearActiveUser() {
157+
this.activeUser = null;
166158
}
167159
}
168160
};
@@ -172,9 +164,4 @@ export default {
172164
h1 {
173165
margin-bottom: 2rem;
174166
}
175-
.btn.collapsed {
176-
svg {
177-
transform: rotate(180deg);
178-
}
179-
}
180167
</style>

0 commit comments

Comments
 (0)