<commit_before><template>
	<div class="my-3 my-md-5">
		<div class="container">
			<div class="page-header">
				<h1 class="page-title">
					Agent 管理
				</h1>
				<div class="page-options d-flex">
					<div class="input-icon ml-2">
						<span class="input-icon-addon">
							<i class="fe fe-search">
							</i>
						</span>
						<input type="text" class="form-control w-10" v-model="hostname" placeholder="搜索主机或者IP" />
					</div>

					<button class="btn btn-primary ml-2" @click="loadRaspList(1)">搜索</button>
				</div>
			</div>
			<div class="card">
				<div class="card-body">

					<vue-loading v-if="loading" type="spiningDubbles" color="rgb(90, 193, 221)" :size="{ width: '50px', height: '50px' }"></vue-loading>

					<table class="table table-hover table-bordered" v-if="! loading">
						<thead>
							<tr>
								<th nowrap>
									主机名
								</th>
								<th>
									IP
								</th>
								<th>
									RASP 版本
								</th>
								<th>
									RASP 目录
								</th>
								<th>
									上次通信
								</th>
								<th>
									状态
								</th>
								<th>
									操作
								</th>
							</tr>
						</thead>
						<tbody>
							<tr v-for="row in data" :key="row.id">
								<td>
									{{ row.hostname }}
								</td>
								<td nowrap>
									10.58.230.19
								</td>
								<td nowrap>
									{{ row.language}}/{{ row.version }} <br>
									official/{{ row.plugin_version }}
								</td>
								<td>
									{{ row.rasp_home }}
								</td>
								<td nowrap>
									{{ moment(row.last_heartbeat_time * 1000).format('YYYY-MM-DD') }} <br />
									{{ moment(row.last_heartbeat_time * 1000).format('hh:mm:ss') }}
								</td>
								<td nowrap>
									<span class="text-danger" v-if="! row.online">离线</span>
									<span v-if="row.online">正常</span>
								</td>
								<td nowrap>
									<a href="javascript:" @click="doDelete(row)">删除</a>
								</td>
							</tr>
						</tbody>
					</table>
					<nav v-if="! loading">
						<b-pagination align="center" :total-rows="total" v-model="currentPage" :per-page="10">
						</b-pagination><commit_msg>ip 展示<commit_after><template>
	<div class="my-3 my-md-5">
		<div class="container">
			<div class="page-header">
				<h1 class="page-title">
					Agent 管理
				</h1>
				<div class="page-options d-flex">
					<div class="input-icon ml-2">
						<span class="input-icon-addon">
							<i class="fe fe-search">
							</i>
						</span>
						<input type="text" class="form-control w-10" v-model="hostname" placeholder="搜索主机或者IP" />
					</div>

					<button class="btn btn-primary ml-2" @click="loadRaspList(1)">搜索</button>
				</div>
			</div>
			<div class="card">
				<div class="card-body">

					<vue-loading v-if="loading" type="spiningDubbles" color="rgb(90, 193, 221)" :size="{ width: '50px', height: '50px' }"></vue-loading>

					<table class="table table-hover table-bordered" v-if="! loading">
						<thead>
							<tr>
								<th nowrap>
									主机名
								</th>
								<th>
									IP
								</th>
								<th>
									RASP 版本
								</th>
								<th>
									RASP 目录
								</th>
								<th>
									上次通信
								</th>
								<th>
									状态
								</th>
								<th>
									操作
								</th>
							</tr>
						</thead>
						<tbody>
							<tr v-for="row in data" :key="row.id">
								<td>
									{{ row.hostname }}
								</td>
								<td nowrap>
									{{ row.register_ip }}
								</td>
								<td nowrap>
									{{ row.language}}/{{ row.version }} <br>
									official/{{ row.plugin_version }}
								</td>
								<td>
									{{ row.rasp_home }}
								</td>
								<td nowrap>
									{{ moment(row.last_heartbeat_time * 1000).format('YYYY-MM-DD') }} <br />
									{{ moment(row.last_heartbeat_time * 1000).format('hh:mm:ss') }}
								</td>
								<td nowrap>
									<span class="text-danger" v-if="! row.online">离线</span>
									<span v-if="row.online">正常</span>
								</td>
								<td nowrap>
									<a href="javascript:" @click="doDelete(row)">删除</a>
								</td>
							</tr>
						</tbody>
					</table>
					<nav v-if="! loading">
						<b-pagination align="center" :total-rows="total" v-model="currentPage" :per-page="10">
						</b-pagination>
{'fraction_non_alphanumeric': 0.19072286319755122, 'fraction_numerical': 0.016717683070402636, 'mean_word_length': 1.6616541353383458, 'pattern_counts': {'":': 0, '<': 145, '<?xml version=': 0, '>': 145, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1444566', 'n_tokens_mistral': 2528, 'n_tokens_neox': 1559, 'n_words': 298}