Commit 2b9b2774 authored by Sascha Pfeiffer's avatar Sascha Pfeiffer

added info display for server license information

parent 3f187dbb
......@@ -45,7 +45,7 @@ build-docker-image:
DOCKER_HOST: 'tcp://docker:2375'
script:
- sh ./var/build-ubuntu.sh
- set -x && curl -fSL "https://download.docker.com/linux/static/stable/x86_64/docker-17.12.0-ce.tgz" -o docker.tgz && echo "692e1c72937f6214b1038def84463018d8e320c8eaf8530546c84c2f8f9c767d *docker.tgz" | sha256sum -c - && tar -xzvf docker.tgz && mv docker/* /usr/local/bin/
- curl -fSL "https://download.docker.com/linux/static/stable/x86_64/docker-17.12.0-ce.tgz" -o docker.tgz && echo "692e1c72937f6214b1038def84463018d8e320c8eaf8530546c84c2f8f9c767d *docker.tgz" | sha256sum -c - && tar -xzvf docker.tgz && mv docker/* /usr/local/bin/
- docker info
- echo $CI_BUILD_TOKEN | docker login --username=gitlab-ci-token --password-stdin registry.gitlab.com
- echo $artifactory_credentials | docker login --username=gitlab --password-stdin psono-docker.jfrog.io
......
......@@ -15,7 +15,7 @@
*/
var account = function($q, $uibModal, storage, managerDatastoreUser, managerDatastoreSetting) {
var account = function($q, $uibModal, $filter, storage, managerDatastoreUser, managerDatastoreSetting) {
var _server_info;
......@@ -44,6 +44,10 @@
{ key: "server_signature", field: "input", type: "text", title: "Server Signature", placeholder: "Server Signature", required: true, readonly: true, tab: 'overview'},
{ key: "server_log_audit", field: "input", type: "text", title: "Server Audit Logging", placeholder: "Server Audit Logging", required: true, readonly: true, tab: 'overview'},
{ key: "server_public_key", field: "input", type: "text", title: "Server Public Key", placeholder: "Server Public Key", required: true, readonly: true, tab: 'overview'},
{ key: "server_license_type", field: "input", type: "text", title: "Server License Type", placeholder: "Server License Type", required: true, readonly: true, tab: 'overview'},
{ key: "server_license_max_users", field: "input", type: "text", title: "Server Max. Users", placeholder: "Server Max. Users", required: true, readonly: true, tab: 'overview'},
{ key: "server_license_valid_from", field: "input", type: "text", title: "Server License Valid From", placeholder: "Server License Valid From", required: true, readonly: true, tab: 'overview'},
{ key: "server_license_valid_till", field: "input", type: "text", title: "Server License Valid Till", placeholder: "Server License Valid Till", required: true, readonly: true, tab: 'overview'},
// Change E-Mail
{ key: "setting_email", field: "input", type: "email", title: "New E-Mail", placeholder: "New E-Mail", required: true, tab: 'change-email'},
{ key: "setting_email_password_old", field: "input", type: "password", title: "Current Password", placeholder: "Current Password", tab: 'change-email'},
......@@ -245,6 +249,39 @@
return storage.find_key('config', 'server_info').value['public_key'];
}
if (key === 'server_license_type') {
if (storage.find_key('config','server_info').value.hasOwnProperty('license_type')) {
if (storage.find_key('config','server_info').value['license_type'] === 'paid') {
return 'Enterprise Edition (EE)'
} else {
return 'Enterprise Edition (EE) limited'
}
}
return 'Community Edition (CE)';
}
if (key === 'server_license_max_users') {
if (storage.find_key('config','server_info').value.hasOwnProperty('license_max_users')) {
return storage.find_key('config','server_info').value['license_max_users'];
}
return 'unlimited';
}
if (key === 'server_license_valid_from') {
if (storage.find_key('config','server_info').value.hasOwnProperty('license_valid_from')) {
return $filter('date')(storage.find_key('config','server_info').value['license_valid_from']*1000, 'mediumDate');
}
return 'N/A';
}
if (key === 'server_license_valid_till') {
if (storage.find_key('config','server_info').value.hasOwnProperty('license_valid_till')) {
return $filter('date')(storage.find_key('config','server_info').value['license_valid_till']*1000, 'mediumDate');
}
return 'N/A';
}
return '';
};
......@@ -349,6 +386,6 @@
};
var app = angular.module('psonocli');
app.factory("account", ['$q', '$uibModal', 'storage', 'managerDatastoreUser', 'managerDatastoreSetting', account]);
app.factory("account", ['$q', '$uibModal', '$filter', 'storage', 'managerDatastoreUser', 'managerDatastoreSetting', account]);
}(angular));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment