Add more stats field
This commit is contained in:
parent
10455cfde6
commit
b4ac5c520d
|
@ -5,9 +5,9 @@
|
|||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "AccessPoint" ADD COLUMN "inventoryTag" TEXT,
|
||||
ADD COLUMN "sshPassword" TEXT,
|
||||
ADD COLUMN "sshUser" TEXT;
|
||||
ALTER TABLE "AccessPoint" ADD COLUMN "encryptedSshPassword" TEXT,
|
||||
ADD COLUMN "encryptedSshUser" TEXT,
|
||||
ADD COLUMN "inventoryTag" TEXT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "WifiDevice" ADD COLUMN "frequency" TEXT,
|
||||
|
@ -27,7 +27,17 @@ DROP TABLE "Statistic";
|
|||
CREATE TABLE "WifiStats" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"timestamp" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"clients" INTEGER NOT NULL,
|
||||
"clients" INTEGER,
|
||||
"avgSignal" INTEGER,
|
||||
"minSignal" INTEGER,
|
||||
"maxSignal" INTEGER,
|
||||
"avgSpeed" INTEGER,
|
||||
"minSpeed" INTEGER,
|
||||
"maxSpeed" INTEGER,
|
||||
"avgClientUptime" INTEGER,
|
||||
"maxClientUptime" INTEGER,
|
||||
"avgUsage" INTEGER,
|
||||
"sumUsage" INTEGER,
|
||||
"accessPointId" INTEGER NOT NULL,
|
||||
|
||||
CONSTRAINT "WifiStats_pkey" PRIMARY KEY ("id")
|
|
@ -166,8 +166,8 @@ model AccessPoint {
|
|||
ip String?
|
||||
clients Int?
|
||||
|
||||
sshUser String?
|
||||
sshPassword String?
|
||||
encryptedSshUser String?
|
||||
encryptedSshPassword String?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
@ -177,11 +177,27 @@ model AccessPoint {
|
|||
}
|
||||
|
||||
model WifiStats {
|
||||
id Int @id @default(autoincrement())
|
||||
timestamp DateTime @default(now())
|
||||
clients Int
|
||||
id Int @id @default(autoincrement())
|
||||
timestamp DateTime @default(now())
|
||||
|
||||
clients Int?
|
||||
|
||||
avgSignal Int?
|
||||
minSignal Int?
|
||||
maxSignal Int?
|
||||
|
||||
avgSpeed Int?
|
||||
minSpeed Int?
|
||||
maxSpeed Int?
|
||||
|
||||
avgClientUptime Int?
|
||||
maxClientUptime Int?
|
||||
|
||||
avgUsage Int?
|
||||
sumUsage Int?
|
||||
|
||||
accessPointId Int
|
||||
accessPoint AccessPoint? @relation("wifistats_to_ap", fields: [accessPointId], references: [id])
|
||||
accessPoint AccessPoint @relation("wifistats_to_ap", fields: [accessPointId], references: [id])
|
||||
}
|
||||
|
||||
model Network {
|
||||
|
|
|
@ -65,9 +65,6 @@
|
|||
{{ item.accessPoint.name || item.accessPoint.hostname }}
|
||||
</small>
|
||||
</router-link>
|
||||
<span v-if="item.accessPoint.local">
|
||||
({{ item.accessPoint.local }})
|
||||
</span>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</div>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
:items="items"
|
||||
:headers="headers"
|
||||
v-bind="$attrs"
|
||||
calculate-widths
|
||||
@click:row="
|
||||
e =>
|
||||
$router.push({
|
||||
|
|
Loading…
Reference in New Issue
Block a user