Class Configuration
- MvcCore\Ext\Form\Core\Base
- MvcCore\Ext\Form\Core\Configuration
Direct known subclasses
MvcCore\Ext\FormIndirect known subclasses
MvcCore\Ext\Auth\SignInForm, MvcCore\Ext\Auth\SignOutForm, MvcCore\Ext\Auth\Virtual\FormNamespace: MvcCore\Ext\Form\Core
Located at ext-form/src/MvcCore/Ext/Form/Core/Configuration.php
public static
|
#
AddCsrfErrorHandler( callable $handler )
Add cross site request forgery error handler. By CSRF error by submitting process there shoud be called queue of those handlers, for example to deauthenticate the user or anything else to secure your app more. |
public
|
|
public
|
#
AddCssClass( string $cssClass = '' )
Add css class (or classes separated by space) and add new value(s) after previous css class(es) attribute values. Value is used for standard css class attribute for HTML form tag. |
public
|
|
public
|
|
public
|
#
SetAttributes( array $attributes = array() )
Set form html element additional attributes. To add any other attribute for html < form> element, set here key/value array, keys will be used as attribute names, values as attribute values, simple. All previously configured additional attributes will be replaced by this function call. |
public
|
#
SetCss( array $cssFiles = array() )
Set supporting css files. All previously configured supporting css files will be replaced. Set it as array with all necessary css file paths to add into html response after form is rendered by contained fields. Every record in this field has defined: - supporting css file relative path |
public
|
#
SetCssClass( string $cssClass = '' )
Set form html element css class attribute value. To specify more css classes - add more strings separated by space and overwrite any previous css class attribute value. Value is used for standard css class attribute for HTML form tag. |
public
|
#
SetCssRenderer( callable $cssRenderer )
Set css external files renderer. If any callable is set, it has to accept first param to be SplFileInfo about extenal support css file. Css renderer must add supporting css file only once into html output result in any custom way, it is it's responsibility. |
public
|
#
SetDefaults( array $defaults = array(), boolean $keysInsensitive = FALSE )
Set multiple fields values by key/value array. For each key in $defaults array, library try to find form control with the same name as array key and that control value is set to array value. Only data with existing fields by keys are setted into field values. Values are setted by keys keys sensitively by default. |
public
|
#
SetEnctype( string $enctype = '' )
Set form enctype attribute - how the form values should be encoded when submitting it to the server. 'application/x-www-form-urlencoded' by default, it means all form values will be encoded to key1=value1&key2=value2... string. |
public
|
#
SetErrorsRenderMode( mixed $errorsRenderMode = \MvcCore\Ext\Form::ERROR_RENDER_MODE_ALL_TOGETHER )
Set errors rendering mode, by default configured as string: 'all-together', It means all errors are rendered naturaly at form begin together in one html div.errors element. If you are using custom template for form - you have to call after form beginning: $this->RenderErrors(); to get all errors into template. |
public
|
#
SetErrorUrl( string $url = '' )
Set error url string, relative or absolute, to specify, where user will be redirected after form will not be submitted successfully. It's not required to use \MvcCore\Ext\Form like this, but if you want to use method $form->RedirectAfterSubmit(); at the end of custom Submit method implementation, you need to specify at least success and error url strings. |
public
|
#
SetFieldsDefaultRenderMode( string $fieldsDefaultRenderMode = \MvcCore\Ext\Form::FIELD_RENDER_MODE_NORMAL )
Det default control/label rendering mode for each form control/label. Default configured value by default is string 'normal', it means label will be rendered before control, only for checkbox and radio button label will be rendered after control. |
public
|
|
public
|
#
SetJs( array $jsFilesClassesAndConstructorParams = array() )
Set supporting javascript files configuration. All previously configured supporting javascripts will be replaced. Set it as array with all necessary javascript contructors and file paths to add into html response after form is rendered by contained fields. Every record in this field has to be defined as array with: 0 - string - supporting javascript file relative path 1 - string - supporting javascript full class name inside supporting file 2 - array - supporting javascript constructor params |
public
|
#
SetJsRenderer( callable $jsRenderer )
Set javascript external files renderer. If any callable is set, it has to accept first param to be SplFileInfo about extenal supporting javascript file. Javascript renderer has to add supporting javascript file only once into html output result in any custom way, it is it's responsibility. |
public
|
#
SetLang( string $lang = '' )
Set $form->Lang, usualy used to complete optional translator language argument automaticly. If you are operating in multilanguage project and you want to use translator in \MvcCore\Ext\Form, set $form->Lang property to desired language code you want to translate every visible text into it. Use this property with $form->Translator and $form->Translate properties; |
public
|
#
SetLocale( string $locale = '' )
Set $form->Locale, usualy used to create proper validator for zip codes, currencies etc... If you are operating in multilanguage project and you want to use form field validators for locale specific needs in \MvcCore\Ext\Form, set $form->Locale property to desired international locale code you want to use proper validator functionality. |
public
|
|
public
|
#
SetNextStepUrl( string $url = '' )
Set next step url string, relative or absolute, to specify, where user will be redirected after form will be submitted successfully and submit button will be recognized to switch $form->Result value to value 2, which means next step redirection after successfull submit. This functionality to switch to value 2 is up to you. This field is designed only for you as empty. It's not required to use \MvcCore\Ext\Form like this, but if you want to use method $form->RedirectAfterSubmit(); at the end of custom Submit method implementation, and you want to go to next step by one button or stay in the same page by another form submit button, this is very good and comfortable pattern. |
public
|
#
SetRequired( boolean $required = TRUE )
Default required attribute for all fields in form. It this global required setter is configured to TRUE, every field with no required configuration after adding into form instance is configured automaticly by this efault property as required. Default values is FALSE, means not required fields in all forms by default. |
public
|
#
SetSuccessUrl( string $url = '' )
Set success url string, relative or absolute, to specify, where user will be redirected after form will be submitted successfully. It's required to use \MvcCore\Ext\Form like this, but if you want to use method $form->RedirectAfterSubmit();, at the end of custom Submit method implementation, you need to specify at least success and error url strings. |
public
|
#
SetTemplatePath( string $path = '' )
Set form custom template relative path without .phtml extension. By default $form->TemplatePath is an empty string, which means there will be used no template and form will be rendered naturaly, one field by one without any breaking line html element. If there is any path defined, it has to be defined relatively from directory '/App/Views/Scripts' to desired template. |
public
|
#
SetTemplateTypePath( string $typePath = '' )
Set $form->TemplateTypePath property, where current form templates will be located. By default, all form templates are located in '/App/Views/Scripts', if you want to change it, you can set this property for example to 'Forms' to define base directory for form templates to /App/Views/Forms' or by defining this property to '../Forms' to '/App/Forms' etc... |
public
|
#
SetTranslate( boolean $translate = TRUE )
Set TRUE to translate everything visible in form. Control placeholders, label texts and error messages. If you are configuring your form to be translated, there is also necessary to set $form->Translator callable to translate everything with it by method $form->SetTranslator();. Default values is NULL, means no translations will be processed it no Translator callable is set. |
public
|
#
SetTranslator( callable $translator = null )
Set translator callable to translate everything visible in form. Handler is necessary to design with first param to be a translation key, second param to be a language code and ahdler has to return translated string result. This property is optional to configure but if it is configured to any callable, everything in form will be translated, except fields strictly defined to not translate. Default values is NULL, means no translations will be processed. |
string |
METHOD_GET
Form http submitting method ('get'). |
#
'get'
|
string |
METHOD_POST
Form http submitting method ('post'). |
#
'post'
|
string |
METHOD_HEAD
Form http submitting method ('head'). |
#
'head'
|
string |
METHOD_PUT
Form http submitting method ('put'). |
#
'put'
|
string |
METHOD_PATCH
Form http submitting method ('patch'). |
#
'patch'
|
string |
METHOD_TRACE
Form http submitting method ('trace'). |
#
'trace'
|
string |
METHOD_OPTIONS
Form http submitting method ('options'). |
#
'options'
|
string |
METHOD_CONNECT
Form http submitting method ('connect'). |
#
'connect'
|
string |
METHOD_DELETE
Form http submitting method ('delete'). |
#
'delete'
|
string |
ENCTYPE_URLENCODED
Form enctype attribute value 'application/x-www-form-urlencoded', By submitting - all form values will be encoded to key1=value1&key2=value2&... string. This enctype type is used for all \MvcCore\Ext\Form(s) by default. |
#
'application/x-www-form-urlencoded'
|
string |
ENCTYPE_MULTIPART
Form enctype attribute value 'multipart/form-data', By submitting - no characters will be encoded. This value is required when you are using forms that have a file upload control. |
#
'multipart/form-data'
|
string |
ENCTYPE_PLAINTEXT
Form enctype attribute value 'application/x-www-form-urlencoded', By submitting - spaces will be converted to "+" symbols, but no special characters will be encoded. |
#
'text/plain'
|
string |
HTML_IDS_DELIMITER
Html id attributes delimiter,
used for form controls to complete
it's ids as |
#
'_'
|
string |
EQUAL
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':equal'
|
string |
NOT_EQUAL
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':notEqual'
|
string |
REQUIRED
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':required'
|
string |
INVALID_FORMAT
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':invalidFormat'
|
string |
INVALID_CHARS
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':invalidChars'
|
string |
EMPTY_CONTENT
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':empty'
|
string |
CSRF
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':csrf'
|
string |
MIN_LENGTH
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':minLength'
|
string |
MAX_LENGTH
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':maxLength'
|
string |
LENGTH
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':length'
|
string |
EMAIL
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':email'
|
string |
URL
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':url'
|
string |
NUMBER
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':number'
|
string |
INTEGER
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':integer'
|
string |
FLOAT
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':float'
|
string |
DATE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':date'
|
string |
DATE_TO_LOW
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':dateToLow'
|
string |
DATE_TO_HIGH
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':dateToHigh'
|
string |
TIME
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':time'
|
string |
TIME_TO_LOW
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':timeToLow'
|
string |
TIME_TO_HIGH
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':timeToHigh'
|
string |
DATETIME
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':datetime'
|
string |
PHONE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':phone'
|
string |
ZIP_CODE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':zipCode'
|
string |
TAX_ID
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':taxId'
|
string |
VAT_ID
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':varId'
|
string |
GREATER
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':greater'
|
string |
LOWER
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':lower'
|
string |
RANGE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':range'
|
string |
MAX_FILE_SIZE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':fileSize'
|
string |
MAX_POST_SIZE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':maxPostSize'
|
string |
IMAGE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':image'
|
string |
MIME_TYPE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':mimeType'
|
string |
VALID
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':valid'
|
string |
CHOOSE_MIN_OPTS
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':chooseMinOpts'
|
string |
CHOOSE_MAX_OPTS
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':chooseMaxOpts'
|
string |
CHOOSE_MIN_OPTS_BUBBLE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':chooseMinOptsBubble'
|
string |
CHOOSE_MAX_OPTS_BUBBLE
Constants used internaly and mostly in validator classes to specify proper error message index. |
#
':chooseMaxOptsBubble'
|
integer |
RESULT_ERRORS
Form submit result state (0 - error happend). Submit was not successful,there was an error/errors. |
#
0
|
integer |
RESULT_SUCCESS
Form submit result state (1 - everything ok). Submit was successful, no error happend. |
#
1
|
integer |
RESULT_NEXT_PAGE
Form submit result state (2 - everything ok, next step). Submit was successful, no error happend and one of submittin button is control to indicate that we can go to next step in multiple forms wizzard (typicly eshop ordering). |
#
2
|
string |
FIELD_RENDER_MODE_NORMAL
Control/labels rendering mode ('normal'). Label will be rendered before control, only for checkbox and radio button label will be rendered after control. |
#
'normal'
|
string |
FIELD_RENDER_MODE_NO_LABEL
Control/labels rendering mode ('no-label'). No label will be rendered with control. |
#
'no-label'
|
string |
FIELD_RENDER_MODE_LABEL_AROUND
Control/labels rendering mode ('label-around'). Label will be rendered around control. |
#
'label-around'
|
string |
ERROR_RENDER_MODE_ALL_TOGETHER
Control errors rendering mode ('all-together'). All errors are rendered naturaly at form begin together in one html div element. If you are using custom template for form - you have to call after form beginning $this->RenderErrors(); to get all errors into template. This value is used as default for all \MvcCore\Ext\Form(s). |
#
'all-together'
|
string |
ERROR_RENDER_MODE_BEFORE_EACH_CONTROL
Control errors rendering mode ('before-each-control'). If there will be any error, it will be rendered as single span.errors before current form control with single or multiple span.error elements inside, by errors count for current form control. It will be rendered in natural form rendering mode without template but also in custom form rendering mode with template if you call anytime in template $field->RenderLabelAndControl(); If you will use in custom form rendering mod with template method $field->RenderControl();, there will be not rendered any error spans before control, you have to use $field->RenderErrors(); to get errors for each control. |
#
'before-each-control'
|
string |
ERROR_RENDER_MODE_AFTER_EACH_CONTROL
Control errors rendering mode ('after-each-control'). If there will be any error, it will be rendered as single span.errors after current form control with single or multiple span.error elements inside, by errors count for current form control. It will be rendered in natural form rendering mode without template but also in custom form rendering mode with template if you call anytime in template $field->RenderLabelAndControl(); If you will use in custom form rendering mod with template method $field->RenderControl();, there will be not rendered any error spans before control, you have to use $field->RenderErrors(); to get errors for each control. |
#
'after-each-control'
|
public static
array
|
$DefaultMessages
Default not translated error messages with replacements for control names and more specific info to tell the user. |
#
array(
self::EQUAL => "Field '{0}' requires exact value: '{1}'.",
self::NOT_EQUAL => "Value for field '{0}' should not be '{1}'.",
self::REQUIRED => "Field '{0}' is required.",
self::INVALID_FORMAT => "Field '{0}' has invalid format ('{1}').",
self::INVALID_CHARS => "Field '{0}' contains invalid characters.",
self::EMPTY_CONTENT => "Sent data are empty.",
self::CSRF => "Form hash expired, please submit the form again.",
self::MIN_LENGTH => "Field '{0}' requires at least {1} characters.",
self::MAX_LENGTH => "Field '{0}' requires no more than {1} characters.",
self::LENGTH => "Field '{0}' requires a value between {1} and {2} characters long.",
self::EMAIL => "Field '{0}' requires a valid email address.",
self::URL => "Field '{0}' requires a valid URL.",
self::NUMBER => "Field '{0}' requires a valid number.",
self::INTEGER => "Field '{0}' requires a valid integer.",
self::FLOAT => "Field '{0}' requires a valid float number.",
self::DATE => "Field '{0}' requires a valid date format: '{1}'.",
self::DATE_TO_LOW => "Field '{0}' requires date higher or equal to '{1}'.",
self::DATE_TO_HIGH => "Field '{0}' requires date lower or equal to '{1}'.",
self::TIME => "Field '{0}' requires a valid time format: '00:00 - 23:59'.",
self::TIME_TO_LOW => "Field '{0}' requires time higher or equal to '{1}'.",
self::TIME_TO_HIGH => "Field '{0}' requires time lower or equal to '{1}'.",
self::DATETIME => "Field '{0}' requires a valid date time format: '{1}'.",
self::PHONE => "Field '{0}' requires a valid phone number.",
self::ZIP_CODE => "Field '{0}' requires a valid zip code.",
self::TAX_ID => "Field '{0}' requires a valid TAX ID.",
self::VAT_ID => "Field '{0}' requires a valid VAR ID.",
self::GREATER => "Field '{0}' requires a value greater than {1}.",
self::LOWER => "Field '{0}' requires a value lower than {1}.",
self::RANGE => "Field '{0}' requires a value between {1} and {2}.",
self::MAX_FILE_SIZE => "The size of the uploaded file can be up to {0} bytes.",
self::MAX_POST_SIZE => "The uploaded data exceeds the limit of {0} bytes.",
self::IMAGE => "The uploaded file has to be image in format JPEG, GIF or PNG.",
self::MIME_TYPE => "The uploaded file is not in the expected file format.",
self::VALID => "Field '{0}' requires a valid option.",
self::CHOOSE_MIN_OPTS => "Field '{0}' requires at least {1} chosen option(s) at minimal.",
self::CHOOSE_MAX_OPTS => "Field '{0}' requires {1} of the selected option(s) at maximum.",
self::CHOOSE_MIN_OPTS_BUBBLE=> "Please select at least {0} options as minimal.",
self::CHOOSE_MAX_OPTS_BUBBLE=> "Please select up to {0} options at maximum.",
)
|
public
|
$Controller
Controller object, always passed and required as first argument through \MvcCore\Ext\Form::__constructor($controller) method. |
#
null
|
public
|
$View
Form view, object container with variables from local context to render in template. Created automaticly inside \MvcCore\Ext\Form before each rendering process. |
#
NULL
|
public
string
|
$Id
Form id, required to configure. Used to identify session data, error messages, csrf tokens, html form attribute id value and much more. |
#
''
|
public
string
|
$Action
Form submitting url value. Should be relative or absolute, anything to complete classic html form attribute action. |
#
''
|
public
string
|
$Method
Form http submitting method. 'post' by default. |
#
self::METHOD_POST
|
public
string
|
$Enctype
Form enctype attribute - how the form values should be encoded when submitting it to the server. 'application/x-www-form-urlencoded' by default, it means all form values will be encoded to key1=value1&key2=value2... string. |
#
self::ENCTYPE_URLENCODED
|
public
string
|
$Lang
Field to complete optional translator language argument automaticly. If you are operating in multilanguage project and you want to use translator in \MvcCore\Ext\Form, set this Lang property to desired language code you want to translate every visible text into it. Use this property with $form->Translator and $form->Translate properties; |
#
''
|
public
string
|
$Locale
Field to create proper validator for zip codes, currencies etc... If you are operating in multilanguage project and you want to use form field validators for locale specific needs in \MvcCore\Ext\Form, set $form->Locale property to desired international locale code you want to use proper validator functionality. |
#
''
|
public
string
|
$CssClass
Form html element css class attribute value. To specify more css classes - add more strings separated by space. |
#
''
|
public
array
|
$Attributes
Form html element additional attributes. To add any other attribute for html < form> element, assert here key/value array, keys will be used as attribute names, values as attribute values, simple. |
#
array()
|
public
string
|
$SuccessUrl
Url string, relative or absolute, to specify, where user will be redirected after form will be submitted successfully. It's required to use \MvcCore\Ext\Form like this, but if you want to use method $form->RedirectAfterSubmit();, at the end of custom Submit method implementation, you need to specify at least success and error url strings. |
#
''
|
public
string
|
$NextStepUrl
Url string, relative or absolute, to specify, where user will be redirected after form will be submitted successfully and submit button will be recognized to switch $form->Result value to value 2, which means next step redirection after successfull submit. This functionality to switch to value 2 is up to you. This field is designed only for you as empty. It's not required to use \MvcCore\Ext\Form like this, but if you want to use method $form->RedirectAfterSubmit(); at the end of custom Submit method implementation, and you want to go to next step by one button or stay in the same page by another form submit button, this is very good and comfortable pattern. to use it like this. |
#
''
|
public
string
|
$ErrorUrl
Url string, relative or absolute, to specify, where user will be redirected after form will not be submitted successfully. It's not required to use \MvcCore\Ext\Form like this, but if you want to use method $form->RedirectAfterSubmit(); at the end of custom Submit method implementation, you need to specify at least success and error url strings. |
#
''
|
public
integer
|
$Result
Form submit result state (by default - 1 - everything ok). Submit was successful, no error happend. |
#
self::RESULT_SUCCESS
|
public
boolean
|
$Translate
If true, every form control placeholder, label content and error message will be translated to $form->Lang value translation fraze. If false, nothing will be translated. If null, nothing configured yet. Null is for internal purposes. |
#
NULL
|
public
callable
|
$Translator
Translator callable (should be closure function or array with classname/instance and method name string). First argument of callable object has to be a translation key and second argument has to be a language string ('en', 'de' ...) to translate the key into. result of callable object has to be a string - translated key to called language. |
#
NULL
|
public
boolean
|
$Required
Default switch how to set every form control to be required by default. If you define directly any control to not be required, it will not be required. This is only value used as default for not strictly defined require values in controls. |
#
FALSE
|
public
|
$Fields
Every form control after it is added by $form->AddField() method is added under it's name into this public array fith all form fields except csrf input:hidden. Fields are rendered by order in this array. |
#
array()
|
public
array
|
$Data
Form submited data from client. After $form->Submit() has been called, data are clean and ready to use if $form->Result is in success state. |
#
array()
|
public
array
|
$Errors
If any configured error happends by $form->Submit() process, it's stored in this array. Every record in this array is array with first item to be an error message string. If the error is for specific field name, there is also a second item - field name. Errors array has normal numeric keys. |
#
array()
|
public
string
|
$FieldsDefaultRenderMode
Default control/label rendering mode for each form control/label. Default values is string 'normal', it means label will be rendered before control, only for checkbox and radio button label will be rendered after control. |
#
self::FIELD_RENDER_MODE_NORMAL
|
public
string
|
$ErrorsRenderMode
Errors rendering mode, by default configured as string: 'all-together', It means all errors are rendered naturaly at form begin together in one html div.errors element. If you are using custom template for form - you have to call after form beginning: $this->RenderErrors(); to get all errors into template. |
#
self::ERROR_RENDER_MODE_ALL_TOGETHER
|
public
string
|
$TemplatePath
Form custom template relative path without .phtml extension. By default it's an empty string, which means there will be used no template and form will be rendered naturaly, one field by one without any breaking line html element. If there is any path defined, it has to be defined relatively from directory '/App/Views/Scripts' to desired template. |
#
''
|
public
string
|
$TemplateTypePath
Property to change template type path, where form templates will be located. By default, all form templates are located in '/App/Views/Scripts', if you want to change it, you can set this property for example to 'Forms' to define base directory for form templates to /App/Views/Forms' or by defining this property to '../Forms' to '/App/Forms' etc... |
#
'Scripts'
|
public
array
|
$Js
Array with all necessary javascript contructors and file paths to add into html response after form is rendered by contained fields. Every record in this field has defined: - string - supporting javascript file relative path - string - supporting javascript full class name inside supporting file - array - supporting javascript constructor params |
#
array()
|
public
array
|
$Css
Array with all necessary css file paths to add into html response after form is rendered by contained fields. Every record in this field has defined: - string - supporting javascript file relative path - string - supporting javascript full class name inside supporting file - array - supporting javascript constructor params |
#
array()
|
public
string
|
$JsBaseFile
If there is necessary to add after form into html response any supported javascript, there is necessary also to add base supporting form javascript - this is relative path where it is located. |
#
'__MVCCORE_FORM_DIR__/mvccore-form.js'
|
public
callable
|
$JsRenderer
Javascript external files renderer. If any callable is set, it has to accept first param to be SplFileInfo about extenal support javascript file. Javascript renderer must add supporting javascript file only once into html output result in any custom way, it is it's responsibility. |
#
NULL
|
public
callable
|
$CssRenderer
Css external files renderer. If any callable is set, it has to accept first param to be SplFileInfo about extenal support css file. Css renderer must add supporting css file only once into html output result in any custom way, it is it's responsibility. |
#
NULL
|
$csrfErrorHandlers,
$css,
$cssAssetsRootDir,
$initialized,
$js,
$jsAssetsRootDir
|


Templating with adminlte.io
Layout and styling Examples: https://adminlte.io/themes/AdminLTE/index2.html
Upgrade (maybe required with AdminTool: 1.1.7): https://adminlte.io/docs/2.4/upgrade-guide
Demo-Info
this is the overridden start page...
sign-in with button on upper right
username: admin
password: admin
Config
Internationalization Enabled =


RenderState Class
(QSGRenderNode::RenderState)Public Functions
| virtual | ~RenderState() |
| virtual const QRegion * | clipRegion() const = 0 |
| virtual void * | get(const char *state) const |
| virtual const QMatrix4x4 * | projectionMatrix() const = 0 |
| virtual bool | scissorEnabled() const = 0 |
| virtual QRect | scissorRect() const = 0 |
| virtual bool | stencilEnabled() const = 0 |
| virtual int | stencilValue() const = 0 |
Member Function Documentation
[virtual]
RenderState::~RenderState()
Destroys the instance of RenderState. The destructor is virtual.
[pure virtual]
const QRegion *RenderState::clipRegion() const
[virtual]
void *RenderState::get(const char *state) const
Returns pointer to a state value.
Reserved for future use.
[pure virtual]
const QMatrix4x4 *RenderState::projectionMatrix() const
Returns pointer to the current projection matrix.
The model-view matrix can be retrieved with QSGRenderNode::matrix(). Typically projection * modelview
is the matrix that is then used in the vertex shader to transform the vertices.
[pure virtual]
bool RenderState::scissorEnabled() const
Returns the current state of scissoring.
Note: Only relevant for graphics APIs that have a dedicated on/off state of scissoring.
[pure virtual]
QRect RenderState::scissorRect() const
Returns the current scissor rectangle when clipping is active.
Note: Be aware of the differences between graphics APIs: for some the scissor rect is only active when scissoring is enabled (for example, OpenGL), while for others the scissor rect is equal to the viewport rect when there is no need to scissor away anything (for example, Direct3D 12).
[pure virtual]
bool RenderState::stencilEnabled() const
Returns the current state of stencil testing.
Note: With graphics APIs where stencil testing is enabled in pipeline state objects, instead of individual state-setting commands, it is up to the implementation of render() to enable stencil testing with operations KEEP
, comparison function EQUAL
, and a read and write mask of 0xFF
.
[pure virtual]
int RenderState::stencilValue() const
Returns the current stencil reference value when clipping is active.


This is an example test used to show the features of the AutoCMS testing system.
This test counts the number of processes running on a worker node, then simulates
rolling two dice by generating random numbers between 1 and 6. It reports
the sum and makes a histogram of the results over the last day. It also sleeps
for a random interval between 0 and 60 seconds.


Collection
Documents for schools about GCE AS and A level subject content for teaching from 2015, 2016, 2017 and 2018.
AS and A level subject content publications setting out the knowledge, understanding and skills common to all AS and A level specifications.
Content and assessment objectives are available on Ofqual’s website .
Published: 9 April 2014
Updated: 3 March 2017
From: Department for Education
Part of: Curriculum and qualifications


class Solution: def maxDistance(self, position: List[int], m: int) -> int: position.sort() def possible(d): placed, last = 0, -math.inf for p in position: if p - last >= d: placed, last = placed + 1, p if placed >= m: return True return False low, high = 1, position[-1] - position[0] + 1 while low < high: mid = (low + high) // 2 if possible(mid): low = mid + 1 else: high = mid return low - 1


PDFUAXMLParser
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented
-
Undocumented


2001 Chevrolet Suburban
This was my current daily driver for a few years. With the 20" rims it
was a blast to drive, but it just wasn't a sports-car. Since I still
have the blazer, I decided to part with it. I think the next project may
be a C4 vette...
Mods: (not much... )
- 20" BBS rims
- The old Alpine deck and EQ from the 4Runner.
- Two 10" woofers in an iso box.
- One of the new Alpine MP3 CD changers
- Thule roof rack
- Billet aluminum grill
Here are a few random digital pic's I've got of the truck.


MNFFeedItem
@interface MNFFeedItem : MNFObject
The MNFFeedItem class encapsulates feed item json data from the server in an object.
A feed item should not be directly initialized but instead should be constructed with data from the server. The response from the server will be automatically converted to an MNFFeedItem object.
-
@abstact The date of the feed item.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSDate *_Nonnull date;
-
@abstract The topic id of the feed item. This can correspond to identifiers of the object being returned in the feed.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSNumber *_Nonnull topicId;
-
@abstract The topic name of the feed item.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSString *_Nonnull topicName;
-
@abstract The title of the feed item. This is a convenient display title gathered from the object data.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSString *_Nonnull title;
-
@abstract The body of the feed item. This is a convenient display body gathered from the object data.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSString *_Nonnull body;
-
@abstract The type name of the feed item. This corresponds to the default type values of each feed item.
Declaration
Objective-C
@property (readonly, copy, nonatomic) NSString *_Nonnull typeName;
-
@abstract The deserialized model object that this feed item represents.
@discussion This object will be serialized according to the feed item type name. A ‘TransactionFeedItemModel’ type name means the model will be an MNFTransaction object.
Declaration
Objective-C
@property (readonly, strong, nonatomic) NSObject *_Nonnull model;


As such, the classes are named using the format:
.d-{value}
for xs
.d-{breakpoint}-{value}
for sm
, md
, lg
, and xl
.Where value is one of:
none
inline
inline-block
block
table
table-cell
table-row
flex
inline-flex
The media queries effect screen widths with the given breakpoint or larger. For example, .d-lg-none
sets display: none;
on both lg
and xl
screens.
| Screen Size | Class |
|---|---|
| Hidden on all | .d-none |
| Hidden only on xs | .d-none .d-sm-block |
| Hidden only on sm | .d-sm-none .d-md-block |
| Hidden only on md | .d-md-none .d-lg-block |
| Hidden only on lg | .d-lg-none .d-xl-block |
| Hidden only on xl | .d-xl-none |
| Visible on all | .d-block |
| Visible only on xs | .d-block .d-sm-none |
| Visible only on sm | .d-none .d-sm-block .d-md-none |
| Visible only on md | .d-none .d-md-block .d-lg-none |
| Visible only on lg | .d-none .d-lg-block .d-xl-none |
| Visible only on xl | .d-none .d-xl-block |


Gecode::REG::Exp Class Reference
List of all members.
Detailed Description
Implementation of the actual expression tree.
Definition at line 45 of file reg.cc.
Member Enumeration Documentation
|
|
Type of regular expression.
- Enumerator:
-
| ET_SYMBOL |
|
| ET_CONC |
|
| ET_OR |
|
| ET_STAR |
|
Definition at line 52 of file reg.cc. |
Member Function Documentation
| void Gecode::REG::Exp::inc |
( |
void |
|
) |
[inline] |
|
| void Gecode::REG::Exp::dec |
( |
void |
|
) |
[inline] |
|
| unsigned int Gecode::REG::Exp::n_pos |
( |
void |
|
) |
const [inline] |
|
| std::ostream & Gecode::REG::Exp::print |
( |
std::ostream & |
|
) |
const |
|
| void * Gecode::REG::Exp::operator new |
( |
size_t |
|
) |
[inline, static] |
|
| void Gecode::REG::Exp::operator delete |
( |
void * |
|
) |
[inline, static] |
|
Member Data Documentation
The documentation for this class was generated from the following file:


Sign in Temporary log in
If you don't have you security card available today you can sign in by answering your security questions.
You need to log in with your secuirty card as soon as you have
If you need a new card you can order on once you have sign in.
Cancel and return to sign in to your secuirty card PIN


Hamiltonian graph: A graph that possesses a Hamiltonian cycle is called a Hamiltonian graph. In the absence of a Hamiltonian cycle, the graph is called non-Hamiltonian.
Hamiltonian cycle: A Hamiltonian cycle is a circuit or cycle that that visits each and every node of a graph exactly once.
• Bipartite graph is a graph in which the vertices can be divided into two disjoint sets such that an edge originating in one disjoint set always moves into another disjoint set.
The above diagram is an example of bipartite graph. The vertices are divided into two disjoin sets such that edge from one set always moves into vertex of another set.
• Owing to the above definition, every vertex has its adjacent vertex only in the disjoint set other than its own.
• So, in a Hamiltonian cycle, the edge must move from one disjoint set to another all the time.
• Eventually, the edge must come back to the original starting vertex. This requires equal number of vertices to be present in both disjoint sets so that the edge can travel from one disjoint set to other and alternate between the two and finally come back to the originating vertex.
So,
Since, , therefore, even number of vertices must present in a bipartite graph for it to be Hamiltonian. If number of vertices is Odd, then it can’t be Hamiltonian.
Thus, it is proved that an undirected bipartite graph which has an odd number of vertices is always non-Hamiltonian.
Consider HAM–CYCLE = and HAM–CYCLE .
For each node, exactly two incident edges participate in the cycle.
Define an algorithm CHECK–HAM–CYCLE to find the Hamiltonian cycles.
• The algorithm takes any graph .
• It should return true if have a Hamiltonian cycle.
• It should return false if doesn’t have a Hamiltonian cycle.
• It should be a polynomial–time algorithm.
Now design another algorithm GENERATE–HAM–CYCLE that generates the order of a legitimate Hamiltonian cycle of if exist.
Algorithm CHECK–HAM–CYCLE:
1 select a node
2 is the edges incident to the node .
3 calculate the pair such that
contains a Hamiltonian cycle.
4 if Hamiltonian cycle exists then
5 return true
6 else
7 return false
Clearly, the calculation of Hamiltonian cycle with all possible pairs requires polynomial time. So the algorithm is a polynomial time algorithm.
Algorithm GENERATE–HAM–CYCLE:
1 for each
2 If CHECK–HAM–CYCLE returns true then
3 print the Hamiltonian cycle of .
The above algorithm iterates times and calls the algorithm CHECK–HAM–CYCLE once per iteration. The total running time of the algorithm will be the product of and polynomial time which is still a polynomial–time (degree of polynomial will be increased by 1).
Therefore, if HAM–CYCLE then the problem of listing the vertices of a Hamiltonian cycle in order is solvable in polynomial–time.
There are lots of problem which does not have any algorithm to solve it in a polynomial time. These types of problems are categorizes in special type of class called as NP-Complete.
Suppose there are two languages and belongs to NP. There also exist 2 non-deterministic decider and such that is decided byand is decided byin their non-deterministic time and respectively.
Suppose is an input to machine M (a non-deterministic poly-time decider). The same input is applied to each operation.
Intersection:
1. Run on
//check accept the input
2. if
3. Run on
//check also accept the input
4. if
//return accept
5. return 1
//reject
6. return 0.
In intersection, an input is accepted only when it is accepted by both non-deterministic poly-time deciders and. The total time taken in processing of n long input is .
This shows that.
Union:
1. Run on
//check accept the input
2. if
//return accept
return 1
3. else
4. Run on
//check also accept the input
5. if
//return accept
6. return 1
7. else
//return reject
8. return 0.
In union, an input is accepted when it is accepted by any one non-deterministic poly-time deciders and. The total time taken in processing of n long input is.
This shows that.
Concatenation:
1. At first split the input into 2 inputs and.
2. Run on
//check accept the input
3. if
4. Run on
//check also accept the input
5. if
//return accept
6. return 1
7. else
//return reject
8. return 0.
9. else
//return reject
10 return 0
In concatenation, an input is split into two inputs and. An input is accepted when is accepted by any one non-deterministic poly-time deciders and is successfully accepted by. The total time taken in processing of n long input is.
This shows that.
//check input is empty
1. if
//return accept
2. return 1
3. Select k between
4. Now, Split into k inputs.
//use for loop to check all inputs
5. for to k
6. Run on
//check accept the input
7. if
//return reject
8. return 0
//return accept
9. return 1
Initially an input is n bit long. A single ‘for’ loop is used to process inputs. Non-deterministic poly-time deciders process the each input. The time taken by in processing one input is . Therefore the total processing time is.
This shows that.
NP under Complement:
Many researcher have studied about the NP problem but they does not found any conclusion whether NP class closed under complement.
If P is closed under complement then P=NP. This means NP is also closed under complement. If P is not closed under complement then NP also does not closed under complement.
Any language L is decidable by an algorithm ‘A’ only when
• If there exist an item ‘a’ which belongs to ‘A’ ( ) and A (a) = 1.
• If x L then A(a) = 0
As per the definition of the NP class, a language L belongs to NP only if :
• There exist a two-input polynomial time algorithm A and a constant c.
• The Language
• Let y be a certificate with |y| = O(|a|c) such that A(a, b) =1
If the above constraints are satisfied, then the algorithm A verifies the language L in polynomial time.
Design an algorithm A’, for a language L in NP to decide L in times of for some constant k.
Algorithm A’:
For different values of ‘ y’
If A(a, b) = = 1
return 1
else
return 0
Calculating the running time:
• Number of possible y are 2|y|
• Here, |y| = O(|x|c)
• Therefore, numbers of possible y are .
• For each y, the algorithms runs A(x, y) once, in polynomial time of O(|x|t) for some constant t.
• Therefore, the total running time of the algorithm is
Hamiltonian Path Problem
Consider a directed acyclic graph having a Hamiltonian path then proving by an algorithm takes polynomial time to run for:
.
Hamiltonian graph is the one which possess the Hamiltonian path and Hamiltonian path is the longest path in the graph that is the path which contains all the vertices of the graph.
A directed acyclic graph must have at least one vertex with indegree 0. Note that a vertex with indegree 0 must be at the beginning of every path and in particular at the start of a Hamiltonian path. So if a DAG has two vertices with in-degree 0 then it can’t have a Hamiltonian path since they both would have to be at the start of the path.
Now, suppose that a DAG G does have a Hamiltonian path then node s must be the unique node with indegree 0 in G so it can easily be identified. Furthermoremust be a Hamiltonian path in the DAG G’ that results after deleting from G vertex s and all of the edges leaving it. From above we see that if G’ has a Hamiltonian path then it must contain a unique vertex s’ with in-degree 0 and s’ is the start of Hamiltonian path. From the above discussion the algorithm is as:
1. Create an array in[v] which stores the in-degree of vertex v
2. Search for vertex with and assign v to
3. If more than one vertex with
// if no path found
4. return ‘NO HAMILTONIAN PATH’
5. set
6. for
7.
// NumZeroIn represents the number of nodes with indegree 0.
8.
// check each vertex with indegree 0
9. for all vertices with degree 0 making edges
10.
11. if
12.
13.
// more than one vertex with indegree 0
14. if
15. return “NO HAMILTONIAN PATH”
16. else
17.
18. return HPFor the creation of an empty array it takes time and in the second step for the search of each vertex in the graph for indegree as 0 it again takes time. The for loop in this algorithm takes time in the form of that is which is a polynomial and so this algorithm is the polynomial time algorithm. Hence, the algorithm for is the
polynomial time algorithm.


--- layout: article titles: en : &EN en-GB : *EN en-US : *EN en-CA : *EN en-AU : *EN zh-Hans : &ZH_HANS 关于 zh : *ZH_HANS zh-CN : *ZH_HANS zh-SG : *ZH_HANS zh-Hant : &ZH_HANT 關於 zh-TW : *ZH_HANT zh-HK : *ZH_HANT ko : &KO 소개 ko-KR : *KO key: page-about ---
I got my PhD at the University of Chile Computer Science Department in 2020, in the topic of live programming for robotic behaviors. Currently, I am an assistant professor in the Software Engineering Section of the University of Southern Denmark since August 2021. Previously, I was a postdoctoral researcher in the Unmanned Aerial System Center (UAS Center) of the same university since March 2020. I am particularly interested in improving the way we build software for robots, drones and cyber-physical systems. This includes the way of how we test and validate these software and how developers interact with the software and the systems.
I work as an assistant professor in the University of Southern Denmark, in the Software Engineering Section. I am collaborating with the Unmanned Aerial System Center (UAS Center) of the same university in the context of the HealthDrone project. In this project I research the development of software architectures for UAS and the use of Domain Specific Languages to specify UAS missions.
For publications, you can find my online profiles on: Google Scholar, DBLP and ORCID.
You can see videos of my work on my Youtube account.
For extra information, you can visit my LinkedIn page.
I have developed several robotic softwares:
I am a founding member of Cuac, a non-profit chilean corporation for robotic education founded in 2021. In particular, the corporation focuses on: (i) reaching the general population with down-to-earth robotic concepts; and (ii) teaching robotics to students or teachers who want to teach robotics to students, with a strong focus on gender and social equality on the students (i.e., the corporation actively looks on reducing the gender and social gap of its students).
In 2016 I co-found the first robotic community in the University of Chile. In this community we bring together all the students in the university that are interested in robotics.
As a result of the robotic community, we raised fundings and implemented a robotic course in the University of Chile inspired by the MIT class Duckietown. We adapted this course from graduate students to second-year engineer students of Chile. We appropriately called this course Duckietown Chile.
The main goal of Duckietown Chile is to introduce robotics to relative young students. We taught robotic concepts using self-driven vehicles as our main example. We incorporated the "business" metaphor of the MIT class, where students are not in a typical course, but they are applying to work in the Duckietown Chile business.
In 2018 and 2019 I co-organized the Beauchef Robotics Challenge (BRC) with the robotic community, the digital fabrication laboratory of the University of Chile (FabLab) and the IEEE RAS student chapter of the University of Chile.
In this competition, participants design, build and program their own line follower robots. An example of this type of robots can be found here: video. We have the complete streaming of our competition in facebook (credits to the guys from timer-crono!).
All documents related to BRC are available in our own GitHub page for anyone who wants to reproduce this competition.
I have participated in several events, presenting not only my work, but also the work of my colleagues of the different groups I have been worked.


- Chargebacks, Rates & Assignments
- Querying Chargebacks
- Creating Chargeback Rates
- Updating Chargeback Rates
- Deleting Chargeback Rates
- Querying Assigned Chargeback Rates
- Assign action for Chargeback Rates
- “Compute” Rate Type
- “Storage” Rate Type
- Basic Template for single chargeback request
- Basic Template for chargebacks collection request
- Enterprise
- Selected Providers
- Selected Clusters
- Tagged VMs and Instances
- Tagged Container Images
- Labeled Container Images
- Tenants
- Enterprise
- Selected Datastores
- Tagged Datastores
- Tenants
- Unassign action for Chargeback Rates
- Example of Chargeback Flow
- Create Chargeback Report
- Filtering according to resource
- Grouping Report Options
- Create Chargeback Rates
- Create Chargebacks (top-level rate entity)
- Assign Chargeback Rate
- Run Chargeback Report
- Results of Chargeback Report
Chargebacks, Rates & Assignments
Queries of Chargebacks and Management of Rates is provided via the following collections:
/api/chargebacks
/api/rates
Querying Chargebacks
Querying all chargebacks in the system is simply:
GET /api/chargebacks
or Query a specific chargeback, for example:
GET /api/chargebacks/1
{
"href": "http://localhost:3000/api/chargebacks/1",
"id": "1",
"guid": "b47a0ef0-4335-11df-aba8-001d09066d98",
"description": "Default",
"rate_type": "Compute",
"created_on": "2014-11-20T19:10:03Z",
"updated_on": "2014-11-20T19:10:03Z",
"default": true
}
Optionally, one can query the rates details for a chargeback as follows:
GET /api/chargebacks/:id/rates
Example getting additional rates details(attributes)
Request:
GET /api/chargebacks/1/rates?expand=resources&attributes=description,metric,group,source,friendly_rate
Response:
{
"name": "rates",
"count": 10,
"subcount": 8,
"resources": [
{
"href": "http://localhost:3000/api/chargebacks/1/rates/8",
"id": "8",
"description": "Fixed Compute Cost 2",
"group": "fixed",
"source": "compute_2",
"friendly_rate": "0.0 Hourly"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/7",
"id": "7",
"description": "Fixed Compute Cost 1",
"group": "fixed",
"source": "compute_1",
"friendly_rate": "1.0 Hourly"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/6",
"id": "6",
"description": "Used Disk I/O in KBps",
"group": "disk_io",
"metric": "disk_usage_rate_average",
"source": "used",
"friendly_rate": "Hourly @ 0.0 + 1.0 per Kbps from 0.0 to Infinity"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/5",
"id": "5",
"description": "Used Network I/O in KBps",
"group": "net_io",
"metric": "net_usage_rate_average",
"source": "used",
"friendly_rate": "Hourly @ 0.0 + 0.0 per Kbps from 0.0 to Infinity"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/4",
"id": "4",
"description": "Allocated Memory in MB",
"group": "memory",
"metric": "derived_memory_available",
"source": "allocated",
"friendly_rate": "Hourly @ 0.0 + 1.0 per Megabytes from 0.0 to Infinity"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/3",
"id": "3",
"description": "Used Memory in MB",
"group": "memory",
"metric": "derived_memory_used",
"source": "used",
"friendly_rate": "Hourly @ 0.0 + 0.0 per Megabytes from 0.0 to Infinity"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/2",
"id": "2",
"description": "Allocated CPU Count",
"group": "cpu",
"metric": "derived_vm_numvcpus",
"source": "allocated",
"friendly_rate": "Hourly @ 0.0 + 1.0 per Cpu from 0.0 to Infinity"
},
{
"href": "http://localhost:3000/api/chargebacks/1/rates/1",
"id": "1",
"description": "Used CPU in MHz",
"group": "cpu",
"metric": "cpu_usagemhz_rate_average",
"source": "used",
"friendly_rate": "Hourly @ 0.0 + 0.0 per Megahertz from 0.0 to Infinity"
}
]
}
Example getting additional of rates details(relations)
Request:
GET /api/rates?expand=resources&attributes=chargeback_rate,detail_measure,detail_currency,chargeable_field,chargeback_tiers
Response:
{
"name": "rates",
"count": 138,
"subcount": 138,
"pages": 1,
"resources": [
{
"href": "http://localhost:3090/api/rates/544",
"id": "544",
"enabled": true,
"description": "Allocated CPU Count",
"group": "cpu",
"source": null,
"metric": "derived_vm_numvcpus",
"per_time": "hourly",
"per_unit": "cpu",
"friendly_rate": "Hourly @ 1.0 + 0.0 per Cpu from 0.0 to Infinity",
"chargeback_rate_id": "8",
"created_on": "2018-06-01T11:24:52Z",
"updated_on": "2018-06-01T11:24:52Z",
"chargeback_rate_detail_measure_id": null,
"chargeback_rate_detail_currency_id": "1",
"chargeable_field_id": "3",
"sub_metric": null,
"chargeback_rate": {
"id": "8",
"guid": "52a70f67-7ab8-47a0-ba36-7808ac2449e0",
"description": "solinux1",
"rate_type": "Compute",
"created_on": "2018-06-01T11:24:52Z",
"updated_on": "2018-06-01T11:24:52Z",
"default": false
},
"detail_currency": {
"id": "1",
"code": "USD",
"name": "United States Dollar",
"full_name": "United States Dollar",
"symbol": "$",
"unicode_hex": "36",
"created_at": "2019-06-13T18:10:32Z",
"updated_at": "2019-07-09T13:42:36Z"
},
"chargeable_field": {
"id": "3",
"chargeback_rate_detail_measure_id": null,
"metric": "derived_vm_numvcpus",
"group": "cpu",
"source": "allocated",
"description": "Allocated CPU Count"
},
"chargeback_tiers": [
{
"id": "11010",
"chargeback_rate_detail_id": "544",
"start": 0.0,
"finish": null,
"fixed_rate": 1.0,
"variable_rate": 0.0
}
],
"actions": [
{
"name": "edit",
"method": "post",
"href": "http://localhost:3090/api/rates/544"
},
{
"name": "edit",
"method": "patch",
"href": "http://localhost:3090/api/rates/544"
},
{
"name": "edit",
"method": "put",
"href": "http://localhost:3090/api/rates/544"
},
{
"name": "delete",
"method": "post",
"href": "http://localhost:3090/api/rates/544"
},
{
"name": "delete",
"method": "delete",
"href": "http://localhost:3090/api/rates/544"
}
]
},
{
"href": "http://localhost:3090/api/rates/510",
"id": "510",
"enabled": true,
"description": "Allocated CPU Count",
"group": "cpu",
"source": null,
"metric": null,
"per_time": "hourly",
"per_unit": "cpu",
"friendly_rate": "Hourly @ 1.0 + 0.0 per Cpu from 0.0 to Infinity",
"chargeback_rate_id": "7",
"created_on": "2018-03-28T10:00:13Z",
"updated_on": "2018-03-28T10:00:13Z",
"chargeback_rate_detail_measure_id": null,
"chargeback_rate_detail_currency_id": "3",
"chargeable_field_id": "3",
"sub_metric": null,
"chargeback_rate": {
"id": "7",
"guid": "a72fd416-26ec-4aa0-bc94-0b741379dfcd",
"description": "teamA_compute_all",
"rate_type": "Compute",
"created_on": "2018-03-28T10:00:13Z",
"updated_on": "2018-03-28T10:00:13Z",
"default": false
},
"detail_currency": {
"id": "3",
"code": "GBP",
"name": "British Pound",
"full_name": "British Pound",
"symbol": "£",
"unicode_hex": "163",
"created_at": "2019-06-13T18:10:32Z",
"updated_at": "2019-07-09T13:42:35Z"
},
"chargeable_field": {
"id": "3",
"chargeback_rate_detail_measure_id": null,
"metric": "derived_vm_numvcpus",
"group": "cpu",
"source": "allocated",
"description": "Allocated CPU Count"
},
"chargeback_tiers": [
{
"id": "10115",
"chargeback_rate_detail_id": "510",
"start": 0.0,
"finish": 'infinity',
"fixed_rate": 1.0,
"variable_rate": 0.0
}
]
},
{
"href": "http://localhost:3090/api/rates/1859",
"id": "1859",
"enabled": true,
"description": "My CPU allocation rate",
"group": "cpu",
"source": "allocated",
"metric": null,
"per_time": "daily",
"per_unit": "megahertz",
"friendly_rate": "Daily @ 2.0 + 0.0 per Megahertz from 0.0 to 1.0\nDaily @ 2.0 + 0.0 per Megahertz from 1.0 to Infinity",
"chargeback_rate_id": "1",
"created_on": "2020-05-26T10:34:39Z",
"updated_on": "2020-05-26T10:34:39Z",
"chargeback_rate_detail_measure_id": "1",
"chargeback_rate_detail_currency_id": "5",
"chargeable_field_id": "3",
"sub_metric": null,
"chargeback_rate": {
"id": "1",
"guid": "b47a0ef0-4335-11df-aba8-001d09066d98",
"description": "Default",
"rate_type": "Compute",
"created_on": "2020-04-23T14:43:50Z",
"updated_on": "2020-04-23T15:00:29Z",
"default": true
},
"detail_measure": {
"id": "1",
"name": "Bytes Units",
"units": [
"bytes",
"kilobytes",
"megabytes",
"gigabytes",
"terabytes"
],
"units_display": [
"B",
"KB",
"MB",
"GB",
"TB"
],
"step": 1024,
"created_at": "2020-04-23T14:43:50Z",
"updated_at": "2020-04-23T15:00:28Z"
},
"detail_currency": {
"id": "5",
"code": "AUD",
"name": "Australian Dollar",
"full_name": "Australian Dollar",
"symbol": "$",
"unicode_hex": null,
"created_at": "2019-06-13T18:10:32Z",
"updated_at": "2019-07-09T13:42:35Z"
},
"chargeable_field": {
"id": "3",
"chargeback_rate_detail_measure_id": null,
"metric": "derived_vm_numvcpus",
"group": "cpu",
"source": "allocated",
"description": "Allocated CPU Count"
},
"chargeback_tiers": [
{
"id": "13114",
"chargeback_rate_detail_id": "1859",
"start": 0.0,
"finish": 1.0,
"fixed_rate": 2.0,
"variable_rate": 0.0
},
{
"id": "13115",
"chargeback_rate_detail_id": "1859",
"start": 1.0,
"finish": 'infinity',
"fixed_rate": 2.0,
"variable_rate": 0.0
}
]
},
...
Creating Chargeback Rates
Creating a Chargeback Rate is done by posting a new resource or create action to the rates collection.
Example follows:
Request:
POST /api/rates
{
"per_time" : "daily",
"chargeback_rate_id" : "1",
"chargeable_field_id" : "1",
"description": "My CPU allocation rate",
"group" : "cpu",
"per_unit" : "megahertz",
"source" : "allocated",
"chargeback_tiers": [
{
"start": 0.0,
"finish": "infinity",
"fixed_rate": 2.0,
"variable_rate": 0.0
}
]
}
Response:
{
"results": [
{
"href": "http://localhost:3090/api/rates/1866",
"id": "1866",
"enabled": true,
"description": "My CPU allocation rate",
"group": "cpu",
"source": "allocated",
"metric": null,
"per_time": "daily",
"per_unit": "megahertz",
"friendly_rate": "Daily @ 2.0 + 0.0 per MHz from 0.0 to Infinity",
"chargeback_rate_id": "1",
"created_on": "2020-05-28T13:28:15Z",
"updated_on": "2020-05-28T13:28:15Z",
"chargeback_rate_detail_measure_id": null,
"chargeback_rate_detail_currency_id": null,
"chargeable_field_id": "1",
"sub_metric": null
}
]
}
Updating Chargeback Rates
Updating rates can be done by posting edit actions on the rates resource.
Request:
POST /api/rates/16
{
"action" : "edit",
"resource" : { "description" : "Allocated NICs", "per_time": "hourly" }
}
Response:
{
"href": "http://localhost:3090/api/rates/16",
"id": "16",
"description": "Allocated NICs",
"per_time": "hourly",
"chargeback_rate_id": "1",
"chargeable_field_id": "3",
"enabled": true,
"group": "net_io",
"source": null,
"metric": null,
"per_unit": "cpu",
"friendly_rate": "Hourly @ 2.0 + 0.0 per Cpu from 0.0 to Infinity",
"created_on": "2020-04-23T15:00:29Z",
"updated_on": "2020-05-28T13:24:33Z",
"chargeback_rate_detail_measure_id": "1",
"chargeback_rate_detail_currency_id": "5",
"sub_metric": null
}
Deleting Chargeback Rates
Deleting Chargeback Rates can be done via either the delete post action or the DELETE HTTP method.
Request:
POST /api/rates/16
{
"action" : "delete"
}
Response:
{
"success": true,
"message": "rates id: 16 deleting",
"href": "http://localhost:3000/api/rates/16"
}
or simply:
DELETE /api/rates/16
Querying Assigned Chargeback Rates
Assigned chargeback rates on single rate:
GET /api/chargebacks/16?attributes=assigned_to
Response:
{
"href": "http://localhost:3090/api/chargebacks/2",
"id": "2",
"guid": "7d7aaf20-5214-11df-a888-001d09066d98",
"description": "Default",
"rate_type": "Storage",
"created_on": "2019-08-07T16:48:04Z",
"updated_on": "2020-04-20T13:27:07Z",
"default": true,
"assigned_to": [
{
"tag": {
"href": "http://localhost:3090/api/tags/48",
"name": "finance",
"category": "department"
}
},
{
"tag": {
"href": "http://localhost:3090/api/tags/26",
"name": "test",
"category": "environment"
}
}
]
}
Assigned chargeback rates on collection:
GET /api/chargebacks?expand=resources&attributes=assigned_to
Response:
{
"name": "chargebacks",
"count": 10,
"subcount": 2,
"subquery_count": 2,
"pages": 1,
"resources": [
{
"href": "http://localhost:3090/api/chargebacks/1",
"id": "1",
"guid": "b47a0ef0-4335-11df-aba8-001d09066d98",
"description": "Default",
"rate_type": "Compute",
"created_on": "2019-08-07T16:48:04Z",
"updated_on": "2020-05-13T09:36:21Z",
"default": true,
"assigned_to": [
{
"object": {
"id": "1",
"name": "Enterprise",
"description": "Enterprise Root Object",
"created_on": "2017-10-06T16:35:32Z",
"updated_on": "2017-10-06T16:35:32Z",
"settings": null
}
}
]
},
{
"href": "http://localhost:3090/api/chargebacks/2",
"id": "2",
"guid": "7d7aaf20-5214-11df-a888-001d09066d98",
"description": "Default",
"rate_type": "Storage",
"created_on": "2019-08-07T16:48:04Z",
"updated_on": "2020-05-13T09:36:21Z",
"default": true,
"assigned_to": [
{
"object": {
"id": "31",
"type": "ManageIQ::Providers::Vmware::InfraManager::Storage",
...
}
},
{
"object": {
"id": "19",
"type": "ManageIQ::Providers::Vmware::InfraManager::Storage"
...
}
},
{
"object": {
"id": "27",
"type": "ManageIQ::Providers::Vmware::InfraManager::Storage"
...
}
},
{
"object": {
"id": "14",
"type": "ManageIQ::Providers::Vmware::InfraManager::Storage"
...
}
}
]
}
]
}
Assign action for Chargeback Rates
Assignments could be done for two rate types: “Compute” and “Storage”. There are few assignments type under each rates type:
“Compute” Rate Type
“Storage” Rate Type
Example (chargebacks collection) - assign storage to chargeback rate with id 2 :
{
"action" : "assign",
"assignments" : [
{
"chargeback":
{
"id" : 2
},
"resource":
{
"href": "http://localhost:3090/api/data_stores/12"
}
}
]
}
Response:
{
"success": true,
"message": "Rates assigned successfully",
"result": [
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/data_stores/12",
"name": "EXPORT"
}
}
]
}
Basic Template for single chargeback request
POST /api/chargebacks/<chargeback_id>
{
"action" : "assign",
"assignments" : [
{
<resource>
}
]
}
Basic Template for chargebacks collection request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback":
{
<chargeback>
},
<resource>
}
]
}
<chargeback>
is same for all types of assignments. For <chargeback>
can be used href
or id
:
-
{"href": "http://localhost:3090/api/chargebacks/1"}
-
{"id": "1"}
<resource>
can be different across types of assignments - formats are
described in next section.
Enterprise
<resource>:
"href": "http://localhost:3090/api/enterprises/1"
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback":
{
"id" : 2
},
"resource":
{
"href": "http://localhost:3090/api/enterprises/1"
}
}
]
}
Response
{
"success": true,
"message": "Rates assigned successfully",
"result": [
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/enterprises/1",
"name": "Enterprise"
}
}
]
}
Selected Providers
<resource>:
"href": "http://localhost:3090/api/enterprises/1"
Selected Clusters
<resource>:
"href": "http://localhost:3090/api/clusters/1"
Tagged VMs and Instances
Identification can be done by tag’s name and tag’s category, by id
or
by href
.
assignment_prefix
is string which partly determines type of
assignment. In this case for “VMs and Instances” value for
assignment_prefix
is vm
.
<resource>:
- "tag": {
"category" : "department",
"name" : "finance",
"assignment_prefix": "vm"
}
- "tag": {
"id" : 28,
"assignment_prefix": "vm"
}
- "tag": {
"href" : 'http://localhost:3090/api/tags/28,
"assignment_prefix": "vm"
}
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback": { "id" : 1},
"tag": { "category" : "department", "name" : "finance", "assignment_prefix": "vm" }
},
{
"chargeback": { "id" : 1},
"tag": { "id" : 2}
},
{
"chargeback": { "id" : 3},
"tag": { "href" : "http://localhost:3090/api/tags/28", "assignment_prefix": "vm" }
}
]
}
Tagged Container Images
Identification can be done by tag’s name and tag’s category, by id
or
by href
.
assignment_prefix
is string which partly determines type of
assignment. - In this case for “Container Images” value for
assignment_prefix
is container_image
<resource>:
"tag":
{
"category" : "department",
"name" : "finance",
"assignment_prefix": "container_image"
}
or
"tag":
{
"id" : 28,
"assignment_prefix": "container_image"
}
or
"tag":
{
"href" : 'http://localhost:3090/api/tags/28,
"assignment_prefix": "container_image"
}
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback": { "id" : 1},
"tag": { "category" : "department", "name" : "finance", "assignment_prefix": "vm" }
},
{
"chargeback": { "id" : 1},
"tag": { "id" : 2}
},
{
"chargeback": { "id" : 3},
"tag": { "href" : "http://localhost:3090/api/tags/28", "assignment_prefix": "vm" }
}
]
}
Labeled Container Images
<resource>:
"href": "http://localhost:3090/api/container_images/934/custom_attributes/30331"
This resource represents custom attributes on container images, so called “labels”.
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" :
[
{
"chargeback": { "id" : 1},
"resource": { "href": "http://localhost:3090/api/container_images/934/custom_attributes/30331" }
},
{
"chargeback": { "id" : 1},
"resource": { "href": "http://localhost:3090/api/container_images/934/custom_attributes/30324" }
}
]
}
Tenants
<resource>:
"href": "http://localhost:3090/api/tenants/1"
Example
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback": {
"id" : 2
},
"resource": {
"href": "http://localhost:3090/api/tenants/1"
}
},
{
"chargeback": {
"id" : 2
},
"resource": {
"href": "http://localhost:3090/api/tenants/2"
}
}
]
}
Response
{
"success": true,
"message": "Rates assigned successfully",
"result": [
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/tenants/1",
"name": "My Company"
}
},
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/tenants/2",
"name": "OpenStack Cloud Provider OpenStack"
}
}
]
}
Enterprise
<resource>:
"resource" :
{
href": "http://localhost:3090/api/enterprises/1"
}
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback":
{
"id" : 2
},
"resource":
{
"href": "http://localhost:3090/api/enterprises/1"
}
}
]
}
Selected Datastores
<resource>:
"resource":
{
"href": "http://localhost:3090/api/enterprises/1"
}
Example
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback" :
{
"id" : 2
},
"resource" :
{
"href" : "/api/data_stores/1"
}
}
]
}
Response
{
"success": true,
"message": "Rates assigned successfully",
"result": [
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/data_stores/1",
"name": "Shared-NFS"
}
}
]
}
Tagged Datastores
<resource>:
"tag":
{
"href": "http://localhost:3090/api/tags/26",
"assignment_prefix": "storage"
}
or
"tag":
{
"category" : "department",
"name" : "finance",
"assignment_prefix": "storage"
}
or
"tag":
{
"id" : "26",
"assignment_prefix": "storage"
}
Example
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"tag": {
"category" : "department",
"name" : "finance",
"assignment_prefix": "storage"
}
}
]
}
Response
{
"success": true,
"message": "Rates assigned successfully",
"result": [
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"tag": {
"href": "http://localhost:3090/api/tags/48",
"name": "finance",
"category": "department",
"assignment_prefix": "storage"
}
}
]
}
Tenants
<resource>:
"href": "http://localhost:3090/api/tenants/1"
Request
POST /api/chargebacks
{
"action" : "assign",
"assignments" : [
{
"chargeback": {
"id" : 2
},
"resource": {
"href": "http://localhost:3090/api/tenants/1"
}
},
{
"chargeback": {
"id" : 2
},
"resource": {
"href": "http://localhost:3090/api/tenants/2"
}
}
]
}
Response
{
"success": true,
"message": "Rates assigned successfully",
"result": [
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/tenants/1",
"name": "My Company"
}
},
{
"chargeback": {
"href": "http://localhost:3090/api/chargebacks/2",
"description": "Default"
},
"resource": {
"href": "http://localhost:3090/api/tenants/2",
"name": "OpenStack Cloud Provider OpenStack"
}
}
]
}
Unassign action for Chargeback Rates
Unassign action has same signature as assign action and action is ‘unassign’.
Example
Request
POST
{
"action" : "unassign",
"assignments" : [
{
"chargeback": { "id" : 3},
"tag": { "category" : "prov_max_retirement_days", "name" : "30", "assignment_prefix": "vm" }
}
]
}
Example of Chargeback Flow
Create Chargeback Report
POST api/reports
{
"action" : "import",
"resource" : {
"report" : {
"rpt_group" : "Custom",
"rpt_type" : "Custom",
"menu_name" : "Chargeback Flow Example",
"col_order" : ["vm_name", "display_range", ..],
"cols" : ["start_date", "display_range", "vm_name", ..],
"headers" : ["VM Name", "Date Range", ..],
"title" : "Chargeback Flow Example",
"db" : "ChargebackVm",
"group" : "y",
"sortby" : ["vm_name", "start_date"],
"template_type" : "report",
"order" : "Ascending",
"db_options" : {
"rpt_type" : "ChargebackVm",
"options" : {
<report_options>
}
}
},
"options" : { "save" : true }
}
}
Attribute "report"
contains JSON with report definition which can be
obtained by exporting a chargeback report.
-
db
is type of report for chargeback purposes. Possible values areChargebackVm, ChargebackContainerProject, ChargebackContainerImage
.
Chargeback Report Options
Chargeback Report Options are present on index options
in request
json. There are also some options about filtering and grouping which are
described in this section. Default attributes are described first and
then there is explanation of attributes according to chargeback type of
report(attribute db
).
Example Request with options
POST /api/chargebacks
"db_options" : {
"rpt_type" : "ChargebackVm",
"options" : {
"interval" : "monthly",
"interval_size" : 12,
"end_interval_offset" : 1,
"tenant_id" : "1",
"method_for_allocated_metrics" : "max",
"include_metrics:" : true,
"cumulative_rate_calculation" : false,
"groupby" : "date",
"groupby_tag" : null,
"groupby_label" : null
}
}
...,
-
method_for_allocated_metrics
-max
oravg
-
include_metrics
-true
orfalse
- enable/disable whether to include metrics data, when disable it uses current values of metric data or charged resources -
cumulative_rate_calculation
-true
orfalse
enable/disable cumulative calculation for tagged resources -
interval
is which time detail is used for the report. Possible values aremonthly, weekly, daily
Metric data for chargeback report are taken from this interval:
`<Time.now-interval_size, Time.now-end_interval_offset>`
-
interval_size, end_interval_offset
- attributes inoptions
. there is used unit according to interval parameter, for example: when interval is “daily” theninterval_size=3
andend_interval_offset=2
mean that generated report will be based on metrics starting 3 days ago to 1 day ago.
Request
POST /api/chargebacks
"report" : {
"db_options" : {
"options" : {
...
}
},
...
}
Filtering according to resource
This is part of json used in request below.
Each section lists possible options to filter according to resource’s
type. There are used ids
for identification each type of resource and
and those ids
are used in attributes according to type of resources.
Name of attributes can be find in following sections. Attributes are
located in json for request(example with tenant) on indexes report,
db_options and options
:
Request
POST /api/chargebacks
"report" : {
"db_options" : {
"options" : {
"tenant_id" : 1,
...
}
},
...
}
Chargeback for VMs (db=ChargebackVm)
tenant_id
- Tenant id
or
owner
- userid
of user which owns VMs.
Request
POST /api/chargebacks
"report" : {
"db_options" : {
"options" : {
"owner" : "admin",
...
}
},
...
}
or
tag
- tag_path of tag
Request
POST /api/chargebacks
"report" : {
"db_options" : {
"options" : {
"tag" : "/managed/prov_max_cpu/2",
...
}
},
...
}
Chargeback for Projects (db=ChargebackContainerProject)
tag
- tag_path of tag
Request
POST /api/chargebacks
"report" : {
"db_options" : {
"options" : {
"tag" : "/managed/prov_max_cpu/2",
...
}
},
...
}
or
provider_id
- “all” or Openshift Provider id
entity_id
- “all” or Container Project id
"report" : {
"db_options" : {
"options" : {
"provider_id" : "41",
"entity_id" : "21",
...
}
},
...
}
Chargeback for Container Images (db=ChargebackContainerImage)
provider_id
- “all” or Openshift Provider id
entity_id
- “all” or Container Image id
Request
POST /api/chargebacks
"report" : {
"db_options" : {
"options" : {
"provider_id" : "all",
"entity_id" : "all",
...
}
}
}
Grouping Report Options
Chargeback for VMs (db=ChargebackVm)
groupby
- specifies a grouping option
Possible values for groupby
:
date
- grouping by date and Vms
date-only
- grouping only by date
tenant
- grouping by tenants
tag
- name of tag category - attribute groupby_tag
needs to be also
specified. Values for groupby_tag
are names of tag category which can
be retrieved in resources
GET
/api/categories?expand=resources&attributes=name
Chargeback for Projects (db=ChargebackContainerProject)
groupby
- specifies a grouping option
Possible values for groupby
:
date
- grouping by date and container projects
date-only
- grouping only by date
project
- grouping by container projects
tag
- - name of tag category - attribute groupby_tag
needs to be
also specified. Values for groupby_tag
are names of tag category which
can be retrieved in resources
GET
/api/categories?expand=resources&attributes=name
Chargeback for Container Images (db=ChargebackContainerImage)
groupby
- specifies a grouping option
Possible values for groupby
:
date
- grouping by date and containers
date-only
- grouping only by date
project
- grouping by container images
label
- grouping by container labels and when this value is set -
attribute groupby_tag
needs to be also specified. Values for
groupby_tag
are names of labels which can be retrieved by
api/container_images/:id/custom_attributes
endpoint (attribute=name)
for single container image.
Example request
GET
/api/container_images/934/custom_attributes?expand=resources&attributes=name&filter[]=section=docker_labels
Response
{
"name": "custom_attributes",
"count": 2041860,
"subcount": 11,
"subquery_count": 11,
"pages": 1,
"resources": [
{
"href": "http://localhost:3090/api/container_images/934/custom_attributes/30322",
"name": "build-date",
"id": "30322"
},
{
"href": "http://localhost:3090/api/container_images/934/custom_attributes/30324",
"name": "architecture",
"id": "30324"
}
],
...
}
Example of request to create chargeback report
Request
POST /api/chargebacks
{
"action" : "import",
"resource" : {
"report" : {
"rpt_group" : "Custom",
"rpt_type" : "Custom",
"menu_name" : "Chargeback Flow Example 1",
"col_order" : ["vm_name", "display_range", "chargeback_rates", "memory_allocated_metric", "memory_allocated_cost", "memory_allocated_rate", "memory_cost"],
"cols" : ["start_date", "display_range", "vm_name", "chargeback_rates", "memory_allocated_metric", "memory_allocated_cost", "memory_allocated_rate", "memory_cost"],
"headers" : ["VM Name", "Date Range", "Chargeback Rates", "Memory Allocated over Time Period", "Memory Allocated Cost" , "Memory Allocated Rate","Memory Total Cost"],
"title" : "Chargeback Flow Example 1",
"db" : "ChargebackVm",
"group" : "y",
"sortby" : ["vm_name", "start_date"],
"template_type" : "report",
"order" : "Ascending",
"db_options" : {
"rpt_type" : "ChargebackVm",
"options" : {
"interval" : "monthly",
"interval_size" : 12,
"end_interval_offset" : 1,
"tenant_id" : "1",
"method_for_allocated_metrics" : "max",
"include_metrics:" : true,
"cumulative_rate_calculation" : false,
"groupby" : "date",
"groupby_tag" : null,
"groupby_label" : null
}
}
},
"options" : { "save" : true }
}
}
Response
{
"results": [
{
"success": true,
"message": "Imported Report: [Chargeback Flow Example 1]",
"result": {
"id": "553",
"name": "Chargeback Flow Example 1",
"title": "Chargeback Flow Example 1",
"rpt_group": "Custom",
"rpt_type": "Custom",
"priority": null,
"db": "ChargebackVm",
"cols": [
"start_date",
"display_range",
"vm_name",
"chargeback_rates",
"memory_allocated_metric",
"memory_allocated_cost",
"memory_allocated_rate",
"memory_cost"
],
"include": null,
"col_order": [
"vm_name",
"display_range",
"chargeback_rates",
"memory_allocated_metric",
"memory_allocated_cost",
"memory_allocated_rate",
"memory_cost"
],
"headers": [
"VM Name",
"Date Range",
"Chargeback Rates",
"Memory Allocated over Time Period",
"Memory Allocated Cost",
"Memory Allocated Rate",
"Memory Total Cost"
],
"conditions": null,
"order": "Ascending",
"sortby": [
"vm_name",
"start_date"
],
"group": "y",
"graph": null,
"dims": null,
"created_on": "2020-05-19T12:16:31Z",
"updated_on": "2020-05-19T12:16:31Z",
"filename": null,
"file_mtime": null,
"categories": null,
"timeline": null,
"template_type": "report",
"where_clause": null,
"db_options": {
"rpt_type": "ChargebackVm",
"options": {
"interval": "monthly",
"interval_size": 12,
"end_interval_offset": 1,
"tenant_id": "1",
"method_for_allocated_metrics": "max",
"include_metrics:": true,
"cumulative_rate_calculation": false,
"groupby": "date",
"groupby_tag": null,
"groupby_label": null
}
},
"generate_cols": null,
"generate_rows": null,
"col_formats": null,
"tz": null,
"time_profile_id": null,
"display_filter": null,
"col_options": null,
"rpt_options": null,
"miq_group_id": "2",
"user_id": "1"
}
}
]
}
Create Chargeback Rates
Chargeback rate is complex structure. Create chargeback rate requires
two endpoints: /api/chargebacks
and /api/rates
. Endpoint
/api/chargebacks
manage top level rate entity which aggregate other
relations like rate details(api/rates
), currencies(api/currencies
),
measures(api/measures
), chargeable_fields(api/chargeable_fields
)
and chargeback tiers. This entity is also used to assigning
rates to any resource.
Create Chargebacks (top-level rate entity)
Request
POST /api/chargebacks
{
"guid" : "daily",
"description" : "1",
"rate_type" : "Compute"
}
Response
{
"results": [
{
"href": "http://localhost:3090/api/chargebacks/14",
"id": "14",
"guid": "daily",
"description": "1",
"rate_type": "Compute",
"created_on": "2020-05-26T12:15:51Z",
"updated_on": "2020-05-26T12:15:51Z",
"default": false
}
]
}
Now we need to create rate details(api/rates
) which includes
chargebable_fields, currenies, measures and tiers. It is also important
assign rate details to chargeback top level entity by chargeback_rate
attribute.
Request
POST /api/rates
{
"per_time" : "daily",
"chargeback_rate" : {"href": "http://localhost:3090/api/chargebacks/14"},
"chargeable_field_id" : "1",
"description": "My CPU allocation rate",
"group" : "cpu",
"per_unit" : "megahertz",
"source" : "allocated",
"chargeback_rate_detail_measure_id": 1,
"detail_currency" : {"id": 5},
"detail_measure" : {"href": "http://localhost:3090/api/measures/3"},
"chargeable_field" : {"href": "http://localhost:3090/api/chargeable_fields/3"},
"chargeback_tiers" : [
{
"start": 0.0,
"finish":1,
"fixed_rate": 2.0,
"variable_rate": 0.0
},
{
"start": 1,
"finish": "infinity",
"fixed_rate": 2.0,
"variable_rate": 0.0
}
]
}
Response
{
"results": [
{
"href": "http://localhost:3090/api/rates/1862",
"id": "1862",
"enabled": true,
"description": "My CPU allocation rate",
"group": "cpu",
"source": "allocated",
"metric": null,
"per_time": "daily",
"per_unit": "megahertz",
"friendly_rate": "Daily @ 2.0 + 0.0 per Megahertz from 0.0 to 1.0\nDaily @ 2.0 + 0.0 per Megahertz from 1.0 to Infinity",
"chargeback_rate_id": "14",
"created_on": "2020-05-26T12:36:32Z",
"updated_on": "2020-05-26T12:36:32Z",
"chargeback_rate_detail_measure_id": "3",
"chargeback_rate_detail_currency_id": "5",
"chargeable_field_id": "3",
"sub_metric": null
}
]
}
Assign Chargeback Rate
There are examples in those sections:
Run Chargeback Report
Please refer to Run Report section for details on how to run chargeback report. Running report requires report id or report href:
Report id or report href can be obtained by chargeback report creation or by listing chargeback reports:
Request
GET /api/reports?expand=resources&attributes=db&filter[]=db='ChargebackVm'&filter[]=or db='ChargebackContainer%'
Response
{
"name": "reports",
"count": 519,
"subcount": 47,
"subquery_count": 47,
"pages": 1,
"resources": [
{
"href": "http://localhost:3090/api/reports/157",
"db": "ChargebackContainerImage",
"id": "157"
},
{
"href": "http://localhost:3090/api/reports/152",
"db": "ChargebackVm",
"id": "152"
},
...
}
Results of Chargeback Report
There is request which list of report result.
Allowed parameters:
hash_attribute=value
- enables hash sorting and pagination for value column
sort_by
- column from MiqReportResult#report#col_order
sort_order
- asc
or desc
limit
- count of records for one page
offset
- result will start form <offset>
. record
filter_column
- chosen column for filtering
filter_string
- this string value is used for filtering on <filter_column>
, record of report result will be
returned in API when <filter_string>
is contained in value of <filter_column>
.
There is possibility to filter according to more columns. We need to add
other filter parameters with suffix _X
where X
is number
(..&filter_column_1=name&filter_string_1=TIE&filter_column_2=hostname&filter_string_2=test
)
Request
GET /api/results/23039?hash_attribute=result_set&sort_by=&sort_order=&limit=20&offset=0&filter_string=windemo
Response
{
"href": "http://localhost:3090/api/results/23039",
"id": "23039",
"name": "Chargeback - Demo",
...,
"result_set": [
{
"start_date": "01/01/19 00:00:00 UTC",
"display_range": "Jan 2019",
"vm_name": "windemo",
"owner_name": "Cloud Operators",
"provider_name": "vCenter",
"total_cost": "$48,303.51",
"cpu_cost": "$935.65",
"cpu_used_cost": "$191.65",
"cpu_used_metric": "12.88 MHz",
"memory_cost": "$1,609.69",
"memory_used_cost": "$1,609.69",
"memory_used_metric": "108.18 MB",
"net_io_used_cost": "$372.00",
"net_io_used_metric": "0.00 KBps",
"chargeback_rates": "Default"
},
{
"start_date": "02/01/19 00:00:00 UTC",
"display_range": "Feb 2019",
"vm_name": "windemo",
"owner_name": "Cloud Operators",
"provider_name": "vCenter",
"total_cost": "$43,851.09",
"cpu_cost": "$861.44",
"cpu_used_cost": "$189.44",
"cpu_used_metric": "14.09 MHz",
"memory_cost": "$1,659.73",
"memory_used_cost": "$1,659.73",
"memory_used_metric": "123.49 MB",
"net_io_used_cost": "$336.00",
"net_io_used_metric": "0.00 KBps",
"chargeback_rates": "Default"
},
{
"start_date": "03/01/19 00:00:00 UTC",
"display_range": "Mar 2019",
"vm_name": "windemo",
"owner_name": "Cloud Operators",
"provider_name": "vCenter",
"total_cost": "$28,906.99",
"cpu_cost": "$553.43",
"cpu_used_cost": "$113.43",
"cpu_used_metric": "12.89 MHz",
"memory_cost": "$1,231.94",
"memory_used_cost": "$1,231.94",
"memory_used_metric": "139.99 MB",
"net_io_used_cost": "$220.00",
"net_io_used_metric": "0.00 KBps",
"chargeback_rates": "Default"
}
],
"count": 3,
"subcount": 3,
"pages": 1
}


CR7 In Trouble? Sarri On Claims Superstar Left Stadium Early
by David KappelJuventus coach Maurizio Sarri has responded to claims superstar Cristiano Ronaldo left the stadium before their game against AC Milan on Sunday was finished. Could the five-time Ballon d'Or winner be in trouble?
Click through the mini-gallery above to see some images of the Ronaldo's early substitution on Sunday night.
The 34-year-old was substituted after just 55 minutes in his side's 1-0 win over Milan on the weekend, with his replacement Paulo Dybala scoring the eventual winner.
Ronaldo looked upset as he was taken off and walked straight down the tunnel, with Calciomercato suggesting that he left the stadium before the final whistle, and his manager Sarri has since responded to the reports.
Post Selfies On Soccer Laduma's Social Media App & Earn Airtime and more! Download Now
"Disrespectful to his teammates? Like I said, I don't know," Sarri said, as quoted by the Daily Express, when asked about the rumours.
"If it's true that he left before the end, it is a problem to be resolved with his teammates."
Amid claims that Ronaldo himself had asked for his substitution, Sarri once again addressed the player's reaction after he walked straight down the tunnel.
"The important thing is that he made himself available. If he gets angry when he comes out, this is part of the game," the Italian tactician added.
“It's only natural a player is going to be irritated about leaving the pitch, especially when he worked so hard to be there.
"All players who are trying to give their best will have at least five minutes of being annoyed when they are substituted, but a coach would, in general, be much more worried if he didn't seem upset."
Read: Frustrated CR7 Storms Off Pitch, Leaves Stadium? Sarri Responds
Juventus, who are yet to taste defeat in this campaign, remain at the top of the Serie A table, one point ahead of second-placed Inter Milan, with Liverpool being the only other unbeaten team in Europe's top five leagues this season.


Virginia A. Redden
Virginia A. Redden, age 97 of Monroe, died Wednesday, November 20, 2019 at Pleasant View Nursing Home.
Virginia was born on July 22, 1922 in Frankfort, KY, the daughter of Launta S. and Forest Elizabeth Armstrong.
Virginia and Edward E. Redden were married on March 13, 1942 in Frankfort. Virginia had a long distinguished career in the banking industry before retiring as vice president at the Bank of Louisville. She enjoyed sports and was an avid golfer.
She is survived by two sons, Donald (Connie) Redden of Gratiot, WI, and Paul (Sharon) Redden of Albuquerque, NM; four grandchildren; and seven great grandchildren. She was preceded in death by her parents; her husband, Edward in 2009; and two brothers, Boyd and Ray Armstrong.
No local services will be held.
Burial will be Arlington National Cemetery, Arlington, Virginia.
Condolences may be shared with the family at www.newcomerfuneralhome.net


How To Download And Install Itunes For Windows 10 Miapple Me Tech Blog
Village Of The Banned Error Installing Itunes Into Win7 For Mamo
How To Download Itunes Wisely Tech Guide
Solving Itunes6464setup Exe Failed Network Error Techyv Com
How To Enable A Download Save Prompt In Microsoft Edge On Windows 10
Lenovo Thinkpad Yoga With Windows 8 Apple Community
How To Link Your Android Or Ios Device To Windows 10 Pcsystemfix
How Can I Disable The Protection So I Can Download An Itunes Update Webroot Community
Download Itunes 12 10 4 2 64 Bit For Windows Tech Tic Altervista
Any Way To Rename A Download From Ff Downloads Firefox
Itunes Version 6 1 6 Download Brownyouth
How To Repair Itunes Crimsonmis
How To Download And Install Itunes For Windows 10 Miapple Me Tech Blog
Windows7でitunesをインストールできないときの対処法
Fix Itunes Errors On Windows 10 Quick Tip
Insane Slow Download Rate Speed Pc And I Apple Community
アップデートもアンインストールも出来ない Itunes ブロ友パソコン相談室
Taunggyi Mobile Family Apple တ အတ က Itunes 12 4 3 For 32 Bit Http Dl Filehorse Com Win Mp3 And Audio Itunes 32 Itunes 12 4 3 32 Bit Exe St Kkbljprjo82h6euj Fjcsq E<PHONE_NUMBER> Fn Itunessetup Exe For 64 Bit Https Secure Appldnld
Itunes 12 4 2 64 Bit Download For Windows 10 8 7 Horje
Download Itunes 12 4 3 For Windows 64 Bit For Older Video Cards
How To Send Downloads From Firefox To An External App
How To Link Your Android Or Ios Device To Windows 10 Pcsystemfix
Microsoft Windows 10 Free Upgrade Revisited Seven More Of Your Questions Answered Technology The Guardian
How To Download And Install Itunes For Windows 10 Miapple Me Tech Blog
How To Download Itunes Wisely Tech Guide
Knowledgebase 32 114 Supportrix
Itunes Download 12 5 5 Windows Careerfasr
Helaly Telecom Itunes 12 4 3 1 Download For Windows Facebook
How To Manually Install Drivers For Iphone Ipad Or Ipod Touch
Itunes 64 Bit Download 2021 Latest For Windows 10 8 7


ctrl.js is a bookmarklet that allows you and your friends to connect your phones to the browser to play HTML5 games.
Simply activate the bookmarklet and scan the QR Code with your phone’s default camera app to connect.
The QR Code contains a link to the peer.js session running in the bookmarklet, allowing it to find your browser and form P2P connection
Events on the phone will then inject themselves as spoofed Keyboard KeyEvents
into the body of the web page you are on.
| Controller Button | Keypress |
|---|---|
| Up | w |
| Left | a |
| Down | s |
| Right | d |
| A | Space |
| B | Shift |
| Start | Enter |
These keymappings can be changed by clicking on the player's name above the QR Code, and are stored locally on a per-page basis.
The source code to ctrl.js is available under the MIT License at Github.
ctrl.js is based on peer.js, qrcode.js, three.js, and Skeleton.css.
ctrl.js Events will appear here upon connection.


Home
About
Hey
Ma
Vezi
Forum
Contact
Caption 1
Caption 2
Caption 3
Welcome to my site !
I hope you enjoyed staying in here !
This is our news header
dfghjkl;kjhgfdsasdfghjkl;
This is our news header
dfghjkl;kjhgfdsasdfghjkl;
This is our news header
dfghjkl;kjhgfdsasdfghjkl;
This is our news header
dfghjkl;kjhgfdsasdfghjkl;
This is our news header
dfghjkl;kjhgfdsasdfghjkl;
Where you can find us:
Male
Female
Submit


Herbal Ecstacy Experience: Original Blue Variety, butterfly one side, 'e' other side.
The first time that I tried 'Herbal Ecstacy' I was at a rave on the south coast of England. I bought a dose from a stall at the start of the evening, the guy who sold them to me said that they were just like 'real E'. 'Rushy' and 'Dancey' were his words. I had bought so-called 'Herbal E's' before only to find out they didn't work, even after two packets! Although sceptical, I bought a dose.
10.30pm: I took the half a 'Dollar' (Ecstacy tablet that supposedly contained MDMA) that I had in my pocket and proceeded to dance with some friends. The effects kinda crept on about 20 min later and the faded less than an hour later.
12.00am: I felt very straight. The pill that I dropped earlier was extremely weak to say the least (probably 10-15mg), so I decided to try the 'Herbal Ecstacy' I bought at the stall earlier. The dose consisted of 5 large blue pills with a butterfly on one side and an 'e' on the other, It made me laugh a bit cos I really didn't think they would work. I swallowed all 5 tabs at 12.00 on the dot, then carried on dancing.
12.45: It was coming to the end of one of the DJ's sets, when I noticed that I was dancing that little bit harder.
1.00am: DJ Mickey Finn stepped up (a top Drum 'n' Bass DJ); I was making one hell of a racket and dancing on a serious energy level.
1.15am: Everytime that a new tune dropped, I would have this incredible adrenaline rush. I felt as though I was becoming a part of the crowd. Not in the same way as with MDMA. Purely on an energy level rather than an emotional, empathetic level. It felt really wicked though! Come On!!!
2.00am: The adrenaline rush had pretty much faded away by now. ' Fuck, Was that it', I thought as I stood in the middle of the dance floor, kinda disappointed. 'Ah well', I better go and buy some 'proper drugs' now I thought.
2.20am: Wham!!! Just 20 mins after thinking that it was all over, they really hit me like a ton of shit! It was as though I had taken about 8 grams of speed! And it just kept getting more intense - Boy, was I surprised. I was so surprised that I had come-up, that I felt that I had to tell everyone!
3.00am: I was well and truly mashed-up, I mean Fucked!, As if I had been wired into the mains. My body was running at a thousand Volts!  It did have some empathetic qualities similar to MDMA, but was less pronounced and much speedier. Not a deep emotional closeness, just the urge to interact with others. The stimulation was far harsher edged and raw compared to Amphetamine, it felt very pleasant though. My mind wasn't to clear and I kept losing the urge to dance. I would here a good tune and start going for it, then a few seconds later I would forget what I was doing.  We smoked a few cigarettes and chatted for a while about what a great night we were all having. Which was cool.  I did't feel the same 'post chemical' comedown as with Amphetamine, which made me feel a little better than previous nights on speed. I don't recall getting home. We took the train, but the journey is missing from my memory!
7.30am: Completely whacked, I arrived home to find both my parents having breakfast at the table. I passed as quickly through as I could to save any interrogation!
8.30am: Sleep was nowhere to be seen, so I just rolled around my bed for a while before going back down stairs and watching TV until Midnight!!! I eventually took a 'Nytol' (Diphenhydramine HCI) which gladly knocked me out within the hour.
In summary, it was a good experience, which I enjoyed greatly. I was very supprised that the pills worked and I think that that had something to do with it. As well as positive expectation, It shows however, that negative expectation can have a very interesting effect on the experience. And proves that the pills were more than just a placebo. I think ephedra is good as an Ecstacy alternative, it just needs something else to give it an element of calm and relaxation. Maybe a herb like Skullcap or Kava would be an effective addition to an Ephedra based product??
I tried the same pills three weeks later and took half a 'White Dove' about 60 mins after taking the Herbal Ecstacy and the MDMA completely cancelled out the Ephedra, leaving me totally straight. About two hours after, I took the other half of the 'White Dove' and I ended up really enjoying the night despite having no success mixing the two substances.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.