Skip to content
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

Scope updates #63

Merged
merged 2 commits into from
Aug 11, 2022
Merged

Scope updates #63

merged 2 commits into from
Aug 11, 2022

Conversation

ryanmelt
Copy link
Member

Updates to make scopes work as desired.

@ryanmelt ryanmelt requested a review from jmthomas August 11, 2022 04:12
@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2022

Codecov Report

Merging #63 (7779368) into master (726eaa5) will decrease coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
- Coverage   77.77%   77.73%   -0.05%     
==========================================
  Files         238      238              
  Lines       18555    18575      +20     
==========================================
+ Hits        14432    14439       +7     
- Misses       4123     4136      +13     
Impacted Files Coverage Δ
lib/openc3/models/scope_model.rb 73.07% <0.00%> (-13.13%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

def destroy
return unless authorization('superadmin')
begin
result = OpenC3::ProcessManager.instance.spawn(["ruby", "/openc3/bin/openc3cli", "destroyscope", params[:id]], "scope_uninstall", params[:id], Time.now + 2.hours, scope: 'DEFAULT')
Copy link
Member

Choose a reason for hiding this comment

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

Seems weird to have to give a scope: 'DEFAULT' to the process to destroy scopes

Copy link
Member Author

Choose a reason for hiding this comment

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

The DEFAULT scope is also going to be the kindof "global scope" that owns Scopes and Roles.

@@ -255,6 +255,8 @@ export default {
'openc3-tool-tablemanager',
'openc3-tool-tlmgrapher',
'openc3-tool-tlmviewer',
'openc3-enterprise-tool-base',
'openc3-enterprise-tool-admin',
Copy link
Member

Choose a reason for hiding this comment

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

I don't think these should be here

Copy link
Member Author

Choose a reason for hiding this comment

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

The alternative is copy this whole file into enterprise and then add in the differences, or come up with some sort of included subfile. This is the simplest for now and we can cleanup later.

@ryanmelt ryanmelt merged commit 735dbbe into master Aug 11, 2022
@ryanmelt ryanmelt deleted the scope_updates branch August 11, 2022 22:48
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.

3 participants