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

ENH Update reference to supported modules data #220

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
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions client/src/components/ModuleDetails/ModuleDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import i18n from 'i18n';
import { Popover, PopoverHeader, PopoverBody } from 'reactstrap';
import ModuleHealthIndicator from 'components/ModuleDetails/ModuleHealthIndicator';

/**
* Module details are a link and popover, attached to each report row. The popover
* will contain a description, link to more information, ratings, etc
* will contain a description, link to more information, etc
*/
class ModuleDetails extends Component {
constructor(props) {
Expand Down Expand Up @@ -61,7 +60,7 @@ class ModuleDetails extends Component {
}

render() {
const { dataSchema: { description, link, linkTitle, rating }, detailsId } = this.props;
const { dataSchema: { description, link, linkTitle }, detailsId } = this.props;
const popoverId = `${detailsId}-popover`;
const triggerId = `${detailsId}-trigger`;

Expand All @@ -88,8 +87,6 @@ class ModuleDetails extends Component {
<span className="package-summary__details-header-text">
{i18n._t('ModuleDetails.MODULE_INFO', 'Module info')}
</span>

<ModuleHealthIndicator link={link} rating={rating} />
</PopoverHeader>

<PopoverBody>
Expand Down Expand Up @@ -121,8 +118,7 @@ ModuleDetails.propTypes = {
description: PropTypes.string,
link: PropTypes.string,
linkTitle: PropTypes.string,
securityAlerts: PropTypes.array,
rating: PropTypes.number
securityAlerts: PropTypes.array
}),
};

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"php": "^8.1",
"silverstripe/framework": "^5",
"silverstripe/reports": "^5",
"silverstripe/supported-modules": "dev-main",
"symbiote/silverstripe-queuedjobs": "^5",
"guzzlehttp/guzzle": "^7.5"
},
Expand Down
5 changes: 2 additions & 3 deletions docs/en/userguide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ the CMS while the update is run.

## Check for additional modules

Click on the 'Explore Addons' button to access [SilverStripe's Add-ons](https://www.silverstripe.org/software/addons/) repository. Use this site to find modules and
themes to add to your SilverStripe website.
Click on the 'Browse Modules' button to browse [Silverstripe CMS modules on packagist](https://packagist.org/search/?type=silverstripe-vendormodule).

## What do "Version, Available, Latest" mean?

Expand All @@ -59,7 +58,7 @@ version, it means that this latest version is outside of your version constraint

## What do the security alerts mean?

The [SilverStripe Composer Security Checker module](https://addons.silverstripe.org/add-ons/bringyourownideas/silverstripe-composer-security-checker)
The [SilverStripe Composer Security Checker module](https://packagist.org/packages/bringyourownideas/silverstripe-composer-security-checker)
adds a task which runs a check if any of the dependencies has known security vulnerabilities.

Provided this optional module is installed, you may see security alerts, if security updates are present for installed
Expand Down
2 changes: 2 additions & 0 deletions lang/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ en:
db_Version: Version
db_VersionConstraint: 'Version constraint'
db_VersionHash: 'Version hash'
VIEW_ON_PACKAGIST: 'View {package} on packagist.org'
BringYourOwnIdeas\Maintenance\Reports\SiteSummary:
FilterSupported: 'Supported modules'
FilterUnsupported: 'Unsupported modules'
LAST_UPDATED: 'Last updated {updated}'
LINK_TO_ADDONS: 'Explore Addons'
LINK_TO_PACKAGIST: 'Browse Modules'
MORE_INFORMATION: 'More information'
ShowAllModules: 'Show all modules'
TITLE: 'Installed modules'
Expand Down
6 changes: 3 additions & 3 deletions src/Model/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ public function getDataSchema()
{
$schema = [
'description' => $this->Description,
'link' => 'https://addons.silverstripe.org/add-ons/' . $this->Name,
'link' => 'https://packagist.org/packages/' . $this->Name,
'linkTitle' => _t(
__CLASS__ . '.ADDONS_LINK_TITLE',
'View {package} on addons.silverstripe.org',
__CLASS__ . '.VIEW_ON_PACKAGIST',
'View {package} on packagist.org',
['package' => $this->Title]
),
'rating'=> (int) $this->Rating
Expand Down
4 changes: 2 additions & 2 deletions src/Reports/SiteSummary.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public function getReportField()
Injector::inst()->create(GridFieldRefreshButton::class, 'buttons-before-left'),
Injector::inst()->create(
GridFieldLinkButton::class,
'https://addons.silverstripe.org',
_t(__CLASS__ . '.LINK_TO_ADDONS', 'Explore Addons'),
'https://packagist.org/search/?type=silverstripe-vendormodule',
_t(__CLASS__ . '.LINK_TO_PACKAGIST', 'Browse Modules'),
'buttons-before-left'
),
$this->getDropdownFilter(),
Expand Down
Loading
Loading