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

feat: Block api feature using licenses, show notice page for trial cloud users #6187

Merged
merged 17 commits into from
May 15, 2023

Conversation

mutdmour
Copy link
Contributor

@mutdmour mutdmour commented May 5, 2023

Github issue / Community forum post (link here to close automatically):

@mutdmour mutdmour requested a review from a team as a code owner May 5, 2023 09:23
@CLAassistant
Copy link

CLAassistant commented May 5, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching **/*.vue:

  • Used composition API for all new components.
  • Added component or unit tests to cover functionality.

Files matching packages/editor-ui/**/*.vue:

  • Added E2E if adding new features.
  • Used design system tokens (colors, spacings...) where possible.

Make sure to check off this list before asking for review.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels May 5, 2023
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Patch coverage: 36.06% and no project coverage change.

Comparison is base (d30632e) 27.77% compared to head (3d1b0ec) 27.77%.

Additional details and impacted files
@@                            Coverage Diff                            @@
##           ado-638-in-app-build-ui-for-upgrade-path    #6187   +/-   ##
=========================================================================
  Coverage                                     27.77%   27.77%           
=========================================================================
  Files                                          2941     2941           
  Lines                                        180422   180463   +41     
  Branches                                      19548    19550    +2     
=========================================================================
+ Hits                                          50108    50123   +15     
- Misses                                       129583   129608   +25     
- Partials                                        731      732    +1     
Impacted Files Coverage Δ
packages/cli/src/License.ts 56.17% <0.00%> (-1.30%) ⬇️
packages/cli/src/Server.ts 0.00% <0.00%> (ø)
packages/editor-ui/src/App.vue 0.00% <0.00%> (ø)
packages/editor-ui/src/stores/n8nRoot.store.ts 91.59% <0.00%> (ø)
packages/editor-ui/src/stores/cloudPlan.store.ts 20.48% <5.88%> (-2.38%) ⬇️
packages/cli/src/PublicApi/index.ts 73.68% <33.33%> (-4.75%) ⬇️
packages/editor-ui/src/views/SettingsApiView.vue 63.67% <55.00%> (-1.21%) ⬇️
packages/editor-ui/src/constants.ts 97.86% <60.00%> (-0.35%) ⬇️
packages/cli/src/audit/risks/instance.risk.ts 87.50% <100.00%> (+0.15%) ⬆️
packages/cli/src/constants.ts 100.00% <100.00%> (ø)
... and 2 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@RicardoE105 RicardoE105 force-pushed the ado-638-in-app-build-ui-for-upgrade-path branch from d6ef52a to b765867 Compare May 6, 2023 20:53
@mutdmour mutdmour changed the title Ado 646 feat: Block api feature using licenses, show notice page for trial cloud users May 12, 2023
@mutdmour mutdmour merged commit d2a77ab into ado-638-in-app-build-ui-for-upgrade-path May 15, 2023
10 checks passed
@mutdmour mutdmour deleted the ado-646 branch May 15, 2023 10:05
RicardoE105 added a commit that referenced this pull request May 15, 2023
…es (#6159)

* Add ExecutionsUsage component

* set $sidebar-expanded-width back to 200px

* add days using interpolation

* Rename PlanData type to CloudPlanData

* Rename Metadata type to PlanMetadata

* Make prop block in the update button

* Use variable in line-height

* Remove progressBarSection class

* fix trial expiration calculation

* mock expirationDate and fix issue with days left

* Remove unnecesary property from class .container

* inject component data via props

* Check for plan data during app mounting and keep data in the store

* Remove mounted hook

* redirect when upgrade plan is clicked

* Remove computed properties

* Remove instance property as it's not needed anymore

* Flatten plan object

* remove console.log

* Add all cloud types within its own namespace

* keep redirection inside component

* get computed properties back

* Improve polling logic

* Move cloudData to its own store

* Remove commented interfaces

* remove cloudPlan from user store

* fix imports

* update logic for userIsTrialing method

* centralize userIsTrialing method

* redirect to production change plan page always

* Call staging or production cloud api depending on base URL

* remove setting store form ExecutionUsage.vue

* fix linting issue

* Add trial group to PlanMetadata group

* Move helpers into the store

* make staging url check more specific

* make cloud state nullable

* fix linting issue

* swap mockup date for endpoint

* Make getCurrentPlan async

* asas

* Improvements

* small improvements

* chore: resolve conflicts

* make sure there is data before calculating trial expiration

* Fix issue with component not loading on first page load

* type safety improvements

* apply component ui feedback

* fix linting issue

* chore: clean up unnecessary change from merge conflict

* feat: Block api feature using licenses, show notice page for trial cloud users (#6187)

* rename planSpec to plan

* Remove instance property as it's not needed anymore

* Flatten plan object

* remove console.log

* feat: disable api using license

* feat: add api page

* chore: resolve conflicts

* chore: resolve conflicts

* feat: update and refactor a bit

* fix: update endpoints

* fix: update endpoints

* fix: use host

* feat: update copy

* fix linting issues

---------

Co-authored-by: ricardo <ricardoespinoza105@gmail.com>

* add pluralization to days left text

---------

Co-authored-by: Mutasem <mutdmour@gmail.com>
Co-authored-by: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants