UX: rename the word "Upgrade" to "Update" in the UI (#208)
In this PR, all references in the UI to the word "`upgrade`" are changed to "`update`". This is to differentiate the update process in self-hosted sites from the plan "upgrade" process in hosted sites.
This commit is contained in:
parent
a2bc9b6eac
commit
340f0006c5
|
@ -8,17 +8,17 @@ export default class RepoStatus extends Component {
|
||||||
@service upgradeStore;
|
@service upgradeStore;
|
||||||
|
|
||||||
get upgradeDisabled() {
|
get upgradeDisabled() {
|
||||||
// Allow to see the currently running upgrade
|
// Allow to see the currently running update
|
||||||
if (this.args.upgradingRepo) {
|
if (this.args.upgradingRepo) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable other buttons when an upgrade is running
|
// Disable other buttons when an update is running
|
||||||
if (this.upgradeStore.running) {
|
if (this.upgradeStore.running) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// docker_manager has to be upgraded before other plugins
|
// docker_manager has to be updated before other plugins
|
||||||
return (
|
return (
|
||||||
!this.args.managerRepo.upToDate &&
|
!this.args.managerRepo.upToDate &&
|
||||||
this.args.managerRepo !== this.args.repo
|
this.args.managerRepo !== this.args.repo
|
||||||
|
@ -43,9 +43,9 @@ export default class RepoStatus extends Component {
|
||||||
|
|
||||||
get upgradeButtonLabel() {
|
get upgradeButtonLabel() {
|
||||||
if (this.args.repo.upgrading) {
|
if (this.args.repo.upgrading) {
|
||||||
return I18n.t("admin.docker.upgrading");
|
return I18n.t("admin.docker.updating");
|
||||||
} else {
|
} else {
|
||||||
return I18n.t("admin.docker.upgrade_action");
|
return I18n.t("admin.docker.update_action");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
{{i18n "admin.docker.outdated_notice"}}
|
{{i18n "admin.docker.outdated_notice"}}
|
||||||
|
|
||||||
<LinkTo @route="upgrade">
|
<LinkTo @route="upgrade">
|
||||||
{{i18n "admin.docker.perform_upgrade"}}
|
{{i18n "admin.docker.perform_update"}}
|
||||||
</LinkTo>
|
</LinkTo>
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
|
@ -24,9 +24,9 @@ export default class UpgradeShow extends Controller {
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
if (this.multiUpgrade) {
|
if (this.multiUpgrade) {
|
||||||
return I18n.t("admin.docker.upgrade_everything");
|
return I18n.t("admin.docker.update_everything");
|
||||||
} else {
|
} else {
|
||||||
return I18n.t("admin.docker.upgrade_repo", { name: this.model.name });
|
return I18n.t("admin.docker.update_repo", { name: this.model.name });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ export default {
|
||||||
api.addAdminSidebarSectionLink("root", {
|
api.addAdminSidebarSectionLink("root", {
|
||||||
name: "admin_upgrade",
|
name: "admin_upgrade",
|
||||||
route: "upgrade.index",
|
route: "upgrade.index",
|
||||||
label: "admin.docker.upgrade_tab",
|
label: "admin.docker.update_tab",
|
||||||
icon: "rocket",
|
icon: "rocket",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{{#if this.currentUser.admin}}
|
{{#if this.currentUser.admin}}
|
||||||
<NavItem @route="upgrade" @label="admin.docker.upgrade_tab" />
|
<NavItem @route="upgrade" @label="admin.docker.update_tab" />
|
||||||
{{/if}}
|
{{/if}}
|
|
@ -1,4 +1,4 @@
|
||||||
<h1>{{i18n "admin.docker.upgrade_title"}}</h1>
|
<h1>{{i18n "admin.docker.update_title"}}</h1>
|
||||||
|
|
||||||
{{#if this.outdated}}
|
{{#if this.outdated}}
|
||||||
<h2>{{i18n "admin.docker.outdated_image_header"}}</h2>
|
<h2>{{i18n "admin.docker.outdated_image_header"}}</h2>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
{{#if this.allUpToDate}}
|
{{#if this.allUpToDate}}
|
||||||
{{i18n "admin.docker.all_up_to_date"}}
|
{{i18n "admin.docker.all_up_to_date"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{i18n "admin.docker.upgrade_all"}}
|
{{i18n "admin.docker.update_all"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
<DockerManager::ProgressBar @percent={{this.upgradeStore.progressPercentage}} />
|
<DockerManager::ProgressBar @percent={{this.upgradeStore.progressPercentage}} />
|
||||||
|
|
||||||
{{#if this.complete}}
|
{{#if this.complete}}
|
||||||
<p>{{i18n "admin.docker.upgrade_successful"}}</p>
|
<p>{{i18n "admin.docker.update_successful"}}</p>
|
||||||
{{else if this.failed}}
|
{{else if this.failed}}
|
||||||
<p>{{i18n "admin.docker.upgrade_error"}}</p>
|
<p>{{i18n "admin.docker.update_error"}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if this.isUpToDate}}
|
{{#if this.isUpToDate}}
|
||||||
|
@ -23,15 +23,15 @@
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
{{#if this.upgrading}}
|
{{#if this.upgrading}}
|
||||||
{{i18n "admin.docker.upgrading"}}
|
{{i18n "admin.docker.updating"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{i18n "admin.docker.start_upgrading"}}
|
{{i18n "admin.docker.start_updating"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{{#if this.upgrading}}
|
{{#if this.upgrading}}
|
||||||
<button {{on "click" this.resetUpgrade}} class="btn unlock" type="button">
|
<button {{on "click" this.resetUpgrade}} class="btn unlock" type="button">
|
||||||
{{i18n "admin.docker.reset_upgrade"}}
|
{{i18n "admin.docker.reset_update"}}
|
||||||
</button>
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,28 +18,28 @@ en:
|
||||||
new_version_available: "New Version Available!"
|
new_version_available: "New Version Available!"
|
||||||
official_plugin: "Official Plugin"
|
official_plugin: "Official Plugin"
|
||||||
outdated_image_header: "You are running an old version of the Discourse image"
|
outdated_image_header: "You are running an old version of the Discourse image"
|
||||||
outdated_image_info: "Upgrades via the web UI are disabled until you run the latest image. To do so log in to your server using SSH and run:"
|
outdated_image_info: "Updates via the web UI are disabled until you run the latest image. To do so log in to your server using SSH and run:"
|
||||||
outdated_image_link: "More info on our support site"
|
outdated_image_link: "More info on our support site"
|
||||||
outdated_notice: "Your Discourse installation is out of date."
|
outdated_notice: "Your Discourse installation is out of date."
|
||||||
perform_upgrade: "Click here to upgrade."
|
perform_update: "Click here to update."
|
||||||
repo_newest_version: "%{name} is at the newest version."
|
repo_newest_version: "%{name} is at the newest version."
|
||||||
repository: "Repository"
|
repository: "Repository"
|
||||||
reset_upgrade: "Reset Upgrade"
|
reset_update: "Reset Update"
|
||||||
reset_warning: "WARNING: You should only reset upgrades that have failed and are not running. This will NOT cancel currently running builds and should only be used as a last resort."
|
reset_warning: "WARNING: You should only reset updates that have failed and are not running. This will NOT cancel currently running builds and should only be used as a last resort."
|
||||||
start_upgrading: "Start Upgrading"
|
start_updating: "Start Updating"
|
||||||
status: "Status"
|
status: "Status"
|
||||||
up_to_date: "Up to date"
|
up_to_date: "Up to date"
|
||||||
upgrade_action: "Upgrade"
|
update_action: "Update"
|
||||||
upgrade_all: "Upgrade All"
|
update_all: "Update All"
|
||||||
upgrade_error: "Sorry, there was an error upgrading Discourse. Please check the logs below."
|
update_error: "Sorry, there was an error updating Discourse. Please check the logs below."
|
||||||
upgrade_everything: "Upgrade everything"
|
update_everything: "Update everything"
|
||||||
upgrade_repo: "Upgrade %{name}"
|
update_repo: "Update %{name}"
|
||||||
upgrade_successful: "Upgrade completed successfully!"
|
update_successful: "Update completed successfully!"
|
||||||
upgrade_tab: "Upgrade"
|
update_tab: "Update"
|
||||||
upgrade_title: "Upgrade"
|
update_title: "Update"
|
||||||
upgrading: "Upgrading…"
|
updating: "Updating…"
|
||||||
|
|
||||||
logs:
|
logs:
|
||||||
staff_actions:
|
staff_actions:
|
||||||
actions:
|
actions:
|
||||||
discourse_upgrade: "Upgrade to the latest version"
|
discourse_update: "Update to the latest version"
|
||||||
|
|
|
@ -9,4 +9,4 @@ en_GB:
|
||||||
admin:
|
admin:
|
||||||
docker:
|
docker:
|
||||||
outdated_notice: "Your Discourse installation is out of date."
|
outdated_notice: "Your Discourse installation is out of date."
|
||||||
perform_upgrade: "Click here to upgrade."
|
perform_update: "Click here to update."
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
en:
|
en:
|
||||||
docker_manager:
|
docker_manager:
|
||||||
title: "Discourse upgrade manager"
|
title: "Discourse update manager"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# name: docker_manager
|
# name: docker_manager
|
||||||
# about: Provides basic monitoring and upgrade facilities to sites using discourse_docker.
|
# about: Provides basic monitoring and update facilities to sites using discourse_docker.
|
||||||
# meta_topic_id: 12655
|
# meta_topic_id: 12655
|
||||||
# version: 1.0.0
|
# version: 1.0.0
|
||||||
# authors: Robin Ward, Sam Saffron
|
# authors: Robin Ward, Sam Saffron
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# we fork and let the parent die because we want the upgrade/child process
|
# we fork and let the parent die because we want the update/child process
|
||||||
# to be orphaned and adopted by the init process to prevent the upgrade
|
# to be orphaned and adopted by the init process to prevent the update
|
||||||
# process from getting killed if/when unicorn gets killed.
|
# process from getting killed if/when unicorn gets killed.
|
||||||
fork do
|
fork do
|
||||||
Process.setsid
|
Process.setsid
|
||||||
|
|
|
@ -80,7 +80,7 @@ acceptance("docker_manager", function (needs) {
|
||||||
|
|
||||||
await click(".upgrade-button");
|
await click(".upgrade-button");
|
||||||
|
|
||||||
assert.dom("h1").hasText("Upgrade discourse");
|
assert.dom("h1").hasText("Update discourse");
|
||||||
assert.dom("button.start-upgrade").exists();
|
assert.dom("button.start-upgrade").exists();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -108,7 +108,7 @@ module("Integration | Component | RepoStatus", function (hooks) {
|
||||||
.exists("green check is present when official");
|
.exists("green check is present when official");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("upgrade button", async function (assert) {
|
test("update button", async function (assert) {
|
||||||
const store = getOwner(this).lookup("service:store");
|
const store = getOwner(this).lookup("service:store");
|
||||||
this.set("repo", store.createRecord("repo", repoProps));
|
this.set("repo", store.createRecord("repo", repoProps));
|
||||||
this.set("managerRepo", store.createRecord("repo", managerProps));
|
this.set("managerRepo", store.createRecord("repo", managerProps));
|
||||||
|
@ -119,9 +119,9 @@ module("Integration | Component | RepoStatus", function (hooks) {
|
||||||
|
|
||||||
assert
|
assert
|
||||||
.dom(".upgrade-button")
|
.dom(".upgrade-button")
|
||||||
.exists("upgrade button is visible when plugin is out-of-date")
|
.exists("update button is visible when plugin is out-of-date")
|
||||||
.isNotDisabled(
|
.isNotDisabled(
|
||||||
"upgrade button is not disabled when docker_manager repo is out-of-date"
|
"update button is not disabled when docker_manager repo is out-of-date"
|
||||||
);
|
);
|
||||||
|
|
||||||
this.managerRepo.version = "022aa3a";
|
this.managerRepo.version = "022aa3a";
|
||||||
|
@ -130,7 +130,7 @@ module("Integration | Component | RepoStatus", function (hooks) {
|
||||||
assert
|
assert
|
||||||
.dom(".upgrade-button")
|
.dom(".upgrade-button")
|
||||||
.isDisabled(
|
.isDisabled(
|
||||||
"upgrade button is disabled when docker_manager repo is not up-to-date"
|
"update button is disabled when docker_manager repo is not up-to-date"
|
||||||
);
|
);
|
||||||
|
|
||||||
this.repo.latest.commits_behind = 0;
|
this.repo.latest.commits_behind = 0;
|
||||||
|
@ -140,6 +140,6 @@ module("Integration | Component | RepoStatus", function (hooks) {
|
||||||
|
|
||||||
assert
|
assert
|
||||||
.dom(".upgrade-button")
|
.dom(".upgrade-button")
|
||||||
.doesNotExist("upgrade button is not visible when plugin is up-to-date");
|
.doesNotExist("update button is not visible when plugin is up-to-date");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue