Warning if version of Devfile is different from 2.2.0 (#7065)

* Warning if version of Devfile is different from 2.2.0

* Fix unit tests
This commit is contained in:
Philippe Martin
2023-09-05 11:30:51 +02:00
committed by GitHub
parent e21b80f72a
commit 3f93ac0744
13 changed files with 38 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ import { Image } from './image';
export interface DevfileContent {
content: string;
version: string;
commands: Array<Command>;
containers: Array<Container>;
images: Array<Image>;

View File

@@ -84,6 +84,10 @@ export class AppComponent implements OnInit {
console.log(error);
}
});
if (newContent.version != "2.2.0") {
this.snackbar.open("The version of the Devfile is "+newContent.version+".\nOnly version 2.2.0 is supported", "ok")
}
});
this.sse.subscribeTo(['DevfileUpdated']).subscribe(event => {