Skip to content

Instantly share code, notes, and snippets.

View sandalu95's full-sized avatar
🎯
Focusing

Sandalu Kalpanee (Sandy) sandalu95

🎯
Focusing
  • WSO2
  • Melbourne, Australia
View GitHub Profile
{
"dashboard":{
"url":"apimanalytics",
"owner":"admin",
"name":"APIM Analytics",
"description":"Widgets to configure APIM Analytics Alert Configurations",
"landingPage":"home",
"parentId":"0",
"pages":[{
"id":"home",
@source(type='inMemory' , topic='APIM_REQUEST')
define stream Request (meta_clientType string, applicationConsumerKey string, applicationName string, applicationId string, applicationOwner string, apiContext string,apiName string, apiVersion string, apiResourcePath string, apiResourceTemplate string, apiMethod string, apiCreator string, apiCreatorTenantDomain string, apiTier string, apiHostname string, username string, userTenantDomain string, userIp string, userAgent string, requestTimestamp long, throttledOut bool, responseTime long, serviceTime long, backendTime long, responseCacheHit bool, responseSize long, protocol string, responseCode int, destination string, securityLatency long, throttlingLatency long, requestMedLat long, responseMedLat long, backendLatency long, otherLatency long, gatewayType string, label string);
from Request
select apiName, apiVersion, apiCreator, responseCode, ifThenElse(responseCode>=500,1,0) as Fivexx, ifThenElse(responseCode>=400 AND responseCode<500,1,0) as Fourxx, ifThenEl
@sandalu95
sandalu95 / widgetConf.json
Created February 19, 2019 18:20
Blog Codes - widgetConf.json file for TopAPICreators Widget
{
"name": "Top API Creators",
"id": "TopAPICreators",
"thumbnailURL": "",
"configs": {
"pubsub": {
"types": ["subscriber"]
},
"providerConfig" : {
"configs": {
@sandalu95
sandalu95 / webpack.config.js
Last active February 19, 2019 18:05
Blog Codes - webpack.config.js file for TopAPICreators Widget
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
context: path.resolve(__dirname, './src'),
entry: {
index: './TopAPICreators.jsx',
},
output: {
path: path.resolve(__dirname, './dist/TopAPICreators'),
@sandalu95
sandalu95 / package.json
Last active February 19, 2019 17:52
Blog Codes - Package.json file for TopAPICreators Widget
{
"name": "top-api-creators",
"version": "1.0.0",
"private": true,
"dependencies": {
"@wso2-dashboards/widget": "^1.4.0",
"@material-ui/core": "^3.9.0",
"@material-ui/icons": "^3.0.2",
"react": "^16.7.0",
"axios": "^0.16.2",