mirror of https://github.com/portainer/portainer
feat(build): add missing imports
parent
fd3e96735c
commit
f5ccfabb2b
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
|
||||
angular.module('portainer.agent').controller('HostBrowserController', [
|
||||
'HostBrowserService', 'Notifications', 'FileSaver', 'ModalService',
|
||||
function HostBrowserController(HostBrowserService, Notifications, FileSaver, ModalService) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
|
||||
angular.module('portainer.agent')
|
||||
.controller('VolumeBrowserController', ['HttpRequestHelper', 'VolumeBrowserService', 'FileSaver', 'Blob', 'ModalService', 'Notifications',
|
||||
function (HttpRequestHelper, VolumeBrowserService, FileSaver, Blob, ModalService, Notifications) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { ResourceGroupViewModel } from '../models/resource_group';
|
||||
|
||||
angular.module('portainer.azure')
|
||||
.factory('ResourceGroupService', ['$q', 'ResourceGroup', function ResourceGroupServiceFactory($q, ResourceGroup) {
|
||||
'use strict';
|
||||
|
|
|
@ -23,7 +23,7 @@ export function ImageViewModel(data) {
|
|||
}
|
||||
}
|
||||
|
||||
function ImageBuildModel(data) {
|
||||
export function ImageBuildModel(data) {
|
||||
this.hasError = false;
|
||||
var buildLogs = [];
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ResourceControlViewModel } from "../../portainer/models/resourceControl";
|
||||
|
||||
export function NetworkViewModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.Name = data.Name;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ResourceControlViewModel } from '../../portainer/models/resourceControl'
|
||||
|
||||
export function SecretViewModel(data) {
|
||||
this.Id = data.ID;
|
||||
this.CreatedAt = data.CreatedAt;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { ResourceControlViewModel } from "../../portainer/models/resourceControl";
|
||||
|
||||
export function VolumeViewModel(data) {
|
||||
this.Id = data.Name;
|
||||
this.Driver = data.Driver;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { ImageBuildModel } from "../models/image";
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('BuildService', ['$q', 'Build', 'FileUploadService', function BuildServiceFactory($q, Build, FileUploadService) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { ConfigViewModel } from '../models/config';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ConfigService', ['$q', 'Config', function ConfigServiceFactory($q, Config) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import angular from 'angular';
|
||||
import { ContainerDetailsViewModel, ContainerViewModel } from '../models/container';
|
||||
import { ContainerDetailsViewModel, ContainerViewModel, ContainerStatsViewModel } from '../models/container';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('ContainerService', ['$q', 'Container', 'ResourceControlService', 'LogHelper',
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { NodeViewModel } from '../models/node';
|
||||
|
||||
angular.module('portainer.docker').factory('NodeService', [
|
||||
'$q', 'Node',
|
||||
function NodeServiceFactory($q, Node) {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import { PluginViewModel } from "../models/plugin";
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('PluginService', ['$q', 'Plugin', 'SystemService', function PluginServiceFactory($q, Plugin, SystemService) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { TaskViewModel } from '../models/task';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.factory('TaskService', ['$q', 'Task', 'LogHelper',
|
||||
function TaskServiceFactory($q, Task, LogHelper) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('ContainerController', ['$q', '$scope', '$state','$transition$', '$filter', 'Commit', 'ContainerHelper', 'ContainerService', 'ImageHelper', 'NetworkService', 'Notifications', 'ModalService', 'ResourceControlService', 'RegistryService', 'ImageService', 'HttpRequestHelper',
|
||||
function ($q, $scope, $state, $transition$, $filter, Commit, ContainerHelper, ContainerService, ImageHelper, NetworkService, Notifications, ModalService, ResourceControlService, RegistryService, ImageService, HttpRequestHelper) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import moment from 'moment';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('EventsController', ['$scope', 'Notifications', 'SystemService',
|
||||
function ($scope, Notifications, SystemService) {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { AccessControlFormData } from '../../../../portainer/components/accessControlForm/porAccessControlFormModel';
|
||||
|
||||
angular.module('portainer.docker')
|
||||
.controller('CreateSecretController', ['$scope', '$state', 'Notifications', 'SecretService', 'LabelHelper', 'Authentication', 'ResourceControlService', 'FormValidator',
|
||||
function ($scope, $state, Notifications, SecretService, LabelHelper, Authentication, ResourceControlService, FormValidator) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function StoridgeNodeModel(name, data) {
|
||||
export function StoridgeNodeModel(name, data) {
|
||||
this.Name = name;
|
||||
this.IP = data.ip;
|
||||
this.Role = data.role;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { StoridgeNodeModel } from '../models/node';
|
||||
|
||||
angular.module('extension.storidge')
|
||||
.factory('StoridgeNodeService', ['$q', 'Storidge', function StoridgeNodeServiceFactory($q, Storidge) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import moment from 'moment';
|
||||
|
||||
angular.module('extension.storidge')
|
||||
.controller('StoridgeMonitorController', ['$q', '$scope', '$interval', '$document', 'Notifications', 'StoridgeClusterService', 'StoridgeChartService',
|
||||
function ($q, $scope, $interval, $document, Notifications, StoridgeClusterService, StoridgeChartService) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function AccessControlFormData() {
|
||||
export function AccessControlFormData() {
|
||||
this.AccessControlEnabled = true;
|
||||
this.Ownership = 'private';
|
||||
this.AuthorizedUsers = [];
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
|
||||
angular.module('portainer.app')
|
||||
.factory('ResourceControlHelper', [function ResourceControlHelperFactory() {
|
||||
'use strict';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function TeamMembershipModel(data) {
|
||||
export function TeamMembershipModel(data) {
|
||||
this.Id = data.Id;
|
||||
this.UserId = data.UserID;
|
||||
this.TeamId = data.TeamID;
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
function TemplateDefaultModel() {
|
||||
import _ from 'lodash';
|
||||
|
||||
export function TemplateDefaultModel() {
|
||||
this.Type = 1;
|
||||
this.AdministratorOnly = false;
|
||||
this.Title = '';
|
||||
|
@ -46,7 +48,7 @@ function TemplateCreateRequest(model) {
|
|||
this.Volumes = model.Volumes;
|
||||
}
|
||||
|
||||
function TemplateUpdateRequest(model) {
|
||||
export function TemplateUpdateRequest(model) {
|
||||
TemplateCreateRequest.call(this, model);
|
||||
this.id = model.Id;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { TeamMembershipModel } from '../../models/teamMembership';
|
||||
|
||||
angular.module('portainer.app')
|
||||
.factory('TeamMembershipService', ['$q', 'TeamMemberships', function TeamMembershipFactory($q, TeamMemberships) {
|
||||
'use strict';
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import angular from 'angular';
|
||||
|
||||
angular.module('portainer.app')
|
||||
.controller('StackController', ['$q', '$scope', '$state', '$transition$', 'StackService', 'NodeService', 'ServiceService', 'TaskService', 'ContainerService', 'ServiceHelper', 'TaskHelper', 'Notifications', 'FormHelper', 'EndpointProvider', 'EndpointService', 'GroupService', 'ModalService',
|
||||
function ($q, $scope, $state, $transition$, StackService, NodeService, ServiceService, TaskService, ContainerService, ServiceHelper, TaskHelper, Notifications, FormHelper, EndpointProvider, EndpointService, GroupService, ModalService) {
|
||||
|
@ -121,7 +123,7 @@ function ($q, $scope, $state, $transition$, StackService, NodeService, ServiceSe
|
|||
var stack = $scope.stack;
|
||||
|
||||
// TODO: this is a work-around for stacks created with Portainer version >= 1.17.1
|
||||
// The EndpointID property is not available for these stacks, we can pass
|
||||
// The EndpointID property is not available for these stacks, we can pass
|
||||
// the current endpoint identifier as a part of the update request. It will be used if
|
||||
// the EndpointID property is not defined on the stack.
|
||||
var endpointId = EndpointProvider.endpointID();
|
||||
|
@ -239,7 +241,7 @@ function ($q, $scope, $state, $transition$, StackService, NodeService, ServiceSe
|
|||
function loadExternalStack(name) {
|
||||
var stackType = $transition$.params().type;
|
||||
if (!stackType || (stackType !== '1' && stackType !== '2')) {
|
||||
Notifications.error('Failure', err, 'Invalid type URL parameter.');
|
||||
Notifications.error('Failure', null, 'Invalid type URL parameter.');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
import angular from 'angular';
|
||||
import { TemplateDefaultModel } from "../../../models/template";
|
||||
|
||||
angular.module('portainer.app')
|
||||
.controller('CreateTemplateController', ['$q', '$scope', '$state', 'TemplateService', 'TemplateHelper', 'NetworkService', 'Notifications',
|
||||
function ($q, $scope, $state, TemplateService, TemplateHelper, NetworkService, Notifications) {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import { AccessControlFormData } from '../../components/accessControlForm/porAccessControlFormModel';
|
||||
|
||||
angular.module('portainer.app')
|
||||
.controller('TemplatesController', ['$scope', '$q', '$state', '$transition$', '$anchorScroll', 'ContainerService', 'ImageService', 'NetworkService', 'TemplateService', 'TemplateHelper', 'VolumeService', 'Notifications', 'ResourceControlService', 'Authentication', 'FormValidator', 'SettingsService', 'StackService', 'EndpointProvider', 'ModalService',
|
||||
function ($scope, $q, $state, $transition$, $anchorScroll, ContainerService, ImageService, NetworkService, TemplateService, TemplateHelper, VolumeService, Notifications, ResourceControlService, Authentication, FormValidator, SettingsService, StackService, EndpointProvider, ModalService) {
|
||||
|
|
Loading…
Reference in New Issue