rjon
Version:
route js object notation is a way to standardize route metadata for use and testing in universal route interpreter software
2 lines (1 loc) • 5.15 kB
TypeScript
export declare const string = "<ack-modal *ngIf=\"testRoute\" (onClose)=\"testRoute=null\" [@500]=\"'fadeInUp'\" [wrapStyle]=\"{width:'100%', 'max-width':'900px'}\"><div class=\"bg-white border border-grey-4x pad radius-5\"><test-route [(hostModel)]=\"hostModel\" [route]=\"testRoute\" [hosts]=\"rjon.hosts\" [headers]=\"rjon.headers\"></test-route></div></ack-modal><ack-modal *ngIf=\"editRoute\" (onClose)=\"editRoute=null\" [@500]=\"'fadeInUp'\" [wrapStyle]=\"{width:'100%', 'max-width':'900px'}\"><div class=\"bg-white border border-grey-4x pad radius-5\"><edit-route [(hostModel)]=\"hostModel\" [routes]=\"rjon.routes\" [route]=\"editRoute\" [hosts]=\"rjon.hosts\" (onChange)=\"onChange.emit(rjon)\"></edit-route><br/><div class=\"text-center flex child-pad\"><a class=\"flex-1 text-danger bg-danger hover-bg-energized hover-text-grey-3x\" (click)=\"deleteRoute(editRoute);editRoute=null\">delete</a><a class=\"flex-1 bg-grey-5x hover-bg-grey-6x hover-text-grey-3x\" (click)=\"editRoute=null\">close</a></div></div></ack-modal><ack-modal *ngIf=\"editHost\" (onClose)=\"editHost=null\" [@500]=\"'fadeInUp'\" [wrapStyle]=\"{width:'100%', 'max-width':'900px'}\"><div class=\"bg-white border border-grey-4x pad radius-5\"><edit-host [(hostModel)]=\"editHost\" (onChange)=\"onChange.emit(rjon)\"></edit-host><br/><div class=\"text-center flex child-pad\"><a class=\"flex-1 text-danger bg-danger hover-bg-energized hover-text-grey-3x\" (click)=\"deleteHost(editHost);editHost=null\">delete</a><a class=\"flex-1 bg-grey-5x hover-bg-grey-6x hover-text-grey-3x\" (click)=\"editHost=null\">close</a></div></div></ack-modal><rjon-links class=\"text-right text-sm\" [rjon]=\"rjon\"></rjon-links><div class=\"markdown-body\"><h3>Table of Headers</h3><rjon-header-editor [data]=\"rjon.headers\"></rjon-header-editor><h3>Table of Hosts</h3><table-of-hosts [hosts]=\"rjon.hosts\" (select)=\"editHost=$event\" selectable=\"1\"></table-of-hosts><div class=\"pad-xs text-right\"><a (click)=\"host={};rjon.hosts.push(host);editHost=host\">add host</a></div><h3>Table of Routes</h3><table-of-routes [routes]=\"rjon.routes\" links=\"1\" (select)=\"editRoute=$event\" selectable=\"1\"></table-of-routes><div class=\"pad-xs text-right\"><a (click)=\"route={};rjon.routes.push(route);editRoute=route\">add route</a></div><br/><h2>Route Definitions</h2><div *ngFor=\"let route of (rjon ? rjon.routes : [])\"><div style=\"padding:.4em;\"><div class=\"flex-valign-center\"><h3 id=\"{{ route.method+':'+route.path | markdownAnchor }}\">{{ route.path }}</h3><div class=\"flex-1 text-right child-margin-xxs\"><button class=\"text-md\" (click)=\"testRoute=route\">test</button><button class=\"text-md\" (click)=\"editRoute=route\">edit</button></div></div><ul style=\"padding-bottom:0;margin-bottom:0;\"><li *ngFor=\"let status of route.status|array\">{{ statIconMap[status].icon }} {{ statIconMap[status] ? statIconMap[status].details : '' }}</li><li *ngIf=\"route.description || route.details\">{{ route.description || route.details }}</li><li *ngFor=\"let note of route.notes|array\">note:{{ note }}</li><li *ngIf=\"route.method\">method: {{ route.method }}</li><li *ngIf=\"route.returnType\">return-type: {{ route.returnType }}</li><ng-container *ngIf=\"route.sample\"><li *ngFor=\"let host of rjon.hosts\"><div *ngFor=\"let sample of route.sample|array; let i=index\"><form action=\"{{ serverUrlByRoute(host, route, sample) }}\" method=\"{{ route.method || 'GET' }}\" enctype=\"{{ sample.fileNames ? 'multipart/form-data' : 'application/json' }}\" target=\"_blank\" style=\"display:inline-block;padding:0.2em;\"><div *ngIf=\"['file','pdf'].indexOf(route.returnType)>=0\">Loading... </div><div><a class=\"result-link\" href=\"{{ serverUrlByRoute(host, route, sample) }}\" target=\"_blank\">{{host.hostname}}</a></div></form></div></li></ng-container></ul><ul *ngFor=\"let sample of route.sample|array\" style=\"padding-top:0;margin-top:0;\"><li *ngIf=\"sample.test\">Sample Test<ul><li *ngIf=\"sample.test.only\"><strong>ONLY</strong> this test during bulk tests</li><li *ngIf=\"sample.test.skip\"><strong>SKIP</strong> (do not test)</li><li *ngIf=\"sample.test.statusCode\">Expects statusCode {{sample.test.statusCode}}</li><li *ngIf=\"sample.test.body\" #showBody=\"var\" [var]=\"false\"><button (click)=\"showBody.var=!showBody.var\">request-body</button><div *ngIf=\"showBody.var\" [@500]=\"'fadeInUp'\"><absolute-overflow-x><pre class=\"code-sample\">{{ sample.test.body | json}}</pre></absolute-overflow-x></div></li></ul></li><li *ngIf=\"sample.response\" #showBody=\"var\" [var]=\"false\"><button (click)=\"showBody.var=!showBody.var\">sample response</button><div *ngIf=\"showBody.var\" [@500]=\"'fadeInUp'\"><absolute-overflow-x><pre class=\"code-sample\">{{ sample.response | json }}</pre></absolute-overflow-x></div></li><li *ngIf=\"sample.request\" #showBody=\"var\" [var]=\"false\"><button (click)=\"showBody.var=!showBody.var\">sample request</button><div *ngIf=\"showBody.var\" [@500]=\"'fadeInUp'\"><absolute-overflow-x><pre class=\"code-sample\">{{ sample.request | json}}</pre></absolute-overflow-x></div></li></ul><br/></div></div></div>";