You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/04/22 14:00:58 UTC

[GitHub] [skywalking-rocketbot-ui] Jtrust opened a new pull request #288: Feat:Import and export the configuration file for the dashboard layout

Jtrust opened a new pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288


   Feature [#287](https://github.com/apache/skywalking-rocketbot-ui/issues/287)
   `<img src="https://s1.ax1x.com/2020/04/22/JUlQrd.jpg" alt="JUlQrd.jpg" border="0" />`
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] wu-sheng merged pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
wu-sheng merged pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on a change in pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on a change in pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#discussion_r433334376



##########
File path: src/views/components/dashboard/tool-bar-btns.vue
##########
@@ -0,0 +1,104 @@
+<template>
+  <div class="flex-h">
+    <div class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: rocketGlobal.edit ? 'view' : 'edit' }">
+        <svg
+          class="icon lg vm cp rk-btn ghost"
+          :style="`color:${!rocketGlobal.edit ? '' : '#ffc107'}`"
+          @click="handleSetEdit"
+        >
+          <use :xlink:href="!rocketGlobal.edit ? '#lock' : '#lock-open'"></use>
+        </svg>
+      </span>
+    </div>
+    <div v-if="rocketGlobal.edit" class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: 'import' }">
+        <input id="tool-bar-file" type="file" name="file" title="" accept=".json" @change="importData"/>
+        <label class="rk-btn ghost input-label" for="tool-bar-file">
+          <svg class="icon lg vm cp " :style="`color: #ffc107; marginTop: 0px`">
+            <use :xlink:href="'#folder_open'"></use>
+          </svg> </label
+      ></span>
+    </div>
+    <div v-if="rocketGlobal.edit" class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: 'export' }">
+        <svg class="icon lg vm cp rk-btn ghost" :style="`color: #ffc107`" @click="exportData">
+          <use :xlink:href="'#save_alt'"></use></svg
+      ></span>
+    </div>
+
+    <div class="rk-dashboard-bar-btn">
+      <svg class="icon lg vm cp rk-btn ghost" @click="handleOption">
+        <use xlink:href="#retry"></use>
+      </svg>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+  import { Vue, Component, Prop } from 'vue-property-decorator';
+  import { Action, Mutation } from 'vuex-class';
+  import { readFile } from '@/utils/readFile';
+  import { saveFile } from '@/utils/saveFile';
+  @Component({})
+  export default class ToolBarBtns extends Vue {
+    @Prop() private compType!: any;
+    @Prop() private rocketGlobal!: any;
+    @Prop() private rocketComps!: any;
+    @Prop() private durationTime!: any;
+    @Prop() private rocketOption: any;
+    @Mutation('SET_COMPS_TREE') private SET_COMPS_TREE: any;
+    @Action('SET_EDIT') private SET_EDIT: any;
+    @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
+
+    private handleOption() {
+      return this.MIXHANDLE_GET_OPTION({
+        compType: this.compType,
+        duration: this.durationTime,
+        keywordServiceName: this.rocketOption.keywordService,
+      });
+    }
+    private handleSetEdit() {
+      this.SET_EDIT(!this.rocketGlobal.edit);
+    }
+    private async importData(event: any) {
+      try {
+        const data: any = await readFile(event);
+        if (!Array.isArray(data)) {
+          throw new Error();
+        }
+        const { children, name, query, type } = data[0];
+        if (children && name && query && type) {
+          this.SET_COMPS_TREE(data);

Review comment:
       Yeah, that's better




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on a change in pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on a change in pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#discussion_r433099047



##########
File path: src/views/components/dashboard/tool-bar-btns.vue
##########
@@ -0,0 +1,104 @@
+<template>
+  <div class="flex-h">
+    <div class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: rocketGlobal.edit ? 'view' : 'edit' }">
+        <svg
+          class="icon lg vm cp rk-btn ghost"
+          :style="`color:${!rocketGlobal.edit ? '' : '#ffc107'}`"
+          @click="handleSetEdit"
+        >
+          <use :xlink:href="!rocketGlobal.edit ? '#lock' : '#lock-open'"></use>
+        </svg>
+      </span>
+    </div>
+    <div v-if="rocketGlobal.edit" class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: 'import' }">
+        <input id="tool-bar-file" type="file" name="file" title="" accept=".json" @change="importData"/>
+        <label class="rk-btn ghost input-label" for="tool-bar-file">
+          <svg class="icon lg vm cp " :style="`color: #ffc107; marginTop: 0px`">
+            <use :xlink:href="'#folder_open'"></use>
+          </svg> </label
+      ></span>
+    </div>
+    <div v-if="rocketGlobal.edit" class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: 'export' }">
+        <svg class="icon lg vm cp rk-btn ghost" :style="`color: #ffc107`" @click="exportData">
+          <use :xlink:href="'#save_alt'"></use></svg
+      ></span>
+    </div>
+
+    <div class="rk-dashboard-bar-btn">
+      <svg class="icon lg vm cp rk-btn ghost" @click="handleOption">
+        <use xlink:href="#retry"></use>
+      </svg>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+  import { Vue, Component, Prop } from 'vue-property-decorator';
+  import { Action, Mutation } from 'vuex-class';
+  import { readFile } from '@/utils/readFile';
+  import { saveFile } from '@/utils/saveFile';
+  @Component({})
+  export default class ToolBarBtns extends Vue {
+    @Prop() private compType!: any;
+    @Prop() private rocketGlobal!: any;
+    @Prop() private rocketComps!: any;
+    @Prop() private durationTime!: any;
+    @Prop() private rocketOption: any;
+    @Mutation('SET_COMPS_TREE') private SET_COMPS_TREE: any;
+    @Action('SET_EDIT') private SET_EDIT: any;
+    @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
+
+    private handleOption() {
+      return this.MIXHANDLE_GET_OPTION({
+        compType: this.compType,
+        duration: this.durationTime,
+        keywordServiceName: this.rocketOption.keywordService,
+      });
+    }
+    private handleSetEdit() {
+      this.SET_EDIT(!this.rocketGlobal.edit);
+    }
+    private async importData(event: any) {
+      try {
+        const data: any = await readFile(event);
+        if (!Array.isArray(data)) {
+          throw new Error();
+        }
+        const { children, name, query, type } = data[0];
+        if (children && name && query && type) {
+          this.SET_COMPS_TREE(data);

Review comment:
       I think the imported data should be added to the whole tree instead of completely replacing the data.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on issue #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on issue #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-618291506


   Thanks for working on this. Could you update the icon style? Now the icons don't look neat enough.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-619555531


   > Could you take a more detailed screenshot?
   
   ok


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] wu-sheng commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-637917790


   @Fine0830 Once the two more import/export checked, the feature is ready, right?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-636676911


   @Jtrust I found two problems about this pr. 
   
   1.Data import failed
   ![WechatIMG40](https://user-images.githubusercontent.com/20871783/83387869-0cdde980-a420-11ea-928a-da872060226a.jpeg)
   
   2. tool bar style
   ![WechatIMG44](https://user-images.githubusercontent.com/20871783/83387879-110a0700-a420-11ea-84e1-e4a92470ff31.jpeg)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-638089500


   Now, the pr is done. @wu-sheng @Jtrust 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-637938442


   It is okay for us to finish import/export data before this Friday. cc: @Jtrust 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-636695121


   @Jtrust  There are three levels `importData`. I think three levels of data import should correspond to different data levels and structures.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on a change in pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on a change in pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#discussion_r433099047



##########
File path: src/views/components/dashboard/tool-bar-btns.vue
##########
@@ -0,0 +1,104 @@
+<template>
+  <div class="flex-h">
+    <div class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: rocketGlobal.edit ? 'view' : 'edit' }">
+        <svg
+          class="icon lg vm cp rk-btn ghost"
+          :style="`color:${!rocketGlobal.edit ? '' : '#ffc107'}`"
+          @click="handleSetEdit"
+        >
+          <use :xlink:href="!rocketGlobal.edit ? '#lock' : '#lock-open'"></use>
+        </svg>
+      </span>
+    </div>
+    <div v-if="rocketGlobal.edit" class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: 'import' }">
+        <input id="tool-bar-file" type="file" name="file" title="" accept=".json" @change="importData"/>
+        <label class="rk-btn ghost input-label" for="tool-bar-file">
+          <svg class="icon lg vm cp " :style="`color: #ffc107; marginTop: 0px`">
+            <use :xlink:href="'#folder_open'"></use>
+          </svg> </label
+      ></span>
+    </div>
+    <div v-if="rocketGlobal.edit" class="rk-dashboard-bar-btn">
+      <span v-tooltip:bottom="{ content: 'export' }">
+        <svg class="icon lg vm cp rk-btn ghost" :style="`color: #ffc107`" @click="exportData">
+          <use :xlink:href="'#save_alt'"></use></svg
+      ></span>
+    </div>
+
+    <div class="rk-dashboard-bar-btn">
+      <svg class="icon lg vm cp rk-btn ghost" @click="handleOption">
+        <use xlink:href="#retry"></use>
+      </svg>
+    </div>
+  </div>
+</template>
+
+<script lang="ts">
+  import { Vue, Component, Prop } from 'vue-property-decorator';
+  import { Action, Mutation } from 'vuex-class';
+  import { readFile } from '@/utils/readFile';
+  import { saveFile } from '@/utils/saveFile';
+  @Component({})
+  export default class ToolBarBtns extends Vue {
+    @Prop() private compType!: any;
+    @Prop() private rocketGlobal!: any;
+    @Prop() private rocketComps!: any;
+    @Prop() private durationTime!: any;
+    @Prop() private rocketOption: any;
+    @Mutation('SET_COMPS_TREE') private SET_COMPS_TREE: any;
+    @Action('SET_EDIT') private SET_EDIT: any;
+    @Action('MIXHANDLE_GET_OPTION') private MIXHANDLE_GET_OPTION: any;
+
+    private handleOption() {
+      return this.MIXHANDLE_GET_OPTION({
+        compType: this.compType,
+        duration: this.durationTime,
+        keywordServiceName: this.rocketOption.keywordService,
+      });
+    }
+    private handleSetEdit() {
+      this.SET_EDIT(!this.rocketGlobal.edit);
+    }
+    private async importData(event: any) {
+      try {
+        const data: any = await readFile(event);
+        if (!Array.isArray(data)) {
+          throw new Error();
+        }
+        const { children, name, query, type } = data[0];
+        if (children && name && query && type) {
+          this.SET_COMPS_TREE(data);

Review comment:
       I think the imported data should be added to the whole `tree` instead of completely replacing the data.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] wu-sheng commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-637921481


   OK, let's make sure this could be ready before the weekend. I plan to use this to set up all native dashboard format this weekend, thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] wu-sheng commented on issue #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-617798538


   I prefer dashboard level import/export to be more flexible


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-636953983


   > @Jtrust I found two problems about this pr.
   > 
   > 1.Data import failed
   > ![WechatIMG40](https://user-images.githubusercontent.com/20871783/83387869-0cdde980-a420-11ea-928a-da872060226a.jpeg)
   > 
   > 1. tool bar style
   >    ![WechatIMG44](https://user-images.githubusercontent.com/20871783/83387879-110a0700-a420-11ea-84e1-e4a92470ff31.jpeg)
   
   Sorry, I didn't take into account the change of data attributes and the `metric` group


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-638094384


   > One conflict, please resolve it. @Fine0830
   
   Done


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust edited a comment on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust edited a comment on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-636953983


   > @Jtrust I found two problems about this pr.
   > 
   > 1.Data import failed
   > ![WechatIMG40](https://user-images.githubusercontent.com/20871783/83387869-0cdde980-a420-11ea-928a-da872060226a.jpeg)
   > 
   > 2. tool bar style
   >    ![WechatIMG44](https://user-images.githubusercontent.com/20871783/83387879-110a0700-a420-11ea-84e1-e4a92470ff31.jpeg)
   
   Sorry, I didn't take into account the change of data attributes and the `metric` group


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] wu-sheng commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-638090409


   OK, let's merge this. I will be OOO until Sunday, so, all my local manual tests will start there too.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on issue #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on issue #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-617829775


   > I prefer dashboard level import/export to be more flexible
   
   This is a good direction and I'm trying to get some ideas


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-637366853


   @Jtrust There is no problem with import data validation. The topology instance and topology endpoint also need to support import/export data. You need to add them.
   ![image](https://user-images.githubusercontent.com/20871783/83495716-aa055480-a4ea-11ea-84ed-3f33aab81dfb.png)
   ![image](https://user-images.githubusercontent.com/20871783/83495750-b5f11680-a4ea-11ea-8ace-e66c2ec6c876.png)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on issue #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on issue #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-618294328


   Could you take a more detailed screenshot?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust removed a comment on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust removed a comment on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-619554600


   > Could you take a more detailed screenshot?
   
   ok


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-619552152


   > I prefer dashboard level import/export to be more flexible
   
   ![pic](https://raw.githubusercontent.com/Jtrust/images/master/img/20200426213312.png)
   how about this as shown in the picture?  When importing data, if the name is the same, replace it, or add a new one


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on a change in pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on a change in pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#discussion_r413659335



##########
File path: src/views/components/dashboard/tool-group.vue
##########
@@ -101,6 +115,31 @@ limitations under the License. -->
       this.handleHide();
       this.template = false;
     }
+    private exportLayoutData() {
+      const data = JSON.stringify(this.rocketComps.tree);
+      const tagA = document.createElement('a');
+      tagA.download = 'dashboard.json';
+      tagA.style.display = 'none';
+      let blob = new Blob([data]);
+      tagA.href = URL.createObjectURL(blob);
+      document.body.appendChild(tagA);
+      tagA.click();
+      document.body.removeChild(tagA);
+    }
+    private importLayoutData() {
+      let obj: any = document.getElementById('file');

Review comment:
       `let` should be `const`. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-637920204


   > @Fine0830 Once the two more import/export checked, the feature is ready, right?
   
   Not yet. There are still problems to be solved.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-638135600


   > Now, the pr is done. @wu-sheng @Jtrust
   
   I'm really sorry that I couldn't deal with the problems left over from last night because I was at work during the day


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] wu-sheng commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-638090661


   One conflict, please resolve it. @Fine0830 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-619550403


   > Thanks for working on this. Could you update the icon style? Now the icons don't look neat enough. You use` js` native API to implement functions. Does `Vue` have corresponding methods to replace it?
   
   Thank you for your Suggestions for improvement. Icon style will be updated in next PR. I guess you're worried about browser reflow. It does have this effect. On the other hand, `appendChild/removeChild` is for firefox compatibility.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Fine0830 edited a comment on issue #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Fine0830 edited a comment on issue #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-618291506


   Thanks for working on this. Could you update the icon style? Now the icons don't look neat enough. You use` js` native API to implement functions. Does `Vue` have corresponding methods to replace it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust commented on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust commented on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-619554600


   > Could you take a more detailed screenshot?
   
   ok


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-rocketbot-ui] Jtrust removed a comment on pull request #288: Feat:Import and export the configuration file for the dashboard layout

Posted by GitBox <gi...@apache.org>.
Jtrust removed a comment on pull request #288:
URL: https://github.com/apache/skywalking-rocketbot-ui/pull/288#issuecomment-638135600


   > Now, the pr is done. @wu-sheng @Jtrust
   
   I'm really sorry that I couldn't deal with the problems left over from last night because I was at work during the day


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org