-
Notifications
You must be signed in to change notification settings - Fork 41
Add textbox #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add textbox #390
Conversation
…tion in textbox config form
25c23d7 to
4955978
Compare
| .side-menu-header { | ||
| position: relative; | ||
| text-align: center; | ||
| padding: 6px 28px; | ||
| } | ||
|
|
||
| .side-menu-header span { | ||
| font-size: inherit; | ||
| user-select: none; | ||
| } | ||
|
|
||
| .side-menu-arrow { | ||
| position: absolute; | ||
| top: 50%; | ||
| transform: translateY(-50%); | ||
| cursor: pointer; | ||
| font-size: 1.2rem; | ||
| color: #6c757d; | ||
| opacity: 0.6; | ||
| } | ||
|
|
||
| .side-menu-arrow.left { | ||
| left: 6px; | ||
| } | ||
|
|
||
| .side-menu-arrow.right { | ||
| right: 6px; | ||
| } | ||
|
|
||
| .side-menu-arrow:hover { | ||
| color: #000; | ||
| opacity: 1; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
С новым side menu мне кажется очень крутая идея 👍 Учитывая что скорее всего ещё новые устройства появлятья будут
| node_id: str = node.data.id # network device name(label) | ||
|
|
||
| if node_type == "textbox": | ||
| return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может быть стоит сделать фильтрацию просто по всем неизвестным типам, а не конкретно по текстбоксам? А вообще, хорошо было бы, чтобы бэкенд ничего не знал о текстбоксах
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Окей, посмотрю как лучше на бэке отфильтровать подобные элементы
| """ | ||
|
|
||
| config: NodeConfig | ||
| config: NodeConfig | TextboxNodeConfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextboxNodeConfig же унаследован от NodeConfig. Кажется явно не то что-то с абстракциями
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Справедливо, изначально так и сделал, но почему-то сломалась десериализация. В целом если текстбокс будет все равно отфильтровываться (в будущем исправлении), то он и не дойдет до этого момента
| default_gw: str = "" | ||
|
|
||
|
|
||
| @dataclass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вообще, под Node на бэкенде раньше понималось network node, т.е. какое-то сетевое устройство. Кажется, как будто отдельный TextboxNodeConfig немного нарушает эту идею
- не очень понимаю, textbox это же чисто элемент фронтенда, зачем он в эмуляторе?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
На бэке перебираются все ноды и десериализуются. Изначально подумал, что node на бэке -- cytoscape node.
В таком случае можно отфильтровать текстбоксы и не обрабатывать (предыдущее обсуждение), согласен, сделаю
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
На бэке перебираются все ноды и десериализуются. Изначально подумал, что
nodeна бэке --cytoscape node
Если бы в проекте бэкенд и эмулятор были корректно разделены, то путаницы наверное бы не было
|
|
||
| # Режим работы: dev (локальный PostgreSQL) или prod (Yandex Cloud PostgreSQL) | ||
| MODE=prod No newline at end of file | ||
| MODE=dev No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😠😠😠😠😠😠😠😠😠😠😠 надо этот файл в .gitignore добавить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
По-хорошему он там должен был быть уже давно (изначально), текущие .env с примерной конфигурацией стоит оставить с MODE=dev и переименовать во что-то, вроде example.env. Занести в .gitignore и не трогать продовый .env
d-zaytsev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Несколько моментов на подумать написал
Add textbox tool for creating comments on canvas: