Git Product home page Git Product logo

Comments (6)

mattatmsft avatar mattatmsft commented on May 20, 2024

Hi there -

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

from windows-admin-center-sdk.

akviacode avatar akviacode commented on May 20, 2024

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

from windows-admin-center-sdk.

mattatmsft avatar mattatmsft commented on May 20, 2024

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.

from windows-admin-center-sdk.

akviacode avatar akviacode commented on May 20, 2024

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.

from windows-admin-center-sdk.

donatwork avatar donatwork commented on May 20, 2024

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.

from windows-admin-center-sdk.

donatwork avatar donatwork commented on May 20, 2024
  // TODO how to close dialog?

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

from windows-admin-center-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.