Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-28733 : Admin Advisor v2 #6461

Merged
merged 25 commits into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d608ef5
temp work
catalintomai Sep 12, 2020
cef507b
Merge branch 'master' into OCTO-6
catalintomai Sep 16, 2020
1fa0814
cleanup + make check-style fixes
catalintomai Sep 16, 2020
1f34c72
add support for 500k banner warning
catalintomai Sep 17, 2020
5a97f51
remove ContextUs texts from the StartTrial version of the modal
catalintomai Sep 17, 2020
2e04eb4
fix localization file
catalintomai Sep 17, 2020
0ccfee7
address CR comments
catalintomai Sep 17, 2020
d9cce21
address CR comments
catalintomai Sep 17, 2020
951a887
address CR comments
catalintomai Sep 17, 2020
35b3e35
addressed CR comments
catalintomai Sep 18, 2020
ecbbc9f
addressed CR comments
catalintomai Sep 18, 2020
a984fab
Merge branch 'master' into OCTO-6
catalintomai Sep 19, 2020
a5b096f
removed StartTrial from webapp following PR spec update
catalintomai Sep 20, 2020
7d70359
refactor multiple warn metric banners handling
catalintomai Sep 20, 2020
da1c74d
remove enterpriseReady references
catalintomai Sep 20, 2020
c6972b7
clean up i18n file
catalintomai Sep 20, 2020
fb5878c
updated mailto strings
catalintomai Sep 20, 2020
8c33ee5
addressed CR comments
catalintomai Sep 22, 2020
154758f
Merge branch 'master' into OCTO-6
catalintomai Sep 22, 2020
e5f1a91
updated ack banner text
catalintomai Sep 23, 2020
305c792
fix Jest test
catalintomai Sep 23, 2020
3dfbab3
address PM spec updates
catalintomai Sep 24, 2020
e89862f
make sure we don't display banner if warn metric is invalid
catalintomai Sep 24, 2020
85ca2b6
Merge branch 'master' into OCTO-6
catalintomai Sep 24, 2020
a2512d9
Merge branch 'master' into OCTO-6
catalintomai Sep 25, 2020
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
Prev Previous commit
Next Next commit
addressed CR comments
  • Loading branch information
catalintomai committed Sep 18, 2020
commit 35b3e351df5fc844f732ef9375b1c03cacbce830
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {isLicenseExpired, isLicenseExpiring, isLicensePastGracePeriod} from 'uti
import {AnnouncementBarTypes, AnnouncementBarMessages, WarnMetricTypes} from 'utils/constants';
import {intlShape} from 'utils/react_intl';

import {t} from 'utils/i18n';

import FormattedMarkdownMessage from 'components/formatted_markdown_message';

import AnnouncementBar from '../default_announcement_bar';
Expand Down Expand Up @@ -75,7 +77,7 @@ class ConfigurationAnnouncementBar extends React.PureComponent {
/>
<FormattedMarkdownMessage
id={'announcement_bar.error.number_active_users_warn_metric_status_ack.text'}
catalintomai marked this conversation as resolved.
Show resolved Hide resolved
defaultMessage={'Your trial has started! Go to the [System Console](/admin_console/environment/web_server) to check out the new features.'}
defaultMessage='Your trial has started! Go to the [System Console](/admin_console/environment/web_server) to check out the new features.'
/>
</React.Fragment>
);
Expand All @@ -88,7 +90,7 @@ class ConfigurationAnnouncementBar extends React.PureComponent {
/>
<FormattedMessage
id={'announcement_bar.warn_metric_status_ack.text'}
catalintomai marked this conversation as resolved.
Show resolved Hide resolved
defaultMessage={'Thank you for contacting Mattermost. We will follow up with you soon.'}
defaultMessage='Thank you for contacting Mattermost. We will follow up with you soon.'
/>
</React.Fragment>
);
Expand All @@ -109,7 +111,7 @@ class ConfigurationAnnouncementBar extends React.PureComponent {
/>
<FormattedMarkdownMessage
id={'announcement_bar.error.number_active_users_warn_metric_status.text'}
catalintomai marked this conversation as resolved.
Show resolved Hide resolved
defaultMessage={'You now have over {limit} users. We strongly recommend using advanced features for large-scale servers.'}
defaultMessage='You now have over {limit} users. We strongly recommend using advanced features for large-scale servers.'
values={{
limit: warnMetricStatus.limit,
}}
Expand All @@ -125,7 +127,7 @@ class ConfigurationAnnouncementBar extends React.PureComponent {
/>
<FormattedMarkdownMessage
id={'announcement_bar.number_of_posts_warn_metric_status.text'}
defaultMessage={'You now have over {limit} posts. We strongly recommend using advanced features for large-scale servers.'}
defaultMessage='You now have over {limit} posts. We strongly recommend using advanced features for large-scale servers.'
values={{
limit: warnMetricStatus.limit,
}}
Expand Down Expand Up @@ -226,7 +228,7 @@ class ConfigurationAnnouncementBar extends React.PureComponent {
handleClose={notice.DismissFunc}
type={notice.Type}
showModal={notice.ShowModal}
modalButtonText={'announcement_bar.error.warn_metric_status.link'}
modalButtonText={t('announcement_bar.error.warn_metric_status.link')}
modalButtonDefaultText='Learn more'
warnMetricStatus={status}
message={notice.Message}
Expand Down Expand Up @@ -274,10 +276,10 @@ class ConfigurationAnnouncementBar extends React.PureComponent {
let id;
let defaultMessage;
if (this.props.config.EnableSignUpWithGitLab === 'true') {
id = 'announcement_bar.error.site_url_gitlab.full';
id = t('announcement_bar.error.site_url_gitlab.full');
defaultMessage = 'Please configure your [site URL](https://docs.mattermost.com/administration/config-settings.html#site-url) either on the [System Console](/admin_console/environment/web_server) or, if you\'re using GitLab Mattermost, in gitlab.rb.';
} else {
id = 'announcement_bar.error.site_url.full';
id = t('announcement_bar.error.site_url.full');
defaultMessage = 'Please configure your [site URL](https://docs.mattermost.com/administration/config-settings.html#site-url) on the [System Console](/admin_console/environment/web_server).';
}

Expand Down
9 changes: 5 additions & 4 deletions components/warn_metric_ack_modal/warn_metric_ack_modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {AnalyticsRow} from 'mattermost-redux/types/admin';
import {ActionFunc} from 'mattermost-redux/types/actions';

import {getSiteURL} from 'utils/url';
import {t} from 'utils/i18n';
import {Constants, ModalIdentifiers, WarnMetricTypes} from 'utils/constants';

import {trackEvent} from 'actions/diagnostics_actions';
Expand Down Expand Up @@ -163,9 +164,9 @@ export default class WarnMetricAckModal extends React.PureComponent<Props, State
link: (
<WarnMetricAckErrorLink
url={mailToLinkText}
messageId={'warn_metric_ack_modal.mailto.link'}
messageId={t('warn_metric_ack_modal.mailto.link')}
forceAck={true}
defaultMessage={'email us'}
defaultMessage='Email us'
onClickHandler={this.onContactUsClick}
/>
),
Expand Down Expand Up @@ -232,7 +233,7 @@ export default class WarnMetricAckModal extends React.PureComponent<Props, State
link: (
<ErrorLink
url={learnMoreLink}
messageId={'warn_metric_ack_modal.learn_more.link'}
messageId={t('warn_metric_ack_modal.learn_more.link')}
catalintomai marked this conversation as resolved.
Show resolved Hide resolved
defaultMessage='Learn more'
/>
),
Expand Down Expand Up @@ -262,7 +263,7 @@ export default class WarnMetricAckModal extends React.PureComponent<Props, State
link: (
<ErrorLink
url={learnMoreLink}
messageId={'warn_metric_ack_modal.learn_more.link'}
messageId={t('warn_metric_ack_modal.learn_more.link')}
catalintomai marked this conversation as resolved.
Show resolved Hide resolved
defaultMessage='Learn more'
/>
),
Expand Down
2 changes: 1 addition & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4123,7 +4123,7 @@
"warn_metric_ack_modal.error.body": "Please try again or visit https://mattermost.com/trial to request a license.",
"warn_metric_ack_modal.header.title": "Scaling with Mattermost",
"warn_metric_ack_modal.learn_more.link": "Learn more",
"warn_metric_ack_modal.mailto.link": "email us",
"warn_metric_ack_modal.mailto.link": "Email us",
"warn_metric_ack_modal.mailto.message": "Support could not be reached. Please {link}.",
"warn_metric_ack_modal.number_of_active_users.description": "Mattermost strongly recommends that deployments of over {limit} users take advantage of features such as user management, server clustering and performance monitoring. Contact us to learn more and let us know how we can help.",
"warn_metric_ack_modal.number_of_active_users.subtext": "By clicking Acknowledge, you will be sharing your information with Mattermost Inc., to learn more about upgrading. {link}",
Expand Down