QF and added dockerfile
This commit is contained in:
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM node:16
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN npm install && npm run build
|
||||
|
||||
FROM nginx:latest-alpine
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY --from=0 /app/dist .
|
||||
ENTRYPOINT [ "start-nginx.sh" ]
|
||||
@@ -56,7 +56,9 @@
|
||||
<v-card-actions>
|
||||
<v-row>
|
||||
<v-col cols="6">
|
||||
<v-btn block class="primary" @click="details = true">Szczegóły</v-btn>
|
||||
<v-btn block class="primary" @click="details = true"
|
||||
>Szczegóły</v-btn
|
||||
>
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<v-btn block class="error" @click="deleteCity()">Usuń</v-btn>
|
||||
@@ -65,27 +67,33 @@
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
<v-skeleton-loader type="card" v-else></v-skeleton-loader>
|
||||
<Details v-model="details" :city="city" :wdata="data" v-if="city && data"></Details>
|
||||
<Details
|
||||
v-model="details"
|
||||
:city="city"
|
||||
:wdata="data"
|
||||
v-if="city && data"
|
||||
></Details>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import Details from '@/components/Details.vue';
|
||||
import Details from "@/components/Details.vue";
|
||||
import axios from "axios";
|
||||
const moment = require("moment");
|
||||
const Config = require("@/config.json");
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
Details,
|
||||
}
|
||||
},
|
||||
})
|
||||
export default class City extends Vue {
|
||||
@Prop({ required: true }) private readonly city!: any;
|
||||
|
||||
private created() {
|
||||
this.getData();
|
||||
//setInterval(this.getData, 1000 * 60);
|
||||
setInterval(this.getData, 1000 * 60);
|
||||
}
|
||||
|
||||
private getData() {
|
||||
@@ -103,7 +111,10 @@ export default class City extends Vue {
|
||||
this.$data.data = res.data;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
this.$store.dispatch(
|
||||
"errorMessage",
|
||||
"Błąd " + e.status.code + " przy pobieraniu danych!"
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -112,7 +123,7 @@ export default class City extends Vue {
|
||||
}
|
||||
|
||||
private deleteCity() {
|
||||
this.$emit('delete');
|
||||
this.$emit("delete");
|
||||
}
|
||||
|
||||
private data() {
|
||||
|
||||
@@ -96,7 +96,6 @@ export default class NewCity extends Vue {
|
||||
},
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res.data);
|
||||
this.$data.items = res.data;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user