microsoft / windows-admin-center-sdk

SDK including documentation and sample code for developing extensions for Windows Admin Center (previously Project Honolulu)
Other
118 stars 51 forks source link

The documentation is out of date #59

Open akviacode opened 5 years ago

akviacode commented 5 years ago

Hello,

We've updated @microsoft/windows-admin-center-sdk Now we cannot build our solutions: there are lot of changes in sdk. And it is not documented anywhere. E.g. https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/extend/guides/create-connection-provider Here there are code samples, but the new sdk has no this.appContextService.rpc.updateData method anymore. So how can we add new connections? Paths for imported modules were changed too. Can you provide uptodate documentation for developers?

Also, Developer Tools extension is not available now. Are you bring it back and when?

Thanks

mattatmsft commented 5 years ago

Hi there -

Which version of the SDK were you on previously? And did you update to latest or insider?

akviacode commented 5 years ago

Updated to the latest: "@microsoft/windows-admin-center-sdk": "latest"

Previous version was "version": "0.856.0"

Now it is: "version": "1.278.0"

Also, we've noticed that angular version was changed from 5.1.2 to 7.1.1

mattatmsft commented 5 years ago

Yes, that was a really big change. A very fundamental platform update, which did cause a lot of update work.

My suggestion would be to use the CLI to create a new project and them move your functional components from the old project into the new.

Also check out this document on migrating.

akviacode commented 5 years ago

Great document! Thanks. Also msft.sme.shell.devguide is awesome.

Have read all. Last point here, previous document Connection Provider example code sample was:

public onSubmit() {
let connections: Connection[] = [];

let connection = <Connection> {
  id: ConnectionUtility.createConnectionId(this.connectionType, this.newConnectionName),
  type: this.connectionType,
  name: this.newConnectionName
};

connections.push(connection);

this.appContextService.rpc.updateData(
  EnvironmentModule.nameOfShell,
  '##',
  <RpcUpdateData> {
    results: {
      connections: connections,
      credentials: null
    }
  }
);
}

public onCancel() {
this.appContextService.rpc.updateData(
  EnvironmentModule.nameOfShell, '##', <RpcUpdateData>{ results: { connections: [] } });
}

It should be replaced with:

public onSubmit() {
    const connection = <Connection> {
        id: ConnectionUtility.createConnectionId(this.connectionType, this.newConnectionName),
        type: this.connectionType,
        name: this.newConnectionName
      };

      this.appContextService.connectionManager.addOrUpdateConnection(connection);

      // TODO how to close dialog?
  }

  public onCancel() {
   // TODO how to close dialog?
  }

Is it correct? If so, how this dialog can be closed?

It's the last migration problem, all other were migrated perfect.

donatwork commented 3 years ago

Yes, that was a really big change. A very fundamental platform update, which did cause a lot of update work.

My suggestion would be to use the CLI to create a new project and them move your functional components from the old project into the new.

Also check out this document on migrating.

That link no longer works, getting 404 error. I do remember seeing that link a year ago but back then I was not working on the project.

donatwork commented 3 years ago
  // TODO how to close dialog?

Out of curiosity, how did you close the dialog(s)?