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

New release hosting collaboration - w45 #13913

Merged
merged 8 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ angular.module('App').controller(
'configurationCtrl',
class ConfigurationCtrl {
/* @ngInject */
constructor($scope, coreConfig, constants) {
constructor($scope, atInternet, coreConfig, constants) {
this.constants = constants;
$scope.user = coreConfig.getUser();
this.atInternet = atInternet;
this.banner2024 =
OVH_WEB_OFFERS_2024[$scope.user.ovhSubsidiary] ||
OVH_WEB_OFFERS_2024.DEFAULT;
}

trackClickWebOfferBanner() {
this.atInternet.trackClick({
name: 'web::::::banner::link::go-to-special-offers',
type: 'action',
});
}

$onInit() {
this.guides = this.constants.TOP_GUIDES;
this.subsidiary = this.user.ovhSubsidiary;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
data-ng-if="$ctrl.isOffersBannerActive"
target="_blank"
rel="noopener"
data-ng-click="$ctrl.trackClickWebOfferBanner()"
href="{{ :: $ctrl.banner2024.url }}"
>
<img
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const DOMAIN_STATUS = {
TECHNICAL_SUSPENDED: 'technical_suspended',
REGISTRY_SUSPENDED: 'registry_suspended',
AUTORENEW_IN_PROGRESS: 'autorenew_in_progress',
AUTORENEW_REGISTRY_IN_PROGRESS: 'autorenew_registry_in_progress',
};

export const DOMAIN_DNSSEC_STATE = {
Expand Down Expand Up @@ -85,6 +86,7 @@ export const DOMAINS_BADGES_STATUS = {
[DOMAIN_STATUS.TECHNICAL_SUSPENDED]: 'oui-badge_limited-edition',
[DOMAIN_STATUS.REGISTRY_SUSPENDED]: 'oui-badge_limited-edition',
[DOMAIN_STATUS.AUTORENEW_IN_PROGRESS]: 'oui-badge_info',
[DOMAIN_STATUS.AUTORENEW_REGISTRY_IN_PROGRESS]: 'oui-badge_info',
};

export const DOMAIN_SUSPENSION_STATE_CLASS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@
data-sortable
>
<span
class="{{:: 'oui-badge ' + $ctrl.DOMAINS_BADGES_STATUS[$value] }}"
data-translate="{{:: 'domains_status_' + $value }}"
class="{{ ::'oui-badge ' + $ctrl.DOMAINS_BADGES_STATUS[$value] }}"
data-translate="{{ ::'domains_status_' + $value }}"
>
</span>
<button
data-ng-if="[$ctrl.DOMAIN_STATUS.RESTORABLE, $ctrl.DOMAIN_STATUS.PENDING_INCOMING_TRANSFER , $ctrl.DOMAIN_STATUS.DISPUTE, $ctrl.DOMAIN_STATUS.EXPIRED].includes($value)"
data-ng-if="[$ctrl.DOMAIN_STATUS.RESTORABLE, $ctrl.DOMAIN_STATUS.PENDING_INCOMING_TRANSFER , $ctrl.DOMAIN_STATUS.DISPUTE, $ctrl.DOMAIN_STATUS.EXPIRED, $ctrl.DOMAIN_STATUS.AUTORENEW_REGISTRY_IN_PROGRESS].includes($value)"
type="button"
class="oui-popover-button"
data-oui-popover="{{::'domains_status_tooltip_' + $value | translate}}"
data-oui-popover="{{ ::'domains_status_tooltip_' + $value | translate }}"
data-oui-popover-placement="right"
></button>
</oui-datagrid-column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"domains_action_per_line_autorenew_activate": "Automatische VerlΓ€ngerung aktivieren",
"domains_action_per_line_autorenew_deactivate": "Automatische VerlΓ€ngerung deaktivieren",
"domains_action_per_line_resiliation_cancellation": "KΓΌndigung der Dienstes stornieren",
"domains_status_autorenew_in_progress": "VerlΓ€ngerung wird vorgenommen"
"domains_status_autorenew_in_progress": "VerlΓ€ngerung wird vorgenommen",
"domains_status_autorenew_registry_in_progress": "VerlΓ€ngerung wird vorgenommen",
"domains_status_tooltip_autorenew_registry_in_progress": "Die VerlΓ€ngerung wird bei der Registry abgeschlossen."
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"domains_action_per_line_autorenew_activate": "Enable automatic renewal",
"domains_action_per_line_autorenew_deactivate": "Disable automatic renewal",
"domains_action_per_line_resiliation_cancellation": "Cancel service termination",
"domains_status_autorenew_in_progress": "Renewal in progress"
"domains_status_autorenew_in_progress": "Renewal in progress",
"domains_status_autorenew_registry_in_progress": "Renewal in progress",
"domains_status_tooltip_autorenew_registry_in_progress": "The renewal process is being finalised with the registry"
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"domains_action_per_line_autorenew_activate": "Activar la renovaciΓ³n automΓ‘tica",
"domains_action_per_line_autorenew_deactivate": "Desactivar la renovaciΓ³n automΓ‘tica",
"domains_action_per_line_resiliation_cancellation": "Cancelar la baja del servicio",
"domains_status_autorenew_in_progress": "RenovaciΓ³n en curso"
"domains_status_autorenew_in_progress": "RenovaciΓ³n en curso",
"domains_status_autorenew_registry_in_progress": "RenovaciΓ³n en curso",
"domains_status_tooltip_autorenew_registry_in_progress": "La renovaciΓ³n se estΓ‘ completando en el registro"
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"domains_status_technical_suspended": "ProcΓ©dure en cours",
"domains_status_registry_suspended": "ProcΓ©dure en cours",
"domains_status_autorenew_in_progress": "Renouvellement en cours",
"domains_status_autorenew_registry_in_progress": "Renouvellement en cours",
"domains_status_tooltip_autorenew_registry_in_progress": "Le renouvellement est en cours de finalisation auprès du registre",
"domains_suspension_state_not_suspended": "Actif",
"domains_suspension_state_suspended": "Inactif",
"domains_renewal_mode_automatic_renew": "Renouvellement automatique",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"domains_status_technical_suspended": "ProcΓ©dure en cours",
"domains_status_registry_suspended": "ProcΓ©dure en cours",
"domains_status_autorenew_in_progress": "Renouvellement en cours",
"domains_status_autorenew_registry_in_progress": "Renouvellement en cours",
"domains_status_tooltip_autorenew_registry_in_progress": "Le renouvellement est en cours de finalisation auprès du registre",
"domains_suspension_state_not_suspended": "Actif",
"domains_suspension_state_suspended": "Inactif",
"domains_renewal_mode_automatic_renew": "Renouvellement automatique",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"domains_action_per_line_autorenew_activate": "Attiva il rinnovo automatico",
"domains_action_per_line_autorenew_deactivate": "Disattiva il rinnovo automatico",
"domains_action_per_line_resiliation_cancellation": "Annulla la disattivazione del servizio",
"domains_status_autorenew_in_progress": "Rinnovo in corso"
"domains_status_autorenew_in_progress": "Rinnovo in corso",
"domains_status_autorenew_registry_in_progress": "Rinnovo in corso",
"domains_status_tooltip_autorenew_registry_in_progress": "Il rinnovo Γ¨ in corso di finalizzazione presso il Registro"
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"domains_action_per_line_autorenew_activate": "WΕ‚Δ…cz automatyczne odnowienie",
"domains_action_per_line_autorenew_deactivate": "WyΕ‚Δ…cz automatyczne odnowienie",
"domains_action_per_line_resiliation_cancellation": "Anuluj rezygnacjΔ™ z usΕ‚ugi",
"domains_status_autorenew_in_progress": "Trwa odnawianie"
"domains_status_autorenew_in_progress": "Trwa odnawianie",
"domains_status_autorenew_registry_in_progress": "Trwa odnawianie",
"domains_status_tooltip_autorenew_registry_in_progress": "Rejestr finalizuje odnowienie"
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,7 @@
"domains_action_per_line_autorenew_activate": "Ativar a renovação automÑtica",
"domains_action_per_line_autorenew_deactivate": "Desativar a renovação automÑtica",
"domains_action_per_line_resiliation_cancellation": "Anular a rescisão do serviço",
"domains_status_autorenew_in_progress": "Renovação em curso"
"domains_status_autorenew_in_progress": "Renovação em curso",
"domains_status_autorenew_registry_in_progress": "Renovação em curso",
"domains_status_tooltip_autorenew_registry_in_progress": "A renovação estÑ em curso de finalização junto do registry"
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ export default /* @ngInject */ ($stateProvider) => {
redirectTo: (transition) =>
transition
.injector()
.getAsync('resources')
.then((resources) =>
resources.data.length === 0
.getAsync('noFiltersHosting')
.then((noFiltersHosting) =>
noFiltersHosting.data.length === 0
? { state: 'app.hosting.onboarding' }
: false,
),
resolve: {
...ListLayoutHelper.stateResolves,
apiPath: () => '/hosting/web',
dataModel: () => 'hosting.web.Service',
noFiltersHosting: /* @ngInject */ ($http) => $http.get('/hosting/web'),
loadResource: /* @ngInject */ ($translate) => (resource) => {
const offerPrefix = NEW_OFFERS_NAME[resource.offer];
const offerName = offerPrefix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,11 @@
<td>example.com</td>
<td>0</td>
<td>TXT</td>
<td data-ng-bind="hosting.token"></td>
<td>
<oui-clipboard
data-model="hosting.token"
></oui-clipboard>
</td>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import {
GIT_ASSOCIATION_GUIDE_LINK,
GIT_WEBHOOK_GUIDE_LINK,
} from './git-association.constants';
import { TRACKING_MULTISITE_PREFIX } from '../git-integration.constants';

export default class HostingMultisiteGitAssociationController {
/* @ngInject */
constructor(
HostingMultisiteGitAssociationService,
coreURLBuilder,
coreConfig,
atInternet,
$translate,
) {
this.REPOSITORY_PLACEHOLDER = REPOSITORY_PLACEHOLDER;
Expand All @@ -26,6 +28,7 @@ export default class HostingMultisiteGitAssociationController {
this.HostingMultisiteGitAssociationService = HostingMultisiteGitAssociationService;
this.coreURLBuilder = coreURLBuilder;
this.$translate = $translate;
this.atInternet = atInternet;
const { ovhSubsidiary } = coreConfig.getUser();
this.GIT_ASSOCIATION_GUIDE_LINK =
GIT_ASSOCIATION_GUIDE_LINK[ovhSubsidiary] ||
Expand Down Expand Up @@ -56,6 +59,10 @@ export default class HostingMultisiteGitAssociationController {
}

applyConfiguration() {
this.atInternet.trackClick({
name: `${TRACKING_MULTISITE_PREFIX}::git-association::confirm`,
type: 'action',
});
const promise = this.isConfiguration
? this.HostingMultisiteGitAssociationService.putWebsiteAssociated(
this.serviceName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,6 @@
<p data-translate="hosting_multisite_git_association_configure_description"></p>

<form class="form-inline" name="$ctrl.gitAssociationForm">
<div
data-ng-if="$ctrl.model.repositoryUrl && !$ctrl.model.repositoryUrl.startsWith('https://')"
>
<h3 data-translate="hosting_multisite_git_association_ssh_key"></h3>
<p
data-translate="hosting_multisite_git_association_ssh_key_description"
></p>
<div class="row">
<oui-field
class="col-md-4"
data-label="{{ ::'hosting_multisite_git_association_ssh_key' | translate }}"
>
<oui-clipboard
name="sshKey"
data-model=":: $ctrl.sshKey"
></oui-clipboard>
</oui-field>
</div>
</div>
<h3 data-translate="hosting_multisite_git_association_configure"></h3>

<oui-message type="info">
Expand Down Expand Up @@ -129,6 +110,26 @@ <h3 data-translate="hosting_multisite_git_association_configure"></h3>
</oui-field>
</div>

<div
data-ng-if="$ctrl.model.repositoryUrl && !$ctrl.model.repositoryUrl.startsWith('https://')"
>
<h3 data-translate="hosting_multisite_git_association_ssh_key"></h3>
<p
data-translate="hosting_multisite_git_association_ssh_key_description"
></p>
<div class="row">
<oui-field
class="col-md-4"
data-label="{{ ::'hosting_multisite_git_association_ssh_key' | translate }}"
>
<oui-clipboard
name="sshKey"
data-model=":: $ctrl.sshKey"
></oui-clipboard>
</oui-field>
</div>
</div>

<h3 data-translate="hosting_multisite_git_association_configure_auto"></h3>
<p
data-translate="hosting_multisite_git_association_webhook_description"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { TRACKING_MULTISITE_PREFIX } from '../git-integration.constants';

export default class HostingMultisiteGitDeploymentController {
/* @ngInject */
constructor(
HostingMultisiteGitDeploymentService,
HostingDomain,
coreURLBuilder,
$translate,
atInternet,
) {
this.HostingMultisiteGitDeploymentService = HostingMultisiteGitDeploymentService;
this.HostingDomain = HostingDomain;
this.coreURLBuilder = coreURLBuilder;
this.$translate = $translate;
this.atInternet = atInternet;
this.gitForcePush = false;
}

Expand All @@ -25,6 +29,10 @@ export default class HostingMultisiteGitDeploymentController {
}

deployment() {
this.atInternet.trackClick({
name: `${TRACKING_MULTISITE_PREFIX}::git-deployment::confirm`,
type: 'action',
});
this.isDeploying = true;
this.HostingMultisiteGitDeploymentService.postWebsiteDeploy(
this.serviceName,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const TRACKING_MULTISITE_PREFIX = 'web::hosting::dashboard::multisite';

export default {
TRACKING_MULTISITE_PREFIX,
};
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { TRACKING_MULTISITE_PREFIX } from '../git-integration.constants';

export default class HostingMultisiteGitDeploymentController {
/* @ngInject */
constructor($translate, HostingDomain, HostingMultisiteGitRemovalService) {
constructor(
$translate,
atInternet,
HostingDomain,
HostingMultisiteGitRemovalService,
) {
this.isConfirmationStep = false;
this.$translate = $translate;
this.atInternet = atInternet;
this.HostingMultisiteGitRemovalService = HostingMultisiteGitRemovalService;
this.HostingDomain = HostingDomain;
}
Expand All @@ -22,6 +30,10 @@ export default class HostingMultisiteGitDeploymentController {
}

deleteGitAssociation(deleteFiles) {
this.atInternet.trackClick({
name: `${TRACKING_MULTISITE_PREFIX}::git-removal::confirm`,
type: 'action',
});
this.isDeleting = true;
this.HostingDomain.getWebsitesAssociated(this.serviceName, this.path)
.then(([websiteId]) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
HOSTING_TAB_DOMAINS,
RECORD_TYPE_TO_IP_TYPE,
} from './hosting-multisite.constants';
import { TRACKING_MULTISITE_PREFIX } from './git-integration/git-integration.constants';

const CDN_STATISTICS_PERIOD = {
DAY: 'day',
Expand Down Expand Up @@ -443,26 +444,42 @@ angular
$scope.setAction('multisite/update/hosting-multisite-update', domain);
};

$scope.goToRemoveRepository = (domain) =>
$scope.goToRemoveRepository = (domain) => {
sendTrackClick(`${TRACKING_MULTISITE_PREFIX}::git-removal`);
$scope.$resolve.goToRemoveRepository(
$scope.hosting.serviceName,
domain.path,
);
};

$scope.goToAssociateRepository = (domain) =>
$scope.goToAssociateRepository = (domain) => {
sendTrackClick(`${TRACKING_MULTISITE_PREFIX}::add-git`);
$scope.$resolve.goToAssociateRepository(
$scope.hosting.serviceName,
domain,
);
};

$scope.goToConfigureGit = (domain) =>
$scope.$resolve.goToConfigureGit($scope.hosting.serviceName, domain);

$scope.goToDeployWebSite = (domain) =>
$scope.$resolve.goToDeployWebSite($scope.hosting.serviceName, domain);
$scope.goToDeployWebSite = (domain) => {
sendTrackClick(`${TRACKING_MULTISITE_PREFIX}::git-deployment`);
return $scope.$resolve.goToDeployWebSite(
$scope.hosting.serviceName,
domain,
);
};

$scope.goToViewLastDeploy = (domain) =>
$scope.$resolve.goToViewLastDeploy($scope.hosting.serviceName, domain);
$scope.goToViewLastDeploy = (domain) => {
sendTrackClick(
`${TRACKING_MULTISITE_PREFIX}::git-view-last-deployment`,
);
return $scope.$resolve.goToViewLastDeploy(
$scope.hosting.serviceName,
domain,
);
};

$scope.restartDomain = (domain) =>
HostingDomain.restartVirtualHostOfAttachedDomain(
Expand Down
Loading
Loading