This repository will centralize the docs for the stacksight project. Checkout the wiki for an overview
stacksight / stacksight-php-sdk Goto Github PK
View Code? Open in Web Editor NEWphp support for stacksight
php support for stacksight
This repository will centralize the docs for the stacksight project. Checkout the wiki for an overview
We can't allow for an api library to go out without proper documentation
please invest the time and document the library and it's use case for each platform
image you are a developer who want's to use it, and fill in the blanks
@igor-lemon
In Drupal module there is a creation of a socket in SSClientBase even when STACKSIGHT_INCLUDE_LOGS is not enabled. the creation of the socket takes about ~250ms.
i suggest to create the socket only logs enabled.
We need to add a few flags for it to index correctly...
https://github.com/oritpersik/stack-sight/commits/master
please create a folder for each platform inside the platform dir
and move the bootstrap files:
bootstrap-drupal.php and bootstrap-wp.php
inside each folder
public function publishEvent($data) {}
public function sendUpdates($data) {}
public function sendHealth($data) {}
these methods get $data with potentially harmful content, they mutate it and finally send it to the SSHttpRequest class method which encode the data to json and pass it to the remote server:
https://github.com/stacksight/stacksight-php-sdk/blob/master/SSHttpRequest.php#L12
https://github.com/stacksight/stacksight-php-sdk/blob/master/SSHttpRequest.php#L50
https://github.com/stacksight/stacksight-php-sdk/blob/master/SSHttpRequest.php#L71
This could be made more secure as someone could try to exploit this json passed to the server.
I tend to be a smart ass and change generic lines like these:
https://github.com/stacksight/stacksight-php-sdk/blob/master/SSEventsMessageMapping.php#L45-L54
switch ($event['action']) {
case 'created':
$design['color'] = $color_created;
break;
case 'updated':
$design['color'] = $color_updated;
break;
case 'deleted':
$design['color'] = $color_deleted;
break;
}
to be this:
$design['color'] = ${'color_' . $event['action']};
and if you really want to be protective about your allowed actions you could do this:
if (in_array($event['action'], arary('created', 'updated', 'deleted')) {
$design['color'] = ${'color_' . $event['action']};
}
Many new wordpress installation are configured with mysqli support only, which creates an issue using this plugin.
So please add conditional mysqli support in bootstrap-wp.php.
Wordpress itself and plugins support both. e.g. MainWP uses this: class-mainwp-child-db.php
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.