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

Toxophilist/sprint dev #482

Merged
merged 9 commits into from
Oct 15, 2021
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Release Notes


## Version 0.28.0
**Release Date**: 20th October 2021
### Features
1. User / Groups View added
1. Allow the creation / definition of local Users
2. Allow the creation / definition of OCI Groups
2. Bastion as a Service functionality added to main design canvas.
### Bug Fixes
1. Add missing policy documentation to export to markdown.


## Version 0.27.1
**Release Date**: 1st October 2021
### Bug Fixes
Expand Down
4 changes: 3 additions & 1 deletion okitweb/static/okit/css/okit_console.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ summary:focus {
}

.hidden {
visibility: hidden;
position: absolute;
display: none;
visibility: hidden;
max-height: 0;
max-width: 0;
}

.okit-pointer-cursor {
Expand Down
2 changes: 1 addition & 1 deletion okitweb/static/okit/js/okit.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class OkitSettings {
this.highlight_association = true;
this.show_label = 'none';
this.tooltip_type = 'simple';
this.name_prefix = 'okit-';
this.name_prefix = 'okit';
this.auto_save = false;
this.show_ocids = false;
this.validate_markdown = true;
Expand Down
2 changes: 1 addition & 1 deletion okitweb/static/okit/js/okit_designer_generation.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function exportToResourceManager() {
create_or_update: $('input[name=create_update_toggle]:checked').val(),
plan_or_apply: $('input[name=plan_apply_toggle]:checked').val()
};
console.info('Resource Manager Options : ' + JSON.stringify(request_json));
// console.info('Resource Manager Options : ' + JSON.stringify(request_json));
hideNavMenu();
setBusyIcon();
$(jqId('modal_dialog_progress')).removeClass('hidden');
Expand Down
76 changes: 76 additions & 0 deletions okitweb/static/okit/model/js/artefacts/bastion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
** Copyright (c) 2020, 2021, Oracle and/or its affiliates.
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
*/
console.info('Loaded Bastion Javascript');

/*
** Define Bastion Class
*/
class Bastion extends OkitArtifact {
/*
** Create
*/
constructor (data={}, okitjson={}) {
super(okitjson);
// Configure default values
// # Required
this.display_name = this.generateDefaultName(okitjson.bastions.length + 1);
this.compartment_id = '';
this.bastion_type = 'STANDARD';
this.target_subnet_id = '';
// # Optional
this.client_cidr_block_allow_list = [];
this.max_session_ttl_in_seconds = 180 * 60;
this.phone_book_entry = '';
this.static_jump_host_ip_addresses = '';
// Update with any passed data
this.merge(data);
this.convert();
// Expose subnet_id at the top level
Object.defineProperty(this, 'subnet_id', {get: function() {return this.target_subnet_id;}, set: function(id) {this.target_subnet_id = id;}, enumerable: false });
}
/*
** Clone Functionality
*/
clone() {
return new Bastion(JSON.clone(this), this.getOkitJson());
}
/*
** Name Generation
*/
getNamePrefix() {
return super.getNamePrefix() + 'b';
}
/*
** Static Functionality
*/
static getArtifactReference() {
return 'Bastion';
}
}
/*
** Dynamically Add Model Functions
*/
OkitJson.prototype.newBastion = function(data) {
this.getBastions().push(new Bastion(data, this));
return this.getBastions()[this.getBastions().length - 1];
}
OkitJson.prototype.getBastions = function() {
if (!this.bastions) {
this.bastions = [];
}
return this.bastions;
}
OkitJson.prototype.getBastion = function(id='') {
for (let artefact of this.getBastions()) {
if (artefact.id === id) {
return artefact;
}
}
return undefined;
}
OkitJson.prototype.deleteBastion = function(id) {
this.bastions = this.bastions ? this.bastions.filter((r) => r.id !== id) : []
}

72 changes: 72 additions & 0 deletions okitweb/static/okit/model/js/artefacts/key.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
** Copyright (c) 2020, 2021, Oracle and/or its affiliates.
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
*/
console.info('Loaded Key Javascript');

/*
** Define Key Class
*/
class Key extends OkitArtifact {
/*
** Create
*/
constructor (data={}, okitjson={}) {
super(okitjson);
// Configure default values
this.display_name = this.generateDefaultName(okitjson.keys.length + 1);
this.compartment_id = data.parent_id;
/*
** TODO: Add Resource / Artefact specific parameters and default
*/
// Update with any passed data
this.merge(data);
this.convert();
// TODO: If the Resource is within a Subnet but the subnet_iss is not at the top level then raise it with the following functions if not required delete them.
// Expose subnet_id at the top level
Object.defineProperty(this, 'subnet_id', {get: function() {return this.primary_mount_target.subnet_id;}, set: function(id) {this.primary_mount_target.subnet_id = id;}, enumerable: false });
}
/*
** Clone Functionality
*/
clone() {
return new Key(JSON.clone(this), this.getOkitJson());
}
/*
** Name Generation
*/
getNamePrefix() {
return super.getNamePrefix() + 'k';
}
/*
** Static Functionality
*/
static getArtifactReference() {
return 'Key';
}
}
/*
** Dynamically Add Model Functions
*/
OkitJson.prototype.newKey = function(data) {
this.getKeys().push(new Key(data, this));
return this.getKeys()[this.getKeys().length - 1];
}
OkitJson.prototype.getKeys = function() {
if (!this.keys) {
this.keys = [];
}
return this.keys;
}
OkitJson.prototype.getKey = function(id='') {
for (let artefact of this.getKeys()) {
if (artefact.id === id) {
return artefact;
}
}
return undefined;
}
OkitJson.prototype.deleteKey = function(id) {
this.keys = this.keys ? this.keys.filter((r) => r.id !== id) : []
}

72 changes: 72 additions & 0 deletions okitweb/static/okit/model/js/artefacts/network_load_balancer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
** Copyright (c) 2020, 2021, Oracle and/or its affiliates.
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
*/
console.info('Loaded Network Load Balancer Javascript');

/*
** Define Network Load Balancer Class
*/
class NetworkLoadBalancer extends OkitArtifact {
/*
** Create
*/
constructor (data={}, okitjson={}) {
super(okitjson);
// Configure default values
this.display_name = this.generateDefaultName(okitjson.network_load_balancers.length + 1);
this.compartment_id = data.parent_id;
/*
** TODO: Add Resource / Artefact specific parameters and default
*/
// Update with any passed data
this.merge(data);
this.convert();
// TODO: If the Resource is within a Subnet but the subnet_iss is not at the top level then raise it with the following functions if not required delete them.
// Expose subnet_id at the top level
Object.defineProperty(this, 'subnet_id', {get: function() {return this.primary_mount_target.subnet_id;}, set: function(id) {this.primary_mount_target.subnet_id = id;}, enumerable: false });
}
/*
** Clone Functionality
*/
clone() {
return new NetworkLoadBalancer(JSON.clone(this), this.getOkitJson());
}
/*
** Name Generation
*/
getNamePrefix() {
return super.getNamePrefix() + 'nlb';
}
/*
** Static Functionality
*/
static getArtifactReference() {
return 'Network Load Balancer';
}
}
/*
** Dynamically Add Model Functions
*/
OkitJson.prototype.newNetworkLoadBalancer = function(data) {
this.getNetworkLoadBalancers().push(new NetworkLoadBalancer(data, this));
return this.getNetworkLoadBalancers()[this.getNetworkLoadBalancers().length - 1];
}
OkitJson.prototype.getNetworkLoadBalancers = function() {
if (!this.network_load_balancers) {
this.network_load_balancers = [];
}
return this.network_load_balancers;
}
OkitJson.prototype.getNetworkLoadBalancer = function(id='') {
for (let artefact of this.getNetworkLoadBalancers()) {
if (artefact.id === id) {
return artefact;
}
}
return undefined;
}
OkitJson.prototype.deleteNetworkLoadBalancer = function(id) {
this.network_load_balancers = this.network_load_balancers ? this.network_load_balancers.filter((r) => r.id !== id) : []
}

72 changes: 72 additions & 0 deletions okitweb/static/okit/model/js/artefacts/nosql_database.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*
** Copyright (c) 2020, 2021, Oracle and/or its affiliates.
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
*/
console.info('Loaded NoSQL Database Javascript');

/*
** Define NoSQL Database Class
*/
class NoSQLDatabase extends OkitArtifact {
/*
** Create
*/
constructor (data={}, okitjson={}) {
super(okitjson);
// Configure default values
this.display_name = this.generateDefaultName(okitjson.nosql_databases.length + 1);
this.compartment_id = data.parent_id;
/*
** TODO: Add Resource / Artefact specific parameters and default
*/
// Update with any passed data
this.merge(data);
this.convert();
// TODO: If the Resource is within a Subnet but the subnet_iss is not at the top level then raise it with the following functions if not required delete them.
// Expose subnet_id at the top level
Object.defineProperty(this, 'subnet_id', {get: function() {return this.primary_mount_target.subnet_id;}, set: function(id) {this.primary_mount_target.subnet_id = id;}, enumerable: false });
}
/*
** Clone Functionality
*/
clone() {
return new NoSQLDatabase(JSON.clone(this), this.getOkitJson());
}
/*
** Name Generation
*/
getNamePrefix() {
return super.getNamePrefix() + 'nd';
}
/*
** Static Functionality
*/
static getArtifactReference() {
return 'NoSQL Database';
}
}
/*
** Dynamically Add Model Functions
*/
OkitJson.prototype.newNoSQLDatabase = function(data) {
this.getNoSQLDatabases().push(new NoSQLDatabase(data, this));
return this.getNoSQLDatabases()[this.getNoSQLDatabases().length - 1];
}
OkitJson.prototype.getNoSQLDatabases = function() {
if (!this.nosql_databases) {
this.nosql_databases = [];
}
return this.nosql_databases;
}
OkitJson.prototype.getNoSQLDatabase = function(id='') {
for (let artefact of this.getNoSQLDatabases()) {
if (artefact.id === id) {
return artefact;
}
}
return undefined;
}
OkitJson.prototype.deleteNoSQLDatabase = function(id) {
this.nosql_databases = this.nosql_databases ? this.nosql_databases.filter((r) => r.id !== id) : []
}

Loading