mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Bug fixes for DC upgrade in arc extension (#19161)
* Removed configure retention policy link. Log errors for upgrade instead of blocking the upgrade. Changed text of version log link. * Addressing comments on PR Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
@@ -338,8 +338,8 @@ export const loadingClusterContextsError = (error: any): string => localize('arc
|
|||||||
// Upgrade
|
// Upgrade
|
||||||
export const upgradeManagement = localize('arc.upgradeManagement', "Upgrade Management");
|
export const upgradeManagement = localize('arc.upgradeManagement', "Upgrade Management");
|
||||||
export const availableUpgrades = localize('arc.availableUpgrades', "Available Upgrades");
|
export const availableUpgrades = localize('arc.availableUpgrades', "Available Upgrades");
|
||||||
export const availableUpgradesDescription = localize('arc.availableUpgradesDescription', "Available upgrades for this resource are listed below. You can apply upgrades by selecting the upgrade button. Learn more about each of these releases at the");
|
export const availableUpgradesDescription = localize('arc.availableUpgradesDescription', "Available upgrades for this resource are listed below. You can apply upgrades by clicking the upgrade button.");
|
||||||
export const versionLog = localize('arc.versionLog', "version log.");
|
export const versionLog = localize('arc.versionLog', "Learn more about each release here.");
|
||||||
export const onlyNextImmediateVersion = localize('arc.onlyNextImmediateVersion', "Currently, only upgrading to the next immediate version is supported.");
|
export const onlyNextImmediateVersion = localize('arc.onlyNextImmediateVersion', "Currently, only upgrading to the next immediate version is supported.");
|
||||||
export const version = localize('arc.version', "Version");
|
export const version = localize('arc.version', "Version");
|
||||||
export const releaseDate = localize('arc.releaseDate', "Release Date");
|
export const releaseDate = localize('arc.releaseDate', "Release Date");
|
||||||
@@ -353,4 +353,3 @@ export function errorListingLogAnalyticsWorkspaces(error: any): string { return
|
|||||||
export const noUpgrades = localize('arc.noUpgrades', 'The current version is the latest version. No upgrades available.');
|
export const noUpgrades = localize('arc.noUpgrades', 'The current version is the latest version. No upgrades available.');
|
||||||
export const upgrading = localize('arc.upgrading', "Data controller is being upgraded. You can check the status of the upgrade by running the following command: 'kubectl get datacontrollers -A'"); // 'kubectl get datacontrollers -A' should not be localized.
|
export const upgrading = localize('arc.upgrading', "Data controller is being upgraded. You can check the status of the upgrade by running the following command: 'kubectl get datacontrollers -A'"); // 'kubectl get datacontrollers -A' should not be localized.
|
||||||
export const currentVersion = localize('arc.currentVersion', "Current version");
|
export const currentVersion = localize('arc.currentVersion', "Current version");
|
||||||
export const releaseDateNotParsed = localize('arc.releaseDateNotParsed', "Release date could not be parsed.");
|
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ export class ControllerUpgradesPage extends DashboardPage {
|
|||||||
this._azApi = vscode.extensions.getExtension(azExt.extension.name)?.exports;
|
this._azApi = vscode.extensions.getExtension(azExt.extension.name)?.exports;
|
||||||
}
|
}
|
||||||
private _upgradesContainer!: azdata.DivContainer;
|
private _upgradesContainer!: azdata.DivContainer;
|
||||||
private _configureRetentionPolicyButton!: azdata.ButtonComponent;
|
|
||||||
private _upgradesTableLoading!: azdata.LoadingComponent;
|
private _upgradesTableLoading!: azdata.LoadingComponent;
|
||||||
private _upgradesTable!: azdata.DeclarativeTableComponent;
|
private _upgradesTable!: azdata.DeclarativeTableComponent;
|
||||||
private _upgradesMessage!: azdata.TextComponent;
|
private _upgradesMessage!: azdata.TextComponent;
|
||||||
@@ -58,25 +57,18 @@ export class ControllerUpgradesPage extends DashboardPage {
|
|||||||
|
|
||||||
const infoAvailableUpgrades = this.modelView.modelBuilder.text().withProps({
|
const infoAvailableUpgrades = this.modelView.modelBuilder.text().withProps({
|
||||||
value: loc.availableUpgradesDescription,
|
value: loc.availableUpgradesDescription,
|
||||||
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px', 'max-width': 'auto' }
|
CSSStyles: { ...cssStyles.text, 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
const upgradesInfoDescription = this.modelView.modelBuilder.flexContainer()
|
|
||||||
.withLayout({ flexWrap: 'wrap' })
|
|
||||||
.withItems([
|
|
||||||
infoAvailableUpgrades
|
|
||||||
]).component();
|
|
||||||
|
|
||||||
const upgradesVersionLogLink = this.modelView.modelBuilder.hyperlink().withProps({
|
const upgradesVersionLogLink = this.modelView.modelBuilder.hyperlink().withProps({
|
||||||
label: loc.versionLog,
|
label: loc.versionLog,
|
||||||
url: 'https://docs.microsoft.com/en-us/azure/azure-arc/data/version-log',
|
url: 'https://docs.microsoft.com/azure/azure-arc/data/version-log'
|
||||||
CSSStyles: { 'margin-block-start': '0px', 'margin-block-end': '0px' }
|
|
||||||
}).component();
|
}).component();
|
||||||
|
|
||||||
const upgradesInfoAndLink = this.modelView.modelBuilder.flexContainer()
|
const upgradesInfoAndLink = this.modelView.modelBuilder.flexContainer()
|
||||||
.withLayout({ flexWrap: 'wrap' })
|
.withLayout({ flexWrap: 'wrap' })
|
||||||
.withItems([
|
.withItems([
|
||||||
upgradesInfoDescription,
|
infoAvailableUpgrades,
|
||||||
upgradesVersionLogLink
|
upgradesVersionLogLink
|
||||||
], { CSSStyles: { 'margin-right': '5px' } }).component();
|
], { CSSStyles: { 'margin-right': '5px' } }).component();
|
||||||
|
|
||||||
@@ -155,16 +147,10 @@ export class ControllerUpgradesPage extends DashboardPage {
|
|||||||
refreshButton.enabled = true;
|
refreshButton.enabled = true;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
this._configureRetentionPolicyButton = this.modelView.modelBuilder.button().withProps({
|
|
||||||
label: loc.configureRetentionPolicyButton,
|
|
||||||
enabled: true,
|
|
||||||
iconPath: IconPathHelper.edit,
|
|
||||||
}).component();
|
|
||||||
|
|
||||||
return this.modelView.modelBuilder.toolbarContainer().withToolbarItems(
|
return this.modelView.modelBuilder.toolbarContainer().withToolbarItems(
|
||||||
[
|
[
|
||||||
{ component: refreshButton, toolbarSeparatorAfter: true },
|
{ component: refreshButton, toolbarSeparatorAfter: true },
|
||||||
{ component: this._configureRetentionPolicyButton, toolbarSeparatorAfter: false },
|
|
||||||
|
|
||||||
]
|
]
|
||||||
).component();
|
).component();
|
||||||
@@ -274,9 +260,7 @@ export class ControllerUpgradesPage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
vscode.window.showErrorMessage(loc.updateExtensionsFailed(error));
|
console.log(error);
|
||||||
} finally {
|
|
||||||
this._configureRetentionPolicyButton.enabled = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -117,7 +117,6 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
// Direct mode argument
|
// Direct mode argument
|
||||||
if (resourceGroup) { argsArray.push('--resource-group', resourceGroup); }
|
if (resourceGroup) { argsArray.push('--resource-group', resourceGroup); }
|
||||||
// Indirect mode arguments
|
// Indirect mode arguments
|
||||||
|
|
||||||
if (namespace) { argsArray.push('--k8s-namespace', namespace); }
|
if (namespace) { argsArray.push('--k8s-namespace', namespace); }
|
||||||
if (usek8s) { argsArray.push('--use-k8s'); }
|
if (usek8s) { argsArray.push('--use-k8s'); }
|
||||||
return this.executeCommand<void>(argsArray, additionalEnvVars);
|
return this.executeCommand<void>(argsArray, additionalEnvVars);
|
||||||
|
|||||||
Reference in New Issue
Block a user