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

Admin updates #1707

Merged
merged 8 commits into from
Jun 25, 2022
Merged

Admin updates #1707

merged 8 commits into from
Jun 25, 2022

Conversation

ryanmelt
Copy link
Contributor

This adds support for the same gem installed multiple times. It also supports changing plugin.txt at install time.
This paves the way for overall configuration import/export (will be the next ticket)

@ryanmelt ryanmelt requested a review from jmthomas June 22, 2022 13:57
@codecov
Copy link

codecov bot commented Jun 23, 2022

Codecov Report

Merging #1707 (d26b0f3) into master (bbf776b) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1707      +/-   ##
==========================================
- Coverage   78.24%   78.22%   -0.03%     
==========================================
  Files         235      235              
  Lines       18151    18188      +37     
==========================================
+ Hits        14203    14228      +25     
- Misses       3948     3960      +12     
Impacted Files Coverage Δ
lib/cosmos/models/plugin_model.rb 88.73% <0.00%> (-6.69%) ⬇️
lib/cosmos/models/model.rb 90.80% <0.00%> (-0.77%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbf776b...d26b0f3. Read the comment docs.

Copy link
Contributor

@jmthomas jmthomas left a comment

Choose a reason for hiding this comment

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

Make sure playwright runs!

@@ -18,7 +18,7 @@
-->

<template>
<v-dialog persistent v-model="show" width="600">
<v-dialog :persistent="!readonly" v-model="show" width="600">
Copy link
Contributor

Choose a reason for hiding this comment

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

When is it readonly? read only plugin?

</template>
<span>Delete Interface</span>
</v-tooltip>
</v-list-item-icon>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't remember why you said you removed all the delete buttons / methods?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the plugin.txt captures the config. That is what needs to be changed to remove targets etc.

show-size
accept=".gem"
class="mx-2"
label="Click to select plugin .gem file(s)"
label="Click to select plugin .gem file to install"
Copy link
Contributor

Choose a reason for hiding this comment

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

New method requires a single upload at a time? I don't think that's a bad thing, just wondering.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it was too complicated with multiple gems and dealing with plugin.txt + variables


# Extract gem and process plugin.txt to determine what VARIABLEs need to be filled in
pkg = Gem::Package.new(gem_file_path)
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

diff

end
end

# Called by the PluginsController to create the plugin
# Because this uses ERB it must be run in a seperate process from the API to
# prevent corruption and single require problems in the current proces
def self.install_phase2(name, variables, scope:, gem_file_path: nil, validate_only: false)
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

diff

@ryanmelt ryanmelt merged commit 69ef6a8 into master Jun 25, 2022
@ryanmelt ryanmelt deleted the admin_updates branch June 25, 2022 03:04
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