Skip to content

Commit d6f4051

Browse files
committed
Merge branch 'azure-devops-pipelines' of https://github.com/FlowFuse/flowfuse into azure-devops-pipelines
2 parents a6b635c + a2dfcbc commit d6f4051

96 files changed

Lines changed: 3093 additions & 1985 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ci/ci-values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ forge:
22
domain: flowfuse.dev
33
https: true
44
localPostgresql: true
5+
projectIngressClassName: traefik
56
broker:
67
enabled: true
78
teamBroker:
@@ -46,3 +47,6 @@ postgresql:
4647
key: "role"
4748
values:
4849
- "management"
50+
51+
ingress:
52+
className: traefik

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ Once you're more comfortable with FlowFuse, you may want to explore some of our
233233
## Support
234234

235235
- [Troubleshooting](/docs/debugging/)
236-
- [Community Support](https://community.flowfuse.com/)
237236
- [FlowFuse Cloud Support](/docs/premium-support/)
238237

239238
## Contributing to FlowFuse

docs/user/role-based-access-control.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ To change a team member's role:
134134

135135
Application-Level RBAC enables you to control permissions at the individual application level within a team. This allows different team members to have different permission levels for different applications without creating multiple teams.
136136

137+
This is an Enterprise lisenced feature for Self Hosted Users and requires an Entprise Team on FlowFuse Cloud.
138+
137139
### Overview
138140

139141
Team-level roles define default permissions across all resources.

forge/ee/lib/autoUpdateStacks/tasks/upgrade-stack.js

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
const { randomInt } = require('../../../../housekeeper/utils')
66

7+
// utility function to pause for a given number of ms
8+
const delay = (time) => new Promise(resolve => setTimeout(resolve, time))
9+
710
module.exports = {
811
name: 'stackUpgrade',
912
// startup: false
@@ -18,41 +21,50 @@ module.exports = {
1821
const projectList = await app.db.models.ProjectSettings.getProjectsToUpgrade(hour, day)
1922
if (projectList) {
2023
for (const project of projectList) {
21-
// we should probably rate limit this to not restart lots of projects at once
22-
if (project.Project.ProjectStack.replacedBy) {
23-
// need to add audit logging
24-
try {
25-
const newStack = await app.db.models.ProjectStack.byId(project.Project.ProjectStack.replacedBy)
26-
app.log.info(`Updating project ${project.Project.id} to stack: '${newStack.hashid}'`)
24+
if (project.Project.state !== 'suspended') {
25+
if (project.Project.ProjectStack.replacedBy) {
26+
// need to add audit logging
27+
try {
28+
const newStack = await app.db.models.ProjectStack.byId(project.Project.ProjectStack.replacedBy)
29+
app.log.info(`Updating project ${project.Project.id} to stack: '${newStack.hashid}'`)
2730

28-
const suspendOptions = {
29-
skipBilling: true
30-
}
31+
const suspendOptions = {
32+
skipBilling: true
33+
}
3134

32-
app.db.controllers.Project.setInflightState(project.Project, 'starting')
33-
const result = await suspendProject(project.Project, suspendOptions)
35+
app.db.controllers.Project.setInflightState(project.Project, 'starting')
36+
const result = await suspendProject(project.Project, suspendOptions)
3437

35-
await project.Project.setProjectStack(newStack)
36-
await project.Project.save()
38+
await project.Project.setProjectStack(newStack)
39+
await project.Project.save()
40+
// Give time for k8s to settle after suspend
41+
await delay(2000)
3742

38-
await app.auditLog.Project.project.stack.changed(null, null, project.Project, newStack)
43+
await app.auditLog.Project.project.stack.changed(null, null, project.Project, newStack)
3944

40-
await unSuspendProject(project.Project, result.resumeProject, result.targetState)
41-
} catch (err) {
42-
app.log.info(`Problem updating project ${project.Project.id} - ${err.toString()}`)
43-
}
44-
} else if (project.value.restart) {
45-
try {
46-
app.log.info(`Restarting project ${project.Project.id} as scheduled`)
47-
await app.db.controllers.Project.setInflightState(project.Project, 'restarting')
48-
project.Project.state = 'running'
49-
await project.Project.save()
50-
await app.containers.restartFlows(project.Project)
51-
await app.auditLog.Project.project.restarted(null, null, project.Project)
52-
await app.db.controllers.Project.clearInflightState(project.Project)
53-
} catch (err) {
54-
app.log.info(`Problem restarting project ${project.Project.id} - ${err.toString()}`)
45+
await unSuspendProject(project.Project, result.resumeProject, result.targetState)
46+
// Space out restarts a little to not overwhelm k8s api
47+
await delay(2000)
48+
} catch (err) {
49+
app.log.info(`Problem updating project ${project.Project.id} - ${err.toString()}`)
50+
}
51+
} else if (project.value.restart) {
52+
try {
53+
app.log.info(`Restarting project ${project.Project.id} as scheduled`)
54+
await app.db.controllers.Project.setInflightState(project.Project, 'restarting')
55+
project.Project.state = 'running'
56+
await project.Project.save()
57+
await app.containers.restartFlows(project.Project)
58+
await app.auditLog.Project.project.restarted(null, null, project.Project)
59+
await app.db.controllers.Project.clearInflightState(project.Project)
60+
// space out the Node-RED restarts a little.
61+
await delay(2000)
62+
} catch (err) {
63+
app.log.info(`Problem restarting project ${project.Project.id} - ${err.toString()}`)
64+
}
5565
}
66+
} else {
67+
app.log.info(`Project ${project.Project.id} is suspended, not upgrading stack`)
5668
}
5769
}
5870
}

frontend/src/App.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
</template>
6363

6464
<script>
65-
import { mapState } from 'pinia'
66-
import { mapActions, mapState as mapVuexState } from 'vuex'
65+
import { mapActions, mapState } from 'pinia'
66+
import { mapState as mapVuexState } from 'vuex'
6767
6868
import Loading from './components/Loading.vue'
6969
import Offline from './components/Offline.vue'
@@ -78,6 +78,7 @@ import PasswordExpired from './pages/PasswordExpired.vue'
7878
import TermsAndConditions from './pages/TermsAndConditions.vue'
7979
import UnverifiedEmail from './pages/UnverifiedEmail.vue'
8080
81+
import { useContextStore } from '@/stores/context.js'
8182
import { useUxDrawersStore } from '@/stores/ux-drawers.js'
8283
8384
export default {
@@ -144,7 +145,7 @@ export default {
144145
this.$store.dispatch('product/checkFlags')
145146
},
146147
methods: {
147-
...mapActions('context', ['updateRoute'])
148+
...mapActions(useContextStore, ['updateRoute'])
148149
}
149150
}
150151
</script>

frontend/src/components/bill-of-materials/DependencyItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import { ChevronRightIcon } from '@heroicons/vue/outline'
2626
2727
import ExternalClient from '../../api/external.js'
28-
import { pluralize } from '../../composables/String.js'
28+
import { pluralize } from '../../composables/strings/String.js'
2929
import daysSince from '../../utils/daysSince.js'
3030
3131
import VersionsList from './VersionsList.vue'

frontend/src/components/dialogs/EditApplicationPermissionsDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { defineComponent } from 'vue'
2121
import { mapState } from 'vuex'
2222
2323
import teamApi from '../../api/team.js'
24-
import { capitalize } from '../../composables/String.js'
24+
import { capitalize } from '../../composables/strings/String.js'
2525
import alerts from '../../services/alerts.js'
2626
import { RoleNames, Roles } from '../../utils/roles.js'
2727

frontend/src/components/dialogs/device-group-management/AddDeviceToGroupDialog.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,7 @@ import { ChipIcon } from '@heroicons/vue/outline'
8282
import { mapActions } from 'pinia'
8383
8484
import ApplicationAPI from '../../../api/application.js'
85-
86-
import { pluralize } from '../../../composables/String.js'
85+
import { pluralize } from '../../../composables/strings/String.js'
8786
import FfLoading from '../../Loading.vue'
8887
import NoticeBanner from '../../notices/NoticeBanner.vue'
8988
import DeployNotice from '../../notices/device-groups/DeployNotice.vue'

frontend/src/components/dialogs/device-group-management/components/device-list.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
<script>
3333
import { mapState } from 'pinia'
3434
35-
import { pluralize } from '../../../../composables/String.js'
36-
35+
import { pluralize } from '../../../../composables/strings/String.js'
3736
import FfDataTable from '../../../../ui-components/components/data-table/DataTable.vue'
3837
import Accordion from '../../../Accordion.vue'
3938

0 commit comments

Comments
 (0)