Skip to content

Commit 9ca8157

Browse files
committed
replace non-production references for masstransit with early access
1 parent 7bc8871 commit 9ca8157

File tree

4 files changed

+23
-3
lines changed

4 files changed

+23
-3
lines changed

src/Frontend/src/components/LicenseNotifications.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ import { useShowToast } from "@/composables/toast";
66
import { TYPE } from "vue-toastification";
77
import routeLinks from "@/router/routeLinks";
88
import { useRouter } from "vue-router";
9+
import { useConfiguration } from "@/composables/configuration";
910
1011
const router = useRouter();
1112
const { license, getOrUpdateLicenseStatus } = useLicense();
1213
14+
const configuration = useConfiguration();
15+
1316
function displayWarningMessage(licenseStatus: LicenseStatus) {
1417
const configurationRootLink = router.resolve(routeLinks.configuration.root).href;
1518
switch (licenseStatus) {
@@ -19,7 +22,9 @@ function displayWarningMessage(licenseStatus: LicenseStatus) {
1922
break;
2023
}
2124
case "ValidWithExpiringTrial": {
22-
const trialExpiring = `<div><strong>Non-production development license expiring</strong><div>Your non-production development license will expire soon. To continue using the Particular Service Platform you'll need to extend your license.</div><a href="${license.license_extension_url}" class="btn btn-warning"><i class="fa fa-external-link-alt"></i> Extend your license</a><a href="${configurationRootLink}" class="btn btn-light">View license details</a></div>`;
25+
const trialExpiring = configuration.value?.mass_transit_connector
26+
? `<div><strong>Early Access license expiring</strong><div>Your Early Access license will expire soon. To continue using the Particular Service Platform you'll need to extend your license.</div><a href="${license.license_extension_url}" class="btn btn-warning"><i class="fa fa-external-link-alt"></i> Extend your license</a><a href="${configurationRootLink}" class="btn btn-light">View license details</a></div>`
27+
: `<div><strong>Non-production development license expiring</strong><div>Your non-production development license will expire soon. To continue using the Particular Service Platform you'll need to extend your license.</div><a href="${license.license_extension_url}" class="btn btn-warning"><i class="fa fa-external-link-alt"></i> Extend your license</a><a href="${configurationRootLink}" class="btn btn-light">View license details</a></div>`;
2328
useShowToast(TYPE.WARNING, "", trialExpiring, true);
2429
break;
2530
}

src/Frontend/src/components/PageFooter.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { monitoringUrl, serviceControlUrl } from "../composables/serviceServiceC
55
import { license, licenseStatus } from "../composables/serviceLicense";
66
import { LicenseStatus } from "@/resources/LicenseInfo";
77
import routeLinks from "@/router/routeLinks";
8+
import { useConfiguration } from "@/composables/configuration";
89
910
const isMonitoringEnabled = computed(() => {
1011
return monitoringUrl.value !== "!" && monitoringUrl.value !== "" && monitoringUrl.value !== null && monitoringUrl.value !== undefined;
@@ -17,6 +18,8 @@ const scAddressTooltip = computed(() => {
1718
const scMonitoringAddressTooltip = computed(() => {
1819
return `Monitoring URL ${monitoringUrl.value}`;
1920
});
21+
22+
const configuration = useConfiguration();
2023
</script>
2124

2225
<template>
@@ -64,7 +67,7 @@ const scMonitoringAddressTooltip = computed(() => {
6467
</template>
6568
</div>
6669
</div>
67-
<template v-if="license.license_status !== LicenseStatus.Unavailable && licenseStatus.isTrialLicense">
70+
<template v-if="license.license_status !== LicenseStatus.Unavailable && !configuration?.mass_transit_connector && licenseStatus.isTrialLicense">
6871
<div class="row trialLicenseBar">
6972
<div role="status" aria-label="trial license bar information">
7073
<RouterLink :to="routeLinks.configuration.license.link">{{ license.license_type }} license</RouterLink>, non-production use only

src/Frontend/src/components/configuration/PlatformLicense.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { connectionState } from "@/composables/serviceServiceControl";
66
import BusyIndicator from "../BusyIndicator.vue";
77
import ExclamationMark from "./../../components/ExclamationMark.vue";
88
import convertToWarningLevel from "@/components/configuration/convertToWarningLevel";
9+
import { useConfiguration } from "@/composables/configuration";
10+
import { typeText } from "@/resources/LicenseInfo";
911
1012
// This is needed because the ConfigurationView.vue routerView expects this event.
1113
// The event is only actually emitted on the RetryRedirects.vue component
@@ -18,6 +20,8 @@ defineEmits<{
1820
const loading = computed(() => {
1921
return !license;
2022
});
23+
24+
const configuration = useConfiguration();
2125
</script>
2226

2327
<template>
@@ -31,7 +35,7 @@ const loading = computed(() => {
3135
<div class="box">
3236
<div class="row">
3337
<div class="license-info">
34-
<div><b>Platform license type:</b> {{ license.license_type }}{{ license.licenseEdition }}</div>
38+
<div><b>Platform license type:</b> {{ typeText(license, configuration) }}{{ license.licenseEdition }}</div>
3539

3640
<template v-if="licenseStatus.isSubscriptionLicense">
3741
<div>

src/Frontend/src/resources/LicenseInfo.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Configuration from "./Configuration";
2+
13
export default interface LicenseInfo {
24
registered_to: string;
35
edition: string;
@@ -11,6 +13,12 @@ export default interface LicenseInfo {
1113
status: string;
1214
}
1315

16+
export function typeText(license: LicenseInfo, configuration: Configuration | null) {
17+
if (license.license_type === "Non-Production Development" && configuration?.mass_transit_connector) {
18+
return "Early Access";
19+
}
20+
}
21+
1422
export enum LicenseStatus {
1523
Valid = "Valid",
1624
Unavailable = "Unavailable",

0 commit comments

Comments
 (0)