<commit_before>class InstanceActionsController {
    constructor(instancesActionCreator) {
        'ngInject';

        this._instancesActionCreator = instancesActionCreator;
    }

    delete() {
        this.drop.close();
        this._instancesActionCreator.delete(this.instance);
    }
}

export default InstanceActionsController;<commit_msg>Confirm dialog for instance deletion action<commit_after>class InstanceActionsController {
    constructor($scope, ekConfirmDialog, instancesActionCreator) {
        'ngInject';

        this._$scope = $scope;
        this._ekConfirmDialog = ekConfirmDialog;
        this._instancesActionCreator = instancesActionCreator;
    }

    delete() {
        this.drop.close();
        return this._ekConfirmDialog.confirm(this._$scope, {
            title: 'Confirm Action',
            content: `Do you want to DELETE ${this.instance.metadata.name} instance?`,
            ok: 'OK',
            cancel: 'CANCEL'
        }).then(() => {
            this._instancesActionCreator.delete(this.instance);
        });
    }
}

export default InstanceActionsController;
{'fraction_non_alphanumeric': 0.10335448776065277, 'fraction_numerical': 0.0, 'mean_word_length': 2.846689895470383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4629357', 'n_tokens_mistral': 292, 'n_tokens_neox': 291, 'n_words': 52}