Compare commits
2 Commits
8d80123145
...
068b82705d
Author | SHA1 | Date | |
---|---|---|---|
068b82705d | |||
57a0b37596 |
163
.drone.yml
163
.drone.yml
@ -52,14 +52,30 @@ steps:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: backend
|
||||
- name: backend-commit
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- sed -i '/yarn --offline build/d' ui/assets.go
|
||||
- go generate -v
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: backend-tag
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- sed -i '/yarn --offline build/d' ui/assets.go
|
||||
- go generate -v
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: vet
|
||||
image: golang:alpine
|
||||
@ -103,14 +119,30 @@ steps:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: build macOS
|
||||
- name: build-commit macOS
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-darwin-${DRONE_STAGE_ARCH}
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-darwin-${DRONE_STAGE_ARCH}
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOOS: darwin
|
||||
GOARCH: amd64
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag macOS
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_TAG##v}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-darwin-${DRONE_STAGE_ARCH}
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOOS: darwin
|
||||
GOARCH: amd64
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy macOS
|
||||
image: appleboy/drone-scp
|
||||
@ -157,6 +189,12 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@ -175,15 +213,32 @@ steps:
|
||||
- yarn --cwd ui install
|
||||
- yarn --cwd ui --offline build
|
||||
|
||||
- name: backend
|
||||
- name: backend-commit
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- sed -i '/yarn --offline build/d' ui/assets.go
|
||||
- go generate -v
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
- ln happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} happydns
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: backend-tag
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- sed -i '/yarn --offline build/d' ui/assets.go
|
||||
- go generate -v
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_TAG##v}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}
|
||||
- ln happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH} happydns
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
@ -219,14 +274,30 @@ steps:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: build macOS
|
||||
- name: build-commit macOS
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-darwin-${DRONE_STAGE_ARCH}
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-darwin-${DRONE_STAGE_ARCH}
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOOS: darwin
|
||||
GOARCH: arm64
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build-tag macOS
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_TAG##v}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-darwin-${DRONE_STAGE_ARCH}
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOOS: darwin
|
||||
GOARCH: arm64
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy macOS
|
||||
image: appleboy/drone-scp
|
||||
@ -274,6 +345,12 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
@ -292,16 +369,34 @@ steps:
|
||||
- yarn --cwd ui install
|
||||
- yarn --cwd ui --offline build
|
||||
|
||||
- name: backend armel
|
||||
- name: backend-commit armel
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add build-base
|
||||
- sed -i '/yarn --offline build/d' ui/assets.go
|
||||
- go generate -v
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}el
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}el
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOARM: 5
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: backend-tag armel
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add build-base
|
||||
- sed -i '/yarn --offline build/d' ui/assets.go
|
||||
- go generate -v
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_TAG##v}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}el
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOARM: 5
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy armel
|
||||
image: appleboy/drone-scp
|
||||
@ -337,14 +432,30 @@ steps:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: backend armhf
|
||||
- name: backend-commit armhf
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add build-base
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOARM: 6
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: backend-tag armhf
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add build-base
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_TAG##v}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}hf
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOARM: 6
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy armhf
|
||||
image: appleboy/drone-scp
|
||||
@ -380,15 +491,32 @@ steps:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: backend armv7
|
||||
- name: backend-commit armv7
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add build-base
|
||||
- go build -v -tags netgo -ldflags '-w' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_BRANCH}-${DRONE_COMMIT}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
|
||||
- ln happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 happydns
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOARM: 7
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: backend-tag armv7
|
||||
image: golang:alpine
|
||||
commands:
|
||||
- apk --no-cache add build-base
|
||||
- go build -v -tags netgo -ldflags '-w -X main.version="${DRONE_TAG##v}" -X main.build=${DRONE_BUILD_NUMBER}' -o happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7
|
||||
- ln happydns-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}v7 happydns
|
||||
environment:
|
||||
CGO_ENABLED: 0
|
||||
GOARM: 7
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
- name: deploy armv7
|
||||
image: appleboy/drone-scp
|
||||
@ -436,6 +564,12 @@ steps:
|
||||
password:
|
||||
from_secret: docker_password
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
- tag
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: docker-manifest
|
||||
@ -454,6 +588,7 @@ steps:
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
- tag
|
||||
|
||||
|
5
main.go
5
main.go
@ -51,9 +51,14 @@ import (
|
||||
_ "git.happydns.org/happydns/storage/leveldb"
|
||||
)
|
||||
|
||||
var (
|
||||
Version = "custom-build"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var err error
|
||||
|
||||
log.Println("This is happyDNS", Version)
|
||||
rand.Seed(time.Now().UTC().UnixNano())
|
||||
|
||||
// Load and parse options
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
<template>
|
||||
<div ng-if="!isLoading()">
|
||||
<div v-for="(v,key) in value" :key="key">
|
||||
<div v-for="(v,key) in val" :key="key">
|
||||
<b-row>
|
||||
<b-col>
|
||||
<h3>
|
||||
@ -57,14 +57,6 @@
|
||||
</h3>
|
||||
</b-col>
|
||||
<b-col v-if="!key || !editKeys[key]" sm="auto">
|
||||
<b-button v-if="!editChildrenKeys[key]" type="button" size="sm" variant="outline-primary" class="mx-1" @click="toogleChildrenEdit(key)">
|
||||
<b-icon icon="pencil" />
|
||||
{{ $t('common.edit') }}
|
||||
</b-button>
|
||||
<b-button v-else type="button" size="sm" variant="success" class="mx-1" @click="saveObject(key)">
|
||||
<b-icon icon="check" />
|
||||
{{ $t('domains.save-modifications') }}
|
||||
</b-button>
|
||||
<b-button type="button" size="sm" variant="outline-danger" class="mx-1" @click="deleteKey(key)">
|
||||
<b-icon icon="trash" />
|
||||
{{ $t('common.delete') }}
|
||||
@ -79,8 +71,9 @@
|
||||
</b-row>
|
||||
<h-resource-value
|
||||
v-if="key"
|
||||
v-model="v[key]"
|
||||
:edit="editChildrenKeys[key]"
|
||||
ref="resource"
|
||||
v-model="val[key]"
|
||||
edit
|
||||
:services="services"
|
||||
:specs="service_specs"
|
||||
:type="main_type"
|
||||
@ -126,7 +119,6 @@ export default {
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
editChildrenKeys: {},
|
||||
editKeys: {},
|
||||
newKeys: {},
|
||||
key_type: '',
|
||||
@ -214,32 +206,22 @@ export default {
|
||||
Vue.delete(this.value, key)
|
||||
}
|
||||
Vue.delete(this.editKeys, key)
|
||||
if (key === '') {
|
||||
this.toogleChildrenEdit(this.newKeys[key], true)
|
||||
}
|
||||
this.$emit('save-service')
|
||||
},
|
||||
|
||||
saveChildrenValues () {
|
||||
for (const key in this.editChildrenKeys) {
|
||||
if (this.editChildrenKeys[key]) {
|
||||
this.saveObject(key)
|
||||
}
|
||||
}
|
||||
this.$refs.resource.saveChildrenValues()
|
||||
|
||||
for (const key in this.editKeys) {
|
||||
if (this.editKeys[key]) {
|
||||
this.rename(key)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
saveObject (key) {
|
||||
const vm = this
|
||||
this.$emit('save-service', function () {
|
||||
Vue.set(vm.editChildrenKeys, key, false)
|
||||
})
|
||||
},
|
||||
|
||||
toogleChildrenEdit (key) {
|
||||
Vue.set(this.editChildrenKeys, key, !this.editChildrenKeys[key])
|
||||
this.$emit('save-service')
|
||||
},
|
||||
|
||||
toogleKeyEdit (key, forceValue) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user