mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 09:51:09 +03:00
remove has-ansi dependency
This commit is contained in:
parent
95a37fab05
commit
cf4b29c6d5
@ -1,5 +1,4 @@
|
||||
import Ansi from 'ansi-to-html';
|
||||
import hasAnsi from 'has-ansi';
|
||||
import Entities from 'html-entities';
|
||||
|
||||
const ELEMENT_TBODY = '#atStdoutResultTable';
|
||||
@ -21,6 +20,15 @@ const TIME_EVENTS = [
|
||||
const ansi = new Ansi();
|
||||
const entities = new Entities.AllHtmlEntities();
|
||||
|
||||
// https://github.com/chalk/ansi-regex
|
||||
const pattern = [
|
||||
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[a-zA-Z\\d]*)*)?\\u0007)',
|
||||
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))'
|
||||
].join('|');
|
||||
|
||||
const re = new RegExp(pattern);
|
||||
const hasAnsi = input => re.test(input);
|
||||
|
||||
function JobRenderService ($q, $sce, $window) {
|
||||
this.init = ({ compile, apply, isStreamActive }) => {
|
||||
this.parent = null;
|
||||
|
@ -114,7 +114,6 @@
|
||||
"codemirror": "^5.17.0",
|
||||
"components-font-awesome": "^4.6.1",
|
||||
"d3": "~3.3.13",
|
||||
"has-ansi": "^3.0.0",
|
||||
"html-entities": "^1.2.1",
|
||||
"javascript-detect-element-resize": "^0.5.3",
|
||||
"jquery": "~2.2.4",
|
||||
|
Loading…
Reference in New Issue
Block a user