2018-12-09 03:49:27 +00:00
|
|
|
// TODO: legacy extension management
|
2019-06-11 21:13:18 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
angular.module('portainer.integrations.storidge', []).config([
|
|
|
|
'$stateRegistryProvider',
|
|
|
|
function ($stateRegistryProvider) {
|
|
|
|
'use strict';
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var storidge = {
|
|
|
|
name: 'storidge',
|
|
|
|
parent: 'root',
|
|
|
|
abstract: true,
|
|
|
|
url: '/storidge',
|
|
|
|
};
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var profiles = {
|
|
|
|
name: 'storidge.profiles',
|
|
|
|
url: '/profiles',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/profiles/profiles.html',
|
|
|
|
controller: 'StoridgeProfilesController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var profile = {
|
|
|
|
name: 'storidge.profiles.profile',
|
|
|
|
url: '/:id',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/profiles/edit/profile.html',
|
|
|
|
controller: 'StoridgeProfileController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var drives = {
|
|
|
|
name: 'storidge.drives',
|
|
|
|
url: '/drives',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/drives/drives.html',
|
|
|
|
controller: 'StoridgeDrivesController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-05-24 21:53:10 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var drive = {
|
|
|
|
name: 'storidge.drives.drive',
|
|
|
|
url: '/:id',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/drives/inspect/drive.html',
|
|
|
|
controller: 'StoridgeDriveController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-05-24 21:53:10 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var snapshot = {
|
|
|
|
name: 'docker.volumes.volume.snapshot',
|
|
|
|
url: '/:snapshotId',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/snapshots/inspect/snapshot.html',
|
|
|
|
controller: 'StoridgeSnapshotController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-05-24 21:53:10 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var profileCreation = {
|
|
|
|
name: 'storidge.profiles.new',
|
|
|
|
url: '/new',
|
|
|
|
params: {
|
|
|
|
profileName: '',
|
|
|
|
},
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/profiles/create/createprofile.html',
|
|
|
|
controller: 'StoridgeCreateProfileController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var cluster = {
|
|
|
|
name: 'storidge.cluster',
|
|
|
|
url: '/cluster',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/cluster/cluster.html',
|
|
|
|
controller: 'StoridgeClusterController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var node = {
|
|
|
|
name: 'storidge.cluster.node',
|
|
|
|
url: '/:name',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/nodes/inspect/node.html',
|
|
|
|
controller: 'StoridgeNodeController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2019-05-24 21:53:10 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
var monitor = {
|
|
|
|
name: 'storidge.monitor',
|
|
|
|
url: '/events',
|
|
|
|
views: {
|
|
|
|
'content@': {
|
|
|
|
templateUrl: './views/monitor/monitor.html',
|
|
|
|
controller: 'StoridgeMonitorController',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2018-01-21 16:26:24 +00:00
|
|
|
|
2020-04-10 21:54:53 +00:00
|
|
|
$stateRegistryProvider.register(storidge);
|
|
|
|
$stateRegistryProvider.register(drives);
|
|
|
|
$stateRegistryProvider.register(drive);
|
|
|
|
$stateRegistryProvider.register(snapshot);
|
|
|
|
$stateRegistryProvider.register(profiles);
|
|
|
|
$stateRegistryProvider.register(profile);
|
|
|
|
$stateRegistryProvider.register(profileCreation);
|
|
|
|
$stateRegistryProvider.register(cluster);
|
|
|
|
$stateRegistryProvider.register(node);
|
|
|
|
$stateRegistryProvider.register(monitor);
|
|
|
|
},
|
|
|
|
]);
|