mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-29 08:10:29 -04:00
Arc april updates (#15237)
* Enables being able to view and edit Coordinator node scheduling params (#15114) * Trying to save per role settings * Updated spec * Cleaning up * Removed unneccessary code and comments * Added separate type for { w?: string, c?: string}, PR fixes * Added methods to refresh mr,ml,cr,cl versus per role * Fixed spec * Put back optional properties, removed passing empty string to reset scheduling params * Spacing * vBump arc * Included roles in fake show output for testing (#15196) * Update arc specs (#15225) * Update azdata Arc specs to match April azdata * vcores -> cpu * fix spacing * Consolidate types and update storage volumes * Fix compile * Update min azdata version Co-authored-by: nasc17 <69922333+nasc17@users.noreply.github.com> Co-authored-by: nasc17 <nasc@microsoft.com>
This commit is contained in:
@@ -311,7 +311,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
}
|
||||
|
||||
private editCores(): void {
|
||||
let currentCPUSize = this._miaaModel.config?.spec?.requests?.vcores;
|
||||
let currentCPUSize = this._miaaModel.config?.spec?.scheduling?.default?.resources?.requests?.cpu;
|
||||
|
||||
if (!currentCPUSize) {
|
||||
currentCPUSize = '';
|
||||
@@ -321,7 +321,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
this.coresRequestBox!.value = '';
|
||||
this.saveArgs.coresRequest = undefined;
|
||||
|
||||
currentCPUSize = this._miaaModel.config?.spec?.limits?.vcores;
|
||||
currentCPUSize = this._miaaModel.config?.spec?.scheduling?.default?.resources?.limits?.cpu;
|
||||
|
||||
if (!currentCPUSize) {
|
||||
currentCPUSize = '';
|
||||
@@ -334,7 +334,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
|
||||
private editMemory(): void {
|
||||
let currentMemSizeConversion: string;
|
||||
let currentMemorySize = this._miaaModel.config?.spec?.requests?.memory;
|
||||
let currentMemorySize = this._miaaModel.config?.spec?.scheduling?.default?.resources?.requests?.memory;
|
||||
|
||||
if (!currentMemorySize) {
|
||||
currentMemSizeConversion = '';
|
||||
@@ -347,7 +347,7 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
||||
|
||||
this.saveArgs.memoryRequest = undefined;
|
||||
|
||||
currentMemorySize = this._miaaModel.config?.spec?.limits?.memory;
|
||||
currentMemorySize = this._miaaModel.config?.spec?.scheduling?.default?.resources?.limits?.memory;
|
||||
|
||||
if (!currentMemorySize) {
|
||||
currentMemSizeConversion = '';
|
||||
|
||||
@@ -74,11 +74,11 @@ export class MiaaConnectionStringsPage extends DashboardPage {
|
||||
|
||||
private getConnectionStrings(): KeyValue[] {
|
||||
const config = this._miaaModel.config;
|
||||
if (!config?.status.externalEndpoint) {
|
||||
if (!config?.status.primaryEndpoint) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const externalEndpoint = parseIpAndPort(config.status.externalEndpoint);
|
||||
const externalEndpoint = parseIpAndPort(config.status.primaryEndpoint);
|
||||
const username = this._miaaModel.username ?? '{your_username_here}';
|
||||
|
||||
return [
|
||||
@@ -97,7 +97,7 @@ $conn = sqlsrv_connect($serverName, $connectionInfo);`),
|
||||
}
|
||||
|
||||
private updateConnectionStrings(): void {
|
||||
this._connectionStringsMessage.value = !this._miaaModel.config?.status.externalEndpoint ? loc.noExternalEndpoint : '';
|
||||
this._connectionStringsMessage.value = !this._miaaModel.config?.status.primaryEndpoint ? loc.noExternalEndpoint : '';
|
||||
this._keyValueContainer.refresh(this.getConnectionStrings());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,10 +350,10 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
||||
private handleMiaaConfigUpdated(): void {
|
||||
if (this._miaaModel.config) {
|
||||
this._instanceProperties.status = this._miaaModel.config.status.state || '-';
|
||||
this._instanceProperties.externalEndpoint = this._miaaModel.config.status.externalEndpoint || loc.notConfigured;
|
||||
this._instanceProperties.vCores = this._miaaModel.config.spec.limits?.vcores?.toString() || '';
|
||||
this._databasesMessage.value = !this._miaaModel.config.status.externalEndpoint ? loc.noExternalEndpoint : '';
|
||||
if (!this._miaaModel.config.status.externalEndpoint) {
|
||||
this._instanceProperties.externalEndpoint = this._miaaModel.config.status.primaryEndpoint || loc.notConfigured;
|
||||
this._instanceProperties.vCores = this._miaaModel.config.spec.scheduling?.default?.resources?.limits?.cpu?.toString() || '';
|
||||
this._databasesMessage.value = !this._miaaModel.config.status.primaryEndpoint ? loc.noExternalEndpoint : '';
|
||||
if (!this._miaaModel.config.status.primaryEndpoint) {
|
||||
this._databasesContainer.removeItem(this._connectToServerLoading);
|
||||
}
|
||||
}
|
||||
@@ -376,7 +376,7 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
||||
} else {
|
||||
// If we don't have an endpoint then there's no point in showing the connect button - but the logic
|
||||
// to display text informing the user of this is already handled by the handleMiaaConfigUpdated
|
||||
if (this._miaaModel?.config?.status.externalEndpoint) {
|
||||
if (this._miaaModel?.config?.status.primaryEndpoint) {
|
||||
this._connectToServerLoading.loading = false;
|
||||
this._connectToServerButton.enabled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user