mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 14:55:27 +02:00
feat(edge/templates): introduce custom templates [EE-6208] (#10561)
This commit is contained in:
parent
a0f583a17d
commit
68950fbb24
81 changed files with 2047 additions and 334 deletions
|
@ -1,23 +0,0 @@
|
|||
import angular from 'angular';
|
||||
|
||||
class EdgeTemplateService {
|
||||
/* @ngInject */
|
||||
constructor(EdgeTemplates) {
|
||||
this.EdgeTemplates = EdgeTemplates;
|
||||
}
|
||||
|
||||
edgeTemplates() {
|
||||
return this.EdgeTemplates.query().$promise;
|
||||
}
|
||||
|
||||
async edgeTemplate(template) {
|
||||
const response = await fetch(template.stackFile);
|
||||
if (!response.ok) {
|
||||
throw new Error(response.statusText);
|
||||
}
|
||||
|
||||
return response.text();
|
||||
}
|
||||
}
|
||||
|
||||
angular.module('portainer.edge').service('EdgeTemplateService', EdgeTemplateService);
|
Loading…
Add table
Add a link
Reference in a new issue