Skip to content

Commit

Permalink
feat: change to projectName
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Lauber <jan.lauber@protonmail.ch>
  • Loading branch information
janlauber committed Dec 5, 2023
1 parent 8f10bfb commit 7b7021d
Show file tree
Hide file tree
Showing 10 changed files with 364 additions and 46 deletions.
44 changes: 22 additions & 22 deletions operator/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,38 @@ spec:
limits:
cpu: "200m"
memory: "256Mi"
# env:
# - name: "REFLEX_USERNAME"
# value: "admin"
# - name: DEBUG
# value: "true"
env:
- name: "REFLEX_USERNAME"
value: "admin"
- name: DEBUG
value: "true"
secrets:
- name: "REFLEX_PASSWORD"
value: "admin"
- name: "ANOTHER_SECRET"
value: "122"
# volumes:
# - name: "data"
# mountPath: "/data"
# size: "2Gi"
# storageClass: "standard"
volumes:
- name: "data"
mountPath: "/data"
size: "2Gi"
storageClass: "standard"
interfaces:
- name: "http"
port: 80
- name: "https"
port: 443
# ingress:
# ingressClass: "nginx"
# annotations:
# nginx.ingress.kubernetes.io/rewrite-target: /
# nginx.ingress.kubernetes.io/ssl-redirect: "false"
# rules:
# - host: "reflex.oneclickapps.dev"
# path: "/test"
# tls: false
# - host: "reflex.oneclickapps.dev"
# path: "/test"
# tls: false
ingress:
ingressClass: "nginx"
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
rules:
- host: "reflex.oneclickapps.dev"
path: "/test"
tls: false
- host: "reflex.oneclickapps.dev"
path: "/test"
tls: false
# - name: "https"
# port: 8443
# ingress:
Expand Down
1 change: 1 addition & 0 deletions ui/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ node_modules
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.node-red.json
6 changes: 3 additions & 3 deletions ui/frontend/src/lib/components/base/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<img src="/images/logo_background.png" class="mr-3 h-10" alt="Flowbite Logo" />
</NavBrand>
<!-- display only when under /app/projects/{id} -->
<!-- {#if $page.url.pathname.startsWith("/app/projects/")}
{#if $page.url.pathname.startsWith("/app/projects/")}
<div class="flex items-center justify-center md:order-1 cursor-pointer active:scale-105">
<Select
placeholder="Choose Project"
Expand All @@ -60,8 +60,8 @@
bind:value={$selectedProjectId}
></Select>
</div>
{/if} -->
<ComboBox />
{/if}
<!-- <ComboBox /> -->
<div class="flex items-center md:order-2 cursor-pointer active:scale-105">
<Avatar id="avatar-menu" src={avatarUrlString} />
</div>
Expand Down
37 changes: 37 additions & 0 deletions ui/pocketbase/pb_migrations/1701789066_created_manifests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const collection = new Collection({
"id": "a3bwaaqkbj0nfdu",
"created": "2023-12-05 15:11:06.505Z",
"updated": "2023-12-05 15:11:06.505Z",
"name": "manifests",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "qze3nz4j",
"name": "json",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}
],
"indexes": [],
"listRule": null,
"viewRule": null,
"createRule": null,
"updateRule": null,
"deleteRule": null,
"options": {}
});

return Dao(db).saveCollection(collection);
}, (db) => {
const dao = new Dao(db);
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu");

return dao.deleteCollection(collection);
})
33 changes: 33 additions & 0 deletions ui/pocketbase/pb_migrations/1701789139_updated_manifests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu")

// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "zrqmwzee",
"name": "rollout",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "22k6ts6gvnp46mc",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))

return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu")

// remove
collection.schema.removeField("zrqmwzee")

return dao.saveCollection(collection)
})
87 changes: 87 additions & 0 deletions ui/pocketbase/pb_migrations/1701789200_updated_manifests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu")

// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "e70d5dls",
"name": "active",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))

// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "zrqmwzee",
"name": "rollout",
"type": "relation",
"required": true,
"presentable": false,
"unique": false,
"options": {
"collectionId": "22k6ts6gvnp46mc",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))

// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "qze3nz4j",
"name": "json",
"type": "json",
"required": true,
"presentable": false,
"unique": false,
"options": {}
}))

return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu")

// remove
collection.schema.removeField("e70d5dls")

// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "zrqmwzee",
"name": "rollout",
"type": "relation",
"required": false,
"presentable": false,
"unique": false,
"options": {
"collectionId": "22k6ts6gvnp46mc",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
}))

// update
collection.schema.addField(new SchemaField({
"system": false,
"id": "qze3nz4j",
"name": "json",
"type": "json",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))

return dao.saveCollection(collection)
})
63 changes: 63 additions & 0 deletions ui/pocketbase/pb_migrations/1701789274_updated_manifests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu")

// remove
collection.schema.removeField("e70d5dls")

// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "nrwdaqpz",
"name": "startDate",
"type": "date",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
}))

// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "grnqhwti",
"name": "endDate",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
}))

return dao.saveCollection(collection)
}, (db) => {
const dao = new Dao(db)
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu")

// add
collection.schema.addField(new SchemaField({
"system": false,
"id": "e70d5dls",
"name": "active",
"type": "bool",
"required": false,
"presentable": false,
"unique": false,
"options": {}
}))

// remove
collection.schema.removeField("nrwdaqpz")

// remove
collection.schema.removeField("grnqhwti")

return dao.saveCollection(collection)
})
79 changes: 79 additions & 0 deletions ui/pocketbase/pb_migrations/1701789313_deleted_manifests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/// <reference path="../pb_data/types.d.ts" />
migrate((db) => {
const dao = new Dao(db);
const collection = dao.findCollectionByNameOrId("a3bwaaqkbj0nfdu");

return dao.deleteCollection(collection);
}, (db) => {
const collection = new Collection({
"id": "a3bwaaqkbj0nfdu",
"created": "2023-12-05 15:11:06.505Z",
"updated": "2023-12-05 15:14:34.816Z",
"name": "manifests",
"type": "base",
"system": false,
"schema": [
{
"system": false,
"id": "zrqmwzee",
"name": "rollout",
"type": "relation",
"required": true,
"presentable": false,
"unique": false,
"options": {
"collectionId": "22k6ts6gvnp46mc",
"cascadeDelete": false,
"minSelect": null,
"maxSelect": 1,
"displayFields": null
}
},
{
"system": false,
"id": "qze3nz4j",
"name": "json",
"type": "json",
"required": true,
"presentable": false,
"unique": false,
"options": {}
},
{
"system": false,
"id": "nrwdaqpz",
"name": "startDate",
"type": "date",
"required": true,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
},
{
"system": false,
"id": "grnqhwti",
"name": "endDate",
"type": "date",
"required": false,
"presentable": false,
"unique": false,
"options": {
"min": "",
"max": ""
}
}
],
"indexes": [],
"listRule": null,
"viewRule": null,
"createRule": null,
"updateRule": null,
"deleteRule": null,
"options": {}
});

return Dao(db).saveCollection(collection);
})
Loading

0 comments on commit 7b7021d

Please sign in to comment.