Browse Source

sort

master
zeus 4 years ago
parent
commit
c6374f0cdd
  1. 2
      dist/index.html
  2. 2
      dist/js/app.9b48d8ee.js
  3. 1
      dist/js/app.9b48d8ee.js.map
  4. 2
      dist/js/app.c7cf9ac6.js
  5. 1
      dist/js/app.c7cf9ac6.js.map
  6. 2
      src-local/LabLearningObject-hybrid
  7. 122
      src-local/LabLearningObject-hybrid-tmp/f6gj50vcj2m.html
  8. 349
      src-local/LabLearningObject-hybrid-tmp/f9g3od4khmk.html
  9. 134
      src-local/llo/new.js
  10. 31
      src/components/manageservices/llo-search.vue
  11. 23
      src/components/mynetwork/dockerservices.vue

2
dist/index.html

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.4c7338ef.css" rel="preload" as="style"><link href="/css/chunk-vendors.77230762.css" rel="preload" as="style"><link href="/js/app.c7cf9ac6.js" rel="preload" as="script"><link href="/js/chunk-vendors.087c2695.js" rel="preload" as="script"><link href="/css/chunk-vendors.77230762.css" rel="stylesheet"><link href="/css/app.4c7338ef.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.087c2695.js"></script><script src="/js/app.c7cf9ac6.js"></script></body></html> <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.4c7338ef.css" rel="preload" as="style"><link href="/css/chunk-vendors.77230762.css" rel="preload" as="style"><link href="/js/app.9b48d8ee.js" rel="preload" as="script"><link href="/js/chunk-vendors.087c2695.js" rel="preload" as="script"><link href="/css/chunk-vendors.77230762.css" rel="stylesheet"><link href="/css/app.4c7338ef.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.087c2695.js"></script><script src="/js/app.9b48d8ee.js"></script></body></html>

2
dist/js/app.9b48d8ee.js

File diff suppressed because one or more lines are too long

1
dist/js/app.9b48d8ee.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.c7cf9ac6.js

File diff suppressed because one or more lines are too long

1
dist/js/app.c7cf9ac6.js.map

File diff suppressed because one or more lines are too long

2
src-local/LabLearningObject-hybrid

@ -1 +1 @@
Subproject commit 67928e846526796d305c87e33ed2b88cad3834f6 Subproject commit da3b482ffa901641ba7f10067e6e502215d9fd42

122
src-local/LabLearningObject-hybrid-tmp/f6gj50vcj2m.html

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.12">
<meta name="description" content="Intro and Install">
<meta name="keywords" content="Linux, apt">
<meta name="author" content="Apostolos rootApostolos@swarmlab.io">
<title>An Introduction to Linux !</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.9/css/asciidoctor.min.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/styles/github.min.css">
</head>
<body class="article toc2 toc-right">
<div id="header">
<h1>An Introduction to Linux !</h1>
<div class="details">
<span id="author" class="author">Apostolos rootApostolos@swarmlab.io</span><br>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of contents</div>
<ul class="sectlevel1">
<li><a href="#_linux_file_system_layout">1. Linux file system layout</a></li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_linux_file_system_layout">1. Linux file system layout</h2>
<div class="sectionbody">
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. Subdirectories of the root directory</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Directory</th>
<th class="tableblock halign-left valign-top">Content</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/bin</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Common programs, shared by the system, the system administrator and the users.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/boot</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub is the GRand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/dev</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Contains references to all the CPU peripheral hardware, which are represented as files with special properties.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/etc</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Most important system configuration files are in /etc</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/home</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Home directories of the common users.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/lib</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Library files, includes files for all kinds of programs needed by the system and the users.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/mnt</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Standard mount point for external file systems, e.g. a CD-ROM or a digital camera.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/opt</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Typically contains extra and third party software.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/proc</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">A virtual file system containing information about system resources.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/root</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The administrative user&#8217;s home directory. Mind the difference between /, the root directory and /root, the home directory of the root user.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/sbin</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Programs for use by the system and the system administrator.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/tmp</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Temporary space for use by the system, cleaned upon reboot, so don&#8217;t use this for saving any work!</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/usr</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Programs, libraries, documentation etc. for all user-related programs.</p></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">/var</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Storage for all variable files and temporary files created by users, such as log files, the mail queue, the print spooler area, space for temporary storage of files downloaded from the Internet, or to keep an image of a CD before burning it.</p></td>
</tr>
</tfoot>
</table>
<div class="paragraph">
<p><br>
<br>
</p>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
<script>
if (!hljs.initHighlighting.called) {
hljs.initHighlighting.called = true
;[].slice.call(document.querySelectorAll('pre.highlight > code')).forEach(function (el) { hljs.highlightBlock(el) })
}
</script>
</body>
</html>

349
src-local/LabLearningObject-hybrid-tmp/f9g3od4khmk.html

@ -0,0 +1,349 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.12">
<meta name="description" content="Intro and Install">
<meta name="keywords" content="Linux, apt">
<meta name="author" content="Apostolos rootApostolos@swarmlab.io">
<title>An Introduction to Linux !</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.9/css/asciidoctor.min.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/styles/github.min.css">
</head>
<body class="article toc2 toc-right">
<div id="header">
<h1>An Introduction to Linux !</h1>
<div class="details">
<span id="author" class="author">Apostolos rootApostolos@swarmlab.io</span><br>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of contents</div>
<ul class="sectlevel1">
<li><a href="#_absolute_basics">1. Absolute basics</a>
<ul class="sectlevel2">
<li><a href="#_key_combinations">1.1. Key combinations</a></li>
<li><a href="#_ls_l">1.2. ls -l</a>
<ul class="sectlevel3">
<li><a href="#_file_types">1.2.1. File types</a></li>
<li><a href="#_access_rights">1.2.2. Access rights</a></li>
<li><a href="#_user_group_codes">1.2.3. User group codes</a></li>
<li><a href="#_exercises">1.2.4. Exercises</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_absolute_basics">1. Absolute basics</h2>
<div class="sectionbody">
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 1. Absolute basics</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Command</th>
<th class="tableblock halign-left valign-top">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ls</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Displays a list of files in the current working directory.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">cd directory</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">change directories</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">passwd</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">change the password for the current user</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">file filename</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">display file type of file with name filename</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">cat textfile</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">throws content of textfile on the screen</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">pwd</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">display present working directory</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">exit or logout</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">leave this session</p></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">man command</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">read man pages on command</p></td>
</tr>
</tfoot>
</table>
<div class="sect2">
<h3 id="_key_combinations">1.1. Key combinations</h3>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 2. Key combinations</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Key or key combination</th>
<th class="tableblock halign-left valign-top">Function</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Ctrl+C</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">End a running program and return the prompt</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Ctrl+Z</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Suspend a program</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">ArrowUp and ArrowDown</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Browse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Tab</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Command or filename completion; when multiple choices are possible, the system will either signal with an audio or visual bell, or, if too many choices are possible, ask you if you want to see them all.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Tab Tab</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Shows file or command completion possibilities.</p></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">Shift+PageUp and Shift+PageDown</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Browse terminal buffer (to see text that has "scrolled off" the screen).</p></td>
</tr>
</tfoot>
</table>
</div>
<div class="sect2">
<h3 id="_ls_l">1.2. ls -l</h3>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash"># ls -al
drwxrwxr-x 4 zeus zeus 4096 Οκτ 23 21:55 .
drwxrwxr-x 9 zeus zeus 4096 Οκτ 15 14:28 ..
drwxrwxr-x 8 zeus zeus 4096 Οκτ 23 21:55 .git
drwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install
crw------- 1 root root 5, 1 Οκτ 23 21:22 console
lrwxrwxrwx 1 root root 11 Οκτ 23 21:21 core -&gt; /proc/kcore
drwxr-xr-x 4 root root 100 Οκτ 23 21:22 cpu
crw------- 1 root root 10, 59 Οκτ 23 21:21 cpu_dma_latency
crw------- 1 root root 10, 203 Οκτ 23 21:21 cuse
-rw-rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md
-rw-rw-r-- 1 zeus zeus 33883 Οκτ 15 14:28 LICENSE
-rw-rw-r-- 1 zeus zeus 691 Οκτ 17 11:13 README.md</code></pre>
</div>
</div>
<div class="sect3">
<h4 id="_file_types">1.2.1. File types</h4>
<div class="paragraph">
<p>This table gives an overview of the characters determining the file type:</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<strong>d</strong>rwxrwxr-x 4 zeus zeus 4096 Οκτ 14 20:24 install
</td>
</tr>
</table>
</div>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 3. File types in a long list</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Symbol</th>
<th class="tableblock halign-left valign-top">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">-</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Regular file</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">d</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Directory</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">l</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Link</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">c</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Special file</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">s</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Socket</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">p</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Named pipe</p></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">b</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Block device</p></td>
</tr>
</tfoot>
</table>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
-<strong>rw-</strong>rw-r-- 1 zeus zeus 1517 Οκτ 23 21:55 INSTALL.md
</td>
</tr>
</table>
</div>
</div>
<div class="sect3">
<h4 id="_access_rights">1.2.2. Access rights</h4>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 4. Access rights</caption>
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Code</th>
<th class="tableblock halign-left valign-top">Meaning</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">0 or -</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">The access right that is supposed to be on this place is not granted.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">4 or</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">read access is granted to the user category defined in this place</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">2 or</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">write permission is granted to the user category defined in this place</p></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">1 or</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">execute permission is granted to the user category defined in this place</p></td>
</tr>
</tfoot>
</table>
</div>
<div class="sect3">
<h4 id="_user_group_codes">1.2.3. User group codes</h4>
<table class="tableblock frame-all grid-all stretch">
<caption class="title">Table 5. User group codes</caption>
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Code</th>
<th class="tableblock halign-left valign-top">Meaning</th>
<th class="tableblock halign-left valign-top"></th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">u</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">user permissions</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">-<strong>rw-</strong>rw-r--</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">g</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">group permissions</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">-rw-<strong>rw-</strong>r--</p></td>
</tr>
</tbody>
<tfoot>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">o</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">permissions for others</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">-rw-rw-<strong>rw-</strong></p></td>
</tr>
</tfoot>
</table>
</div>
<div class="sect3">
<h4 id="_exercises">1.2.4. Exercises</h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">touch example
chmod 400 example
ls -l example
chmod 500 example
ls -l example
chmod 600 example
ls -l example
chmod 644 example
ls -l example
chmod 660 example
ls -l example
chmod 700 example
ls -l example
chmod 755 example
ls -l example
chmod 775 example
ls -l example
ls -l example
chmod 777 example
ls -l example</code></pre>
</div>
</div>
<div class="paragraph">
<p><br>
<br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
<script>
if (!hljs.initHighlighting.called) {
hljs.initHighlighting.called = true
;[].slice.call(document.querySelectorAll('pre.highlight > code')).forEach(function (el) { hljs.highlightBlock(el) })
}
</script>
</body>
</html>

134
src-local/llo/new.js

@ -220,13 +220,17 @@ app.get('/get_llo', (req, res, next) => {
const page = req.query["page"] const page = req.query["page"]
const per_page = req.query["per_page"] const per_page = req.query["per_page"]
var level = req.query["level"] var level = req.query["level"]
var lang = req.query["lang"]
var filter = 'NULL' var filter = 'NULL'
RES.sort = req.query["sort"] var sort = req.query["sort"]
var sorttmp1 = sort.split('|');
var sortname = sorttmp1[0];
var sortorder = sorttmp1[1];
if(typeof req.query["filter"] !== "undefined" && req.query["filter"] !== ''){ if(typeof req.query["filter"] !== "undefined" && req.query["filter"] !== ''){
//console.log('no')
filter = req.query["filter"] filter = req.query["filter"]
}else{ }else{
console.log('yes') console.log('yes')
} }
RES.type = req.query["type"] RES.type = req.query["type"]
@ -251,6 +255,25 @@ console.log('yes')
datajson=results datajson=results
} }
var resultslang = []
var filterlang = ''
if(lang !== 0){
if (lang == 1){
filterlang = 'en'
} else if (lang == 2){
filterlang = 'el'
}
var greplang = new RegExp(filterlang);
var datalenth1 = datajson.length
for (var i=0 ; i < datalenth1 ; i++)
{
if(greplang.test(datajson[i]['lang'])){
resultslang.push(datajson[i]);
}
}
datajson=resultslang
}
var resultsl = [] var resultsl = []
var filterlevel = '' var filterlevel = ''
if(level !== 0){ if(level !== 0){
@ -276,18 +299,48 @@ console.log('yes')
datajson=resultsl datajson=resultsl
} }
//console.log(datajson) // sort by title
if(sortname == 'title'){
datajson.sort(function (a, b) {
if(sortorder == 'asc'){
return a.title.localeCompare(b.title);
}else{
return b.title.localeCompare(a.title);
}
});
}else if(sortname == 'lang'){
datajson.sort(function (a, b) {
if(sortorder == 'asc'){
return a.lang.localeCompare(b.lang);
}else{
return b.lang.localeCompare(a.lang);
}
});
}
var resultid = []
var datalenth2 = datajson.length
for (var i=0 ; i < datalenth2 ; i++)
{
datajson[i].id=i
datajson[i]._id=i
resultid.push(datajson[i]);
}
datajson=resultid
var total = datajson.length; var total = datajson.length;
var perpage = per_page var perpage = per_page
//var page = 1 //var page = 1
var lastpage = Math.trunc(total/5); //var lastpage = Math.trunc(total/5);
var lastpage = total/perpage;
if(lastpage <= 1) { if(lastpage <= 1) {
lastpage=1 lastpage=1
}else{ }else{
lastpage++ lastpage++
} }
lastpage = Math.trunc(lastpage)
var next=(page+1); var next=(page+1);
if(next >= lastpage){ if(next >= lastpage){
@ -320,10 +373,11 @@ console.log('yes')
` `
//"next_page_url": "?page="+${next}, //"next_page_url": "?page="+${next},
//"prev_page_url": "?page="+${prev}, //"prev_page_url": "?page="+${prev},
//console.log(JSON.stringify(links))
//myplaybooks.links = links //myplaybooks.links = links
myplaybooks.links = JSON.parse(links); myplaybooks.links = JSON.parse(links);
myplaybooks.data = datajson; from--
myplaybooks.data = datajson.slice(from,to);
//myplaybooks.data = datajson;
var RES = new Object(); var RES = new Object();
RES.code = req.query["action"] RES.code = req.query["action"]
@ -341,9 +395,13 @@ app.get('/dockerservices', (req, res, next) => {
var RES = new Object(); var RES = new Object();
const page = req.query["page"] const page = req.query["page"]
const per_page = req.query["per_page"] const per_page = req.query["per_page"]
RES.sort = req.query["sort"] var sort = req.query["sort"]
RES.filter = req.query["filter"] var filter = req.query["filter"]
RES.type = req.query["type"] var type = req.query["type"]
var sort = req.query["sort"]
var sorttmp1 = sort.split('|');
var sortname = sorttmp1[0];
var sortorder = sorttmp1[1];
var showexec = `docker ps --format '{"ID":"{{ .ID }}", "Image": "{{ .Image }}", "Names":"{{ .Names }}", "Ports":"{{.Ports}}", "Networks":"{{.Networks}}", "Status":"{{.Status}}","RunningFor":"{{.RunningFor}}","CreatedAt":"{{.CreatedAt}}"}' | jq . -s ` var showexec = `docker ps --format '{"ID":"{{ .ID }}", "Image": "{{ .Image }}", "Names":"{{ .Names }}", "Ports":"{{.Ports}}", "Networks":"{{.Networks}}", "Status":"{{.Status}}","RunningFor":"{{.RunningFor}}","CreatedAt":"{{.CreatedAt}}"}' | jq . -s `
exec(showexec, (err, stdout, stderr) => { exec(showexec, (err, stdout, stderr) => {
@ -356,19 +414,69 @@ app.get('/dockerservices', (req, res, next) => {
var string = stdout.toString() var string = stdout.toString()
var datajson = JSON.parse(string); var datajson = JSON.parse(string);
var results = []
if(filter !== 'NULL'){
var grep = new RegExp(filter);
var datalenth = datajson.length
for (var i=0 ; i < datalenth ; i++)
{
if(grep.test(datajson[i]['Names'])){
results.push(datajson[i]);
}
}
datajson=results
}
// sort by title
if(sortname == 'Names'){
datajson.sort(function (a, b) {
if(sortorder == 'asc'){
return a.Names.localeCompare(b.Names);
}else{
return b.Names.localeCompare(a.Names);
}
});
}else if(sortname == 'Status'){
datajson.sort(function (a, b) {
if(sortorder == 'asc'){
return a.Status.localeCompare(b.Status);
}else{
return b.Status.localeCompare(a.Status);
}
});
}
var resultid = []
var datalenth2 = datajson.length
for (var i=0 ; i < datalenth2 ; i++)
{
datajson[i].id=i
datajson[i]._id=i
resultid.push(datajson[i]);
}
datajson=resultid
//console.log('Number of files ' + stdout); //console.log('Number of files ' + stdout);
//console.log('Number string ' + string); //console.log('Number string ' + string);
//console.log('stringify ' + JSON.stringify(datajson)); //console.log('stringify ' + JSON.stringify(datajson));
var total = datajson.length; var total = datajson.length;
var perpage = per_page var perpage = per_page
//var page = 1 //var page = 1
var lastpage = Math.trunc(total/5); var lastpage = total/perpage;
if(lastpage <= 1) { if(lastpage <= 1) {
lastpage=1 lastpage=1
}else{ }else{
lastpage++ lastpage++
} }
lastpage = Math.trunc(lastpage);
var next=(page+1); var next=(page+1);
if(next >= lastpage){ if(next >= lastpage){
@ -404,7 +512,9 @@ app.get('/dockerservices', (req, res, next) => {
//console.log(JSON.stringify(links)) //console.log(JSON.stringify(links))
//myplaybooks.links = links //myplaybooks.links = links
myplaybooks.links = JSON.parse(links); myplaybooks.links = JSON.parse(links);
myplaybooks.data = datajson; from--
myplaybooks.data = datajson.slice(from,to);
//myplaybooks.data = datajson;
var RES = new Object(); var RES = new Object();
RES.code = req.query["action"] RES.code = req.query["action"]

31
src/components/manageservices/llo-search.vue

@ -274,6 +274,14 @@ v-for="(course, i) in courses"
<div class="input-group-prepend"> <div class="input-group-prepend">
<select <select
class="custom-select custom-select-sm" v-model="searchcourselang">
<option value="0" selected>Lang...</option>
<option value="1">English</option>
<option value="2">Ελληνικά</option>
</select>
</div>
<div class="input-group-prepend">
<select
class="custom-select custom-select-sm" v-model="searchcourselevel"> class="custom-select custom-select-sm" v-model="searchcourselevel">
<option value="0" selected>Level...</option> <option value="0" selected>Level...</option>
<option value="1">Elementary</option> <option value="1">Elementary</option>
@ -402,6 +410,7 @@ export default {
datatitle:'', datatitle:'',
progress:0, progress:0,
searchcourselevel:0, searchcourselevel:0,
searchcourselang:0,
courses:[], courses:[],
courseshow:false, courseshow:false,
container:{ container:{
@ -432,7 +441,7 @@ export default {
{ {
name: 'subtitle', name: 'subtitle',
title: '<span class="orange"></span>Course', title: '<span class="orange"></span>Course',
sortField: 'subtitle', //sortField: 'subtitle',
visible:true, visible:true,
dataClass: 'left aligned w-25', dataClass: 'left aligned w-25',
width: '25%' width: '25%'
@ -445,18 +454,19 @@ export default {
{ {
name: 'desc', name: 'desc',
title: '<span class="orange"></span>Description', title: '<span class="orange"></span>Description',
sortField: 'desc', //sortField: 'desc',
titleClass: 'center aligned', titleClass: 'center aligned',
visible:true, visible:true,
width: '40%' width: '30%'
}, },
{ {
name: 'ID', name: 'lang',
sortField: 'ID', title: '<span class="orange"></span>Lang',
sortField: 'lang',
titleClass: 'center aligned', titleClass: 'center aligned',
dataClass: 'left aligned w-25', dataClass: 'text-center',
visible:false, visible:true,
width: '15%' width: '10%'
}, },
{ {
name: '__slot:actions', // <---- name: '__slot:actions', // <----
@ -472,7 +482,7 @@ export default {
perpage: 5, perpage: 5,
searchFor: '', searchFor: '',
sortOrder: [{ sortOrder: [{
field: 'pipelinename', field: 'title',
direction: 'asc' direction: 'asc'
}], }],
multiSort: true, multiSort: true,
@ -496,7 +506,7 @@ export default {
Vue.nextTick( () => this.getprogress(this.datadir)) Vue.nextTick( () => this.getprogress(this.datadir))
}) })
this.$root.$on('hybrid_refresh_dockerservices', () => { this.$root.$on('hybrid_refresh_dockerservices', () => {
Vue.nextTick( () => this.$refs.vuetable.refresh()) //Vue.nextTick( () => this.$refs.vuetable.refresh())
}) })
//refresh from socket mytable //refresh from socket mytable
this.$root.$on('hybrid_refresh_table', (v) => { this.$root.$on('hybrid_refresh_table', (v) => {
@ -575,6 +585,7 @@ export default {
this.moreParams = { this.moreParams = {
'filter': this.searchFor, 'filter': this.searchFor,
'level': this.searchcourselevel, 'level': this.searchcourselevel,
'lang': this.searchcourselang,
'type': this.selected 'type': this.selected
} }
Vue.nextTick( () => this.$refs.vuetable.refresh()) Vue.nextTick( () => this.$refs.vuetable.refresh())

23
src/components/mynetwork/dockerservices.vue

@ -14,11 +14,19 @@
<b-container fluid class="bv-example-row"> <b-container fluid class="bv-example-row">
<div class="input-group input-group-sm sm-3"> <div class="input-group input-group-sm sm-3">
<div class="input-group-append">
<button
class="btn btn-outline-info"
round
type="button"
@click="setRefresh">
Refresh table</button>
</div>
<input type="text" <input type="text"
class="form-control" class="form-control"
aria-label="Small" aria-describedby="inputGroup-sizing-sm" aria-label="Small" aria-describedby="inputGroup-sizing-sm"
placeholder="Search" placeholder="Search by Name"
v-model="searchFor" v-model="searchFor"
@keyup.enter="setFilter" @keyup.enter="setFilter"
> >
@ -155,7 +163,7 @@ export default {
{ {
name: 'Image', name: 'Image',
title: '<span class="orange"></span>Image', title: '<span class="orange"></span>Image',
sortField: 'Image', //sortField: 'Image',
visible:true, visible:true,
dataClass: 'left aligned w-25', dataClass: 'left aligned w-25',
width: '15%', width: '15%',
@ -206,7 +214,7 @@ export default {
perpage: 5, perpage: 5,
searchFor: '', searchFor: '',
sortOrder: [{ sortOrder: [{
field: 'pipelinename', field: 'Names',
direction: 'asc' direction: 'asc'
}], }],
multiSort: true, multiSort: true,
@ -226,6 +234,8 @@ export default {
}, },
mounted() { mounted() {
this.$root.$on('hybrid_refresh_dockerservices', () => { this.$root.$on('hybrid_refresh_dockerservices', () => {
//this.setFilter()
//this.$refs.vuetable.refresh()
Vue.nextTick( () => this.$refs.vuetable.refresh()) Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable() this.refreshVuetable()
}) })
@ -277,6 +287,13 @@ export default {
}, },
setRefresh () {
this.moreParams = {
'filter': '',
'type': this.selected
}
Vue.nextTick( () => this.$refs.vuetable.refresh())
},
setFilter () { setFilter () {
this.moreParams = { this.moreParams = {
'filter': this.searchFor, 'filter': this.searchFor,

Loading…
Cancel
Save