Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/TwigSlot/twig-client
Browse files Browse the repository at this point in the history
  • Loading branch information
tch1001 committed Oct 8, 2022
2 parents 162d4d5 + 7525c43 commit ac08783
Show file tree
Hide file tree
Showing 9 changed files with 652 additions and 38 deletions.
8 changes: 4 additions & 4 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_ORY_URL=https://twig.tchlabs.net/kratos
VITE_AUTH_URL=https://twig.tchlabs.net/auth
VITE_API_URL=https://twig.tchlabs.net/api
VITE_AUTOFILL_URL=https://twig.tchlabs.net/autofill
VITE_ORY_URL=https://twigslot.com/kratos
VITE_AUTH_URL=https://twigslot.com/auth
VITE_API_URL=https://twigslot.com/api
VITE_AUTOFILL_URL=https://twigslot.com/autofill
6 changes: 4 additions & 2 deletions kubernetes/nginx-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: nginx-container
image: tch1001/twig_client:latest
image: tch1001/twig_client:v3.1.1
ports:
- containerPort: 80
---
Expand All @@ -28,4 +28,6 @@ spec:
ports:
- protocol: TCP
port: 80
targetPort: 80
targetPort: 80
nodePort: 30002
type: LoadBalancer
4 changes: 2 additions & 2 deletions kubernetes/traefik-ingress-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ spec:
entryPoints:
- websecure
routes:
- match: Host(`twig.tchlabs.net`)
- match: Host(`twigslot.com`)
kind: Rule
services:
- name: nginx-service
port: 80
tls:
certResolver: myresolver
domains:
- main: twig.tchlabs.net
- main: twigslot.com
13 changes: 13 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,19 @@ body {
float: left;
}
.deco-panel {
background-color: yellowgreen;
position: fixed;
bottom: 0;
right: 0;
}
.graph-logs-panel {
background-color: yellow;
position: fixed;
bottom: 0;
left: 0;
}
.info-panel-outer {
position: relative;
clear: left;
Expand Down
16 changes: 9 additions & 7 deletions src/components/DataPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@
</div>
<div class="control">
<a target="_blank" :href="data_panel.link">
<button class="button is-dark">Open</button>
<button class="button is-dark info-panel-item">Open</button>
<button @click="hide_description = !hide_description"
class="button info-panel-item">{{ hide_description ? "Show" : "Hide"}} description</button>
</a>
<text class="subtitle is-4 data-panel-item">{{ retrieval_status }}</text>
</div>
<div class="control" :style="{marginTop: '10px'}">
<div class="control" :style="{marginTop: '10px'}" v-if="!hide_description">
<textarea class="textarea" rows="5" cols="50" placeholder="Description" :value="data_panel.description"
@focus="pauseKeyDown" @blur="handleBlur('description', $event)"></textarea>
</div>

<div class="info-panel-inner">
<div></div>
</div>
</div>
</template>

Expand Down Expand Up @@ -62,6 +60,7 @@ import graphData from "../graphData";
const project_id: any = ref("");
const retrieval_status = ref("")
const hide_description = ref(true);
export default defineComponent({
name: "DataPanel",
setup() { },
Expand All @@ -72,7 +71,8 @@ export default defineComponent({
},
data() {
return {
retrieval_status
retrieval_status,
hide_description
}
},
methods: {
Expand Down Expand Up @@ -119,13 +119,15 @@ export default defineComponent({
request_url_post.substring(0, requestLengthLimit) +
(request_url_post.length > requestLengthLimit ? "..." : "");
retrieval_status.value = "Saving..."
this.$emit('add_log', 'DataPanel', 'saving data panel...')
axios.post(request_url_pre + request_url_post).then((response) => {
console.log(response.data);
graphData.nodes.value[`node${response.data.uid}`] = response.data;
if (this.$props.data_panel.uid == response.data.uid) {
this.$emit("updatedDataPanel");
}
retrieval_status.value = "Saved!"
this.$emit('add_log', 'DataPanel', 'saved')
setTimeout(() => {
retrieval_status.value = ""
}, 1000)
Expand Down
Loading

0 comments on commit ac08783

Please sign in to comment.