diff --git a/generators/react/templates/postcss.config.js.ejs b/generators/react/templates/postcss.config.js.ejs index d750644c7a27..0e39141614a8 100644 --- a/generators/react/templates/postcss.config.js.ejs +++ b/generators/react/templates/postcss.config.js.ejs @@ -17,7 +17,5 @@ limitations under the License. -%> module.exports = { - plugins: [ - require('autoprefixer') - ] + plugins: [require('autoprefixer')], }; diff --git a/generators/react/templates/src/main/webapp/app/app.scss.ejs b/generators/react/templates/src/main/webapp/app/app.scss.ejs index be3f4c1e4038..5b8196206957 100644 --- a/generators/react/templates/src/main/webapp/app/app.scss.ejs +++ b/generators/react/templates/src/main/webapp/app/app.scss.ejs @@ -131,7 +131,9 @@ Generic styles } .shadow { - box-shadow: rgba(0, 0, 0, 0.12) 0px 1px 6px, rgba(0, 0, 0, 0.12) 0px 1px 4px; + box-shadow: + rgba(0, 0, 0, 0.12) 0px 1px 6px, + rgba(0, 0, 0, 0.12) 0px 1px 4px; border-radius: 2px; } @@ -157,8 +159,8 @@ Generic styles /* padding helpers */ @mixin pad($size, $side) { - @if $size== "" { - @if $side== "" { + @if $size== '' { + @if $side== '' { .pad { padding: 10px !important; } @@ -168,7 +170,7 @@ Generic styles } } } @else { - @if $side== "" { + @if $side== '' { .pad-#{$size} { padding: #{$size}px !important; } @@ -180,54 +182,54 @@ Generic styles } } -@include pad("", ""); -@include pad("2", ""); -@include pad("3", ""); -@include pad("5", ""); -@include pad("10", ""); -@include pad("20", ""); -@include pad("25", ""); -@include pad("30", ""); -@include pad("50", ""); -@include pad("75", ""); -@include pad("100", ""); -@include pad("4", "top"); -@include pad("5", "top"); -@include pad("10", "top"); -@include pad("20", "top"); -@include pad("25", "top"); -@include pad("30", "top"); -@include pad("50", "top"); -@include pad("75", "top"); -@include pad("100", "top"); -@include pad("4", "bottom"); -@include pad("5", "bottom"); -@include pad("10", "bottom"); -@include pad("20", "bottom"); -@include pad("25", "bottom"); -@include pad("30", "bottom"); -@include pad("50", "bottom"); -@include pad("75", "bottom"); -@include pad("100", "bottom"); -@include pad("5", "right"); -@include pad("10", "right"); -@include pad("20", "right"); -@include pad("25", "right"); -@include pad("30", "right"); -@include pad("50", "right"); -@include pad("75", "right"); -@include pad("100", "right"); -@include pad("5", "left"); -@include pad("10", "left"); -@include pad("20", "left"); -@include pad("25", "left"); -@include pad("30", "left"); -@include pad("50", "left"); -@include pad("75", "left"); -@include pad("100", "left"); +@include pad('', ''); +@include pad('2', ''); +@include pad('3', ''); +@include pad('5', ''); +@include pad('10', ''); +@include pad('20', ''); +@include pad('25', ''); +@include pad('30', ''); +@include pad('50', ''); +@include pad('75', ''); +@include pad('100', ''); +@include pad('4', 'top'); +@include pad('5', 'top'); +@include pad('10', 'top'); +@include pad('20', 'top'); +@include pad('25', 'top'); +@include pad('30', 'top'); +@include pad('50', 'top'); +@include pad('75', 'top'); +@include pad('100', 'top'); +@include pad('4', 'bottom'); +@include pad('5', 'bottom'); +@include pad('10', 'bottom'); +@include pad('20', 'bottom'); +@include pad('25', 'bottom'); +@include pad('30', 'bottom'); +@include pad('50', 'bottom'); +@include pad('75', 'bottom'); +@include pad('100', 'bottom'); +@include pad('5', 'right'); +@include pad('10', 'right'); +@include pad('20', 'right'); +@include pad('25', 'right'); +@include pad('30', 'right'); +@include pad('50', 'right'); +@include pad('75', 'right'); +@include pad('100', 'right'); +@include pad('5', 'left'); +@include pad('10', 'left'); +@include pad('20', 'left'); +@include pad('25', 'left'); +@include pad('30', 'left'); +@include pad('50', 'left'); +@include pad('75', 'left'); +@include pad('100', 'left'); @mixin no-padding($side) { - @if $side== "all" { + @if $side== 'all' { .no-padding { padding: 0 !important; } @@ -238,11 +240,11 @@ Generic styles } } -@include no-padding("left"); -@include no-padding("right"); -@include no-padding("top"); -@include no-padding("bottom"); -@include no-padding("all"); +@include no-padding('left'); +@include no-padding('right'); +@include no-padding('top'); +@include no-padding('bottom'); +@include no-padding('all'); /* end of padding helpers */ @@ -250,7 +252,7 @@ Generic styles margin: 0px; } @mixin voffset($size) { - @if $size== "" { + @if $size== '' { .voffset { margin-top: 2px !important; } @@ -261,16 +263,16 @@ Generic styles } } -@include voffset(""); -@include voffset("5"); -@include voffset("10"); -@include voffset("15"); -@include voffset("30"); -@include voffset("40"); -@include voffset("60"); -@include voffset("80"); -@include voffset("100"); -@include voffset("150"); +@include voffset(''); +@include voffset('5'); +@include voffset('10'); +@include voffset('15'); +@include voffset('30'); +@include voffset('40'); +@include voffset('60'); +@include voffset('80'); +@include voffset('100'); +@include voffset('150'); .readonly { background-color: #eee; diff --git a/generators/react/templates/src/main/webapp/app/app.tsx.ejs b/generators/react/templates/src/main/webapp/app/app.tsx.ejs index 3316fc75db10..3b8a855f76a8 100644 --- a/generators/react/templates/src/main/webapp/app/app.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/app.tsx.ejs @@ -83,10 +83,10 @@ export const App = () => {
- + -
diff --git a/generators/react/templates/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs index b444bbaf6084..dfa0f72fe29d 100644 --- a/generators/react/templates/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/config/axios-interceptor.spec.ts.ejs @@ -29,7 +29,7 @@ describe('Axios Interceptor', () => { it('onRequestSuccess is called on fulfilled request', () => { expect((client.interceptors.request as any).handlers[0].fulfilled({ data: 'foo', url: '/test' })).toMatchObject({ - data: 'foo' + data: 'foo', }); }); it('onResponseSuccess is called on fulfilled response', () => { @@ -40,12 +40,11 @@ describe('Axios Interceptor', () => { response: { statusText: 'NotFound', status: 401, - data: { message: 'Page not found' } - } + data: { message: 'Page not found' }, + }, }; expect((client.interceptors.response as any).handlers[0].rejected(rejectError)).rejects.toEqual(rejectError); expect(onUnauthenticated.calledOnce).toBe(true); }); }); }); - diff --git a/generators/react/templates/src/main/webapp/app/config/constants.ts.ejs b/generators/react/templates/src/main/webapp/app/config/constants.ts.ejs index abfcd50f17a5..19145bb38423 100644 --- a/generators/react/templates/src/main/webapp/app/config/constants.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/config/constants.ts.ejs @@ -18,11 +18,11 @@ -%> export const AUTHORITIES = { ADMIN: 'ROLE_ADMIN', - USER: 'ROLE_USER' + USER: 'ROLE_USER', }; export const messages = { - DATA_ERROR_ALERT: 'Internal Error' + DATA_ERROR_ALERT: 'Internal Error', }; export const APP_DATE_FORMAT = 'DD/MM/YY HH:mm'; diff --git a/generators/react/templates/src/main/webapp/app/config/notification-middleware.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/config/notification-middleware.spec.ts.ejs index b95d0a22d141..47ac6eb194cc 100644 --- a/generators/react/templates/src/main/webapp/app/config/notification-middleware.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/config/notification-middleware.spec.ts.ejs @@ -35,14 +35,14 @@ describe('Notification Middleware', () => { // Default action for use in local tests const DEFAULT = { type: SUCCESS_TYPE, - payload: 'foo' + payload: 'foo', }; const HEADER_SUCCESS = { type: SUCCESS_TYPE, payload: { - "status": 201, - "statusText": "Created", - "headers": {"app-alert": "foo.created", "app-params": "foo"} + status: 201, + statusText: 'Created', + headers: { 'app-alert': 'foo.created', 'app-params': 'foo' }, }, }; @@ -120,7 +120,7 @@ describe('Notification Middleware', () => { response: { data: '', config: { - url: 'api/authenticate' + url: 'api/authenticate', }, status: 401, }, diff --git a/generators/react/templates/src/main/webapp/app/config/store.ts.ejs b/generators/react/templates/src/main/webapp/app/config/store.ts.ejs index de517ab8f3ac..d150b56db983 100644 --- a/generators/react/templates/src/main/webapp/app/config/store.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/config/store.ts.ejs @@ -75,7 +75,7 @@ export function configureInjectableStore(storeToInject) { combineReducers({ ...sharedReducers, ...injectableStore.asyncReducers, - }) + }), ); }; diff --git a/generators/react/templates/src/main/webapp/app/index.tsx.ejs b/generators/react/templates/src/main/webapp/app/index.tsx.ejs index 4886733978a5..c8c834e88b35 100644 --- a/generators/react/templates/src/main/webapp/app/index.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/index.tsx.ejs @@ -52,7 +52,7 @@ const render = Component => - + , ); render(AppComponent); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.spec.ts.ejs index 95df3937ad70..8904899de14a 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.spec.ts.ejs @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> - import axios from 'axios'; import sinon from 'sinon'; import { configureStore } from '@reduxjs/toolkit'; @@ -95,10 +94,7 @@ describe('Activate reducer tests', () => { }); it('dispatches RESET actions', async () => { await store.dispatch(reset()); - expect(store.getState()).toEqual([ - expect.any(Object), - expect.objectContaining(reset()), - ]); + expect(store.getState()).toEqual([expect.any(Object), expect.objectContaining(reset())]); }); }); }); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.ts.ejs index e60a650d9ce9..7e9088aa35d1 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.reducer.ts.ejs @@ -23,10 +23,10 @@ import { serializeAxiosError } from 'app/shared/reducers/reducer.utils'; const initialState = { activationSuccess: false, - activationFailure: false + activationFailure: false, }; -export type ActivateState = Readonly; +export type ActivateState = Readonly; // Actions diff --git a/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.tsx.ejs index 2318f5f3714f..9962f1e353fd 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/activate/activate.tsx.ejs @@ -31,7 +31,8 @@ const successAlert = ( sign in - . + + . ); @@ -49,7 +50,7 @@ export const ActivatePage = () => { const [searchParams] = useSearchParams(); useEffect(() => { - const key = searchParams.get("key"); + const key = searchParams.get('key'); dispatch(activateAction(key)); return () => { diff --git a/generators/react/templates/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs index 7b1d0d4a4f28..05a4457e2223 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/password-reset/finish/password-reset-finish.tsx.ejs @@ -38,7 +38,7 @@ export const PasswordResetFinishPage = () => { () => () => { dispatch(reset()); }, - [] + [], ); const handleValidSubmit = ({ newPassword }) => dispatch(handlePasswordResetFinish({ key, newPassword })); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/password-reset/init/password-reset-init.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/account/password-reset/init/password-reset-init.tsx.ejs index 19b49d1e1e59..0c74d56a9505 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/password-reset/init/password-reset-init.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/password-reset/init/password-reset-init.tsx.ejs @@ -31,7 +31,7 @@ export const PasswordResetInit = () => { () => () => { dispatch(reset()); }, - [] + [], ); const handleValidSubmit = ({ email }) => { diff --git a/generators/react/templates/src/main/webapp/app/modules/account/password-reset/password-reset.reducer.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/password-reset/password-reset.reducer.ts.ejs index 04c9a62224e6..aec9e4dc9036 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/password-reset/password-reset.reducer.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/password-reset/password-reset.reducer.ts.ejs @@ -28,7 +28,7 @@ const initialState = { successMessage: null, }; -export type PasswordResetState = Readonly; +export type PasswordResetState = Readonly; const apiUrl = 'api/account/reset-password'; // Actions @@ -37,13 +37,13 @@ export const handlePasswordResetInit = createAsyncThunk( 'passwordReset/reset_password_init', // If the content-type isn't set that way, axios will try to encode the body and thus modify the data sent to the server. async (mail: string) => axios.post(`${apiUrl}/init`, mail, { headers: { ['Content-Type']: 'text/plain' } }), - { serializeError: serializeAxiosError } + { serializeError: serializeAxiosError }, ); export const handlePasswordResetFinish = createAsyncThunk( 'passwordReset/reset_password_finish', async (data: { key: string; newPassword: string }) => axios.post(`${apiUrl}/finish`, data), - { serializeError: serializeAxiosError } + { serializeError: serializeAxiosError }, ); export const PasswordResetSlice = createSlice({ @@ -91,4 +91,3 @@ export const { reset } = PasswordResetSlice.actions; // Reducer export default PasswordResetSlice.reducer; - diff --git a/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.spec.ts.ejs index c5480d285966..5f60340d5a07 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.spec.ts.ejs @@ -40,7 +40,7 @@ describe('Password reducer tests', () => { loading: false, errorMessage: null, updateSuccess: false, - updateFailure: false + updateFailure: false, }); }); }); @@ -51,7 +51,7 @@ describe('Password reducer tests', () => { expect(toTest).toMatchObject({ updateSuccess: false, updateFailure: false, - loading: true + loading: true, }); }); it('should detect a success', () => { @@ -59,7 +59,7 @@ describe('Password reducer tests', () => { expect(toTest).toMatchObject({ updateSuccess: true, updateFailure: false, - loading: false + loading: false, }); }); it('should detect a failure', () => { @@ -67,7 +67,7 @@ describe('Password reducer tests', () => { expect(toTest).toMatchObject({ updateSuccess: false, updateFailure: true, - loading: false + loading: false, }); }); @@ -77,7 +77,7 @@ describe('Password reducer tests', () => { errorMessage: null, successMessage: null, updateSuccess: false, - updateFailure: false + updateFailure: false, }; expect(password({ ...initialState, loading: true }, reset)).toEqual({ ...initialState, @@ -110,11 +110,7 @@ describe('Password reducer tests', () => { }); it('dispatches RESET actions', async () => { await store.dispatch(reset()); - expect(store.getState()).toEqual([ - expect.any(Object), - expect.objectContaining(reset()), - ]); + expect(store.getState()).toEqual([expect.any(Object), expect.objectContaining(reset())]); }); - }); }); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.ts.ejs index 2f0166e85149..86232451c4f4 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/password/password.reducer.ts.ejs @@ -26,10 +26,10 @@ const initialState = { errorMessage: null, successMessage: null, updateSuccess: false, - updateFailure: false + updateFailure: false, }; -export type PasswordState = Readonly; +export type PasswordState = Readonly; const apiUrl = 'api/account'; @@ -43,7 +43,7 @@ interface IPassword { export const savePassword = createAsyncThunk( 'password/update_password', async (password: IPassword) => axios.post(`${apiUrl}/change-password`, password), - { serializeError: serializeAxiosError } + { serializeError: serializeAxiosError }, ); export const PasswordSlice = createSlice({ diff --git a/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.spec.ts.ejs index 94369e686e72..b0d50ac8125f 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.spec.ts.ejs @@ -50,13 +50,13 @@ describe('Creating account tests', () => { it('should detect a request', () => { expect(register(undefined, { type: handleRegister.pending.type })).toEqual({ ...initialState, - loading: true + loading: true, }); }); it('should handle RESET', () => { expect( - register({ loading: true, registrationSuccess: true, registrationFailure: true, errorMessage: '', successMessage: '' }, reset()) + register({ loading: true, registrationSuccess: true, registrationFailure: true, errorMessage: '', successMessage: '' }, reset()), ).toEqual({ ...initialState, }); @@ -85,7 +85,7 @@ describe('Creating account tests', () => { register(undefined, { type: handleRegister.rejected.type, error, - }) + }), ).toEqual({ ...initialState, registrationFailure: true, @@ -119,10 +119,7 @@ describe('Creating account tests', () => { }); it('dispatches RESET actions', async () => { await store.dispatch(reset()); - expect(store.getState()).toEqual([ - expect.any(Object), - expect.objectContaining(reset()), - ]); + expect(store.getState()).toEqual([expect.any(Object), expect.objectContaining(reset())]); }); }); }); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.ts.ejs index 3978876a60cd..7dd6e7d58a6d 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/register/register.reducer.ts.ejs @@ -36,7 +36,7 @@ export type RegisterState = Readonly; export const handleRegister = createAsyncThunk( 'register/create_account', async (data: { login: string; email: string; password: string; langKey?: string }) => axios.post('api/register', data), - { serializeError: serializeAxiosError } + { serializeError: serializeAxiosError }, ); export const RegisterSlice = createSlice({ diff --git a/generators/react/templates/src/main/webapp/app/modules/account/register/register.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/account/register/register.tsx.ejs index 2e42d5a839e7..3e889a1c1e9f 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/register/register.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/register/register.tsx.ejs @@ -161,6 +161,6 @@ export const RegisterPage = () => { ); -} +}; export default RegisterPage; diff --git a/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.reducer.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.reducer.ts.ejs index 4dd8ef9fb59e..84d7af440cb1 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.reducer.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.reducer.ts.ejs @@ -25,10 +25,10 @@ const initialState = { loading: false, sessions: [], updateSuccess: false, - updateFailure: false + updateFailure: false, }; -export type SessionsState = Readonly; +export type SessionsState = Readonly; // Actions const apiUrl = '/api/account/sessions'; @@ -56,21 +56,15 @@ export const SessionsSlice = createSlice({ }) .addCase(findAll.fulfilled, (state, action) => { state.loading = false; - state.sessions= action.payload.data; + state.sessions = action.payload.data; }) .addCase(invalidateSession.fulfilled, state => { state.loading = false; - state.updateSuccess= true; + state.updateSuccess = true; }) - .addMatcher( - isPending( - findAll, - invalidateSession, - ), - (state) => { - state.loading = true; - } - ); + .addMatcher(isPending(findAll, invalidateSession), state => { + state.loading = true; + }); }, }); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.tsx.ejs index ff76b88d894f..894fd293c9e1 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/sessions/sessions.tsx.ejs @@ -47,43 +47,53 @@ export const SessionsPage = () => { const updateFailure = useAppSelector(state => state.sessions.updateFailure); return ( -
-

- - Active sessions for [{account.login}] - -

- - {(updateSuccess) ? ( +
+

+ + Active sessions for [{account.login}] + +

+ + {updateSuccess ? ( Session invalidated! - ) : null} + ) : null} - {(updateFailure) ? ( + {updateFailure ? ( - An error has occurred! The session could not be invalidated. + + An error has occurred! The session could not be invalidated. + - ) : null} + ) : null} - + -
- - +
+
+ - - - + + + - + - + {sessions.map((s, index) => ( @@ -96,12 +106,11 @@ export const SessionsPage = () => { ))} - -
IP AddressUser agentDate + IP Address + + User agent + + Date +
{s.ipAddress}
-
+ +
+
); }; export default SessionsPage; - diff --git a/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs index ee02c4f63733..4c090b113491 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.reducer.spec.ts.ejs @@ -40,7 +40,7 @@ describe('Settings reducer tests', () => { loading: false, errorMessage: null, updateSuccess: false, - updateFailure: false + updateFailure: false, }); }); }); @@ -51,7 +51,7 @@ describe('Settings reducer tests', () => { expect(toTest).toMatchObject({ updateSuccess: false, updateFailure: false, - loading: true + loading: true, }); }); it('should detect a success', () => { @@ -59,7 +59,7 @@ describe('Settings reducer tests', () => { expect(toTest).toMatchObject({ updateSuccess: true, updateFailure: false, - loading: false + loading: false, }); }); it('should detect a failure', () => { @@ -67,7 +67,7 @@ describe('Settings reducer tests', () => { expect(toTest).toMatchObject({ updateSuccess: false, updateFailure: true, - loading: false + loading: false, }); }); @@ -77,7 +77,7 @@ describe('Settings reducer tests', () => { errorMessage: null, successMessage: null, updateSuccess: false, - updateFailure: false + updateFailure: false, }; expect(account({ ...initialState, loading: true }, reset())).toEqual({ ...initialState, @@ -112,10 +112,7 @@ describe('Settings reducer tests', () => { }); it('dispatches RESET actions', async () => { await store.dispatch(reset()); - expect(store.getState()).toEqual([ - expect.any(Object), - expect.objectContaining(reset()), - ]); + expect(store.getState()).toEqual([expect.any(Object), expect.objectContaining(reset())]); }); }); }); diff --git a/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.tsx.ejs index 14658e75eb06..9ee02d9fb829 100644 --- a/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/account/settings/settings.tsx.ejs @@ -55,7 +55,7 @@ export const SettingsPage = () => { saveAccountSettings({ ...account, ...values, - }) + }), ); }; diff --git a/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.spec.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.spec.ts.ejs index 554622d6e2bd..21622b3bb1bf 100644 --- a/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.spec.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.spec.ts.ejs @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> - import axios from 'axios'; import sinon from 'sinon'; import { configureStore } from '@reduxjs/toolkit'; @@ -172,7 +171,7 @@ describe('Administration reducer tests', () => { expect(toTest).toMatchObject({ loading: false, - health: payload.data + health: payload.data, }); }); @@ -182,7 +181,7 @@ describe('Administration reducer tests', () => { expect(toTest).toMatchObject({ loading: false, - metrics: payload.data + metrics: payload.data, }); }); @@ -192,7 +191,7 @@ describe('Administration reducer tests', () => { expect(toTest).toMatchObject({ loading: false, - threadDump: payload.data + threadDump: payload.data, }); }); @@ -204,8 +203,8 @@ describe('Administration reducer tests', () => { loading: false, configuration: { configProps: payload.data, - env: {} - } + env: {}, + }, }); }); diff --git a/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs b/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs index 9a8ac6eaa412..e19712a4989e 100644 --- a/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/administration/administration.reducer.ts.ejs @@ -68,9 +68,13 @@ export const getSystemMetrics = createAsyncThunk('administration/fetch_metrics', serializeError: serializeAxiosError, }); -export const getSystemThreadDump = createAsyncThunk('administration/fetch_thread_dump', async () => axios.get('management/threaddump'), { - serializeError: serializeAxiosError, -}); +export const getSystemThreadDump = createAsyncThunk( + 'administration/fetch_thread_dump', + async () => axios.get('management/threaddump'), + { + serializeError: serializeAxiosError, + }, +); export const getLoggers = createAsyncThunk('administration/fetch_logs', async () => axios.get('management/loggers'), { serializeError: serializeAxiosError, diff --git a/generators/react/templates/src/main/webapp/app/modules/administration/configuration/configuration.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/administration/configuration/configuration.tsx.ejs index a9b3be727afb..fdf52243d5e3 100644 --- a/generators/react/templates/src/main/webapp/app/modules/administration/configuration/configuration.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/administration/configuration/configuration.tsx.ejs @@ -132,4 +132,3 @@ export const ConfigurationPage = () => { }; export default ConfigurationPage; - diff --git a/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.scss.ejs b/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.scss.ejs index d0bd086456bd..020a0bf68505 100644 --- a/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.scss.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.scss.ejs @@ -16,7 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. -%> - iframe { background: white; } diff --git a/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.tsx.ejs b/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.tsx.ejs index a9b2871d086b..8a2d590fa0c3 100644 --- a/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.tsx.ejs +++ b/generators/react/templates/src/main/webapp/app/modules/administration/docs/docs.tsx.ejs @@ -23,8 +23,12 @@ import React from 'react'; const DocsPage = () => (