Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
loicgreffier committed Jan 7, 2025
1 parent 5b75614 commit 1bbf6ec
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 72 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ public JsExecutionDto getJsExecutionByProjectWidgetId(final Long projectWidgetId
* @return The related Js execution
*/
private JsExecutionDto createJsExecutionByProjectWidget(final ProjectWidget projectWidget) {
String properties = getProjectWidgetConfigurationsWithGlobalOne(projectWidget,
projectWidget.getWidget().getCategory().getConfigurations());
String properties = getProjectWidgetConfigurationsWithGlobalOne(
projectWidget,
projectWidget.getWidget().getCategory().getConfigurations()
);
String script = projectWidget.getWidget().getBackendJs();
String previousData = projectWidget.getData();
Long projectId = projectWidget.getProjectGrid().getProject().getId();
Expand All @@ -95,8 +97,17 @@ private JsExecutionDto createJsExecutionByProjectWidget(final ProjectWidget proj
WidgetStateEnum state = projectWidget.getState();
Date lastSuccess = projectWidget.getLastSuccessDate();

return new JsExecutionDto(properties, script, previousData, projectId, technicalId, delay, timeout, state,
lastSuccess);
return new JsExecutionDto(
properties,
script,
previousData,
projectId,
technicalId,
delay,
timeout,
state,
lastSuccess
);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ public final class JsEndpoints {
* @throws RemoteException If an error occurred during the execution of the request
* @throws RequestException If an error occurred during the execution of the request
*/
private static String executeRequest(String url, String headerName, String headerValue, String headerToReturn,
String body, boolean returnCode)
private static String executeRequest(String url,
String headerName,
String headerValue,
String headerToReturn,
String body,
boolean returnCode)
throws IOException, RemoteException, RequestException {
Request.Builder builder = new Request.Builder().url(url);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class DashboardDetailComponent implements OnInit, OnDestroy {
/**
* Add a new grid to the current project
*
* @param formData The data retrieved from the side nav
* @param formGroup The data retrieved from the side nav
*/
private addNewGrid(formGroup: UntypedFormGroup): void {
const formData: GridRequest = formGroup.value;
Expand All @@ -453,7 +453,7 @@ export class DashboardDetailComponent implements OnInit, OnDestroy {
/**
* Execute the action edit the grids when the sidenav has been saved
*
* @param formData The data retrieve from the form sidenav
* @param formGroup The data retrieve from the form sidenav
*/
private editGrids(formGroup: UntypedFormGroup): void {
const formData: ProjectGridRequest = formGroup.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export class DashboardScreenWidgetComponent implements OnInit, OnDestroy {
* @param httpProjectWidgetService Back-End service used to manage http calls for project widgets
* @param websocketService Front-End service used to manage websocket connections
* @param dialogService Front-End service used to manage dialog
* @param sidenavService Front-End service used to manage sidenav's
* @param sidenavService Front-End service used to manage sidenav
* @param projectWidgetFormStepsService Front-End service used to generate steps for project widget
* @param toastService Front-End service used to display messages
* @param widgetConfigurationFormFieldsService Front-End service used to manage the widget's category settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes
* @param libraryService Front-End service used to manage the libraries
*/
constructor(
private renderer: Renderer2,
private readonly renderer: Renderer2,
private readonly httpProjectService: HttpProjectService,
private readonly websocketService: WebsocketService,
private readonly libraryService: LibraryService
Expand Down Expand Up @@ -175,10 +175,8 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes

if (!changes['project'].previousValue) {
this.initProjectWebsockets();
} else {
if (changes['project'].previousValue.token !== changes['project'].currentValue.token) {
this.resetProjectWebsockets();
}
} else if (changes['project'].previousValue.token !== changes['project'].currentValue.token) {
this.resetProjectWebsockets();
}
}
}
Expand Down Expand Up @@ -215,7 +213,7 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes
this.libraryService.init(this.project.librariesToken.length);

if (this.project.librariesToken.length > 0) {
this.project.librariesToken.forEach(token => {
this.project.librariesToken.forEach((token) => {
const script: HTMLScriptElement = document.createElement('script');
script.type = 'text/javascript';
script.src = HttpAssetService.getContentUrl(token);
Expand Down Expand Up @@ -291,14 +289,12 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes
y: projectWidget.widgetPosition.gridRow - 1,
w: projectWidget.widgetPosition.width,
h: projectWidget.widgetPosition.height
})
});
});

return layout;
}



/**********************************************************************************************************/
/* WEBSOCKET MANAGEMENT */
/**********************************************************************************************************/
Expand Down Expand Up @@ -399,7 +395,7 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes
this.currentGrid = layout;

const projectWidgetPositionRequests: ProjectWidgetPositionRequest[] = [];
this.currentGrid.forEach(gridItem => {
this.currentGrid.forEach((gridItem) => {
projectWidgetPositionRequests.push({
projectWidgetId: Number(gridItem.id),
gridColumn: gridItem.x + 1,
Expand All @@ -421,8 +417,8 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes
private isGridItemsHasMoved(layout: KtdGridLayout): boolean {
let itemHaveBeenMoved = false;

this.currentGrid.forEach(currentGridItem => {
const gridItemFound = layout.find(newGridItem => {
this.currentGrid.forEach((currentGridItem) => {
const gridItemFound = layout.find((newGridItem) => {
return currentGridItem.id === newGridItem.id;
});

Expand All @@ -439,6 +435,6 @@ export class DashboardScreenComponent implements AfterViewInit, OnChanges, OnDes
* @param id The id of the project widget
*/
public getProjectWidgetById(id: any): ProjectWidget {
return this.projectWidgets.find(projectWidget => projectWidget.id === Number(id));
return this.projectWidgets.find((projectWidget) => projectWidget.id === Number(id));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export class ProjectWidgetFormStepsService {
type: widgetParam.type,
label: widgetParam.description,
placeholder: widgetParam.usageExample,
value: configValue ? configValue : widgetParam.defaultValue,
value: configValue || widgetParam.defaultValue,
iconPrefix: widgetParam.usageTooltip ? IconEnum.HELP : undefined,
iconPrefixTooltip: widgetParam.usageTooltip ? widgetParam.usageTooltip : undefined,
iconSuffix: widgetParam.type === DataTypeEnum.PASSWORD ? IconEnum.SHOW_PASSWORD : undefined,
Expand Down

0 comments on commit 1bbf6ec

Please sign in to comment.