sealos
sealos copied to clipboard
feat: Anticipated Price
🤖 Generated by Copilot at 0517b2a
Summary
:moneybag::globe_with_meridians::bug:
This pull request adds a new feature to the application launchpad frontend and backend that allows users to see the estimated cost of the app resources based on their subscription plan and the source price. It also fixes some bugs and improves the UI and localization of some components. The main files involved are resourcePrice.ts
, PriceBox.tsx
, Form.tsx
, and static.ts
.
Sing, O Muse, of the skillful pull request That brought to the launchpad a wondrous feature To show the mortal users the price of their apps And the resources they consume in the cloud.
Walkthrough
- Implement the feature of displaying the estimated cost of the application resources in the frontend and backend (link, link, link, link, link, link, link, link)
- Add the
resourcePrice
API in theplatform.ts
andresourcePrice.ts
files to calculate the price of the application resources based on the user's price query CRD and the source price CRD (link, link) - Add the
getUserPrice
function in thestatic.ts
and_app.tsx
files to fetch the user's price from the backend when the application is loaded and retry in case of failure (link, link) - Add the
PriceBox
component in thePriceBox.tsx
andForm.tsx
files to display the estimated cost of the application resources based on the user's price and the source price (link, link, link) - Add the type declaration for the
resourcePriceResponse
and the initial value for theSOURCE_PRICE
variable in thestatic.ts
file to store and access the user's price and the source price (link) - Fix the localization issues in the frontend labels and texts (link, link, link, link, link, link, link, link, link, link)
- Change the labels for the deployment mode, network configuration, basic configuration, CPU value, and memory value fields to match the backend terminology, make them shorter and consistent with other labels, and remove the redundant ones (link, link, link, link, link)
- Add the labels for the total price, day, and anticipated price fields to the
common.json
files in English and Chinese to support the new feature of displaying the estimated cost of the application resources (link, link) - Change the text for the "未开启" label in the
AppMainInfo
component from Chinese to English ("Not Enabled") to fix a localization issue (link) - Change the text for the title of the
ConfigmapModal
component from "添加ConfigMap" and "修改ConfigMap" to "Add" and "Update" to make it shorter and consistent with other modals (link) - Wrap the text for the title of the
ConfigmapModal
component with thet
function to enable localization based on the user's language preference (link)
- Fix the logic and linting errors in the
ConfigmapModal
component (link, link) - Change the order of the
getServiceEnv
andgetUserPrice
functions in theuseEffect
hook of theApp
component to ensure that the user's price is fetched before the service environment is set (link)
🤖 Generated by lychee action
Summary
Status | Count |
---|---|
🔍 Total | 637 |
✅ Successful | 302 |
⏳ Timeouts | 0 |
🔀 Redirected | 0 |
👻 Excluded | 334 |
❓ Unknown | 0 |
🚫 Errors | 0 |
Full action output
Codecov Report
Patch and project coverage have no change.
Comparison is base (
b8efed9
) 72.97% compared to head (fcac3ea
) 72.97%.
:exclamation: Current head fcac3ea differs from pull request most recent head 2930e00. Consider uploading reports for the commit 2930e00 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #3357 +/- ##
=======================================
Coverage 72.97% 72.97%
=======================================
Files 8 8
Lines 618 618
=======================================
Hits 451 451
Misses 132 132
Partials 35 35
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.