-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
code quality / improvementenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Preflight Checklist
- I have read the Contributing Guidelines for this project.
- I agree to follow the Code of Conduct that this project adheres to.
- I have searched the issue tracker for an issue that matches the one I want to file, without success.
Request type
Request for enhancement of a component
Functionality
The current NetzgrafikDto is composed of many attributes, some are unused, at least as far as I know. This issue aims to remove them, to simplify this object and reduce the JSON payload. Some of these fields are anyway recalculated at loading etc.
The idea behind this issue would be also to simplify the NetzgrafikDto.
Current interface:
export interface NetzgrafikDto {
nodes: NodeDto[]; // list of all nodes - analog database (DB) table
trainrunSections: TrainrunSectionDto[]; // list of all trainrun sections - analog DB table
trainruns: TrainrunDto[]; // list of all trainruns - analog DB table
resources: ResourceDto[]; // list of all resources - analog DB table
metadata: MetadataDto; // global settings / definitions
freeFloatingTexts: FreeFloatingTextDto[]; //list of all notes - analog database (DB) table
labels: LabelDto[]; // list of all labels - DB table (filterable labels)
labelGroups: LabelGroupDto[]; // list of all label groups - DB table (filterable groups)
filterData: FilterDataDto; // reference to the filter settings (predefined filters)
}Fields:
NetzgrafikDto.trainrunSections.path: this is recalculated anyway at loading.
Other considerations (that may need more refactoring that just not including them in the dto):
- Can
NetzgrafikDto.resourcesbe agregated in associatedNetzgrafikDto.nodes? Since this refers to the "capacity" of a station (= number of docks in a node)? I don't understand why the two objects have different life times. I would recommand doingNetzgrafikDto.nodes.capacity (int)directly instead. - Can
NetzgrafikDto.nodes.symmetryAxisbe droped? I don't see any use of this. This looks deprecated. - Can
NetzgrafikDto.trainrunSections.specificTrainrunSectionFrequencyIdbe droped? This looks deprecated, even tho I see the how it could be used, since it is not already I recommand removing it and if needed in the future re-think the whole feature. - Globally, I see many uses of
id: 0-> this is dangerous, we should never haveid = 0(i.e.trainrunCategories,trainrunFrequencies,trainrunTimeCategoryId...)
Link to design proposal file
No response
aiAdrian
Metadata
Metadata
Assignees
Labels
code quality / improvementenhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers