Initial work on Arc controller + MIAA dashboards (#10781)

* initial

* postgres overview dashboard

* fewer dependencies

* stricter compile options

* make vsce package work

* Add localizedConstants

* Add localizedConstants

(cherry picked from commit 3ceed3e82b918ac829a7eac01487844e7d2ec02d)

* common WIP

* Initial dashboard work

* separate ui and models

* extend DashboardPage

* remove error handling

* wip

* Add more localized constants

* More updates

* Use api to populate instances

* merge master, strict mode, error handling, propertiesContainer, openInAzure

* use more localizedConstants

* localization

* connection strings and properties pages

* don't include arc extension by default

* don't include arc extension by default

* Address PR feedback

* undo changes to modelview components

* localize copied to clipboard

* localize copied to clipboard with function

* Update gulpfile.hygiene.js

* Move the gulpfile

* More updates

* more updates

* More updates

* re-delete file

* Fix compile error

* PR comments

Co-authored-by: Brian Bergeron <brberger@microsoft.com>
Co-authored-by: Brian Bergeron <brian.e.bergeron@gmail.com>
Co-authored-by: Amir Omidi <amomidi@microsoft.com>
This commit is contained in:
Charles Gagnon
2020-06-09 13:40:15 -07:00
committed by GitHub
parent 684aedfffa
commit 6536896c7d
15 changed files with 602 additions and 18 deletions

View File

@@ -11,6 +11,7 @@ import { DuskyObjectModelsDatabase, DuskyObjectModelsDatabaseServiceArcPayload }
import { DashboardPage } from '../../components/dashboardPage';
import { ControllerModel } from '../../../models/controllerModel';
import { PostgresModel } from '../../../models/postgresModel';
import { ResourceType } from '../../../common/utils';
export class PostgresOverviewPage extends DashboardPage {
private propertiesLoading?: azdata.LoadingComponent;
@@ -244,12 +245,12 @@ export class PostgresOverviewPage extends DashboardPage {
}).component();
openInAzurePortalButton.onDidClick(async () => {
const r = this._controllerModel.registration('postgresInstances', this._postgresModel.namespace(), this._postgresModel.name());
const r = this._controllerModel.getRegistration(ResourceType.postgresInstances, this._postgresModel.namespace(), this._postgresModel.name());
if (!r) {
vscode.window.showErrorMessage(loc.couldNotFindAzureResource(this._postgresModel.fullName()));
} else {
vscode.env.openExternal(vscode.Uri.parse(
`https://portal.azure.com/#resource/subscriptions/${r.subscriptionId}/resourceGroups/${r.resourceGroupName}/providers/Microsoft.AzureData/postgresInstances/${r.instanceName}`));
`https://portal.azure.com/#resource/subscriptions/${r.subscriptionId}/resourceGroups/${r.resourceGroupName}/providers/Microsoft.AzureData/${ResourceType.postgresInstances}/${r.instanceName}`));
}
});
@@ -263,7 +264,7 @@ export class PostgresOverviewPage extends DashboardPage {
}
private refreshProperties() {
const registration = this._controllerModel.registration('postgresInstances', this._postgresModel.namespace(), this._postgresModel.name());
const registration = this._controllerModel.getRegistration(ResourceType.postgresInstances, this._postgresModel.namespace(), this._postgresModel.name());
const endpoint: { ip?: string, port?: number } = this._postgresModel.endpoint();
this.properties!.propertyItems = [