Skip to content

Commit

Permalink
form updates, version up
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterlong committed Oct 1, 2020
1 parent fccc559 commit adfc113
Show file tree
Hide file tree
Showing 9 changed files with 85 additions and 141 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.90.70 (10-1-2020)
- Merged PR #806 - Enhance GRPC Monitoring
- Modified multiple Vue forms to use number models for integer inputs

# 0.90.69 (09-18-2020)
- Fixed issue with service view not loading. #808 #811 #800

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/forms/Checkin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span class="d-block mt-2">
<input type="text" class="form-control" :value="`${core.domain}/checkin/${checkin.api_key}`" readonly>
<span class="small">Send a GET request to this URL every {{checkin.interval}} seconds
<button @click="deleteCheckin(checkin)" type="button" class="btn btn-danger btn-xs float-right mt-1">Delete</button>
<button @click.prevent="deleteCheckin(checkin)" type="button" class="btn btn-danger btn-xs float-right mt-1">Delete</button>
</span>
</span>
</div>
Expand All @@ -22,7 +22,7 @@
</div>
<div class="col-12 col-md-5">
<label for="checkin_interval" class="col-form-label">Interval (minutes)</label>
<input v-model="checkin.interval" type="number" name="interval" class="form-control" id="checkin_interval" placeholder="1" min="1">
<input v-model.number="checkin.interval" type="number" name="interval" class="form-control" id="checkin_interval" placeholder="1" min="1">
</div>
<div class="col-12 col-md-5">
<label class="col-form-label"></label>
Expand Down
12 changes: 1 addition & 11 deletions frontend/src/forms/Message.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="form-group row">
<label class="col-sm-4 col-form-label">{{ $t('service') }}</label>
<div class="col-sm-8">
<select v-model="message.service" name="service_id" class="form-control">
<select v-model.number="message.service" name="service_id" class="form-control">
<option v-bind:value="0">{{ $t('global_announcement') }}</option>
<option v-for="service in $store.getters.services" :value="service.id" v-bind:key="service.id" >{{service.name}}</option>
</select>
Expand All @@ -44,16 +44,6 @@
</div>
</div>

<div v-show="this.service === null" class="form-group row">
<label for="service_id" class="col-sm-4 col-form-label">{{ $t('service') }}</label>
<div class="col-sm-8">
<select v-model="message.service" class="form-control" name="service" id="service_id">
<option v-bind:value="0">{{ $t('global_announcement') }}</option>
<option v-for="service in $store.getters.services" :value="service.id" v-bind:key="service.id">{{service.name}}</option>
</select>
</div>
</div>

<div class="form-group row">
<label for="notify_method" class="col-sm-4 col-form-label">{{ $t('notify_users') }}</label>
<div class="col-sm-8">
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/forms/Notifier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<div class="col-sm-12">
<span class="slider-info">Limit {{notifier.limits}} per hour</span>
<input v-model="notifier.limits" type="range" name="limits" class="slider" min="1" max="300">
<input v-model.number="notifier.limits" type="range" name="limits" class="slider" min="1" max="300">
<small class="form-text text-muted">Notifier '{{notifier.title}}' will send a maximum of {{notifier.limits}} notifications per hour.</small>
</div>

Expand Down Expand Up @@ -146,7 +146,6 @@
<span class="badge badge-info float-right text-uppercase mt-1">{{notifier.logs.length}}</span>
</div>
<div class="card-body" :class="{'d-none': !expanded_logs}">

<div v-for="(log, i) in notifier.logs.reverse()" class="alert" :class="{'alert-danger': log.error, 'alert-dark': !log.success && !log.error, 'alert-success': log.success && !log.error}">
<span class="d-block">
Service {{log.service}}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/forms/Service.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="form-group row">
<label for="service_type" class="col-sm-4 col-form-label">{{ $t('group') }}</label>
<div class="col-sm-8">
<select v-model="service.group_id" class="form-control">
<select v-model.number="service.group_id" class="form-control">
<option value="0" >No Group</option>
<option v-for="(group, index) in $store.getters.cleanGroups()" :value="group.id">{{group.name}}</option>
</select>
Expand Down Expand Up @@ -57,11 +57,11 @@
<label for="service_interval" class="col-sm-4 col-form-label">{{ $t('check_interval') }}</label>
<div class="col-sm-6">
<span class="slider-info">{{secondsHumanize(service.check_interval)}}</span>
<input v-model="service.check_interval" type="range" class="slider" id="service_interval" min="1" max="1800" :step="1">
<input v-model.number="service.check_interval" type="range" class="slider" id="service_interval" min="1" max="1800" :step="1">
<small id="interval" class="form-text text-muted">Interval to check your service state</small>
</div>
<div class="col-sm-2">
<input v-model="service.check_interval" type="number" name="check_interval" class="form-control">
<input v-model.number="service.check_interval" type="number" name="check_interval" class="form-control">
</div>
</div>

Expand All @@ -85,7 +85,7 @@
<div v-if="service.type.match(/^(tcp|udp|grpc)$/)" class="form-group row">
<label class="col-sm-4 col-form-label">Port</label>
<div class="col-sm-8">
<input v-model="service.port" type="number" name="port" class="form-control" id="service_port" placeholder="8080">
<input v-model.number="service.port" type="number" name="port" class="form-control" id="service_port" placeholder="8080">
</div>
</div>

Expand All @@ -107,12 +107,12 @@
<label class="col-sm-4 col-form-label">{{ $t('service_timeout') }}</label>
<div class="col-sm-6">
<span v-if="service.timeout >= 0" class="slider-info">{{secondsHumanize(service.timeout)}}</span>
<input v-model="service.timeout" type="range" id="timeout" name="timeout" class="slider" min="1" max="180">
<input v-model.number="service.timeout" type="range" id="timeout" name="timeout" class="slider" min="1" max="180">
<small class="form-text text-muted">If the endpoint does not respond within this time it will be considered to be offline</small>
</div>

<div class="col-sm-2">
<input v-model="service.timeout" type="number" name="service_timeout" class="form-control">
<input v-model.number="service.timeout" type="number" name="service_timeout" class="form-control">
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/forms/Setup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div class="col-5 col-md-6">
<div v-if="setup.db_connection !== 'sqlite'" class="form-group">
<label class="text-capitalize">{{ $t('db_port') }}</label>
<input @keyup="canSubmit" v-model="setup.db_port" id="db_port" type="number" class="form-control" placeholder="5432">
<input @keyup="canSubmit" v-model.number="setup.db_port" id="db_port" type="number" class="form-control" placeholder="5432">
</div>
</div>
</div>
Expand Down
15 changes: 6 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,32 @@ go 1.14
require (
github.com/GeertJohan/go.rice v1.0.0
github.com/aws/aws-sdk-go v1.30.20
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fatih/structs v1.1.0
github.com/foomo/simplecert v1.7.5
github.com/foomo/tlsconfig v0.0.0-20180418120404-b67861b076c9
github.com/getsentry/sentry-go v0.5.1
github.com/go-mail/mail v2.3.1+incompatible
github.com/go-redis/cache/v8 v8.0.0
github.com/go-redis/redis/v8 v8.1.3
github.com/gorilla/mux v1.7.4
github.com/hako/durafmt v0.0.0-20200605151348-3a43fc422dd9
github.com/jinzhu/gorm v1.9.12
github.com/mattn/go-sqlite3 v2.0.3+incompatible
github.com/pkg/errors v0.9.1
github.com/pquerna/cachecontrol v0.0.0-20200819021114-67c6ae64274f // indirect
github.com/prometheus/client_golang v1.1.0
github.com/sirupsen/logrus v1.5.0
github.com/spf13/cobra v1.0.0
github.com/spf13/viper v1.6.3
github.com/statping/emails v1.0.0
github.com/stretchr/objx v0.2.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/t-tiger/gorm-bulk-insert/v2 v2.0.1
github.com/tensorflow/tensorflow v2.3.0+incompatible // indirect
go.uber.org/atomic v1.6.0 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
golang.org/x/text v0.3.3 // indirect
google.golang.org/grpc v1.28.1
gopkg.in/natefinch/lumberjack.v2 v2.0.0
gopkg.in/yaml.v2 v2.2.8
gorm.io/driver/mysql v1.0.1
gorm.io/driver/postgres v1.0.0
gorm.io/driver/sqlite v1.1.1
gorm.io/gorm v1.20.0
gorm.io/plugin/dbresolver v1.0.0
gopkg.in/yaml.v2 v2.3.0
)
Loading

0 comments on commit adfc113

Please sign in to comment.