Skip to content

Commit 2af687d

Browse files
jleveuglejleveugle
authored andcommitted
feat: init public cloud app
1 parent 355cede commit 2af687d

33 files changed

+1425
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "@ovh-ux/manager-public-cloud",
3+
"version": "2.0.0",
4+
"private": true,
5+
"license": "BSD-3-Clause",
6+
"main": "./src/index.js",
7+
"scripts": {
8+
"build": "webpack",
9+
"dev": "webpack-dev-server",
10+
"dev:watch": "yarn run dev",
11+
"start": "lerna exec --stream --scope='@ovh-ux/manager-stack' --include-filtered-dependencies -- yarn run build",
12+
"start:dev": "lerna exec --stream --scope='@ovh-ux/manager-stack' --include-filtered-dependencies -- yarn run dev",
13+
"start:watch": "lerna exec --stream --parallel --scope='@ovh-ux/manager-stack' --include-filtered-dependencies -- yarn run dev:watch"
14+
},
15+
"dependencies": {
16+
"@ovh-ux/manager-core": "^2.0.0",
17+
"@ovh-ux/ng-ovh-api-wrappers": "^3.0.0",
18+
"@ovh-ux/ng-ovh-apiv7": "^2.0.0",
19+
"@ovh-ux/ng-ovh-otrs": "^7.0.0-beta.1",
20+
"@ovh-ux/ng-ovh-sidebar-menu": "^8.0.0-beta.0",
21+
"@uirouter/angularjs": "^1.0.20",
22+
"angular": "^1.7.5",
23+
"angular-resource": "^1.7.5",
24+
"angular-translate": "^2.18.1",
25+
"bootstrap4": "twbs/bootstrap#v4.0.0",
26+
"jquery": "^2.1.3",
27+
"lodash": "^3.10.1",
28+
"moment": "^2.22.2",
29+
"ovh-api-services": "^4.0.0",
30+
"ovh-ui-angular": "^2.23.0",
31+
"ovh-ui-kit": "^2.23.1",
32+
"ovh-ui-kit-bs": "^2.1.1"
33+
},
34+
"devDependencies": {
35+
"@fortawesome/fontawesome-free": "^5.7.2",
36+
"@ovh-ux/manager-webpack-config": "^3.0.1",
37+
"webpack-merge": "^4.1.4"
38+
}
39+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default class PublicCloudController {
2+
/* eslint-disable */
3+
shouldDisplaySidebar() {
4+
return true;
5+
}
6+
/* eslint-enable */
7+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!doctype html>
2+
<html class="h-100">
3+
<head>
4+
<title>Public Cloud - OVH</title>
5+
<meta charset="utf-8" />
6+
</head>
7+
<body class="h-100">
8+
<div data-ng-app="ovhStack" class="h-100 d-flex flex-column overflow-hidden" data-ng-controller="PublicCloudController as $ctrl">
9+
<div>
10+
<ovh-manager-navbar></ovh-manager-navbar>
11+
</div>
12+
<div class="w-100 h-100">
13+
<div class="container-fluid h-100">
14+
<div class="row h-100">
15+
<div class="col-md-2 p-0 h-100 d-flex flex-column" data-ng-if="$ctrl.shouldDisplaySidebar()">
16+
<cloud-sidebar></cloud-sidebar>
17+
</div>
18+
<div class="h-100 d-flex" data-ng-class="{ 'col-md-10': $ctrl.shouldDisplaySidebar(), 'col-md-12': !$ctrl.shouldDisplaySidebar() }" ui-view>
19+
<div class="m-auto text-center">
20+
<span class="oui-icon oui-icon-clock-wait mb-4" style="font-size: 5rem;"></span>
21+
<h1 class="font-weight-bold" data-translate="public_cloud_coming_soon"></h1>
22+
<p data-translate="public_cloud_coming_soon_description"></p>
23+
</div>
24+
</div>
25+
</div>
26+
</div>
27+
</div>
28+
</div>
29+
</body>
30+
</html>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import 'script-loader!jquery'; // eslint-disable-line
2+
import 'script-loader!lodash'; // eslint-disable-line
3+
4+
import angular from 'angular';
5+
import core from '@ovh-ux/manager-core';
6+
import ngOvhApiWrappers from '@ovh-ux/ng-ovh-api-wrappers';
7+
8+
import 'ovh-ui-kit/dist/oui.css';
9+
import 'ovh-ui-kit-bs/dist/ovh-ui-kit-bs.css';
10+
11+
import navbar from './navbar';
12+
import sidebar from './sidebar';
13+
14+
import './index.scss';
15+
16+
import controller from './index.controller';
17+
import service from './index.service';
18+
19+
angular
20+
.module('ovhStack', [
21+
core,
22+
navbar,
23+
ngOvhApiWrappers,
24+
sidebar,
25+
])
26+
.controller('PublicCloudController', controller)
27+
.service('publicCloud', service)
28+
.run(/* @ngTranslationsInject:json ./translations */);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default /* @ngInject */ ($urlRouterProvider) => {
2+
$urlRouterProvider.otherwise('/');
3+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@import "~bootstrap4/scss/_functions";
2+
@import "~bootstrap4/scss/_variables";
3+
@import "~bootstrap4/scss/_mixins";
4+
@import '~bootstrap4/scss/_utilities.scss';
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import _ from 'lodash';
2+
3+
export default /* @ngInject */ class PublicCloud {
4+
constructor(iceberg) {
5+
this.iceberg = iceberg;
6+
}
7+
8+
getProjects() {
9+
return this
10+
.iceberg('/cloud/project')
11+
.query()
12+
.expand('CachedObjectList-Cursor')
13+
.sort('description') // Doesn't work as long as cache is not enaled
14+
.execute()
15+
.$promise
16+
.then(projects => _.sortBy(projects, 'description')); // Fallback
17+
}
18+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 15 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)