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

Deploy 2024-11-12 #1891

Merged
merged 26 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4d9f9a6
[UXE-5512] fix: adjust loop requests waf filter (#1855)
lucasmendes21 Oct 29, 2024
6de0897
fix: more details render empty in real time events (#1857)
lucasmendes21 Oct 29, 2024
fb38c97
feat: added new custom ports to edge application form
peterpaulo-azion Oct 30, 2024
da0995a
Merge pull request #1860 from aziontech/new-custom-ports-to-edge-app
peterpaulo-azion Oct 30, 2024
109da93
feat: added marketplace products to sidebar menu with flag
peterpaulo-azion Oct 30, 2024
ec43ce9
chore: lint files
peterpaulo-azion Oct 30, 2024
7191e43
chore: remove vite timestamp
peterpaulo-azion Oct 30, 2024
c00a2df
fix: invoice details section not load values service and product char…
lucasmendes21 Oct 30, 2024
cc908c4
[UXE-5515] feat: enable identify event on each page change for appcue…
lucasmendes21 Oct 31, 2024
136d940
[NO-ISSUE] chore: Update IaC for production (#1868)
vinigfer Oct 31, 2024
87366c4
refactor: get menu itens function
peterpaulo-azion Oct 31, 2024
1291dd7
[UXE-5470] feat: remove domains from edge firewall and add edge firew…
aloisio-m-bastian Oct 31, 2024
37710e5
[UXE-5554] feat: added no cache browser option to cache settings (#1867)
peterpaulo-azion Oct 31, 2024
d88de1e
Merge pull request #1864 from aziontech/add-new-links-to-sidebar-menu
peterpaulo-azion Oct 31, 2024
37ac637
[UXE-5553] feat: add sampling behavior to datastream form (#1873)
aloisio-m-bastian Nov 4, 2024
b085a67
[UXE-5550] feat: Block users with more than 2999 domains to acess dat…
aloisio-m-bastian Nov 4, 2024
73c18c2
[UXE-5541] feat: migrate domains to workloads in real time metrics (#…
peterpaulo-azion Nov 4, 2024
b3ceeb9
fix: request workloads just when target route is data stream (#1881)
aloisio-m-bastian Nov 6, 2024
6ab1887
feat: add menu option to manage accounts depending on the account typ…
aloisio-m-bastian Nov 6, 2024
393616f
[NO-ISSUE] feat: disable sorting for specific columns in list views (…
HerbertJulio Nov 8, 2024
8060531
[UXE-5580] feat: add reseller, group and client management list views…
aloisio-m-bastian Nov 8, 2024
351180a
[UXE-4355] feat: billing - use new accounting GQL endpoint for regula…
lucasmendes21 Nov 8, 2024
5cf31c8
[UXE-5544] fix: Bot Manager (Radware) URL (#1892)
vinigfer Nov 8, 2024
3314ff0
[NO-ISSUE] chore: Update IaC for Stage env (#1893)
vinigfer Nov 8, 2024
3fdb404
[UXE-5525] fix: Some custom ports not selecting when editing Edge App…
pauloSF0 Nov 11, 2024
639dbf8
[UXE-5554] fix: Not showing the No Cache value on Cache Settings List…
pauloSF0 Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions azion.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,19 @@ const backRules = [
rewrite: '/billing/graphql'
}
},
{
name: 'Route GraphQL Accounting Queries to Manager Origin',
description: 'Routes GraphQL Accounting queries to the Manager, updating the URI accordingly',
match: '^/graphql/accounting',
behavior: {
forwardCookies: true,
setOrigin: {
name: 'origin-manager',
type: 'single_origin'
},
rewrite: '/accounting/graphql'
}
},
{
name: 'Route Send Feedback',
description: 'this route will send user feedback to jira',
Expand Down
5 changes: 5 additions & 0 deletions azion/production/azion.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@
"id": 297983,
"name": "Route Send Feedback",
"phase": "request"
},
{
"id": 313139,
"name": "Route API Identity Providers",
"phase": "request"
}
]
},
Expand Down
5 changes: 5 additions & 0 deletions azion/stage/azion.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@
"id": 312030,
"name": "Route API Identity Providers",
"phase": "request"
},
{
"id": 317377,
"name": "Route GraphQL Accounting Queries to Manager Origin",
"phase": "request"
}
]
},
Expand Down
16 changes: 14 additions & 2 deletions cypress/e2e/domains/create-domain-edge-application.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import generateUniqueName from '../../support/utils'
let domainName
let edgeAppName
let digitalCertificateName
let firewallName
const createEdgeApplicationCase = () => {
edgeAppName = generateUniqueName('EdgeApp')
firewallName = generateUniqueName('EdgeFirewall')
// Arrange
cy.get(selectors.edgeApplication.mainSettings.nameInput).type(edgeAppName)
cy.get(selectors.edgeApplication.mainSettings.addressInput).type(`${edgeAppName}.edge.app`)
Expand All @@ -17,6 +19,14 @@ const createEdgeApplicationCase = () => {
cy.verifyToast('success', 'Your edge application has been created')
}

const createEdgeFirewallCase = () => {
cy.get(selectors.edgeFirewall.nameInput).clear()
cy.get(selectors.edgeFirewall.nameInput).type(firewallName)
cy.intercept('GET', '/api/v3/edge_firewall*').as('getEdgeFirewallApi')
cy.get(selectors.domains.edgeFirewallActionBar).find(selectors.form.actionsSubmitButton).click()
cy.wait('@getEdgeFirewallApi')
}

const createDigitalCertificateCase = () => {
digitalCertificateName = generateUniqueName('digitalCertificate')
cy.get(selectors.digitalCertificates.digitalCertificateName).type(digitalCertificateName)
Expand Down Expand Up @@ -60,8 +70,10 @@ describe('Domains spec', { tags: ['@dev3'] }, () => {
cy.get(selectors.domains.edgeApplicationField).click()
cy.get(selectors.domains.createEdgeApplicationButton).click()
createEdgeApplicationCase()
cy.get(selectors.domains.cnamesField).type(`${domainName}.edge.app`)

cy.get(selectors.domains.edgeFirewallField).click()
cy.get(selectors.domains.createEdgeFirewallButton).click()
createEdgeFirewallCase()
cy.get(selectors.domains.cnameAccessOnlyField).click()
cy.get(selectors.domains.digitalCertificateDropdown).click()
cy.get(selectors.domains.createDigitalCertificateButton).click()
createDigitalCertificateCase()
Expand Down
4 changes: 4 additions & 0 deletions cypress/support/selectors/product-selectors/domains.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ export default {
edgeApplicationField: '[data-testid="domains-form__edge-application-field__dropdown"]',
edgeApplicationDropdownFilter:
'[data-testid="domains-form__edge-application-field__dropdown-filter-input"]',
edgeFirewallField: '[data-testid="domains-form__edge-firewall-field__dropdown"]',
mtlsTrustedCADropdownFilter:
'[data-testid="domains-form__mtls-trusted-certificate-field__dropdown-filter-input"]',
edgeApplicationOption: '#edgeApplication_0',
edgeCertificateOption: '#edgeCertificate_0',
cnamesField: '[data-testid="domains-form__cnames-field__textarea"]',
createEdgeApplicationButton: '[data-testid="domains-form__create-edge-application-button"]',
createEdgeFirewallButton: '[data-testid="domains-form__create-edge-firewall-button"]',
edgeApplicationDrawer: '.p-sidebar-content',
dialogTitle: '[data-testid="domains-view__copy-domain-dialog__header-title"]',
domainField: '[data-testid="domains-dialog__domain-field__input"]',
digitalCertificateDropdownFilter:
'[data-testid="domains-form__edge-certificate-field__dropdown-filter-input"]',
createDigitalCertificateButton: '[data-testid="domains-form__create-digital-certificate-button"]',
digitalCertificateActionBar: '[data-testid="digital-certificates-drawer__action-bar"]',
edgeFirewallActionBar: '[data-testid="edge-firewall-drawer__action-bar"]',
cnameAccessOnlyField: '[data-testid="domains-form__cname-access-only-field"]',
copyDomainButton: '[data-testid="domains-dialog__copy-domain__button"]',
confirmButton: '[data-testid="domains-dialog__confirm__button"]',
pageTitle: (entityName) => `[data-testid="page_title_${entityName}"]`,
Expand Down
22 changes: 22 additions & 0 deletions src/helpers/convert-array-objects-to-camel-case.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { parseSnakeToCamel } from './parse-api-body'

/**
* Converts all properties of an array of objects from snake_case to camelCase, including nested objects
* @param {Array<Object>} arrayOfObjects - Array containing objects with properties in snake_case
* @returns {Array<Object>} - New array with objects containing properties in camelCase
*/
export const convertArrayObjectsToCamelCase = (arrayOfObjects) => {
return arrayOfObjects.map((object) => {
const convertedObject = {}
for (const key in object) {
const camelKey = key.replace(/_([a-z])/g, (match) => match[1].toUpperCase())
convertedObject[camelKey] =
typeof object[key] === 'object' && object[key] !== null
? Array.isArray(object[key])
? convertArrayObjectsToCamelCase(object[key])
: parseSnakeToCamel(object[key])
: object[key]
}
return convertedObject
})
}
19 changes: 19 additions & 0 deletions src/helpers/make-list-service-query-params.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Creates URLSearchParams object for list service queries
* @param {Object} params - Query parameters
* @param {string} params.fields - Fields to return
* @param {string} params.ordering - Field to order by
* @param {number} params.page - Page number
* @param {number} params.pageSize - Items per page
* @returns {URLSearchParams} URLSearchParams object
*/
export const makeListServiceQueryParams = ({ fields, ordering, page, pageSize, search }) => {
const searchParams = new URLSearchParams()

if (fields) searchParams.append('fields', fields)
if (ordering) searchParams.append('ordering', ordering)
if (page) searchParams.append('page', page.toString())
if (pageSize) searchParams.append('page_size', pageSize.toString())
if (search) searchParams.append('search', search)
return searchParams
}
11 changes: 11 additions & 0 deletions src/helpers/payment-history.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const getLastDayMonth = () => {
const today = new Date()
const year = today.getFullYear()
const month = today.getMonth()

const dateFinal = new Date(year, month + 1, 0)

return dateFinal.toISOString().split('T')[0]
}

export { getLastDayMonth }
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {
searchEdgeFunctionsService,
searchDomainsService,
searchEdgeDnsService,
searchBotCategoryService,
searchChallengeSolvedService,
searchClassifiedService,
searchActionService
searchActionService,
searchWorkloadsService
} from '@/services/real-time-metrics-services'

const MAP_SERVICE_OPERATION = {
configurationIdIn: searchDomainsService,
configurationIdIn: searchWorkloadsService,
zoneIdIn: searchEdgeDnsService,
edgeFunctionIdIn: searchEdgeFunctionsService,
botCategoryIn: searchBotCategoryService,
Expand Down
3 changes: 2 additions & 1 deletion src/router/hooks/afterEachRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { inject } from 'vue'
/** @type {import('vue-router').NavigationHookAfter} */
export default function afterEachRoute(to, from, failure) {
const loadingStore = useLoadingStore()
const { hasActiveUserId } = useAccountStore()
const { hasActiveUserId, userId } = useAccountStore()
loadingStore.finishLoading()

if (failure || !hasActiveUserId) return
Expand All @@ -17,4 +17,5 @@ export default function afterEachRoute(to, from, failure) {
url: to.fullPath
})
.track()
tracker.identify(userId)
}
4 changes: 3 additions & 1 deletion src/router/hooks/beforeEachRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
billingGuard,
redirectGuard,
redirectToManagerGuard,
ssoManagementGuard
ssoManagementGuard,
domainsLimitGuard
} from '@/router/hooks/guards'
import { useHelpCenterStore } from '@/stores/help-center'
import { useRouter } from 'vue-router'
Expand All @@ -24,6 +25,7 @@ export default async function beforeEachRoute(guardDependency) {
billingGuard,
redirectGuard,
ssoManagementGuard,
domainsLimitGuard,
redirectToManagerGuard
]

Expand Down
2 changes: 1 addition & 1 deletion src/router/hooks/guards/SSOManagementGuard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export function ssoManagementGuard({ to, accountStore }) {
if (to.fullPath.includes('identity-providers') && !accountStore.hasAccessToSSOManagement) {
return '/'
}
}
}
15 changes: 1 addition & 14 deletions src/router/hooks/guards/billingGuard.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
import { billingRoutes } from '@/router/routes/billing-routes'
import { getStaticUrlsByEnvironment } from '@/helpers'

const BILLING_REDIRECT_OPTIONS = {
path: `${billingRoutes.path}/payment`,
query: { paymentSession: 'true' }
}

const billingUrl = getStaticUrlsByEnvironment('billing')

/** @type {import('vue-router').NavigationGuardWithThis} */
export async function billingGuard({ to, accountStore }) {
const {
hasActiveUserId,
redirectToExternalBillingNeeded,
billingAccessPermitted,
paymentReviewPending
} = accountStore
const { hasActiveUserId, billingAccessPermitted, paymentReviewPending } = accountStore

const isPrivateRoute = !to.meta.isPublic
const isCurrentRouteBilling = to.fullPath.includes(billingRoutes.path)

if (isPrivateRoute && hasActiveUserId) {
if (isCurrentRouteBilling) {
if (redirectToExternalBillingNeeded) {
window.open(billingUrl, '_blank')
return false
}

if (!billingAccessPermitted) {
return '/'
}
Expand Down
24 changes: 24 additions & 0 deletions src/router/hooks/guards/domainsLimitGuard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { listWorkloadsService } from '@/services/workloads-services'
/** @type {import('vue-router').NavigationGuardWithThis} */

export async function domainsLimitGuard({ to, accountStore }) {
const { hasActiveUserId } = accountStore
if (!hasActiveUserId) {
return true
}

const isCreateOrEditDataStream =
to.name === 'create-data-stream' || to.name === 'edit-data-stream'
if (isCreateOrEditDataStream) {
const workloads = await listWorkloadsService({
fields: 'id',
ordering: 'id',
page: 1,
pageSize: 1
})
const isMaxDomainsReached = workloads.count >= 3000
if (isMaxDomainsReached) {
return '/'
}
}
}
5 changes: 3 additions & 2 deletions src/router/hooks/guards/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { billingGuard } from './billingGuard'
import { redirectGuard } from './redirectGuard'
import { redirectToManagerGuard } from './redirectToManagerGuard'
import { ssoManagementGuard } from './SSOManagementGuard'

import { domainsLimitGuard } from './domainsLimitGuard'
export {
logoutGuard,
loadingGuard,
Expand All @@ -15,5 +15,6 @@ export {
billingGuard,
redirectGuard,
redirectToManagerGuard,
ssoManagementGuard
ssoManagementGuard,
domainsLimitGuard
}
9 changes: 7 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { edgeApplicationRoutes } from '@routes/edge-application-routes'
import { edgeFirewallRoutes } from '@routes/edge-firewall-routes'
import { edgeFunctionsRoutes } from '@routes/edge-functions-routes'
import { edgeNodeRoutes } from '@routes/edge-node-routes'
import { resellerManagementRoutes } from '@routes/reseller-management-routes'
import { edgePulseRoutes } from '@routes/edge-pulse-routes'
import { edgeServicesRoutes } from '@routes/edge-services-routes'
import { errorRoutes } from '@routes/error-routes'
Expand Down Expand Up @@ -44,7 +45,8 @@ import beforeEachRoute from './hooks/beforeEachRoute'
import { useAccountStore } from '@/stores/account'
import { identityProvidersRoutes } from '@routes/identity-providers-routes'
import { loadContractServicePlan } from '@/services/contract-services'

import { groupManagementRoutes } from '@routes/group-management-routes'
import { clientManagementRoutes } from '@routes/client-management-routes'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
Expand Down Expand Up @@ -85,7 +87,10 @@ const router = createRouter({
billingRoutes,
importGithubRoutes,
azionAiRoutes,
compareWithAzionRoutes
compareWithAzionRoutes,
resellerManagementRoutes,
groupManagementRoutes,
clientManagementRoutes
].concat(errorRoutes)
})

Expand Down
20 changes: 20 additions & 0 deletions src/router/routes/client-management-routes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import('vue-router').RouteRecordRaw} */
export const clientManagementRoutes = {
path: '/client/management',
name: 'client-management',
children: [
{
path: '',
name: 'client-management',
component: () => import('@views/ClientManagement/ListView.vue'),
meta: {
breadCrumbs: [
{
label: 'Client Management',
to: '/client/management'
}
]
}
}
]
}
20 changes: 20 additions & 0 deletions src/router/routes/group-management-routes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import('vue-router').RouteRecordRaw} */
export const groupManagementRoutes = {
path: '/group/management',
name: 'group-management',
children: [
{
path: '',
name: 'group-management',
component: () => import('@views/GroupManagement/ListView.vue'),
meta: {
breadCrumbs: [
{
label: 'Group Management',
to: '/group/management'
}
]
}
}
]
}
20 changes: 20 additions & 0 deletions src/router/routes/reseller-management-routes/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type {import('vue-router').RouteRecordRaw} */
export const resellerManagementRoutes = {
path: '/reseller/management',
name: 'reseller-management',
children: [
{
path: '',
name: 'reseller-management',
component: () => import('@views/ResellerManagement/ListView.vue'),
meta: {
breadCrumbs: [
{
label: 'Reseller Management',
to: '/reseller/management'
}
]
}
}
]
}
3 changes: 3 additions & 0 deletions src/services/accounts-management-services/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { listAccountsService } from './list-accounts-service'

export { listAccountsService }
Loading
Loading