Skip to content

Commit 526ed0a

Browse files
author
Andrei Neagu
committed
Merge remote-tracking branch 'upstream/master' into pr-osparc-stream-zipping-of-s3-content
2 parents 2c2d2db + 2305d68 commit 526ed0a

File tree

29 files changed

+731
-180
lines changed

29 files changed

+731
-180
lines changed

.env-devel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ FUNCTION_SERVICES_AUTHORS='{"UN": {"name": "Unknown", "email": "[email protected]
141141

142142
WEBSERVER_LICENSES={}
143143
LICENSES_ITIS_VIP_SYNCER_ENABLED=false
144+
LICENSES_ITIS_VIP_SYNCER_PERIODICITY=1D00:00:00
144145
LICENSES_ITIS_VIP_API_URL=https://replace-with-itis-api/{category}
145146
LICENSES_ITIS_VIP_CATEGORIES='{"HumanWholeBody": "Humans", "HumanBodyRegion": "Humans (Region)", "AnimalWholeBody": "Animal"}'
146147
LICENSES_SPEAG_PHANTOMS_API_URL=https://replace-with-speag-api/{category}

packages/models-library/src/models_library/api_schemas_webserver/licensed_items.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class LicensedItemRpcGet(BaseModel):
2828
licensed_resource_type: LicensedResourceType
2929
licensed_resources: list[dict[str, Any]]
3030
pricing_plan_id: PricingPlanId
31+
is_hidden_on_market: bool
3132
created_at: datetime
3233
modified_at: datetime
3334

@@ -42,6 +43,7 @@ class LicensedItemRpcGet(BaseModel):
4243
"licensed_resource_type": f"{LicensedResourceType.VIP_MODEL}",
4344
"licensed_resources": [cast(JsonDict, VIP_DETAILS_EXAMPLE)],
4445
"pricing_plan_id": "15",
46+
"is_hidden_on_market": False,
4547
"created_at": "2024-12-12 09:59:26.422140",
4648
"modified_at": "2024-12-12 09:59:26.422140",
4749
}

packages/models-library/src/models_library/licenses.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class LicensedItemDB(BaseModel):
8181

8282
pricing_plan_id: PricingPlanId
8383
product_name: ProductName
84+
is_hidden_on_market: bool
8485

8586
# states
8687
created: datetime
@@ -124,6 +125,7 @@ class LicensedItem(BaseModel):
124125
licensed_resource_type: LicensedResourceType
125126
licensed_resources: list[dict[str, Any]]
126127
pricing_plan_id: PricingPlanId
128+
is_hidden_on_market: bool
127129
created_at: datetime
128130
modified_at: datetime
129131

@@ -149,6 +151,7 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
149151
)
150152
],
151153
"pricing_plan_id": "15",
154+
"is_hidden_on_market": False,
152155
"created_at": "2024-12-12 09:59:26.422140",
153156
"modified_at": "2024-12-12 09:59:26.422140",
154157
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
"""add is_hidden_on_market field
2+
3+
Revision ID: e8ffc0c96336
4+
Revises: a53c3c153bc8
5+
Create Date: 2025-02-13 18:05:42.851252+00:00
6+
7+
"""
8+
import sqlalchemy as sa
9+
from alembic import op
10+
11+
# revision identifiers, used by Alembic.
12+
revision = "e8ffc0c96336"
13+
down_revision = "a53c3c153bc8"
14+
branch_labels = None
15+
depends_on = None
16+
17+
18+
def upgrade():
19+
# ### commands auto generated by Alembic - please adjust! ###
20+
op.add_column(
21+
"licensed_items",
22+
sa.Column(
23+
"is_hidden_on_market",
24+
sa.Boolean(),
25+
server_default=sa.text("false"),
26+
nullable=False,
27+
),
28+
)
29+
# ### end Alembic commands ###
30+
31+
32+
def downgrade():
33+
# ### commands auto generated by Alembic - please adjust! ###
34+
op.drop_column("licensed_items", "is_hidden_on_market")
35+
# ### end Alembic commands ###

packages/postgres-database/src/simcore_postgres_database/models/licensed_items.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ class LicensedResourceType(str, enum.Enum):
6969
nullable=False,
7070
doc="Product name identifier. If None, then the item is not exposed",
7171
),
72+
sa.Column(
73+
"is_hidden_on_market",
74+
sa.Boolean(),
75+
nullable=False,
76+
server_default=sa.text("false"),
77+
doc="If true, the item is not listed on the market. (Public API might want to see all of them, even if they are not listed on the Market)",
78+
),
7279
column_created_datetime(timezone=True),
7380
column_modified_datetime(timezone=True),
7481
sa.Index("idx_licensed_items_key_version", "key", "version", unique=True),

services/api-server/openapi.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6716,6 +6716,10 @@
67166716
"title": "Pricing Plan Id",
67176717
"minimum": 0
67186718
},
6719+
"is_hidden_on_market": {
6720+
"type": "boolean",
6721+
"title": "Is Hidden On Market"
6722+
},
67196723
"created_at": {
67206724
"type": "string",
67216725
"format": "date-time",
@@ -6736,6 +6740,7 @@
67366740
"licensed_resource_type",
67376741
"licensed_resources",
67386742
"pricing_plan_id",
6743+
"is_hidden_on_market",
67396744
"created_at",
67406745
"modified_at"
67416746
],

services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ class LicensedItemGet(BaseModel):
148148
licensed_resource_type: LicensedResourceType
149149
licensed_resources: list[dict[str, Any]]
150150
pricing_plan_id: PricingPlanId
151+
is_hidden_on_market: bool
151152
created_at: datetime
152153
modified_at: datetime
153154
model_config = ConfigDict(

services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def _create_licensed_items_get_page(
6464
licensed_resource_type=elm.licensed_resource_type,
6565
licensed_resources=elm.licensed_resources,
6666
pricing_plan_id=elm.pricing_plan_id,
67+
is_hidden_on_market=elm.is_hidden_on_market,
6768
created_at=elm.created_at,
6869
modified_at=elm.modified_at,
6970
)

services/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ services:
727727

728728
WEBSERVER_LICENSES: ${WEBSERVER_LICENSES}
729729
LICENSES_ITIS_VIP_SYNCER_ENABLED : ${LICENSES_ITIS_VIP_SYNCER_ENABLED}
730+
LICENSES_ITIS_VIP_SYNCER_PERIODICITY: ${LICENSES_ITIS_VIP_SYNCER_PERIODICITY}
730731
LICENSES_ITIS_VIP_API_URL: ${LICENSES_ITIS_VIP_API_URL}
731732
LICENSES_ITIS_VIP_CATEGORIES: ${LICENSES_ITIS_VIP_CATEGORIES}
732733
LICENSES_SPEAG_PHANTOMS_API_URL: ${LICENSES_SPEAG_PHANTOMS_API_URL}

services/static-webserver/client/source/class/osparc/desktop/credits/BillingCenter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ qx.Class.define("osparc.desktop.credits.BillingCenter", {
3636

3737
if (osparc.product.Utils.showS4LStore()) {
3838
this.__addPurchasesPage();
39-
this.__addCheckoutsPage();
39+
// For now, do not add checkouts page
40+
// this.__addCheckoutsPage();
4041
}
4142
},
4243

@@ -102,7 +103,7 @@ qx.Class.define("osparc.desktop.credits.BillingCenter", {
102103

103104
__addPurchasesPage: function() {
104105
const title = this.tr("Purchases");
105-
const iconSrc = "@FontAwesome5Solid/list/22";
106+
const iconSrc = "@FontAwesome5Solid/shopping-bag/22";
106107
const purchases = new osparc.desktop.credits.Purchases();
107108
const page = this.addTab(title, iconSrc, purchases);
108109
return page;

0 commit comments

Comments
 (0)