Skip to content

Add duplication capability to functions and outputs #1411

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

internalthought
Copy link

Inspired by issue #1366

@kizniche
Copy link
Owner

kizniche commented Feb 25, 2025

I see you found my clone_model function I used to duplicate dashboards/inputs. This looks great. I'll test soon to see if I notice any issues. Thanks for the PR!

@kizniche
Copy link
Owner

kizniche commented Feb 26, 2025

The build test test_add_all_function_devices_logged_in_as_admin seems to be failing.

=========================== short test summary info ============================
FAILED tests/software_tests/test_mycodo_flask/test_endpoints.py::test_add_all_function_devices_logged_in_as_admin - AssertionError: Number of Functions doesn't match: In DB 1, Should be: 0
assert 1 == 0
FAILED tests/software_tests/test_mycodo_flask/test_endpoints.py::test_add_all_function_actions_logged_in_as_admin - AssertionError: Number of Actions doesn't match: In DB 0, Should be: 1
assert 0 == 1

I'll investigate later

@internalthought
Copy link
Author

internalthought commented Feb 26, 2025

fixed my implementation to work with the clone_model -> database interactions. also had issues installing to rpi(i had previously tested on docker only), so put in some workarounds to get it running. if its too messy, i can clean that up.

@kizniche
Copy link
Owner

What is the purpose of the additional commands in the update-permissions section of upgrade_commands.sh? Restarting all services when permissions are set seems out of place and is likely to negatively impact some users.

@internalthought
Copy link
Author

for some reason, when running setup.sh, the web server connect test doesn't pass unless i delete the mycodoflask.sock and restart all three services. i reordered the setup.sh commands and added to the reset web server command, just to pass through install. not entirely sure why that's the case. i fixed the endpoint test to work with duplication test case, although my changes may make this test less useful. either way, the duplication function and buttons work and pytest passes!

printf "#### Ensuring socket directory permissions\n"
mkdir -p /usr/local
chmod 775 /usr/local
chown root:mycodo /usr/local
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be changing the group of a user's /usr/local directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants