Skip to content

Commit 281b7a5

Browse files
committed
MAGETWO-55193: Extension Management with Marketplace data
- Update message on Readiness Check
1 parent a5146f5 commit 281b7a5

File tree

8 files changed

+25
-9
lines changed

8 files changed

+25
-9
lines changed

setup/pub/magento/setup/extension-grid.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ angular.module('extension-grid', ['ngStorage'])
129129
version: $scope.availableUpdatePackages[extension.name]['latestVersion']
130130
}
131131
];
132-
titleService.setTitle('update', extension.moduleName ? extension.moduleName : extension.name);
132+
titleService.setTitle('update', extension);
133133
$state.go('root.readiness-check-update');
134134
};
135135

@@ -139,7 +139,7 @@ angular.module('extension-grid', ['ngStorage'])
139139
name: extension.name
140140
}
141141
];
142-
titleService.setTitle('uninstall', extension.moduleName ? extension.moduleName : extension.name);
142+
titleService.setTitle('uninstall', extension);
143143
$localStorage.componentType = extension.type;
144144
$state.go('root.readiness-check-uninstall');
145145
};

setup/pub/magento/setup/install-extension-grid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ angular.module('install-extension-grid', ['ngStorage', 'clickOut'])
138138
}
139139
];
140140
$localStorage.moduleName = extension.name;
141+
$localStorage.packageTitle = extension.package_title;
141142
$scope.error = false;
142143
$scope.errorMessage = '';
143144
}

setup/pub/magento/setup/main.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,19 @@ main.controller('navigationController',
251251
.service('titleService', ['$localStorage', '$rootScope',
252252
function ($localStorage, $rootScope) {
253253
return {
254-
setTitle: function(type, moduleName) {
255-
$localStorage.moduleName = moduleName;
254+
setTitle: function(type, component) {
255+
if (type === 'enable' || type === 'disable') {
256+
$localStorage.packageTitle = $localStorage.moduleName = component.moduleName;
257+
} else {
258+
$localStorage.moduleName = component.moduleName ? component.moduleName : component.name;
259+
$localStorage.packageTitle = component.package_title;
260+
}
261+
256262
if (typeof $localStorage.titles === 'undefined') {
257263
$localStorage.titles = [];
258264
}
259265
$localStorage.titles[type] = type.charAt(0).toUpperCase() + type.slice(1) + ' '
260-
+ $localStorage.moduleName;
266+
+ ($localStorage.packageTitle ? $localStorage.packageTitle : $localStorage.moduleName);
261267
$rootScope.titles = $localStorage.titles;
262268
}
263269
};

setup/pub/magento/setup/module-grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ angular.module('module-grid', ['ngStorage'])
6666
isComposerPackage: component.name !== 'unknown',
6767
}
6868
];
69-
titleService.setTitle(type, component.moduleName ? component.moduleName : component.name);
69+
titleService.setTitle(type, component);
7070
$localStorage.componentType = component.type;
7171
$state.go('root.readiness-check-'+type);
7272
};

setup/pub/magento/setup/readiness-check.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ angular.module('readiness-check', [])
352352
$scope.wordingOfReadinessCheckAction = function() {
353353
var $actionString = 'We\'re making sure your server environment is ready for ';
354354
if ($localStorage.moduleName) {
355-
$actionString += $localStorage.moduleName;
355+
$actionString += $localStorage.packageTitle ? $localStorage.packageTitle : $localStorage.moduleName;
356356
} else {
357357
if($state.current.type === 'install' || $state.current.type === 'upgrade') {
358358
$actionString += 'Magento';
@@ -369,6 +369,14 @@ angular.module('readiness-check', [])
369369
} else {
370370
$actionString +='ed';
371371
}
372+
373+
if ($localStorage.moduleName
374+
&& $localStorage.packageTitle
375+
&& $localStorage.moduleName != $localStorage.packageTitle
376+
) {
377+
$actionString += ', which consists of the following packages:<br/>- ' + $localStorage.moduleName;
378+
}
379+
372380
return $actionString;
373381
}
374382
}]);

setup/pub/magento/setup/update-extension-grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ angular.module('update-extension-grid', ['ngStorage', 'clickOut'])
3939
version: extension.updateVersion
4040
}
4141
];
42-
titleService.setTitle('update', extension.name);
42+
titleService.setTitle('update', extension);
4343
$scope.nextState();
4444
};
4545
}

setup/src/Magento/Setup/Model/PackagesData.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
/**
99
* Class PackagesData returns system packages and available for update versions
10+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1011
*/
1112
class PackagesData
1213
{

setup/view/magento/setup/readiness-check/progress.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<span></span><span></span><span></span><span></span>
3131
<span></span><span></span><span></span><span></span>
3232
</span>
33-
<span class="message-text">{{wordingOfReadinessCheckAction()}}.</span>
33+
<span class="message-text" ng-bind-html="wordingOfReadinessCheckAction()"></span>
3434
</div>
3535

3636
</div>

0 commit comments

Comments
 (0)