mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-13 19:48:21 +00:00
Add Test Form
This commit is contained in:
parent
c683dd5981
commit
b0938a8ca8
1 changed files with 11 additions and 16 deletions
|
@ -1,14 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { apiCall } from "../api";
|
import { apiCall } from "../api";
|
||||||
|
import PillBar from "../components/inputs/PillBar.vue";
|
||||||
|
import TextBox from "../components/inputs/TextBox.vue";
|
||||||
|
import MultilineTextBox from "../components/inputs/MultilineTextBox.vue";
|
||||||
|
import CheckBox from "../components/inputs/CheckBox.vue";
|
||||||
|
|
||||||
async function doShit(){
|
async function doShit(){
|
||||||
apiCall("Firewall.GetForwardRules", {});
|
apiCall("Firewall.GetForwardRules", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
let name = $ref("");
|
let fields = $ref([
|
||||||
let comment = $ref("");
|
{key: "name", label: "Name", component: () => TextBox },
|
||||||
let counter = $ref(false);
|
{key: "verdict", label: "Verdict", component: () => PillBar, props: {options: [{name: 'Accept'}, {name: 'Drop'}, {name: 'Continue'}]}},
|
||||||
let options = $ref([{name: 'Accept'}, {name: 'Drop'}, {name: 'Continue'}]);
|
{key: "counter", label: "Counter", component: () => CheckBox },
|
||||||
|
{key: "comment", label: "Comment", component: () => MultilineTextBox },
|
||||||
|
]);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -17,18 +23,7 @@ let options = $ref([{name: 'Accept'}, {name: 'Drop'}, {name: 'Continue'}]);
|
||||||
<PageHeader title="Dashboard">
|
<PageHeader title="Dashboard">
|
||||||
<button @click="doShit">Example Buttons</button>
|
<button @click="doShit">Example Buttons</button>
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
<form @submit="$event => $event.preventDefault()" class="cl-secondary">
|
<NiceForm class="scroll cl-secondary" title="Testasdfdsfsdf" :fields="fields"/>
|
||||||
<h3>Create Rule</h3>
|
|
||||||
<label for="name" v-text="'Name'"/>
|
|
||||||
<input name="name" v-model="name"/>
|
|
||||||
<label for="counter" v-text="'Counter'"/>
|
|
||||||
<input name="counter" type="checkbox" v-model="counter"/>
|
|
||||||
<label for="comment" v-text="'Comment'"/>
|
|
||||||
<textarea name="comment" v-model="comment"></textarea>
|
|
||||||
<label for="verdict" v-text="'Verdict'"/>
|
|
||||||
<pillbar :options="options" name="verdict" ></pillbar>
|
|
||||||
<button>Submit</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue