CA-39992: Add "Repair Storage" action to the PBD_PLUG_FAILED_ON_SERVER_START alert

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2017-06-30 16:15:31 +01:00
parent 79dd753f5c
commit 813228eed6
3 changed files with 19 additions and 8 deletions

View File

@ -358,12 +358,11 @@ namespace XenAdmin.Alerts
case XenAPI.Message.MessageType.MULTIPATH_PERIODIC_ALERT:
return Program.ViewLogFiles;
// CA-23823: XenCenter "Repair Storage" link broken
// PBD_PLUG_FAILED_ON_SERVER_START give us host not sr uuid.
// therefore nothing we can do.
//case XenAPI.Message.MessageType.PBD_PLUG_FAILED_ON_SERVER_START:
// Menus.RepairSR(XenObject as XenObject<SR>);
// break;
case XenAPI.Message.MessageType.PBD_PLUG_FAILED_ON_SERVER_START:
var repairSrCommand = new RepairSRCommand(Program.MainWindow, XenObject.Connection.Cache.SRs);
if (repairSrCommand.CanExecute())
return () => repairSrCommand.Execute();
return null;
default:
return null;
}

View File

@ -3417,6 +3417,15 @@ namespace XenAdmin {
}
}
/// <summary>
/// Looks up a localized string similar to Repair Storage.
/// </summary>
public static string Message_action_pbd_plug_failed_on_server_start {
get {
return ResourceManager.GetString("Message.action-pbd_plug_failed_on_server_start", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Apply License.
/// </summary>
@ -3762,7 +3771,7 @@ namespace XenAdmin {
}
/// <summary>
/// Looks up a localized string similar to A storage repository could not be attached when server &apos;{0}&apos; started. You may be able to fix this using the &apos;Repair Storage&apos; option in the Storage menu..
/// Looks up a localized string similar to A storage repository could not be attached when server &apos;{0}&apos; started..
/// </summary>
public static string Message_body_pbd_plug_failed_on_server_start {
get {

View File

@ -1065,7 +1065,7 @@
<value>Servers in pool '{0}' have experienced a change in multipath status. Currently the following servers have inactive paths: {1}. See the [XenCenter] logs for the full details.</value>
</data>
<data name="Message.body-pbd_plug_failed_on_server_start" xml:space="preserve">
<value>A storage repository could not be attached when server '{0}' started. You may be able to fix this using the 'Repair Storage' option in the Storage menu.</value>
<value>A storage repository could not be attached when server '{0}' started.</value>
</data>
<data name="Message.body-pool_master_transition" xml:space="preserve">
<value>Server '{0}' is now the master of pool '{1}'.</value>
@ -1814,4 +1814,7 @@
<data name="Label-host.system_status-VM-snapshot-schedule" xml:space="preserve">
<value>Scheduled snapshots log files</value>
</data>
<data name="Message.action-pbd_plug_failed_on_server_start" xml:space="preserve">
<value>Repair Storage</value>
</data>
</root>