Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add object & cloud-archives storages #365

Merged
merged 5 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/manager/apps/pci/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"start:watch": "lerna exec --stream --parallel --scope='@ovh-ux/manager-pci-app' --include-filtered-dependencies -- yarn run dev:watch"
},
"dependencies": {
"@ovh-ux/ng-ovh-uirouter-layout": "^0.0.0",
"@ovh-ux/manager-cloud-styles": "^0.3.0-alpha.0",
"@ovh-ux/manager-config": "^0.2.0",
"@ovh-ux/manager-core": "^5.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ export const MENU = [
},
{
options: {
state: 'pci.projects.project2',
state: 'pci.projects.project.storages.objects',
},
translation: 'cloud_sidebar_storage_object_storage',
},
{
options: {
state: 'pci.projects.project2',
state: 'pci.projects.project.storages.archives',
},
translation: 'cloud_sidebar_storage_cold_storage',
},
{
options: {
state: 'pci.projects.project2',
state: 'pci.projects.project.storages.snapshots',
},
translation: 'cloud_sidebar_storage_volume_storage',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/modules/pci/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"ovh-angular-pagination-front": "ovh-ux/ovh-angular-pagination-front#^5.1.0",
"ovh-angular-q-allsettled": "ovh-ux/ovh-angular-q-allSettled#^0.3.1",
"ovh-angular-responsive-page-switcher": "^1.1.0",
"ovh-api-services": "^6.8.0",
"ovh-api-services": "git+https://github.com/ovh-ux/ovh-api-services.git#feat/cloud-project-storage-aapi",
"ovh-common-style": "^5.0.0",
"ovh-jquery-ui-draggable-ng": "ovh-ux/ovh-jquery-ui-draggable-ng#^0.0.5",
"ovh-manager-webfont": "^1.1.0",
Expand Down
1 change: 0 additions & 1 deletion packages/manager/modules/pci/src/projects/project/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'angular-translate';
import 'ovh-api-services';
import 'ovh-ui-angular';


import edit from './edit';
import instances from './instances';
import kubernetes from './kubernetes';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider
.state('pci.projects.project.storages.archives.add', {
url: '/new',
component: 'pciProjectStorageContainersAdd',
resolve: {
goBack: /* @ngInject */ ($rootScope, $state, projectId) => (reload = false) => {
if (reload) {
$rootScope.$emit('pci_storages_containers_refresh');
}
return $state.go('pci.projects.project.storages.archives', {
projectId,
});
},
cancelLink: /* @ngInject */ ($state, projectId) => $state.href('pci.projects.project.storages.archives', {
projectId,
}),
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-translate-async-loader';
import '@uirouter/angularjs';
import 'angular-translate';
import 'ovh-ui-angular';
import 'ovh-api-services';
import 'angular-ui-bootstrap';

import containersAdd from '../../containers/add';
import routing from './add.routing';

const moduleName = 'ovhManagerPciStoragesCloudArchivesAdd';

angular
.module(moduleName, [
containersAdd,
'ngTranslateAsyncLoader',
'oui',
'ovh-api-services',
'ovhManagerCore',
'pascalprecht.translate',
'ui.router',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider
.state('pci.projects.project.storages.archives.archive', {
url: '/{containerId}',
component: 'pciProjectStorageContainersContainer',
resolve: {
containerId: /* @ngInject */ $transition$ => $transition$.params().containerId,
addObject: /* @ngInject */ ($state, projectId, containerId) => () => $state.go('pci.projects.project.storages.archives.archive.add', {
projectId,
containerId,
}),
deleteObject: /* @ngInject */ ($state, projectId, containerId) => object => $state.go('pci.projects.project.storages.archives.archive.delete', {
projectId,
containerId,
objectId: object.name,
}),
goBack: /* @ngInject */ ($state, projectId) => () => $state.go('pci.projects.project.storages.archives', {
projectId,
}),
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider
.state('pci.projects.project.storages.archives.delete', {
url: '/delete?containerId',
views: {
modal: {
component: 'pciProjectStorageContainersContainerDelete',
},
},
layout: 'modal',
resolve: {
containerId: /* @ngInject */$transition$ => $transition$.params().containerId,
goBack: /* @ngInject */ ($rootScope, $state, projectId) => (reload = false) => {
if (reload) {
$rootScope.$emit('pci_storages_containers_refresh');
}
return $state.go('pci.projects.project.storages.archives', {
projectId,
});
},
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-translate-async-loader';
import '@uirouter/angularjs';
import 'angular-translate';
import 'ovh-ui-angular';
import 'ovh-api-services';

import containers from '../../../containers';
import routing from './delete.routing';

const moduleName = 'ovhManagerPciStoragesCloudArchivesArchiveDelete';

angular
.module(moduleName, [
containers,
'ngTranslateAsyncLoader',
'oui',
'ovh-api-services',
'ovhManagerCore',
'pascalprecht.translate',
'ui.router',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-translate-async-loader';
import '@uirouter/angularjs';
import 'angular-translate';
import 'ovh-ui-angular';
import 'ovh-api-services';

import containers from '../../containers/container';
import deleteContainer from './delete';
import addObject from './object/add';
import deleteObject from './object/delete';
import routing from './cloud-archive.routing';

const moduleName = 'ovhManagerPciStoragesCloudArchivesArchive';

angular
.module(moduleName, [
addObject,
containers,
deleteContainer,
deleteObject,
'ngTranslateAsyncLoader',
'oui',
'ovh-api-services',
'ovhManagerCore',
'pascalprecht.translate',
'ui.router',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider
.state('pci.projects.project.storages.archives.archive.add', {
url: '/new',
views: {
modal: {
component: 'pciProjectStorageContainersContainerObjectAdd',
},
},
layout: 'modal',
resolve: {
archive: () => true,
goBack: /* @ngInject */ (
$rootScope,
$state,
projectId,
containerId,
) => (reload = false) => {
if (reload) {
$rootScope.$emit('pci_storages_containers_container_refresh');
}
return $state.go('pci.projects.project.storages.archives.archive', {
projectId,
containerId,
});
},
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-translate-async-loader';
import '@uirouter/angularjs';
import 'angular-translate';
import 'ovh-ui-angular';
import 'ovh-api-services';

import containers from '../../../../containers';
import routing from './add.routing';

const moduleName = 'ovhManagerPciStoragesCloudArchivesArchiveObjectAdd';

angular
.module(moduleName, [
containers,
'ngTranslateAsyncLoader',
'oui',
'ovh-api-services',
'ovhManagerCore',
'pascalprecht.translate',
'ui.router',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider
.state('pci.projects.project.storages.archives.archive.delete', {
url: '/delete?objectId',
views: {
modal: {
component: 'pciProjectStorageContainersContainerObjectDelete',
},
},
layout: 'modal',
resolve: {
objectId: /* @ngInject */$transition$ => $transition$.params().objectId,
goBack: /* @ngInject */ (
$rootScope,
$state,
projectId,
containerId,
) => (reload = false) => {
if (reload) {
$rootScope.$emit('pci_storages_containers_container_refresh');
}
return $state.go('pci.projects.project.storages.archives.archive', {
projectId,
containerId,
});
},
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-translate-async-loader';
import '@uirouter/angularjs';
import 'angular-translate';
import 'ovh-ui-angular';
import 'ovh-api-services';

import containers from '../../../../containers';
import routing from './delete.routing';

const moduleName = 'ovhManagerPciStoragesCloudArchivesArchiveObjectDelete';

angular
.module(moduleName, [
containers,
'ngTranslateAsyncLoader',
'oui',
'ovh-api-services',
'ovhManagerCore',
'pascalprecht.translate',
'ui.router',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider
.state('pci.projects.project.storages.archives', {
url: '/cloud-archives',
component: 'pciProjectStorageContainers',
resolve: {
archive: () => true,
addContainer: /* @ngInject */($state, projectId) => () => $state.go('pci.projects.project.storages.archives.add', {
projectId,
}),
viewContainer: /* @ngInject */($state, projectId) => container => $state.go('pci.projects.project.storages.archives.archive', {
projectId,
containerId: container.id,
}),
deleteContainer: /* @ngInject */($state, projectId) => container => $state.go('pci.projects.project.storages.archives.delete', {
projectId,
containerId: container.id,
}),
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import angular from 'angular';
import '@ovh-ux/manager-core';
import '@ovh-ux/ng-translate-async-loader';
import '@uirouter/angularjs';
import 'angular-translate';
import 'oclazyload';
jleveugle marked this conversation as resolved.
Show resolved Hide resolved
import 'ovh-ui-angular';
import 'ovh-api-services';

import containers from '../containers';

import addObject from './add';
import cloudArchive from './cloud-archive';

import routing from './cloud-archives.routing';

const moduleName = 'ovhManagerPciStoragesCloudArchives';

angular
.module(moduleName, [
addObject,
containers,
cloudArchive,
'ngTranslateAsyncLoader',
'oui',
'ovh-api-services',
'ovhManagerCore',
'pascalprecht.translate',
'ui.router',
])
.config(routing)
.run(/* @ngTranslationsInject:json ./translations */);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import controller from './add.controller';
import template from './add.html';

export default {
controller,
template,
bindings: {
projectId: '<',
archive: '<',
goBack: '<',
cancelLink: '<',
},
};
Loading