Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
baas
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
baas
Commits
5526a0ae
Commit
5526a0ae
authored
Mar 11, 2016
by
Efthymia Bika
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate cloud settings
parent
bde69b50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
1 deletion
+36
-1
baas/activity.html
baas/activity.html
+36
-1
No files found.
baas/activity.html
View file @
5526a0ae
...
...
@@ -14,7 +14,6 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<script
src=
"backup.js"
></script>
<script
type=
"text/javascript"
>
function
check_gpg
()
{
...
...
@@ -46,9 +45,45 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
}
if
(
Object
.
keys
(
clouds
).
length
==
0
)
{
$
(
"
#cloud-alert
"
).
show
();
}
else
{
update_clouds_settings
(
clouds
);
}
}
function
update_clouds_settings
(
clouds
)
{
function
handle_error
(
data
)
{
console
.
error
(
"
Error updating clouds settings
"
+
data
);
}
function
handle_result
()
{
var
cloud
=
arguments
[
0
].
cloud
;
var
data
=
arguments
[
1
];
var
endpoints
=
JSON
.
parse
(
data
).
access
.
serviceCatalog
$
.
each
(
endpoints
,
function
(
i
,
endpoint
)
{
switch
(
endpoint
.
type
)
{
case
'
account
'
:
try
{
clouds
[
cloud
.
name
].
astakos_account
=
endpoint
[
'
endpoints
'
][
0
][
'
publicURL
'
];
write_conf_file
(
CLOUDS_CONF_FILE
,
clouds
);
}
catch
(
err
)
{
console
.
log
(
'
Failed to get astakos_account
'
+
err
);
}
break
;
}
});
}
$
.
each
(
clouds
,
function
(
i
,
cloud
)
{
if
(
typeof
cloud
.
astakos_account
==
'
undefined
'
)
{
var
astakos
=
getClient
(
'
astakos_notoken
'
,
cloud
.
auth_url
,
null
,
cloud
.
cert
);
astakos
.
post
(
'
/tokens
'
,
null
,
null
,
200
,
handle_result
.
bind
(
null
,
{
cloud
:
cloud
}),
handle_error
);
}
});
}
load_data_from_file
(
BACKUP_CONF_FILE
,
render_backup_sets
);
function
go_to_backup
(
backup
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment